Title: [272461] trunk/Source/WebCore
Revision
272461
Author
[email protected]
Date
2021-02-06 07:22:57 -0800 (Sat, 06 Feb 2021)

Log Message

ASSERT NOT REACHED in WebCore::Layout::LineBuilder::candidateContentForLine
https://bugs.webkit.org/show_bug.cgi?id=221492
<rdar://problem/74032439>

Reviewed by Antti Koivisto.

Floats are not part of the inline content and they should be ignored while checking if the continuous candidate content ends in a wrap opportunity.

* layout/inlineformatting/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::candidateContentForLine):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (272460 => 272461)


--- trunk/Source/WebCore/ChangeLog	2021-02-06 07:51:26 UTC (rev 272460)
+++ trunk/Source/WebCore/ChangeLog	2021-02-06 15:22:57 UTC (rev 272461)
@@ -1,3 +1,16 @@
+2021-02-06  Zalan Bujtas  <[email protected]>
+
+        ASSERT NOT REACHED in WebCore::Layout::LineBuilder::candidateContentForLine
+        https://bugs.webkit.org/show_bug.cgi?id=221492
+        <rdar://problem/74032439>
+
+        Reviewed by Antti Koivisto.
+
+        Floats are not part of the inline content and they should be ignored while checking if the continuous candidate content ends in a wrap opportunity.
+
+        * layout/inlineformatting/InlineLineBuilder.cpp:
+        (WebCore::Layout::LineBuilder::candidateContentForLine):
+
 2021-02-05  Ricky Mondello  <[email protected]>
 
         Deploy WTFMove in the constructor for AutofillElements

Modified: trunk/Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp (272460 => 272461)


--- trunk/Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp	2021-02-06 07:51:26 UTC (rev 272460)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp	2021-02-06 15:22:57 UTC (rev 272461)
@@ -510,6 +510,10 @@
             // This candidate inline content ends because the entire content ends and not because there's a soft wrap opportunity.
             return false;
         }
+        if (m_inlineItems[softWrapOpportunityIndex - 1].isFloat()) {
+            // While we stop at floats, they are not considered real soft wrap opportunities. 
+            return false;
+        }
         // See https://www.w3.org/TR/css-text-3/#line-break-details
         auto& trailingInlineItem = m_inlineItems[softWrapOpportunityIndex - 1];
         if (trailingInlineItem.isBox() || trailingInlineItem.isLineBreak() || trailingInlineItem.isWordBreakOpportunity() || trailingInlineItem.isInlineBoxEnd()) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to