Title: [284073] trunk/Source/WebCore
Revision
284073
Author
[email protected]
Date
2021-10-12 18:10:43 -0700 (Tue, 12 Oct 2021)

Log Message

[LFC][IFC] Inline box boundaries should not prevent trailing whitespace collapsing
https://bugs.webkit.org/show_bug.cgi?id=231614

Reviewed by Antti Koivisto.

This is currently papered over by webkit.org/b/231581 (not testable).

* layout/formattingContexts/inline/InlineContentBreaker.cpp:
(WebCore::Layout::InlineContentBreaker::ContinuousContent::append):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (284072 => 284073)


--- trunk/Source/WebCore/ChangeLog	2021-10-13 01:09:27 UTC (rev 284072)
+++ trunk/Source/WebCore/ChangeLog	2021-10-13 01:10:43 UTC (rev 284073)
@@ -1,3 +1,15 @@
+2021-10-12  Alan Bujtas  <[email protected]>
+
+        [LFC][IFC] Inline box boundaries should not prevent trailing whitespace collapsing
+        https://bugs.webkit.org/show_bug.cgi?id=231614
+
+        Reviewed by Antti Koivisto.
+
+        This is currently papered over by webkit.org/b/231581 (not testable).
+
+        * layout/formattingContexts/inline/InlineContentBreaker.cpp:
+        (WebCore::Layout::InlineContentBreaker::ContinuousContent::append):
+
 2021-10-12  Tim Horton  <[email protected]>
 
         Implement alternate style for textarea

Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp (284072 => 284073)


--- trunk/Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp	2021-10-13 01:09:27 UTC (rev 284072)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp	2021-10-13 01:10:43 UTC (rev 284073)
@@ -576,10 +576,14 @@
 
 void InlineContentBreaker::ContinuousContent::append(const InlineItem& inlineItem, const RenderStyle& style, InlineLayoutUnit logicalWidth, std::optional<InlineLayoutUnit> collapsibleWidth)
 {
+    ASSERT(inlineItem.isText() || inlineItem.isBox() || inlineItem.isInlineBoxStart() || inlineItem.isInlineBoxEnd());
     m_runs.append({ inlineItem, style, logicalWidth });
     m_logicalWidth = clampTo<InlineLayoutUnit>(m_logicalWidth + logicalWidth);
     if (!collapsibleWidth) {
-        m_collapsibleLogicalWidth = { };
+        if (inlineItem.isText() || inlineItem.isBox()) {
+            // Inline boxes do not prevent the trailing content from getting collapsed.
+            m_collapsibleLogicalWidth = { };
+        }
         return;
     }
     ASSERT(*collapsibleWidth <= logicalWidth);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to