Title: [276637] trunk
Revision
276637
Author
[email protected]
Date
2021-04-27 07:06:54 -0700 (Tue, 27 Apr 2021)

Log Message

[RenderTreeBuilder] ASSERTION FAILED: ancestor->style().columnSpan() != ColumnSpan::All || !isValidColumnSpanner(fragmentedFlow, *ancestor) in WebCore::isValidColumnSpanner
https://bugs.webkit.org/show_bug.cgi?id=225078
<rdar://76127681>

Reviewed by Antti Koivisto.

Source/WebCore:

MultiColumnBuilder::multiColumnDescendantInserted() expects up-to-date fragmentedFlowState on the newly inserted renderer.

Test: fast/multicol/nested-spanner-assert.html

* rendering/updating/RenderTreeBuilder.cpp:
(WebCore::RenderTreeBuilder::normalizeTreeAfterStyleChange):
(WebCore::RenderTreeBuilder::childFlowStateChangesAndAffectsParentBlock):

LayoutTests:

* fast/multicol/nested-spanner-assert-expected.txt: Added.
* fast/multicol/nested-spanner-assert.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (276636 => 276637)


--- trunk/LayoutTests/ChangeLog	2021-04-27 14:02:50 UTC (rev 276636)
+++ trunk/LayoutTests/ChangeLog	2021-04-27 14:06:54 UTC (rev 276637)
@@ -1,3 +1,14 @@
+2021-04-27  Zalan Bujtas  <[email protected]>
+
+        [RenderTreeBuilder] ASSERTION FAILED: ancestor->style().columnSpan() != ColumnSpan::All || !isValidColumnSpanner(fragmentedFlow, *ancestor) in WebCore::isValidColumnSpanner
+        https://bugs.webkit.org/show_bug.cgi?id=225078
+        <rdar://76127681>
+
+        Reviewed by Antti Koivisto.
+
+        * fast/multicol/nested-spanner-assert-expected.txt: Added.
+        * fast/multicol/nested-spanner-assert.html: Added.
+
 2021-04-21  Sergio Villar Senin  <[email protected]>
 
         [css-flexbox] percent children don't resolve against the flex basis on a fully inflexible item with fixed flex-basis

Added: trunk/LayoutTests/fast/multicol/nested-spanner-assert-expected.txt (0 => 276637)


--- trunk/LayoutTests/fast/multicol/nested-spanner-assert-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/multicol/nested-spanner-assert-expected.txt	2021-04-27 14:06:54 UTC (rev 276637)
@@ -0,0 +1,2 @@
+PASS if no crash or assert.
+

Added: trunk/LayoutTests/fast/multicol/nested-spanner-assert.html (0 => 276637)


--- trunk/LayoutTests/fast/multicol/nested-spanner-assert.html	                        (rev 0)
+++ trunk/LayoutTests/fast/multicol/nested-spanner-assert.html	2021-04-27 14:06:54 UTC (rev 276637)
@@ -0,0 +1,25 @@
+<style>
+.multi-column {
+  column-count: 2;
+}
+.absolute {
+  position: absolute;
+}
+.spanner {
+  column-span: all;
+}
+</style>
+PASS if no crash or assert.
+<div class=multi-column>
+  <div id=go_inflow class="absolute spanner">
+    <div id=become_spanner></div>
+  </div>
+</div>
+<script>
+if (window.testRunner)
+  testRunner.dumpAsText();
+document.body.offsetHeight;
+go_inflow.classList.remove("absolute");
+document.body.offsetHeight;
+become_spanner.classList.add("spanner");
+</script>

Modified: trunk/Source/WebCore/ChangeLog (276636 => 276637)


--- trunk/Source/WebCore/ChangeLog	2021-04-27 14:02:50 UTC (rev 276636)
+++ trunk/Source/WebCore/ChangeLog	2021-04-27 14:06:54 UTC (rev 276637)
@@ -1,3 +1,19 @@
+2021-04-27  Zalan Bujtas  <[email protected]>
+
+        [RenderTreeBuilder] ASSERTION FAILED: ancestor->style().columnSpan() != ColumnSpan::All || !isValidColumnSpanner(fragmentedFlow, *ancestor) in WebCore::isValidColumnSpanner
+        https://bugs.webkit.org/show_bug.cgi?id=225078
+        <rdar://76127681>
+
+        Reviewed by Antti Koivisto.
+
+        MultiColumnBuilder::multiColumnDescendantInserted() expects up-to-date fragmentedFlowState on the newly inserted renderer.
+
+        Test: fast/multicol/nested-spanner-assert.html
+
+        * rendering/updating/RenderTreeBuilder.cpp:
+        (WebCore::RenderTreeBuilder::normalizeTreeAfterStyleChange):
+        (WebCore::RenderTreeBuilder::childFlowStateChangesAndAffectsParentBlock):
+
 2021-04-21  Sergio Villar Senin  <[email protected]>
 
         [css-flexbox] percent children don't resolve against the flex basis on a fully inflexible item with fixed flex-basis

Modified: trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp (276636 => 276637)


--- trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp	2021-04-27 14:02:50 UTC (rev 276636)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp	2021-04-27 14:06:54 UTC (rev 276637)
@@ -642,8 +642,8 @@
             return false;
         }();
         if (movingIntoMulticolumn) {
+            renderer.initializeFragmentedFlowStateOnInsertion();
             multiColumnBuilder().multiColumnDescendantInserted(downcast<RenderMultiColumnFlow>(*enclosingFragmentedFlow), renderer);
-            renderer.initializeFragmentedFlowStateOnInsertion();
             return;
         }
         auto movingOutOfMulticolumn = !wasOutOfFlowPositioned && isOutOfFlowPositioned;
@@ -766,8 +766,8 @@
             };
             if (auto* newEnclosingMultiColumn = newMultiColumnForChildRenderer()) {
                 // Let the fragmented flow know that it has a new in-flow descendant.
+                child.initializeFragmentedFlowStateOnInsertion();
                 multiColumnBuilder().multiColumnDescendantInserted(*newEnclosingMultiColumn, child);
-                child.initializeFragmentedFlowStateOnInsertion();
             }
         }
     } else {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to