Title: [256458] trunk/Source/WebCore
Revision
256458
Author
[email protected]
Date
2020-02-12 11:07:24 -0800 (Wed, 12 Feb 2020)

Log Message

[LFC][IFC] Display::Run should not have any geometry mutation functions.
https://bugs.webkit.org/show_bug.cgi?id=207633
<rdar://problem/59386235>

Reviewed by Antti Koivisto.

Now that Display::Runs are constructed after merging the runs on the line, we don't need any of
these mutation functions.

* layout/displaytree/DisplayRun.h:
(WebCore::Display::Run::textContent const):
(WebCore::Display::Run::isLineBreak const):
(WebCore::Display::Run::lineIndex const):
(WebCore::Display::Run::setWidth): Deleted.
(WebCore::Display::Run::setTop): Deleted.
(WebCore::Display::Run::setlLeft): Deleted.
(WebCore::Display::Run::moveVertically): Deleted.
(WebCore::Display::Run::moveHorizontally): Deleted.
(WebCore::Display::Run::expandVertically): Deleted.
(WebCore::Display::Run::expandHorizontally): Deleted.
(WebCore::Display::Run::setTextContent): Deleted.
(WebCore::Display::Run::setExpansion): Deleted.
(WebCore::Display::Run::setImage): Deleted.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (256457 => 256458)


--- trunk/Source/WebCore/ChangeLog	2020-02-12 18:59:46 UTC (rev 256457)
+++ trunk/Source/WebCore/ChangeLog	2020-02-12 19:07:24 UTC (rev 256458)
@@ -1,3 +1,29 @@
+2020-02-12  Zalan Bujtas  <[email protected]>
+
+        [LFC][IFC] Display::Run should not have any geometry mutation functions.
+        https://bugs.webkit.org/show_bug.cgi?id=207633
+        <rdar://problem/59386235>
+
+        Reviewed by Antti Koivisto.
+
+        Now that Display::Runs are constructed after merging the runs on the line, we don't need any of
+        these mutation functions.
+
+        * layout/displaytree/DisplayRun.h:
+        (WebCore::Display::Run::textContent const):
+        (WebCore::Display::Run::isLineBreak const):
+        (WebCore::Display::Run::lineIndex const):
+        (WebCore::Display::Run::setWidth): Deleted.
+        (WebCore::Display::Run::setTop): Deleted.
+        (WebCore::Display::Run::setlLeft): Deleted.
+        (WebCore::Display::Run::moveVertically): Deleted.
+        (WebCore::Display::Run::moveHorizontally): Deleted.
+        (WebCore::Display::Run::expandVertically): Deleted.
+        (WebCore::Display::Run::expandHorizontally): Deleted.
+        (WebCore::Display::Run::setTextContent): Deleted.
+        (WebCore::Display::Run::setExpansion): Deleted.
+        (WebCore::Display::Run::setImage): Deleted.
+
 2020-02-12  Megan Gardner  <[email protected]>
 
         Fix highlight text decorations to work with all decoration types and colors

Modified: trunk/Source/WebCore/layout/displaytree/DisplayRun.h (256457 => 256458)


--- trunk/Source/WebCore/layout/displaytree/DisplayRun.h	2020-02-12 18:59:46 UTC (rev 256457)
+++ trunk/Source/WebCore/layout/displaytree/DisplayRun.h	2020-02-12 19:07:24 UTC (rev 256458)
@@ -65,8 +65,6 @@
     struct Expansion;
     Run(size_t lineIndex, const Layout::Box&, const InlineRect&, const InlineRect& inkOverflow, Expansion, Optional<TextContent> = WTF::nullopt);
 
-    size_t lineIndex() const { return m_lineIndex; }
-
     const InlineRect& rect() const { return m_rect; }
     const InlineRect& inkOverflow() const { return m_inkOverflow; }
 
@@ -79,34 +77,24 @@
     InlineLayoutUnit width() const { return m_rect.width(); }
     InlineLayoutUnit height() const { return m_rect.height(); }
 
-    void setWidth(InlineLayoutUnit width) { m_rect.setWidth(width); }
-    void setTop(InlineLayoutUnit top) { m_rect.setTop(top); }
-    void setlLeft(InlineLayoutUnit left) { m_rect.setLeft(left); }
-    void moveVertically(InlineLayoutUnit delta) { m_rect.moveVertically(delta); }
-    void moveHorizontally(InlineLayoutUnit delta) { m_rect.moveHorizontally(delta); }
-    void expandVertically(InlineLayoutUnit delta) { m_rect.expandVertically(delta); }
-    void expandHorizontally(InlineLayoutUnit delta) { m_rect.expandHorizontally(delta); }
-
-    void setTextContent(const TextContent&& textContent) { m_textContent.emplace(textContent); }
+    Optional<TextContent>& textContent() { return m_textContent; }
     const Optional<TextContent>& textContent() const { return m_textContent; }
-    Optional<TextContent>& textContent() { return m_textContent; }
+    // FIXME: This information should be preserved at Run construction time.
+    bool isLineBreak() const { return layoutBox().isLineBreakBox() || (textContent() && textContent()->content() == "\n" && style().preserveNewline()); }
 
     struct Expansion {
         ExpansionBehavior behavior { DefaultExpansion };
         InlineLayoutUnit horizontalExpansion { 0 };
     };
-    void setExpansion(Expansion expansion) { m_expansion = expansion; }
     Expansion expansion() const { return m_expansion; }
 
-    void setImage(CachedImage& image) { m_cachedImage = &image; }
     CachedImage* image() const { return m_cachedImage; }
 
-    // FIXME: This information should be preserved at Run construction time.
-    bool isLineBreak() const { return layoutBox().isLineBreakBox() || (textContent() && textContent()->content() == "\n" && style().preserveNewline()); }
-
     const Layout::Box& layoutBox() const { return *m_layoutBox; }
     const RenderStyle& style() const { return m_layoutBox->style(); }
 
+    size_t lineIndex() const { return m_lineIndex; }
+
 private:
     // FIXME: Find out the Display::Run <-> paint style setup.
     const size_t m_lineIndex;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to