Title: [282449] trunk/Source/WebCore
Revision
282449
Author
[email protected]
Date
2021-09-15 06:33:49 -0700 (Wed, 15 Sep 2021)

Log Message

[Layout][Integration] Remove unnecessary Run typedef
https://bugs.webkit.org/show_bug.cgi?id=230303

Reviewed by Alan Bujtas.

Use Layout::Run directly instead of LayoutIntegration::Run.

* layout/integration/LayoutIntegrationInlineContent.cpp:
(WebCore::LayoutIntegration:: const):
(WebCore::LayoutIntegration::InlineContent::indexForRun const):
(WebCore::LayoutIntegration::InlineContent::firstRunForLayoutBox const):
* layout/integration/LayoutIntegrationInlineContent.h:
(WebCore::LayoutIntegration::InlineContent::lineForRun const):
* layout/integration/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::paintTextRunUsingPhysicalCoordinates):
* layout/integration/LayoutIntegrationLineLayout.h:
* layout/integration/LayoutIntegrationPagination.cpp:
(WebCore::LayoutIntegration::makeAdjustedContent):
* layout/integration/LayoutIntegrationRunIterator.cpp:
(WebCore::LayoutIntegration::textRunFor):
* layout/integration/LayoutIntegrationRunIterator.h:
* layout/integration/LayoutIntegrationRunIteratorModernPath.h:
(WebCore::LayoutIntegration::RunIteratorModernPath::run const):
* rendering/TextPainter.cpp:
(WebCore::TextPainter::clearGlyphDisplayLists):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (282448 => 282449)


--- trunk/Source/WebCore/ChangeLog	2021-09-15 12:20:25 UTC (rev 282448)
+++ trunk/Source/WebCore/ChangeLog	2021-09-15 13:33:49 UTC (rev 282449)
@@ -1,3 +1,31 @@
+2021-09-15  Antti Koivisto  <[email protected]>
+
+        [Layout][Integration] Remove unnecessary Run typedef
+        https://bugs.webkit.org/show_bug.cgi?id=230303
+
+        Reviewed by Alan Bujtas.
+
+        Use Layout::Run directly instead of LayoutIntegration::Run.
+
+        * layout/integration/LayoutIntegrationInlineContent.cpp:
+        (WebCore::LayoutIntegration:: const):
+        (WebCore::LayoutIntegration::InlineContent::indexForRun const):
+        (WebCore::LayoutIntegration::InlineContent::firstRunForLayoutBox const):
+        * layout/integration/LayoutIntegrationInlineContent.h:
+        (WebCore::LayoutIntegration::InlineContent::lineForRun const):
+        * layout/integration/LayoutIntegrationLineLayout.cpp:
+        (WebCore::LayoutIntegration::LineLayout::paintTextRunUsingPhysicalCoordinates):
+        * layout/integration/LayoutIntegrationLineLayout.h:
+        * layout/integration/LayoutIntegrationPagination.cpp:
+        (WebCore::LayoutIntegration::makeAdjustedContent):
+        * layout/integration/LayoutIntegrationRunIterator.cpp:
+        (WebCore::LayoutIntegration::textRunFor):
+        * layout/integration/LayoutIntegrationRunIterator.h:
+        * layout/integration/LayoutIntegrationRunIteratorModernPath.h:
+        (WebCore::LayoutIntegration::RunIteratorModernPath::run const):
+        * rendering/TextPainter.cpp:
+        (WebCore::TextPainter::clearGlyphDisplayLists):
+
 2021-09-15  Carlos Garcia Campos  <[email protected]>
 
         AX: Remove AXCoreObject::containsText

Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContent.cpp (282448 => 282449)


--- trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContent.cpp	2021-09-15 12:20:25 UTC (rev 282448)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContent.cpp	2021-09-15 13:33:49 UTC (rev 282449)
@@ -47,7 +47,7 @@
     return runs.size() > 1;
 };
 
-WTF::IteratorRange<const Run*> InlineContent::runsForRect(const LayoutRect&) const
+WTF::IteratorRange<const Layout::Run*> InlineContent::runsForRect(const LayoutRect&) const
 {
     // FIXME: Do something efficient e.g. using line boxes.
     if (runs.isEmpty())
@@ -78,7 +78,7 @@
     return m_lineLayout->flow();
 }
 
-size_t InlineContent::indexForRun(const Run& run) const
+size_t InlineContent::indexForRun(const Layout::Run& run) const
 {
     auto index = static_cast<size_t>(&run - runs.begin());
     RELEASE_ASSERT(index < runs.size());
@@ -85,7 +85,7 @@
     return index;
 }
 
-const Run* InlineContent::firstRunForLayoutBox(const Layout::Box& layoutBox) const
+const Layout::Run* InlineContent::firstRunForLayoutBox(const Layout::Box& layoutBox) const
 {
     auto index = firstRunIndexForLayoutBox(layoutBox);
     return index ? &runs[*index] : nullptr;

Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContent.h (282448 => 282449)


--- trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContent.h	2021-09-15 12:20:25 UTC (rev 282448)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContent.h	2021-09-15 13:33:49 UTC (rev 282449)
@@ -47,13 +47,11 @@
 
 class LineLayout;
 
-using Run = Layout::Run;
-
 struct InlineContent : public RefCounted<InlineContent> {
     static Ref<InlineContent> create(const LineLayout& lineLayout) { return adoptRef(*new InlineContent(lineLayout)); }
     ~InlineContent();
 
-    using Runs = Vector<Run>;
+    using Runs = Vector<Layout::Run>;
     using Lines = Vector<Line>;
 
     Runs runs;
@@ -63,8 +61,8 @@
 
     bool hasContent() const;
     
-    const Line& lineForRun(const Run& run) const { return lines[run.lineIndex()]; }
-    WTF::IteratorRange<const Run*> runsForRect(const LayoutRect&) const;
+    const Line& lineForRun(const Layout::Run& run) const { return lines[run.lineIndex()]; }
+    WTF::IteratorRange<const Layout::Run*> runsForRect(const LayoutRect&) const;
     void shrinkToFit();
 
     const LineLayout& lineLayout() const;
@@ -71,9 +69,9 @@
     const RenderObject& rendererForLayoutBox(const Layout::Box&) const;
     const RenderBlockFlow& containingBlock() const;
 
-    size_t indexForRun(const Run&) const;
+    size_t indexForRun(const Layout::Run&) const;
 
-    const Run* firstRunForLayoutBox(const Layout::Box&) const;
+    const Layout::Run* firstRunForLayoutBox(const Layout::Box&) const;
     template<typename Function> void traverseNonRootInlineBoxes(const Layout::Box&, Function&&);
 
     std::optional<size_t> firstRunIndexForLayoutBox(const Layout::Box&) const;

Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp (282448 => 282449)


--- trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp	2021-09-15 12:20:25 UTC (rev 282448)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp	2021-09-15 13:33:49 UTC (rev 282449)
@@ -547,7 +547,7 @@
         m_inlineContent->releaseCaches();
 }
 
-void LineLayout::paintTextRunUsingPhysicalCoordinates(PaintInfo& paintInfo, const LayoutPoint& paintOffset, const Line& line, const Run& run)
+void LineLayout::paintTextRunUsingPhysicalCoordinates(PaintInfo& paintInfo, const LayoutPoint& paintOffset, const Line& line, const Layout::Run& run)
 {
     auto& style = run.style();
     if (run.style().visibility() != Visibility::Visible)

Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.h (282448 => 282449)


--- trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.h	2021-09-15 12:20:25 UTC (rev 282448)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.h	2021-09-15 13:33:49 UTC (rev 282449)
@@ -118,7 +118,7 @@
     InlineContent& ensureInlineContent();
     void updateLayoutBoxDimensions(const RenderBox&);
 
-    void paintTextRunUsingPhysicalCoordinates(PaintInfo&, const LayoutPoint& paintOffset, const Line&, const Run&);
+    void paintTextRunUsingPhysicalCoordinates(PaintInfo&, const LayoutPoint& paintOffset, const Line&, const Layout::Run&);
 
     const Layout::ContainerBox& rootLayoutBox() const;
     Layout::ContainerBox& rootLayoutBox();

Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationPagination.cpp (282448 => 282449)


--- trunk/Source/WebCore/layout/integration/LayoutIntegrationPagination.cpp	2021-09-15 12:20:25 UTC (rev 282448)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationPagination.cpp	2021-09-15 13:33:49 UTC (rev 282449)
@@ -140,9 +140,9 @@
         };
     };
 
-    auto adjustedRun = [&](const Run& run, float offset)
+    auto adjustedRun = [&](const Layout::Run& run, float offset)
     {
-        return Run {
+        return Layout::Run {
             run.lineIndex(),
             run.type(),
             run.layoutBox(),

Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationRunIterator.cpp (282448 => 282449)


--- trunk/Source/WebCore/layout/integration/LayoutIntegrationRunIterator.cpp	2021-09-15 12:20:25 UTC (rev 282448)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationRunIterator.cpp	2021-09-15 13:33:49 UTC (rev 282449)
@@ -196,7 +196,7 @@
 }
 
 #if ENABLE(LAYOUT_FORMATTING_CONTEXT)
-TextRunIterator textRunFor(const InlineContent& content, const Run& run)
+TextRunIterator textRunFor(const InlineContent& content, const Layout::Run& run)
 {
     return textRunFor(content, content.indexForRun(run));
 }

Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationRunIterator.h (282448 => 282449)


--- trunk/Source/WebCore/layout/integration/LayoutIntegrationRunIterator.h	2021-09-15 12:20:25 UTC (rev 282448)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationRunIterator.h	2021-09-15 13:33:49 UTC (rev 282449)
@@ -202,7 +202,7 @@
 TextRunIterator firstTextRunInTextOrderFor(const RenderText&);
 TextRunIterator textRunFor(const LegacyInlineTextBox*);
 #if ENABLE(LAYOUT_FORMATTING_CONTEXT)
-TextRunIterator textRunFor(const InlineContent&, const Run&);
+TextRunIterator textRunFor(const InlineContent&, const Layout::Run&);
 TextRunIterator textRunFor(const InlineContent&, size_t runIndex);
 #endif
 TextRunRange textRunsFor(const RenderText&);

Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationRunIteratorModernPath.h (282448 => 282449)


--- trunk/Source/WebCore/layout/integration/LayoutIntegrationRunIteratorModernPath.h	2021-09-15 12:20:25 UTC (rev 282448)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationRunIteratorModernPath.h	2021-09-15 13:33:49 UTC (rev 282449)
@@ -247,7 +247,7 @@
     void setAtEnd() { m_runIndex = runs().size(); }
 
     const InlineContent::Runs& runs() const { return m_inlineContent->runs; }
-    const Run& run() const { return runs()[m_runIndex]; }
+    const Layout::Run& run() const { return runs()[m_runIndex]; }
     const Line& line() const { return m_inlineContent->lineForRun(run()); }
 
     RefPtr<const InlineContent> m_inlineContent;

Modified: trunk/Source/WebCore/rendering/TextPainter.cpp (282448 => 282449)


--- trunk/Source/WebCore/rendering/TextPainter.cpp	2021-09-15 12:20:25 UTC (rev 282448)
+++ trunk/Source/WebCore/rendering/TextPainter.cpp	2021-09-15 13:33:49 UTC (rev 282449)
@@ -230,7 +230,7 @@
     GlyphDisplayListCache<LegacyInlineTextBox>::singleton().clear();
 #if ENABLE(LAYOUT_FORMATTING_CONTEXT)
     if (RuntimeEnabledFeatures::sharedFeatures().layoutFormattingContextIntegrationEnabled())
-        GlyphDisplayListCache<LayoutIntegration::Run>::singleton().clear();
+        GlyphDisplayListCache<Layout::Run>::singleton().clear();
 #endif
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to