Modified: trunk/LayoutTests/ChangeLog (95566 => 95567)
--- trunk/LayoutTests/ChangeLog 2011-09-20 20:21:25 UTC (rev 95566)
+++ trunk/LayoutTests/ChangeLog 2011-09-20 20:26:13 UTC (rev 95567)
@@ -1,3 +1,16 @@
+2011-09-20 David Hyatt <[email protected]>
+
+ https://bugs.webkit.org/show_bug.cgi?id=68314
+
+ Added some more clipping tests for overflow to make sure the right things happen
+ when border-radius is specified.
+
+ Reviewed by Simon Fraser and Darin Adler.
+
+ * fast/clip/overflow-border-radius-fixed-position.html: Added.
+ * platform/mac/fast/clip/overflow-border-radius-fixed-position-expected.png: Added.
+ * platform/mac/fast/clip/overflow-border-radius-fixed-position-expected.txt: Added.
+
2011-09-20 Dan Bernstein <[email protected]>
MathML renderers do not override RenderObject::renderName()
Added: trunk/LayoutTests/fast/clip/overflow-border-radius-fixed-position.html (0 => 95567)
--- trunk/LayoutTests/fast/clip/overflow-border-radius-fixed-position.html (rev 0)
+++ trunk/LayoutTests/fast/clip/overflow-border-radius-fixed-position.html 2011-09-20 20:26:13 UTC (rev 95567)
@@ -0,0 +1,24 @@
+<html>
+<body>
+The div below should be rounded. You should see a rounded green square or the test has failed.
+
+<div style="width:100px;height:100px;position:fixed;overflow:hidden;border-radius:30%">
+<div style="width:100px;height:100px;position:relative;background-color:green"></div>
+</div>
+
+<p style="margin-top: 130px;">
+This div should not be rounded. You should see a solid green square or the test has failed.
+
+<div style="width:100px;height:100px;overflow:hidden;border-radius:30%">
+<div style="width:100px;height:100px;position:fixed;background-color:green"></div>
+</div>
+
+<p>
+This div should be rounded. You should see a rounded green square or the test has failed.
+
+<div style="width:100px;height:100px;overflow:hidden;position:relative;border-radius:30%">
+<div style="width:100px;height:100px;overflow:hidden;border-radius:24px">
+<div style="width:100px;height:100px;position:absolute;background-color:green"></div>
+</div>
+</div>
+</div>
\ No newline at end of file
Added: trunk/LayoutTests/platform/mac/fast/clip/overflow-border-radius-fixed-position-expected.txt (0 => 95567)
--- trunk/LayoutTests/platform/mac/fast/clip/overflow-border-radius-fixed-position-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/clip/overflow-border-radius-fixed-position-expected.txt 2011-09-20 20:26:13 UTC (rev 95567)
@@ -0,0 +1,29 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock (anonymous) at (0,0) size 784x18
+ RenderText {#text} at (0,0) size 603x18
+ text run at (0,0) width 603: "The div below should be rounded. You should see a rounded green square or the test has failed."
+ RenderText {#text} at (0,0) size 0x0
+ RenderBlock {P} at (0,148) size 784x18
+ RenderText {#text} at (0,0) size 565x18
+ text run at (0,0) width 565: "This div should not be rounded. You should see a solid green square or the test has failed."
+ RenderBlock {P} at (0,298) size 784x18
+ RenderText {#text} at (0,0) size 563x18
+ text run at (0,0) width 563: "This div should be rounded. You should see a rounded green square or the test has failed."
+layer at (8,190) size 100x100
+ RenderBlock {DIV} at (0,182) size 100x100
+layer at (8,26) size 100x100
+ RenderBlock (positioned) {DIV} at (8,26) size 100x100
+layer at (8,26) size 100x100
+ RenderBlock (relative positioned) {DIV} at (0,0) size 100x100 [bgcolor=#008000]
+layer at (8,190) size 100x100
+ RenderBlock (positioned) {DIV} at (8,190) size 100x100 [bgcolor=#008000]
+layer at (8,340) size 100x100
+ RenderBlock (relative positioned) {DIV} at (0,332) size 100x100
+layer at (8,340) size 100x100
+ RenderBlock {DIV} at (0,0) size 100x100
+layer at (8,340) size 100x100
+ RenderBlock (positioned) {DIV} at (0,0) size 100x100 [bgcolor=#008000]
Modified: trunk/Source/WebCore/ChangeLog (95566 => 95567)
--- trunk/Source/WebCore/ChangeLog 2011-09-20 20:21:25 UTC (rev 95566)
+++ trunk/Source/WebCore/ChangeLog 2011-09-20 20:26:13 UTC (rev 95567)
@@ -1,3 +1,19 @@
+2011-09-20 David Hyatt <[email protected]>
+
+ https://bugs.webkit.org/show_bug.cgi?id=68314
+
+ Make sure that the containing block loop when clipping to border-radius
+ terminates by checking if you hit the RenderView. Null checking isn't sufficient
+ for stupid historical reasons that should be fixed (i.e., the RenderView returns itself
+ as its own containing block, even though this should just be changed).
+
+ Reviewed by Simon Fraser and Darin Adler.
+
+ Added new test in fast/clip.
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::inContainingBlockChain):
+
2011-09-20 Dan Bernstein <[email protected]>
MathML renderers do not override RenderObject::renderName()
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (95566 => 95567)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2011-09-20 20:21:25 UTC (rev 95566)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2011-09-20 20:26:13 UTC (rev 95567)
@@ -2559,7 +2559,8 @@
if (startLayer == endLayer)
return true;
- for (RenderBlock* currentBlock = startLayer->renderer()->containingBlock(); currentBlock; currentBlock = currentBlock->containingBlock()) {
+ RenderView* view = startLayer->renderer()->view();
+ for (RenderBlock* currentBlock = startLayer->renderer()->containingBlock(); currentBlock && currentBlock != view; currentBlock = currentBlock->containingBlock()) {
if (currentBlock->layer() == endLayer)
return true;
}