Bug 763133 - border-radius not clipping SVG contents. r=bzbarsky

This commit is contained in:
Robert Longson 2012-06-12 11:25:26 +01:00
parent 3b397ad01b
commit 3fd65ea12a
3 changed files with 22 additions and 1 deletions

View File

@ -0,0 +1,13 @@
<html>
<head>
</head>
<body style="background-color: lime;">
<svg width="300" height="300"
style="border-radius: 200px; overflow: hidden; background-color: red; position: absolute;">
<rect width="300" height="300" fill="red"/>
</svg>
<svg width="300" height="300" style="position: absolute;">
<circle cx="150" cy="150" r="155" fill="lime"/>
</svg>
</body>
</html>

View File

@ -23,6 +23,7 @@ include moz-only/reftest.list
include svg-integration/reftest.list
== altGlyph-01.svg altGlyph-01-ref.svg
== border-radius-01.html pass.svg
== cssComment-in-attribute-01.svg cssComment-in-attribute-01-ref.svg
== clip-01.svg pass.svg
== clip-02a.svg clip-02-ref.svg

View File

@ -626,8 +626,15 @@ nsSVGOuterSVGFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
nsresult rv = DisplayBorderBackgroundOutline(aBuilder, aLists);
NS_ENSURE_SUCCESS(rv, rv);
return aLists.Content()->AppendNewToTop(
nsDisplayList replacedContent;
rv = replacedContent.AppendNewToTop(
new (aBuilder) nsDisplaySVG(aBuilder, this));
NS_ENSURE_SUCCESS(rv, rv);
WrapReplacedContentForBorderRadius(aBuilder, &replacedContent, aLists);
return NS_OK;
}
void