Title: [252322] trunk/Source/WebCore
Revision
252322
Author
[email protected]
Date
2019-11-11 07:13:37 -0800 (Mon, 11 Nov 2019)

Log Message

[LFC][IFC] Line::m_trimmableRuns does not need to be a ListHashSet
https://bugs.webkit.org/show_bug.cgi?id=204061
<rdar://problem/57064178>

Reviewed by Antti Koivisto.

Switch from ListHashSet to Vector.

* layout/inlineformatting/InlineLine.cpp:
(WebCore::Layout::Line::removeTrailingTrimmableContent):
(WebCore::Layout::Line::appendTextContent):
* layout/inlineformatting/InlineLine.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (252321 => 252322)


--- trunk/Source/WebCore/ChangeLog	2019-11-11 06:25:58 UTC (rev 252321)
+++ trunk/Source/WebCore/ChangeLog	2019-11-11 15:13:37 UTC (rev 252322)
@@ -1,3 +1,18 @@
+2019-11-11  Zalan Bujtas  <[email protected]>
+
+        [LFC][IFC] Line::m_trimmableRuns does not need to be a ListHashSet
+        https://bugs.webkit.org/show_bug.cgi?id=204061
+        <rdar://problem/57064178>
+
+        Reviewed by Antti Koivisto.
+
+        Switch from ListHashSet to Vector.
+
+        * layout/inlineformatting/InlineLine.cpp:
+        (WebCore::Layout::Line::removeTrailingTrimmableContent):
+        (WebCore::Layout::Line::appendTextContent):
+        * layout/inlineformatting/InlineLine.h:
+
 2019-11-10  Zalan Bujtas  <[email protected]>
 
         [LFC][IFC] Move Line::Run's line layout specific logic to InlineItemRun

Modified: trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp (252321 => 252322)


--- trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp	2019-11-11 06:25:58 UTC (rev 252321)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp	2019-11-11 15:13:37 UTC (rev 252322)
@@ -426,6 +426,7 @@
         trimmableRun->setCollapsesToZeroAdvanceWidth();
     }
     m_lineBox.shrinkHorizontally(trimmableWidth);
+    m_trimmableRuns.clear();
 }
 
 void Line::moveLogicalLeft(LayoutUnit delta)
@@ -551,7 +552,7 @@
     if (collapsedRun)
         lineRun->setIsCollapsed();
     if (isTrimmable)
-        m_trimmableRuns.add(lineRun.get());
+        m_trimmableRuns.append(lineRun.get());
 
     m_lineBox.expandHorizontally(lineRun->logicalRect().width());
     m_inlineItemRuns.append(WTFMove(lineRun));

Modified: trunk/Source/WebCore/layout/inlineformatting/InlineLine.h (252321 => 252322)


--- trunk/Source/WebCore/layout/inlineformatting/InlineLine.h	2019-11-11 06:25:58 UTC (rev 252321)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineLine.h	2019-11-11 15:13:37 UTC (rev 252322)
@@ -149,7 +149,7 @@
 
     const InlineFormattingContext& m_inlineFormattingContext;
     Vector<std::unique_ptr<InlineItemRun>> m_inlineItemRuns;
-    ListHashSet<InlineItemRun*> m_trimmableRuns;
+    Vector<InlineItemRun*> m_trimmableRuns;
     Optional<LineBox::Baseline> m_initialStrut;
     LayoutUnit m_lineLogicalWidth;
     Optional<TextAlignMode> m_horizontalAlignment;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to