Title: [205721] releases/WebKitGTK/webkit-2.14
Revision
205721
Author
[email protected]
Date
2016-09-09 02:21:04 -0700 (Fri, 09 Sep 2016)

Log Message

Merge r205479 - ASSERTION FAILED: !currBox->needsLayout() in WebCore::RenderBlock::checkPositionedObjectsNeedLayout
https://bugs.webkit.org/show_bug.cgi?id=120291
<rdar://problem/27683456>

Reviewed by David Hyatt.

Source/WebCore:

This patch ensures that we always set the 'positioned child needs layout' bit on the containing block
when a new positioned descendant gets inserted. It fixes cases for simplified layout when
we ended up not laying out the descendant element.

Test: fast/block/positioning/assert-when-positioned-descendant-is-not-getting-laid-out.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::insertPositionedObject):

LayoutTests:

* fast/block/positioning/assert-when-positioned-descendant-is-not-getting-laid-out-expected.txt: Added.
* fast/block/positioning/assert-when-positioned-descendant-is-not-getting-laid-out.html: Added.

Modified Paths

Added Paths

Diff

Modified: releases/WebKitGTK/webkit-2.14/LayoutTests/ChangeLog (205720 => 205721)


--- releases/WebKitGTK/webkit-2.14/LayoutTests/ChangeLog	2016-09-09 09:19:01 UTC (rev 205720)
+++ releases/WebKitGTK/webkit-2.14/LayoutTests/ChangeLog	2016-09-09 09:21:04 UTC (rev 205721)
@@ -1,3 +1,14 @@
+2016-09-06  Zalan Bujtas  <[email protected]>
+
+        ASSERTION FAILED: !currBox->needsLayout() in WebCore::RenderBlock::checkPositionedObjectsNeedLayout
+        https://bugs.webkit.org/show_bug.cgi?id=120291
+        <rdar://problem/27683456>
+
+        Reviewed by David Hyatt.
+
+        * fast/block/positioning/assert-when-positioned-descendant-is-not-getting-laid-out-expected.txt: Added.
+        * fast/block/positioning/assert-when-positioned-descendant-is-not-getting-laid-out.html: Added.
+
 2016-09-03  Chris Dumez  <[email protected]>
 
         Align meta element http-equiv="refresh" parsing with the HTML specification

Added: releases/WebKitGTK/webkit-2.14/LayoutTests/fast/block/positioning/assert-when-positioned-descendant-is-not-getting-laid-out-expected.txt (0 => 205721)


--- releases/WebKitGTK/webkit-2.14/LayoutTests/fast/block/positioning/assert-when-positioned-descendant-is-not-getting-laid-out-expected.txt	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.14/LayoutTests/fast/block/positioning/assert-when-positioned-descendant-is-not-getting-laid-out-expected.txt	2016-09-09 09:21:04 UTC (rev 205721)
@@ -0,0 +1,3 @@
+PASS if no assert in debug.
+
+

Added: releases/WebKitGTK/webkit-2.14/LayoutTests/fast/block/positioning/assert-when-positioned-descendant-is-not-getting-laid-out.html (0 => 205721)


--- releases/WebKitGTK/webkit-2.14/LayoutTests/fast/block/positioning/assert-when-positioned-descendant-is-not-getting-laid-out.html	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.14/LayoutTests/fast/block/positioning/assert-when-positioned-descendant-is-not-getting-laid-out.html	2016-09-09 09:21:04 UTC (rev 205721)
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that we properly layout positioned descendants.</title>
+<script>
+if (window.testRunner)
+    testRunner.dumpAsText();
+
+window._onload_ = function() {
+  document.execCommand('selectAll');
+  document.designMode = 'on';
+}
+</script>
+<style>
+html, caption, tfoot, button {
+    display: inline-flex;
+    position: absolute;
+    flex-direction: row-reverse;
+}
+
+tfoot {
+    position: relative;
+}
+</style>
+</head>
+<body>
+PASS if no assert in debug.
+<table><caption></caption><tfoot><tr><th><button><span></span></button></th></tr></tfoot></table>
+</body>
+</html>

Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog (205720 => 205721)


--- releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog	2016-09-09 09:19:01 UTC (rev 205720)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog	2016-09-09 09:21:04 UTC (rev 205721)
@@ -1,3 +1,20 @@
+2016-09-06  Zalan Bujtas  <[email protected]>
+
+        ASSERTION FAILED: !currBox->needsLayout() in WebCore::RenderBlock::checkPositionedObjectsNeedLayout
+        https://bugs.webkit.org/show_bug.cgi?id=120291
+        <rdar://problem/27683456>
+
+        Reviewed by David Hyatt.
+
+        This patch ensures that we always set the 'positioned child needs layout' bit on the containing block
+        when a new positioned descendant gets inserted. It fixes cases for simplified layout when
+        we ended up not laying out the descendant element. 
+
+        Test: fast/block/positioning/assert-when-positioned-descendant-is-not-getting-laid-out.html
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::insertPositionedObject):
+
 2016-08-31  Filip Pizlo  <[email protected]>
 
         Butterflies should be allocated in Auxiliary MarkedSpace instead of CopiedSpace and we should rewrite as much of the GC as needed to make this not a regression

Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderBlock.cpp (205720 => 205721)


--- releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderBlock.cpp	2016-09-09 09:19:01 UTC (rev 205720)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderBlock.cpp	2016-09-09 09:21:04 UTC (rev 205721)
@@ -2253,7 +2253,9 @@
 
     if (positioned.isRenderFlowThread())
         return;
-
+    // We should turn this bit on only while in layout.
+    ASSERT(posChildNeedsLayout() || view().frameView().isInLayout());
+    setPosChildNeedsLayoutBit(true);
     positionedDescendantsMap().addDescendant(*this, positioned, isRenderView() ? PositionedDescendantsMap::MoveDescendantToEnd::Yes
         : PositionedDescendantsMap::MoveDescendantToEnd::No);
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to