diff --git a/content/svg/content/test/bounds-helper.svg b/content/svg/content/test/bounds-helper.svg index ea7b8a64352..599918dbf99 100644 --- a/content/svg/content/test/bounds-helper.svg +++ b/content/svg/content/test/bounds-helper.svg @@ -6,13 +6,6 @@ text { font: 20px monospace; } - - - - - - - abc abc diff --git a/content/svg/content/test/test_bounds.html b/content/svg/content/test/test_bounds.html index 38f5ce675ed..a742f4b6890 100644 --- a/content/svg/content/test/test_bounds.html +++ b/content/svg/content/test/test_bounds.html @@ -44,24 +44,6 @@ function runTest() { var doc = $("svg").contentWindow.document; - var svg1Bounds = doc.getElementById("svg1").getBoundingClientRect(); - is(svg1Bounds.left, 10, "svg1.getBoundingClientRect().left"); - is(svg1Bounds.top, 10, "svg1.getBoundingClientRect().top"); - is(svg1Bounds.width, 25, "svg1.getBoundingClientRect().width"); - is(svg1Bounds.height, 30, "svg1.getBoundingClientRect().height"); - - var svg2Bounds = doc.getElementById("svg2").getBoundingClientRect(); - is(svg2Bounds.left, 0, "svg2.getBoundingClientRect().left"); - is(svg2Bounds.top, 0, "svg2.getBoundingClientRect().top"); - is(svg2Bounds.width, 2, "svg2.getBoundingClientRect().width"); - is(svg2Bounds.height, 2, "svg2.getBoundingClientRect().height"); - - var svg3Bounds = doc.getElementById("svg3").getBoundingClientRect(); - is(svg3Bounds.left, 0, "svg3.getBoundingClientRect().left"); - is(svg3Bounds.top, 0, "svg3.getBoundingClientRect().top"); - is(svg3Bounds.width, 1, "svg3.getBoundingClientRect().width"); - is(svg3Bounds.height, 1, "svg3.getBoundingClientRect().height"); - var text1 = doc.getElementById("text1"); var text1Bounds = text1.getBoundingClientRect(); diff --git a/layout/svg/nsSVGInnerSVGFrame.cpp b/layout/svg/nsSVGInnerSVGFrame.cpp index c9e25df18a7..2c8a3c34f2b 100644 --- a/layout/svg/nsSVGInnerSVGFrame.cpp +++ b/layout/svg/nsSVGInnerSVGFrame.cpp @@ -90,25 +90,6 @@ nsSVGInnerSVGFrame::PaintSVG(nsRenderingContext *aContext, return nsSVGInnerSVGFrameBase::PaintSVG(aContext, aDirtyRect); } -NS_IMETHODIMP_(nsRect) -nsSVGInnerSVGFrame::GetCoveredRegion() -{ - float x, y, w, h; - static_cast(mContent)-> - GetAnimatedLengthValues(&x, &y, &w, &h, nullptr); - if (w < 0.0f) w = 0.0f; - if (h < 0.0f) h = 0.0f; - // GetCanvasTM includes the x,y translation - nsRect bounds = nsSVGUtils::ToCanvasBounds(gfxRect(0.0, 0.0, w, h), - GetCanvasTM(FOR_OUTERSVG_TM), - PresContext()); - - if (!StyleDisplay()->IsScrollableOverflow()) { - bounds.UnionRect(bounds, nsSVGUtils::GetCoveredRegion(mFrames)); - } - return bounds; -} - void nsSVGInnerSVGFrame::ReflowSVG() { diff --git a/layout/svg/nsSVGInnerSVGFrame.h b/layout/svg/nsSVGInnerSVGFrame.h index aa91c60d7ef..ee69e878742 100644 --- a/layout/svg/nsSVGInnerSVGFrame.h +++ b/layout/svg/nsSVGInnerSVGFrame.h @@ -52,7 +52,6 @@ public: // nsISVGChildFrame interface: NS_IMETHOD PaintSVG(nsRenderingContext *aContext, const nsIntRect *aDirtyRect) MOZ_OVERRIDE; - NS_IMETHOD_(nsRect) GetCoveredRegion() MOZ_OVERRIDE; virtual void ReflowSVG() MOZ_OVERRIDE; virtual void NotifySVGChanged(uint32_t aFlags) MOZ_OVERRIDE; NS_IMETHOD_(nsIFrame*) GetFrameForPoint(const nsPoint &aPoint) MOZ_OVERRIDE; diff --git a/layout/svg/nsSVGOuterSVGFrame.cpp b/layout/svg/nsSVGOuterSVGFrame.cpp index 22a3407b54b..3b8121539b1 100644 --- a/layout/svg/nsSVGOuterSVGFrame.cpp +++ b/layout/svg/nsSVGOuterSVGFrame.cpp @@ -889,25 +889,6 @@ nsSVGOuterSVGFrame::PaintSVG(nsRenderingContext* aContext, return anonKid->PaintSVG(aContext, aDirtyRect); } -NS_IMETHODIMP_(nsRect) -nsSVGOuterSVGFrame::GetCoveredRegion() -{ - float x, y, w, h; - static_cast(mContent)-> - GetAnimatedLengthValues(&x, &y, &w, &h, nullptr); - if (w < 0.0f) w = 0.0f; - if (h < 0.0f) h = 0.0f; - // GetCanvasTM includes the x,y translation - nsRect bounds = nsSVGUtils::ToCanvasBounds(gfxRect(0.0, 0.0, w, h), - GetCanvasTM(FOR_OUTERSVG_TM), - PresContext()); - - if (!(mIsRootContent || StyleDisplay()->IsScrollableOverflow())) { - bounds.UnionRect(bounds, nsSVGUtils::GetCoveredRegion(mFrames)); - } - return bounds; -} - SVGBBox nsSVGOuterSVGFrame::GetBBoxContribution(const gfxMatrix &aToBBoxUserspace, uint32_t aFlags) diff --git a/layout/svg/nsSVGOuterSVGFrame.h b/layout/svg/nsSVGOuterSVGFrame.h index a42acb7ef6b..b6a188a8caf 100644 --- a/layout/svg/nsSVGOuterSVGFrame.h +++ b/layout/svg/nsSVGOuterSVGFrame.h @@ -111,7 +111,6 @@ public: // nsISVGChildFrame methods: NS_IMETHOD PaintSVG(nsRenderingContext* aContext, const nsIntRect *aDirtyRect) MOZ_OVERRIDE; - NS_IMETHOD_(nsRect) GetCoveredRegion() MOZ_OVERRIDE; virtual SVGBBox GetBBoxContribution(const gfxMatrix &aToBBoxUserspace, uint32_t aFlags) MOZ_OVERRIDE;