Title: [246476] trunk/Source/WebCore
Revision
246476
Author
[email protected]
Date
2019-06-16 12:30:15 -0700 (Sun, 16 Jun 2019)

Log Message

[LFC][IFC] Completely collapsed runs should not go to the trimmable run list.
https://bugs.webkit.org/show_bug.cgi?id=198900
<rdar://problem/51782156>

Reviewed by Antti Koivisto.

* layout/inlineformatting/InlineLine.cpp:
(WebCore::Layout::Line::trailingTrimmableWidth const):
(WebCore::Layout::Line::appendTextContent):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (246475 => 246476)


--- trunk/Source/WebCore/ChangeLog	2019-06-16 19:28:14 UTC (rev 246475)
+++ trunk/Source/WebCore/ChangeLog	2019-06-16 19:30:15 UTC (rev 246476)
@@ -1,5 +1,17 @@
 2019-06-16  Zalan Bujtas  <[email protected]>
 
+        [LFC][IFC] Completely collapsed runs should not go to the trimmable run list.
+        https://bugs.webkit.org/show_bug.cgi?id=198900
+        <rdar://problem/51782156>
+
+        Reviewed by Antti Koivisto.
+
+        * layout/inlineformatting/InlineLine.cpp:
+        (WebCore::Layout::Line::trailingTrimmableWidth const):
+        (WebCore::Layout::Line::appendTextContent):
+
+2019-06-16  Zalan Bujtas  <[email protected]>
+
         [LFC][IFC] Use the borderBox rect consistently to size the inline box.
         https://bugs.webkit.org/show_bug.cgi?id=198899
 

Modified: trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp (246475 => 246476)


--- trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp	2019-06-16 19:28:14 UTC (rev 246475)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp	2019-06-16 19:30:15 UTC (rev 246476)
@@ -159,8 +159,10 @@
 LayoutUnit Line::trailingTrimmableWidth() const
 {
     LayoutUnit trimmableWidth;
-    for (auto* trimmableRun : m_trimmableContent)
+    for (auto* trimmableRun : m_trimmableContent) {
+        ASSERT(!trimmableRun->isCollapsed);
         trimmableWidth += trimmableRun->logicalRect.width();
+    }
     return trimmableWidth;
 }
 
@@ -228,7 +230,7 @@
 
     auto textContext = Content::Run::TextContext { inlineItem.start(), inlineItem.isCollapsed() ? 1 : inlineItem.length() };
     auto lineItem = std::make_unique<Content::Run>(inlineItem, logicalRect, textContext, isCompletelyCollapsed, canBeExtended);
-    if (isTrimmable)
+    if (isTrimmable && !isCompletelyCollapsed)
         m_trimmableContent.add(lineItem.get());
 
     m_content->runs().append(WTFMove(lineItem));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to