Skip to content

Commit

Permalink
Bug 846547 - Remove unused arg "aElement" from SVGContentUtils::GetVi…
Browse files Browse the repository at this point in the history
…ewboxTransform() r=dholbert
  • Loading branch information
Flavio Martins committed Mar 3, 2013
1 parent 87ee6a7 commit 3afaa62
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 19 deletions.
9 changes: 3 additions & 6 deletions content/svg/content/src/SVGContentUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,22 +273,19 @@ SVGContentUtils::AngleBisect(float a1, float a2)
}

gfxMatrix
SVGContentUtils::GetViewBoxTransform(const nsSVGElement* aElement,
float aViewportWidth, float aViewportHeight,
SVGContentUtils::GetViewBoxTransform(float aViewportWidth, float aViewportHeight,
float aViewboxX, float aViewboxY,
float aViewboxWidth, float aViewboxHeight,
const SVGAnimatedPreserveAspectRatio &aPreserveAspectRatio)
{
return GetViewBoxTransform(aElement,
aViewportWidth, aViewportHeight,
return GetViewBoxTransform(aViewportWidth, aViewportHeight,
aViewboxX, aViewboxY,
aViewboxWidth, aViewboxHeight,
aPreserveAspectRatio.GetAnimValue());
}

gfxMatrix
SVGContentUtils::GetViewBoxTransform(const nsSVGElement* aElement,
float aViewportWidth, float aViewportHeight,
SVGContentUtils::GetViewBoxTransform(float aViewportWidth, float aViewportHeight,
float aViewboxX, float aViewboxY,
float aViewboxWidth, float aViewboxHeight,
const SVGPreserveAspectRatio &aPreserveAspectRatio)
Expand Down
6 changes: 2 additions & 4 deletions content/svg/content/src/SVGContentUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,13 @@ class SVGContentUtils
/* Generate a viewbox to viewport tranformation matrix */

static gfxMatrix
GetViewBoxTransform(const nsSVGElement* aElement,
float aViewportWidth, float aViewportHeight,
GetViewBoxTransform(float aViewportWidth, float aViewportHeight,
float aViewboxX, float aViewboxY,
float aViewboxWidth, float aViewboxHeight,
const SVGAnimatedPreserveAspectRatio &aPreserveAspectRatio);

static gfxMatrix
GetViewBoxTransform(const nsSVGElement* aElement,
float aViewportWidth, float aViewportHeight,
GetViewBoxTransform(float aViewportWidth, float aViewportHeight,
float aViewboxX, float aViewboxY,
float aViewboxWidth, float aViewboxHeight,
const SVGPreserveAspectRatio &aPreserveAspectRatio);
Expand Down
3 changes: 1 addition & 2 deletions content/svg/content/src/SVGMarkerElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,7 @@ SVGMarkerElement::GetViewBoxTransform()
"Rendering should be disabled");

gfxMatrix viewBoxTM =
SVGContentUtils::GetViewBoxTransform(this,
viewportWidth, viewportHeight,
SVGContentUtils::GetViewBoxTransform(viewportWidth, viewportHeight,
viewbox.x, viewbox.y,
viewbox.width, viewbox.height,
mPreserveAspectRatio);
Expand Down
3 changes: 1 addition & 2 deletions content/svg/content/src/SVGSVGElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -667,8 +667,7 @@ SVGSVGElement::GetViewBoxTransform() const
return gfxMatrix(0.0, 0.0, 0.0, 0.0, 0.0, 0.0); // singular
}

return SVGContentUtils::GetViewBoxTransform(this,
viewportWidth, viewportHeight,
return SVGContentUtils::GetViewBoxTransform(viewportWidth, viewportHeight,
viewBox.x, viewBox.y,
viewBox.width, viewBox.height,
GetPreserveAspectRatioWithOverride());
Expand Down
3 changes: 1 addition & 2 deletions content/svg/content/src/nsSVGFilters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5648,8 +5648,7 @@ nsSVGFEImageElement::Filter(nsSVGFilterInstance *instance,
const gfxRect& filterSubregion = aTarget->mFilterPrimitiveSubregion;

gfxMatrix viewBoxTM =
SVGContentUtils::GetViewBoxTransform(this,
filterSubregion.Width(), filterSubregion.Height(),
SVGContentUtils::GetViewBoxTransform(filterSubregion.Width(), filterSubregion.Height(),
0,0, nativeWidth, nativeHeight,
mPreserveAspectRatio);

Expand Down
3 changes: 1 addition & 2 deletions layout/svg/nsSVGImageFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,7 @@ nsSVGImageFrame::GetRasterImageTransform(int32_t aNativeWidth,
element->GetAnimatedLengthValues(&x, &y, &width, &height, nullptr);

gfxMatrix viewBoxTM =
SVGContentUtils::GetViewBoxTransform(element,
width, height,
SVGContentUtils::GetViewBoxTransform(width, height,
0, 0, aNativeWidth, aNativeHeight,
element->mPreserveAspectRatio);

Expand Down
1 change: 0 additions & 1 deletion layout/svg/nsSVGPatternFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,6 @@ nsSVGPatternFrame::ConstructCTM(const nsSVGViewBox& aViewBox,
}

gfxMatrix tm = SVGContentUtils::GetViewBoxTransform(
static_cast<SVGPatternElement*>(mContent),
viewportWidth, viewportHeight,
viewBoxRect.x, viewBoxRect.y,
viewBoxRect.width, viewBoxRect.height,
Expand Down

0 comments on commit 3afaa62

Please sign in to comment.