Changeset 256458 in webkit
- Timestamp:
- Feb 12, 2020 11:07:24 AM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r256451 r256458 1 2020-02-12 Zalan Bujtas <zalan@apple.com> 2 3 [LFC][IFC] Display::Run should not have any geometry mutation functions. 4 https://bugs.webkit.org/show_bug.cgi?id=207633 5 <rdar://problem/59386235> 6 7 Reviewed by Antti Koivisto. 8 9 Now that Display::Runs are constructed after merging the runs on the line, we don't need any of 10 these mutation functions. 11 12 * layout/displaytree/DisplayRun.h: 13 (WebCore::Display::Run::textContent const): 14 (WebCore::Display::Run::isLineBreak const): 15 (WebCore::Display::Run::lineIndex const): 16 (WebCore::Display::Run::setWidth): Deleted. 17 (WebCore::Display::Run::setTop): Deleted. 18 (WebCore::Display::Run::setlLeft): Deleted. 19 (WebCore::Display::Run::moveVertically): Deleted. 20 (WebCore::Display::Run::moveHorizontally): Deleted. 21 (WebCore::Display::Run::expandVertically): Deleted. 22 (WebCore::Display::Run::expandHorizontally): Deleted. 23 (WebCore::Display::Run::setTextContent): Deleted. 24 (WebCore::Display::Run::setExpansion): Deleted. 25 (WebCore::Display::Run::setImage): Deleted. 26 1 27 2020-02-12 Megan Gardner <megan_gardner@apple.com> 2 28 -
trunk/Source/WebCore/layout/displaytree/DisplayRun.h
r256437 r256458 66 66 Run(size_t lineIndex, const Layout::Box&, const InlineRect&, const InlineRect& inkOverflow, Expansion, Optional<TextContent> = WTF::nullopt); 67 67 68 size_t lineIndex() const { return m_lineIndex; }69 70 68 const InlineRect& rect() const { return m_rect; } 71 69 const InlineRect& inkOverflow() const { return m_inkOverflow; } … … 80 78 InlineLayoutUnit height() const { return m_rect.height(); } 81 79 82 void setWidth(InlineLayoutUnit width) { m_rect.setWidth(width); } 83 void setTop(InlineLayoutUnit top) { m_rect.setTop(top); } 84 void setlLeft(InlineLayoutUnit left) { m_rect.setLeft(left); } 85 void moveVertically(InlineLayoutUnit delta) { m_rect.moveVertically(delta); } 86 void moveHorizontally(InlineLayoutUnit delta) { m_rect.moveHorizontally(delta); } 87 void expandVertically(InlineLayoutUnit delta) { m_rect.expandVertically(delta); } 88 void expandHorizontally(InlineLayoutUnit delta) { m_rect.expandHorizontally(delta); } 89 90 void setTextContent(const TextContent&& textContent) { m_textContent.emplace(textContent); } 80 Optional<TextContent>& textContent() { return m_textContent; } 91 81 const Optional<TextContent>& textContent() const { return m_textContent; } 92 Optional<TextContent>& textContent() { return m_textContent; } 82 // FIXME: This information should be preserved at Run construction time. 83 bool isLineBreak() const { return layoutBox().isLineBreakBox() || (textContent() && textContent()->content() == "\n" && style().preserveNewline()); } 93 84 94 85 struct Expansion { … … 96 87 InlineLayoutUnit horizontalExpansion { 0 }; 97 88 }; 98 void setExpansion(Expansion expansion) { m_expansion = expansion; }99 89 Expansion expansion() const { return m_expansion; } 100 90 101 void setImage(CachedImage& image) { m_cachedImage = ℑ }102 91 CachedImage* image() const { return m_cachedImage; } 103 104 // FIXME: This information should be preserved at Run construction time.105 bool isLineBreak() const { return layoutBox().isLineBreakBox() || (textContent() && textContent()->content() == "\n" && style().preserveNewline()); }106 92 107 93 const Layout::Box& layoutBox() const { return *m_layoutBox; } 108 94 const RenderStyle& style() const { return m_layoutBox->style(); } 95 96 size_t lineIndex() const { return m_lineIndex; } 109 97 110 98 private:
Note: See TracChangeset
for help on using the changeset viewer.