Title: [275130] trunk/Source/WebCore
Revision
275130
Author
[email protected]
Date
2021-03-26 21:24:21 -0700 (Fri, 26 Mar 2021)

Log Message

Dirty layout for floating children of inline on full layout
https://bugs.webkit.org/show_bug.cgi?id=223660

Patch by Ian Gilbert <[email protected]> on 2021-03-26
Reviewed by Zalan Bujtas.

Avoid consuming an object on an empty line when that object is floating or out-of-flow.

* rendering/line/BreakingContext.h:
(WebCore::BreakingContext::handleEndOfLine):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (275129 => 275130)


--- trunk/Source/WebCore/ChangeLog	2021-03-27 03:52:53 UTC (rev 275129)
+++ trunk/Source/WebCore/ChangeLog	2021-03-27 04:24:21 UTC (rev 275130)
@@ -1,3 +1,15 @@
+2021-03-26  Ian Gilbert  <[email protected]>
+
+        Dirty layout for floating children of inline on full layout
+        https://bugs.webkit.org/show_bug.cgi?id=223660
+
+        Reviewed by Zalan Bujtas.
+
+        Avoid consuming an object on an empty line when that object is floating or out-of-flow.
+
+        * rendering/line/BreakingContext.h:
+        (WebCore::BreakingContext::handleEndOfLine):
+
 2021-03-26  Chris Dumez  <[email protected]>
 
         Avoid heap allocation on the audio thread in BaseAudioContext::scheduleNodeDeletion()

Modified: trunk/Source/WebCore/rendering/line/BreakingContext.h (275129 => 275130)


--- trunk/Source/WebCore/rendering/line/BreakingContext.h	2021-03-27 03:52:53 UTC (rev 275129)
+++ trunk/Source/WebCore/rendering/line/BreakingContext.h	2021-03-27 04:24:21 UTC (rev 275130)
@@ -1236,7 +1236,9 @@
         // Empty inline elements like <span></span> can produce such lines and now we just ignore these break opportunities
         // at the start of a line, if no width has been committed yet.
         // Behave as if it was actually empty and consume at least one object.
-        m_lineBreak.increment();
+        auto overflowingBoxIsInlineLevelBox = m_lineBreak.renderer() && !m_lineBreak.renderer()->isFloatingOrOutOfFlowPositioned();
+        if (overflowingBoxIsInlineLevelBox)
+            m_lineBreak.increment();
     }
 
     // Sanity check our whitespace collapsing transitions.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to