Backout 24de4eda70e2 (bug 530985) for failures in test_bug 450930.xhtml, CLOSED TREE

This commit is contained in:
Wes Kocher 2013-06-27 12:38:33 -07:00
parent a78b6401ba
commit d171c9e074
6 changed files with 0 additions and 65 deletions

View File

@ -6,13 +6,6 @@ text { font: 20px monospace; }
</style>
<g id="g">
<svg id="svg1" x="10" y="10" width="25" height="30"/>
<svg id="svg2" width="1" height="1" overflow="visible">
<rect width="2" height="2" fill="yellow"/>
</svg>
<svg id="svg3" width="1" height="1" overflow="hidden">
<rect width="2" height="2" fill="yellow"/>
</svg>
<text id="text1" x="25" y="25">abc</text>
<text id="text1a" x="85" y="25" stroke="black" stroke-width="4">abc</text>
<rect id="rect1" x="50" y="50" width="50" height="50" fill="green"/>

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -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();

View File

@ -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<SVGSVGElement*>(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()
{

View File

@ -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;

View File

@ -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<SVGSVGElement*>(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)

View File

@ -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;