Title: [91689] trunk
- Revision
- 91689
- Author
- [email protected]
- Date
- 2011-07-25 11:55:58 -0700 (Mon, 25 Jul 2011)
Log Message
REGRESSION (r85964): Improper relayout of some nested positioned elements
https://bugs.webkit.org/show_bug.cgi?id=64286
Reviewed by David Hyatt.
Source/WebCore:
Fixes an issue when traversing up the containing block hierarchy after skipping
relatively positioned inlines.
When processing a positioned element we skip any intermediate inlines to get to
to enclosing block B, but don't use the containing block for B (call this P_B) to
properly continue traversing up the containing block hierarchy. So, B may be
considered again instead of looking at P_B. Hence, we don't set the correct dirty
bits for P_B and may not schedule a relayout with respect to the correct layout node.
Test: fast/block/positioning/relayout-nested-positioned-elements-crash.html
* rendering/RenderObject.h:
(WebCore::RenderObject::markContainingBlocksForLayout):
LayoutTests:
Add test case to ensure we don't regress relayout of nested positioned elements.
* fast/block/positioning/relayout-nested-positioned-elements-expected-crash.txt: Added.
* fast/block/positioning/relayout-nested-positioned-elements-crash.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (91688 => 91689)
--- trunk/LayoutTests/ChangeLog 2011-07-25 18:55:55 UTC (rev 91688)
+++ trunk/LayoutTests/ChangeLog 2011-07-25 18:55:58 UTC (rev 91689)
@@ -1,3 +1,15 @@
+2011-07-25 Daniel Bates <[email protected]>
+
+ REGRESSION (r85964): Improper relayout of some nested positioned elements
+ https://bugs.webkit.org/show_bug.cgi?id=64286
+
+ Reviewed by David Hyatt.
+
+ Add test case to ensure we don't regress relayout of nested positioned elements.
+
+ * fast/block/positioning/relayout-nested-positioned-elements-expected-crash.txt: Added.
+ * fast/block/positioning/relayout-nested-positioned-elements-crash.html: Added.
+
2011-07-25 Adrienne Walker <[email protected]>
[chromium] japanese-rl-selection-clear broken by ICU roll
Added: trunk/LayoutTests/fast/block/positioning/relayout-nested-positioned-elements-crash.html (0 => 91689)
--- trunk/LayoutTests/fast/block/positioning/relayout-nested-positioned-elements-crash.html (rev 0)
+++ trunk/LayoutTests/fast/block/positioning/relayout-nested-positioned-elements-crash.html 2011-07-25 18:55:58 UTC (rev 91689)
@@ -0,0 +1,27 @@
+<html>
+<head>
+<title>Test case for bug 64286</title>
+<script>
+if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+</script>
+</head>
+<body>
+<p>This tests that we don't cause an assertion failure on relayout of nested positioned elements. This test PASSED if we don't cause an assertion failure.</p>
+<div style="position:absolute">
+ <span style="position:relative">
+ PASS
+ <div style="position:absolute">
+ <input id="hideMe"/>
+ </div>
+ </span>
+</div>
+<script>
+window.setTimeout(runTest, 0); // For some reason we need the setTimeout() for this test to work.
+function runTest()
+{
+ document.getElementById("hideMe").style.display = "none";
+}
+</script>
+</body>
+</html>
Added: trunk/LayoutTests/fast/block/positioning/relayout-nested-positioned-elements-expected-crash.txt (0 => 91689)
--- trunk/LayoutTests/fast/block/positioning/relayout-nested-positioned-elements-expected-crash.txt (rev 0)
+++ trunk/LayoutTests/fast/block/positioning/relayout-nested-positioned-elements-expected-crash.txt 2011-07-25 18:55:58 UTC (rev 91689)
@@ -0,0 +1,3 @@
+This tests that we don't cause an assertion failure on relayout of nested positioned elements. This test PASSED if we don't cause an assertion failure.
+
+PASS
Modified: trunk/Source/WebCore/ChangeLog (91688 => 91689)
--- trunk/Source/WebCore/ChangeLog 2011-07-25 18:55:55 UTC (rev 91688)
+++ trunk/Source/WebCore/ChangeLog 2011-07-25 18:55:58 UTC (rev 91689)
@@ -1,3 +1,24 @@
+2011-07-25 Daniel Bates <[email protected]>
+
+ REGRESSION (r85964): Improper relayout of some nested positioned elements
+ https://bugs.webkit.org/show_bug.cgi?id=64286
+
+ Reviewed by David Hyatt.
+
+ Fixes an issue when traversing up the containing block hierarchy after skipping
+ relatively positioned inlines.
+
+ When processing a positioned element we skip any intermediate inlines to get to
+ to enclosing block B, but don't use the containing block for B (call this P_B) to
+ properly continue traversing up the containing block hierarchy. So, B may be
+ considered again instead of looking at P_B. Hence, we don't set the correct dirty
+ bits for P_B and may not schedule a relayout with respect to the correct layout node.
+
+ Test: fast/block/positioning/relayout-nested-positioned-elements-crash.html
+
+ * rendering/RenderObject.h:
+ (WebCore::RenderObject::markContainingBlocksForLayout):
+
2011-07-25 Arno Renevier <[email protected]>
removes last ENABLE(DRAG_SUPPORT) gtk check
Modified: trunk/Source/WebCore/rendering/RenderObject.h (91688 => 91689)
--- trunk/Source/WebCore/rendering/RenderObject.h 2011-07-25 18:55:55 UTC (rev 91688)
+++ trunk/Source/WebCore/rendering/RenderObject.h 2011-07-25 18:55:58 UTC (rev 91689)
@@ -1024,10 +1024,13 @@
if (!container && !o->isRenderView())
return;
if (!last->isText() && (last->style()->position() == FixedPosition || last->style()->position() == AbsolutePosition)) {
+ bool willSkipRelativelyPositionedInlines = !o->isRenderBlock();
while (o && !o->isRenderBlock()) // Skip relatively positioned inlines and get to the enclosing RenderBlock.
o = o->container();
if (!o || o->m_posChildNeedsLayout)
return;
+ if (willSkipRelativelyPositionedInlines)
+ container = o->container();
o->m_posChildNeedsLayout = true;
simplifiedNormalFlowLayout = true;
ASSERT(!o->isSetNeedsLayoutForbidden());
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes