Title: [271394] trunk/Source/WebCore
Revision
271394
Author
[email protected]
Date
2021-01-12 01:42:35 -0800 (Tue, 12 Jan 2021)

Log Message

[Multicol] set the childrenInline flag on the RenderBlockFlow properly
https://bugs.webkit.org/show_bug.cgi?id=218555

Reviewed by Zalan Bujtas.

* rendering/updating/RenderTreeBuilderMultiColumn.cpp:
(WebCore::RenderTreeBuilder::MultiColumn::destroyFragmentedFlow):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (271393 => 271394)


--- trunk/Source/WebCore/ChangeLog	2021-01-12 09:37:17 UTC (rev 271393)
+++ trunk/Source/WebCore/ChangeLog	2021-01-12 09:42:35 UTC (rev 271394)
@@ -1,3 +1,13 @@
+2021-01-12  Zalan Bujtas  <[email protected]>
+
+        [Multicol] set the childrenInline flag on the RenderBlockFlow properly
+        https://bugs.webkit.org/show_bug.cgi?id=218555
+
+        Reviewed by Zalan Bujtas.
+
+        * rendering/updating/RenderTreeBuilderMultiColumn.cpp:
+        (WebCore::RenderTreeBuilder::MultiColumn::destroyFragmentedFlow):
+
 2021-01-12  Rob Buis  <[email protected]>
 
         Null check CSSFilter::output()

Modified: trunk/Source/WebCore/rendering/updating/RenderTreeBuilderMultiColumn.cpp (271393 => 271394)


--- trunk/Source/WebCore/rendering/updating/RenderTreeBuilderMultiColumn.cpp	2021-01-12 09:37:17 UTC (rev 271393)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeBuilderMultiColumn.cpp	2021-01-12 09:42:35 UTC (rev 271394)
@@ -221,7 +221,18 @@
         m_builder.destroy(*columnSet);
 
     flow.clearMultiColumnFlow();
-    flow.setChildrenInline(true);
+    auto hasInitialBlockChild = [&] {
+        if (!flow.isFieldset())
+            return false;
+        // We don't move the legend under the multicolumn flow (see MultiColumn::createFragmentedFlow), so when the multicolumn context is destroyed
+        // the fieldset already has a legend block level box.
+        for (auto& box : childrenOfType<RenderBox>(flow)) {
+            if (box.isLegend())
+                return true;
+        }
+        return false;
+    }();
+    flow.setChildrenInline(!hasInitialBlockChild);
     m_builder.moveAllChildren(multiColumnFlow, flow, RenderTreeBuilder::NormalizeAfterInsertion::Yes);
     m_builder.destroy(multiColumnFlow);
     for (auto& parentAndSpanner : parentAndSpannerList)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to