Title: [257001] trunk/Source/WebCore
Revision
257001
Author
za...@apple.com
Date
2020-02-19 16:49:59 -0800 (Wed, 19 Feb 2020)

Log Message

[LFC][Integration] Do not try to lay out a formatting context unless there's some content in it
https://bugs.webkit.org/show_bug.cgi?id=207956
<rdar://problem/59455700>

Reviewed by Simon Fraser.

LineLayout::layout() normally don't get called when the block level box has not children (canUse() returns false for such cases), but we are probably missing some invalidation here
so we end up with an "empty" formatting context.

* layout/integration/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::layout):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (257000 => 257001)


--- trunk/Source/WebCore/ChangeLog	2020-02-20 00:49:34 UTC (rev 257000)
+++ trunk/Source/WebCore/ChangeLog	2020-02-20 00:49:59 UTC (rev 257001)
@@ -1,5 +1,19 @@
 2020-02-19  Zalan Bujtas  <za...@apple.com>
 
+        [LFC][Integration] Do not try to lay out a formatting context unless there's some content in it
+        https://bugs.webkit.org/show_bug.cgi?id=207956
+        <rdar://problem/59455700>
+
+        Reviewed by Simon Fraser.
+
+        LineLayout::layout() normally don't get called when the block level box has not children (canUse() returns false for such cases), but we are probably missing some invalidation here
+        so we end up with an "empty" formatting context.
+
+        * layout/integration/LayoutIntegrationLineLayout.cpp:
+        (WebCore::LayoutIntegration::LineLayout::layout):
+
+2020-02-19  Zalan Bujtas  <za...@apple.com>
+
         [First paint] Introduce FrameView::m_firstVisuallyNonEmptyLayoutMilestoneIsPending
         https://bugs.webkit.org/show_bug.cgi?id=207966
         <rdar://problem/59606528>

Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp (257000 => 257001)


--- trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp	2020-02-20 00:49:34 UTC (rev 257000)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp	2020-02-20 00:49:59 UTC (rev 257001)
@@ -98,6 +98,9 @@
 
 void LineLayout::layout()
 {
+    if (!rootLayoutBox().hasInFlowOrFloatingChild())
+        return;
+
     prepareLayoutState();
     prepareFloatingState();
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to