Title: [253874] trunk/Source/WebCore
Revision
253874
Author
[email protected]
Date
2019-12-22 07:21:07 -0800 (Sun, 22 Dec 2019)

Log Message

[LFC][Integration] Do not remove trailing whitespace when it is followed by a line break
https://bugs.webkit.org/show_bug.cgi?id=205549
<rdar://problem/58139893>

Reviewed by Antti Koivisto.

Complex line layout quirk: keep the trailing whitespace aroun
when it is followed by a line break, unless the content overflows the line.

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

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (253873 => 253874)


--- trunk/Source/WebCore/ChangeLog	2019-12-22 15:12:09 UTC (rev 253873)
+++ trunk/Source/WebCore/ChangeLog	2019-12-22 15:21:07 UTC (rev 253874)
@@ -1,5 +1,19 @@
 2019-12-22  Zalan Bujtas  <[email protected]>
 
+        [LFC][Integration] Do not remove trailing whitespace when it is followed by a line break
+        https://bugs.webkit.org/show_bug.cgi?id=205549
+        <rdar://problem/58139893>
+
+        Reviewed by Antti Koivisto.
+
+        Complex line layout quirk: keep the trailing whitespace aroun
+        when it is followed by a line break, unless the content overflows the line.
+
+        * layout/inlineformatting/InlineLineBuilder.cpp:
+        (WebCore::Layout::LineBuilder::removeTrailingCollapsibleContent):
+
+2019-12-22  Zalan Bujtas  <[email protected]>
+
         [LFC][Integration] Do not collapse trailing letter spacing
         https://bugs.webkit.org/show_bug.cgi?id=205548
         <rdar://problem/58139872>

Modified: trunk/Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp (253873 => 253874)


--- trunk/Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp	2019-12-22 15:12:09 UTC (rev 253873)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp	2019-12-22 15:21:07 UTC (rev 253874)
@@ -378,6 +378,14 @@
     if (m_collapsibleContent.isEmpty() || m_inlineItemRuns.isEmpty())
         return;
 
+    // Complex line layout quirk: keep the trailing whitespace around when it is followed by a line break, unless the content overflows the line.
+    if (RuntimeEnabledFeatures::sharedFeatures().layoutFormattingContextIntegrationEnabled()) {
+        if (m_inlineItemRuns.last().isLineBreak() && availableWidth() >= 0) {
+            m_collapsibleContent.reset();
+            return;
+        }
+    }
+
     m_lineBox.shrinkHorizontally(m_collapsibleContent.collapse());
     // If we collapsed the first visible run on the line, we need to re-check the visibility status.
     if (!m_lineIsVisuallyEmptyBeforeCollapsibleContent)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to