Changeset 250482 in webkit
- Timestamp:
- Sep 28, 2019 7:30:40 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r250464 r250482 1 2019-09-28 Zalan Bujtas <zalan@apple.com> 2 3 [LFC][IFC] Line::Box should have a const public interface 4 https://bugs.webkit.org/show_bug.cgi?id=202336 5 <rdar://problem/55798628> 6 7 Reviewed by Antti Koivisto. 8 9 Clean up Line::Box interface. 10 11 * layout/inlineformatting/InlineLine.cpp: 12 (WebCore::Layout::Line::close): 13 * layout/inlineformatting/InlineLine.h: 14 (WebCore::Layout::Line::Run::displayRun const): 15 (WebCore::Layout::Line::Run::isVisuallyEmpty const): 16 (WebCore::Layout::Line::Run::expand): 17 (WebCore::Layout::Line::Run::displayRun): Deleted. 18 1 19 2019-09-27 Chris Dumez <cdumez@apple.com> 2 20 -
trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp
r250439 r250482 179 179 ASSERT(previousRun->isText()); 180 180 ASSERT(currentRun->isText()); 181 auto& previousDisplayRun = previousRun->displayRun(); 182 auto& currentDisplayRun = currentRun->displayRun(); 183 previousDisplayRun.expandHorizontally(currentDisplayRun.logicalWidth()); 184 previousDisplayRun.textContext()->expand(currentDisplayRun.textContext()->length()); 181 previousRun->expand(*currentRun); 185 182 m_runList.remove(index); 186 183 } -
trunk/Source/WebCore/layout/inlineformatting/InlineLine.h
r250439 r250482 70 70 71 71 const Display::Run& displayRun() const { return m_displayRun; } 72 Display::Run& displayRun() { return m_displayRun; }73 72 const Box& layoutBox() const { return m_inlineItem.layoutBox(); } 74 73 75 74 const Display::Rect& logicalRect() const { return m_displayRun.logicalRect(); } 75 bool isVisuallyEmpty() const { return m_isVisuallyEmpty; } 76 76 77 77 bool isText() const { return m_inlineItem.isText(); } … … 81 81 bool isContainerEnd() const { return m_inlineItem.isContainerEnd(); } 82 82 83 bool isVisuallyEmpty() const { return m_isVisuallyEmpty; }84 bool isWhitespace() const;85 bool canBeExtended() const;86 87 83 private: 88 84 friend class Line; … … 90 86 void moveVertically(LayoutUnit offset) { m_displayRun.moveVertically(offset); } 91 87 void moveHorizontally(LayoutUnit offset) { m_displayRun.moveHorizontally(offset); } 88 89 void expand(const Run&); 90 92 91 void setVisuallyIsEmpty() { m_isVisuallyEmpty = true; } 92 93 bool isWhitespace() const; 94 bool canBeExtended() const; 93 95 94 96 const InlineItem& m_inlineItem; … … 142 144 }; 143 145 146 inline void Line::Run::expand(const Run& other) 147 { 148 ASSERT(isText()); 149 ASSERT(other.isText()); 150 151 auto& otherDisplayRun = other.displayRun(); 152 m_displayRun.expandHorizontally(otherDisplayRun.logicalWidth()); 153 m_displayRun.textContext()->expand(otherDisplayRun.textContext()->length()); 154 } 155 144 156 } 145 157 }
Note: See TracChangeset
for help on using the changeset viewer.