mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 646799. Clip the contents of iframes to border-radius. r=roc
This commit is contained in:
parent
0f133018de
commit
0b7ef49a81
@ -419,10 +419,17 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
childItems.AppendToTop(layerItem);
|
||||
}
|
||||
|
||||
nsDisplayList list;
|
||||
// Clip children to the child root frame's rectangle
|
||||
rv = aLists.Content()->AppendNewToTop(
|
||||
rv = list.AppendNewToTop(
|
||||
new (aBuilder) nsDisplayClip(aBuilder, this, &childItems,
|
||||
subdocBoundsInParentUnits));
|
||||
|
||||
if (mIsInline) {
|
||||
WrapReplacedContentForBorderRadius(aBuilder, &list, aLists);
|
||||
} else {
|
||||
aLists.Content()->AppendToTop(&list);
|
||||
}
|
||||
}
|
||||
// delete childItems in case of OOM
|
||||
childItems.DeleteAll();
|
||||
|
7
layout/reftests/border-radius/iframe-1-ref.html
Normal file
7
layout/reftests/border-radius/iframe-1-ref.html
Normal file
@ -0,0 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<iframe style="position: absolute; left: 0px; top: 0px; width: 300px; height: 150px; border: none; border-radius: 50px; background: green;" src="data:text/html,<body>"></iframe>
|
||||
<div style="position: absolute; left: 10px; top: 0px; width: 280px; height: 150px; background: red;"></div>
|
||||
<div style="position: absolute; left: 0px; top: 10px; width: 300px; height: 130px; background: red;"></div>
|
||||
</body>
|
||||
</html>
|
7
layout/reftests/border-radius/iframe-1.html
Normal file
7
layout/reftests/border-radius/iframe-1.html
Normal file
@ -0,0 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<iframe style="position: absolute; left: 0px; top: 0px; width: 300px; height: 150px; border: none; border-radius: 50px; background: green;" src="data:text/html,<body bgcolor=green>"></iframe>
|
||||
<div style="position: absolute; left: 10px; top: 0px; width: 280px; height: 150px; background: red;"></div>
|
||||
<div style="position: absolute; left: 0px; top: 10px; width: 300px; height: 130px; background: red;"></div>
|
||||
</body>
|
||||
</html>
|
@ -77,3 +77,5 @@ random-if(winWidget) HTTP(..) == corner-joins-2.xhtml corner-joins-2-ref.xhtml
|
||||
== scroll-1.html scroll-1-ref.html # see bug 602892
|
||||
|
||||
== zero-radius-clip-1.html zero-radius-clip-ref.html
|
||||
|
||||
== iframe-1.html iframe-1-ref.html
|
||||
|
Loading…
Reference in New Issue
Block a user