Changeset 247153 in webkit
- Timestamp:
- Jul 5, 2019 7:24:23 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r247152 r247153 1 2019-07-05 Zalan Bujtas <zalan@apple.com> 2 3 [LFC][IFC] Inline runs should be relative to the line's top/left initially 4 https://bugs.webkit.org/show_bug.cgi?id=199157 5 <rdar://problem/52053415> 6 7 Reviewed by Antti Koivisto. 8 9 Let's construct the runs relative to the line's top/left and convert them relative to the formatting root's border box top/left 10 when the line is being closed. When the line moves (floats etc) we don't have to move each runs individually. 11 12 * layout/inlineformatting/InlineLine.cpp: 13 (WebCore::Layout::Line::close): 14 (WebCore::Layout::Line::moveLogicalLeft): 15 (WebCore::Layout::Line::appendInlineContainerStart): 16 (WebCore::Layout::Line::appendTextContent): 17 (WebCore::Layout::Line::appendNonReplacedInlineBox): 18 (WebCore::Layout::Line::appendHardLineBreak): 19 1 20 2019-07-05 Antti Koivisto <antti@apple.com> 2 21 -
trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp
r247151 r247153 141 141 } 142 142 run->logicalRect.setTop(logicalTop); 143 // Convert runs from relative to the line top/left to the formatting root's border box top/left. 144 run->logicalRect.moveVertically(this->logicalTop()); 145 run->logicalRect.moveHorizontally(this->logicalLeft()); 143 146 } 144 147 } … … 168 171 m_logicalTopLeft.move(delta, 0); 169 172 m_lineLogicalWidth -= delta; 170 for (auto& run : m_content->runs())171 run->logicalRect.moveHorizontally(delta);172 173 } 173 174 … … 212 213 { 213 214 auto logicalRect = Display::Rect { }; 214 logicalRect.setLeft(contentLogical Right());215 logicalRect.setLeft(contentLogicalWidth()); 215 216 logicalRect.setWidth(logicalWidth); 216 217 … … 265 266 266 267 auto logicalRect = Display::Rect { }; 267 logicalRect.setLeft(contentLogical Right());268 logicalRect.setLeft(contentLogicalWidth()); 268 269 logicalRect.setWidth(logicalWidth); 269 270 if (!m_skipVerticalAligment) { … … 288 289 auto logicalRect = Display::Rect { }; 289 290 290 logicalRect.setLeft(contentLogical Right() + horizontalMargin.start);291 logicalRect.setLeft(contentLogicalWidth() + horizontalMargin.start); 291 292 logicalRect.setWidth(logicalWidth); 292 293 if (!m_skipVerticalAligment) { … … 309 310 { 310 311 auto logicalRect = Display::Rect { }; 311 logicalRect.setLeft(contentLogical Right());312 logicalRect.setLeft(contentLogicalWidth()); 312 313 logicalRect.setWidth({ }); 313 314 if (!m_skipVerticalAligment) {
Note: See TracChangeset
for help on using the changeset viewer.