Title: [257360] trunk
Revision
257360
Author
za...@apple.com
Date
2020-02-25 09:30:38 -0800 (Tue, 25 Feb 2020)

Log Message

[LFC][OutOfFlow] Out-of-flow positioned line breaks can generate display boxes
https://bugs.webkit.org/show_bug.cgi?id=208198
<rdar://problem/59764787>

Reviewed by Antti Koivisto.

Source/WebCore:

Test: fast/layoutformattingcontext/out-of-flow-positioned-line-breaks.html

This assert should take the positioning into account when checking againts line breaks.
(In practice those display boxes are empty and they don't really contribute to rendering but
they are still valid content.)

* layout/FormattingState.cpp:
(WebCore::Layout::FormattingState::displayBox):

LayoutTests:

* fast/layoutformattingcontext/out-of-flow-positioned-line-breaks-expected.html: Added.
* fast/layoutformattingcontext/out-of-flow-positioned-line-breaks.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (257359 => 257360)


--- trunk/LayoutTests/ChangeLog	2020-02-25 17:19:58 UTC (rev 257359)
+++ trunk/LayoutTests/ChangeLog	2020-02-25 17:30:38 UTC (rev 257360)
@@ -1,3 +1,14 @@
+2020-02-25  Zalan Bujtas  <za...@apple.com>
+
+        [LFC][OutOfFlow] Out-of-flow positioned line breaks can generate display boxes
+        https://bugs.webkit.org/show_bug.cgi?id=208198
+        <rdar://problem/59764787>
+
+        Reviewed by Antti Koivisto.
+
+        * fast/layoutformattingcontext/out-of-flow-positioned-line-breaks-expected.html: Added.
+        * fast/layoutformattingcontext/out-of-flow-positioned-line-breaks.html: Added.
+
 2020-02-25  Chris Dumez  <cdu...@apple.com>
 
         Regression(CookieCache) Hang and very high CPU usage on nytimes.com

Added: trunk/LayoutTests/fast/layoutformattingcontext/out-of-flow-positioned-line-breaks-expected.html ( => )


Added: trunk/LayoutTests/fast/layoutformattingcontext/out-of-flow-positioned-line-breaks.html
===================================================================
--- trunk/LayoutTests/fast/layoutformattingcontext/out-of-flow-positioned-line-breaks.html	                        (rev 0)
+++ trunk/LayoutTests/fast/layoutformattingcontext/out-of-flow-positioned-line-breaks.html	2020-02-25 17:30:38 UTC (rev 257360)
@@ -0,0 +1,7 @@
+<!-- webkit-test-runner [ internal:LayoutFormattingContextEnabled=true internal:LayoutFormattingContextIntegrationEnabled=false ] -->
+<br style="position: absolute;">
+<br style="position: fixed">
+<br style="position: static">
+<wbr style="position: absolute">
+<wbr style="position: fixed">
+<wbr style="position: static">

Modified: trunk/Source/WebCore/ChangeLog (257359 => 257360)


--- trunk/Source/WebCore/ChangeLog	2020-02-25 17:19:58 UTC (rev 257359)
+++ trunk/Source/WebCore/ChangeLog	2020-02-25 17:30:38 UTC (rev 257360)
@@ -1,3 +1,20 @@
+2020-02-25  Zalan Bujtas  <za...@apple.com>
+
+        [LFC][OutOfFlow] Out-of-flow positioned line breaks can generate display boxes
+        https://bugs.webkit.org/show_bug.cgi?id=208198
+        <rdar://problem/59764787>
+
+        Reviewed by Antti Koivisto.
+
+        Test: fast/layoutformattingcontext/out-of-flow-positioned-line-breaks.html
+
+        This assert should take the positioning into account when checking againts line breaks.
+        (In practice those display boxes are empty and they don't really contribute to rendering but
+        they are still valid content.) 
+
+        * layout/FormattingState.cpp:
+        (WebCore::Layout::FormattingState::displayBox):
+
 2020-02-25  Antti Koivisto  <an...@apple.com>
 
         Remove throttling code from RenderLayerCompositor

Modified: trunk/Source/WebCore/layout/FormattingState.cpp (257359 => 257360)


--- trunk/Source/WebCore/layout/FormattingState.cpp	2020-02-25 17:19:58 UTC (rev 257359)
+++ trunk/Source/WebCore/layout/FormattingState.cpp	2020-02-25 17:30:38 UTC (rev 257360)
@@ -53,7 +53,7 @@
     // Should never need to mutate a display box outside of the formatting context.
     ASSERT(&layoutState().establishedFormattingState(layoutBox.formattingContextRoot()) == this);
     // Anonymous text wrappers/line break boxes should not need display boxes.
-    ASSERT(!layoutBox.isInlineTextBox() && !layoutBox.isLineBreakBox());
+    ASSERT(!layoutBox.isInlineTextBox() && (!layoutBox.isLineBreakBox() || layoutBox.isOutOfFlowPositioned()));
     return layoutState().ensureDisplayBoxForLayoutBox(layoutBox);
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to