Title: [258666] trunk
Revision
258666
Author
[email protected]
Date
2020-03-18 15:48:44 -0700 (Wed, 18 Mar 2020)

Log Message

[MultiColumn] Ignore spanner boxes inside <legend>
https://bugs.webkit.org/show_bug.cgi?id=209248
<rdar://problem/51857865>

Reviewed by Simon Fraser.

Source/WebCore:

<legend> boxes don't participate in the multicolumn flow, they are simply ignored.
This patch ensures that we don't include their descendants in the spanner construction.
<column>some<legend><div spanner></div></legend>content</column> <- the "spanner" div won't span the column content.

Test: fast/multicol/spanner-inside-legend-crash.html

* rendering/updating/RenderTreeBuilderMultiColumn.cpp:
(WebCore::isValidColumnSpanner):

LayoutTests:

* fast/multicol/spanner-inside-legend-crash-expected.txt: Added.
* fast/multicol/spanner-inside-legend-crash.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (258665 => 258666)


--- trunk/LayoutTests/ChangeLog	2020-03-18 22:30:11 UTC (rev 258665)
+++ trunk/LayoutTests/ChangeLog	2020-03-18 22:48:44 UTC (rev 258666)
@@ -1,3 +1,14 @@
+2020-03-18  Zalan Bujtas  <[email protected]>
+
+        [MultiColumn] Ignore spanner boxes inside <legend>
+        https://bugs.webkit.org/show_bug.cgi?id=209248
+        <rdar://problem/51857865>
+
+        Reviewed by Simon Fraser.
+
+        * fast/multicol/spanner-inside-legend-crash-expected.txt: Added.
+        * fast/multicol/spanner-inside-legend-crash.html: Added.
+
 2020-03-18  Eugene But  <[email protected]>
 
         Test for ReplaceSelectionCommand::InsertedNodes::willRemoveNodePreservingChildren crash fix

Added: trunk/LayoutTests/fast/multicol/spanner-inside-legend-crash-expected.txt (0 => 258666)


--- trunk/LayoutTests/fast/multicol/spanner-inside-legend-crash-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/multicol/spanner-inside-legend-crash-expected.txt	2020-03-18 22:48:44 UTC (rev 258666)
@@ -0,0 +1,2 @@
+
+spanners should be ignored inside legends(legends are not part of the flow)

Added: trunk/LayoutTests/fast/multicol/spanner-inside-legend-crash.html (0 => 258666)


--- trunk/LayoutTests/fast/multicol/spanner-inside-legend-crash.html	                        (rev 0)
+++ trunk/LayoutTests/fast/multicol/spanner-inside-legend-crash.html	2020-03-18 22:48:44 UTC (rev 258666)
@@ -0,0 +1,13 @@
+<style>
+.container, fieldset {
+    column-count: 2;
+}
+.spanner {
+    column-span: all;
+}
+</style>
+<div class=container><fieldset><legend><div class=spanner>spanners should be ignored inside legends(legends are not part of the flow)</div></legend></fieldset></div>
+<script>
+if (window.testRunner)
+    testRunner.dumpAsText();
+</script>

Modified: trunk/Source/WebCore/ChangeLog (258665 => 258666)


--- trunk/Source/WebCore/ChangeLog	2020-03-18 22:30:11 UTC (rev 258665)
+++ trunk/Source/WebCore/ChangeLog	2020-03-18 22:48:44 UTC (rev 258666)
@@ -1,3 +1,20 @@
+2020-03-18  Zalan Bujtas  <[email protected]>
+
+        [MultiColumn] Ignore spanner boxes inside <legend>
+        https://bugs.webkit.org/show_bug.cgi?id=209248
+        <rdar://problem/51857865>
+
+        Reviewed by Simon Fraser.
+
+        <legend> boxes don't participate in the multicolumn flow, they are simply ignored.
+        This patch ensures that we don't include their descendants in the spanner construction.
+        <column>some<legend><div spanner></div></legend>content</column> <- the "spanner" div won't span the column content. 
+
+        Test: fast/multicol/spanner-inside-legend-crash.html
+
+        * rendering/updating/RenderTreeBuilderMultiColumn.cpp:
+        (WebCore::isValidColumnSpanner):
+
 2020-03-18  Yusuke Suzuki  <[email protected]>
 
         Add a way to mark a rejected promise as handled

Modified: trunk/Source/WebCore/rendering/updating/RenderTreeBuilderMultiColumn.cpp (258665 => 258666)


--- trunk/Source/WebCore/rendering/updating/RenderTreeBuilderMultiColumn.cpp	2020-03-18 22:30:11 UTC (rev 258665)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeBuilderMultiColumn.cpp	2020-03-18 22:48:44 UTC (rev 258666)
@@ -99,6 +99,8 @@
     for (auto* ancestor = descendantBox.containingBlock(); ancestor; ancestor = ancestor->containingBlock()) {
         if (is<RenderView>(*ancestor))
             return false;
+        if (ancestor->isLegend())
+            return false;
         if (is<RenderFragmentedFlow>(*ancestor)) {
             // Don't allow any intervening non-multicol fragmentation contexts. The spec doesn't say
             // anything about disallowing this, but it's just going to be too complicated to
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to