Title: [194426] trunk
Revision
194426
Author
[email protected]
Date
2015-12-27 14:56:57 -0800 (Sun, 27 Dec 2015)

Log Message

Should never be reached failure in WebCore::RenderElement::clearLayoutRootIfNeeded
https://bugs.webkit.org/show_bug.cgi?id=151590

Reviewed by Simon Fraser.

We should always set the layoutroot when a new subtree layout is requested (and convert it
to a full layout when needed). It ensures that renderers are detached cleanly even when
they are set as layoutroot.

Source/WebCore:

Test: fast/block/assert-when-layout-root-is-not-cleared.html

* page/FrameView.cpp:
(WebCore::FrameView::scheduleRelayoutOfSubtree):

LayoutTests:

* fast/block/assert-when-layout-root-is-not-cleared-expected.txt: Added.
* fast/block/assert-when-layout-root-is-not-cleared.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (194425 => 194426)


--- trunk/LayoutTests/ChangeLog	2015-12-27 07:21:12 UTC (rev 194425)
+++ trunk/LayoutTests/ChangeLog	2015-12-27 22:56:57 UTC (rev 194426)
@@ -1,3 +1,17 @@
+2015-12-27  Zalan Bujtas  <[email protected]>
+
+        Should never be reached failure in WebCore::RenderElement::clearLayoutRootIfNeeded
+        https://bugs.webkit.org/show_bug.cgi?id=151590
+
+        Reviewed by Simon Fraser.
+
+        We should always set the layoutroot when a new subtree layout is requested (and convert it
+        to a full layout when needed). It ensures that renderers are detached cleanly even when
+        they are set as layoutroot.
+
+        * fast/block/assert-when-layout-root-is-not-cleared-expected.txt: Added.
+        * fast/block/assert-when-layout-root-is-not-cleared.html: Added.
+
 2015-12-25  Zalan Bujtas  <[email protected]>
 
         Subpixel rendering: Add subpixel support for outline.

Added: trunk/LayoutTests/fast/block/assert-when-layout-root-is-not-cleared-expected.txt (0 => 194426)


--- trunk/LayoutTests/fast/block/assert-when-layout-root-is-not-cleared-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/block/assert-when-layout-root-is-not-cleared-expected.txt	2015-12-27 22:56:57 UTC (rev 194426)
@@ -0,0 +1,2 @@
+Pass if no assert in debug.
+foo

Added: trunk/LayoutTests/fast/block/assert-when-layout-root-is-not-cleared.html (0 => 194426)


--- trunk/LayoutTests/fast/block/assert-when-layout-root-is-not-cleared.html	                        (rev 0)
+++ trunk/LayoutTests/fast/block/assert-when-layout-root-is-not-cleared.html	2015-12-27 22:56:57 UTC (rev 194426)
@@ -0,0 +1,19 @@
+<html>
+<head>
+<script>
+if (window.testRunner)
+  testRunner.dumpAsText();
+window._onload_ = function() {
+    document.designMode = 'on';
+    document.execCommand('selectAll');
+    document.execCommand('indent');
+}
+</script>
+<style>
+* {
+    -webkit-appearance: checkbox;
+}
+</style>
+</head>
+<body>Pass if no assert in debug.<div>foo</div></body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (194425 => 194426)


--- trunk/Source/WebCore/ChangeLog	2015-12-27 07:21:12 UTC (rev 194425)
+++ trunk/Source/WebCore/ChangeLog	2015-12-27 22:56:57 UTC (rev 194426)
@@ -1,3 +1,19 @@
+2015-12-27  Zalan Bujtas  <[email protected]>
+
+        Should never be reached failure in WebCore::RenderElement::clearLayoutRootIfNeeded
+        https://bugs.webkit.org/show_bug.cgi?id=151590
+
+        Reviewed by Simon Fraser.
+
+        We should always set the layoutroot when a new subtree layout is requested (and convert it
+        to a full layout when needed). It ensures that renderers are detached cleanly even when
+        they are set as layoutroot.
+
+        Test: fast/block/assert-when-layout-root-is-not-cleared.html
+
+        * page/FrameView.cpp:
+        (WebCore::FrameView::scheduleRelayoutOfSubtree):
+
 2015-12-26  Gyuyoung Kim  <[email protected]>
 
         [CMake] Rearrange new gamepad files with deprecated files

Modified: trunk/Source/WebCore/page/FrameView.cpp (194425 => 194426)


--- trunk/Source/WebCore/page/FrameView.cpp	2015-12-27 07:21:12 UTC (rev 194425)
+++ trunk/Source/WebCore/page/FrameView.cpp	2015-12-27 22:56:57 UTC (rev 194426)
@@ -2654,7 +2654,8 @@
     ASSERT(frame().view() == this);
 
     if (renderView.needsLayout()) {
-        newRelayoutRoot.markContainingBlocksForLayout(ScheduleRelayout::No);
+        m_layoutRoot = &newRelayoutRoot;
+        convertSubtreeLayoutToFullLayout();
         return;
     }
 
@@ -2695,8 +2696,8 @@
     }
 
     // Just do a full relayout.
+    m_layoutRoot = &newRelayoutRoot;
     convertSubtreeLayoutToFullLayout();
-    newRelayoutRoot.markContainingBlocksForLayout(ScheduleRelayout::No);
     InspectorInstrumentation::didInvalidateLayout(frame());
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to