Bug 1540408 Part 3 - Rename SVGViewBoxRect to SVGViewBox r=dholbert

This commit is contained in:
longsonr
2019-04-10 05:08:14 +01:00
parent 8eec04afdb
commit 632c5be54b
23 changed files with 140 additions and 130 deletions

View File

@@ -9589,14 +9589,15 @@ static nsRect ComputeSVGReferenceRect(nsIFrame* aFrame,
SVGViewportElement* svgElement = element->GetCtx();
MOZ_ASSERT(svgElement);
if (svgElement && svgElement->HasViewBoxRect()) {
if (svgElement && svgElement->HasViewBox()) {
// If a `viewBox` attribute is specified for the SVG viewport creating
// element:
// 1. The reference box is positioned at the origin of the coordinate
// system established by the `viewBox` attribute.
// 2. The dimension of the reference box is set to the width and height
// values of the `viewBox` attribute.
const SVGViewBoxRect& value = svgElement->GetViewBox()->GetAnimValue();
const SVGViewBox& value =
svgElement->GetAnimatedViewBox()->GetAnimValue();
r = nsRect(nsPresContext::CSSPixelsToAppUnits(value.x),
nsPresContext::CSSPixelsToAppUnits(value.y),
nsPresContext::CSSPixelsToAppUnits(value.width),