Changeset 259611 in webkit
- Timestamp:
- Apr 6, 2020, 4:34:51 PM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
rendering/RenderBlockFlow.cpp (modified) (2 diffs)
-
rendering/RenderText.cpp (modified) (2 diffs)
-
rendering/RenderText.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r259606 r259611 1 2020-04-06 Zalan Bujtas <zalan@apple.com> 2 3 Delete line boxes when moving text renderers between block flows 4 https://bugs.webkit.org/show_bug.cgi?id=210000 5 6 Reviewed by Antti Koivisto. 7 8 After style and/or tree mutation the existing line boxes are destroyed during the subsequent layout. 9 When the text renderer moves between block flows and the destination block flow initiates a different 10 type of line layout, we need to make sure the previous line content is cleaned up properly. 11 12 * rendering/RenderBlockFlow.cpp: 13 (WebCore::RenderBlockFlow::layoutSimpleLines): 14 (WebCore::RenderBlockFlow::layoutLFCLines): 15 * rendering/RenderText.cpp: 16 (WebCore::RenderText::removeAndDestroyTextBoxes): 17 (WebCore::RenderText::dirtyLineBoxes): 18 (WebCore::RenderText::deleteLineBoxes): 19 * rendering/RenderText.h: 20 1 21 2020-04-06 Ross Kirsling <ross.kirsling@sony.com> 2 22 -
trunk/Source/WebCore/rendering/RenderBlockFlow.cpp
r259455 r259611 3716 3716 } 3717 3717 3718 for (auto& renderer : childrenOfType<RenderObject>(*this)) 3718 for (auto& renderer : childrenOfType<RenderObject>(*this)) { 3719 if (is<RenderText>(renderer)) 3720 downcast<RenderText>(renderer).deleteLineBoxes(); 3719 3721 renderer.clearNeedsLayout(); 3722 } 3720 3723 3721 3724 LayoutUnit lineLayoutHeight = SimpleLineLayout::computeFlowHeight(*this, simpleLineLayout); … … 3734 3737 auto& layoutFormattingContextLineLayout = *this->layoutFormattingContextLineLayout(); 3735 3738 3736 for (auto& renderer : childrenOfType<RenderObject>(*this)) 3739 for (auto& renderer : childrenOfType<RenderObject>(*this)) { 3740 if (is<RenderText>(renderer)) 3741 downcast<RenderText>(renderer).deleteLineBoxes(); 3737 3742 renderer.clearNeedsLayout(); 3743 } 3738 3744 3739 3745 layoutFormattingContextLineLayout.layout(); -
trunk/Source/WebCore/rendering/RenderText.cpp
r257899 r259611 281 281 m_lineBoxes.invalidateParentChildLists(); 282 282 #endif 283 m_lineBoxes.deleteAll();283 deleteLineBoxes(); 284 284 } 285 285 … … 1299 1299 { 1300 1300 if (fullLayout) 1301 m_lineBoxes.deleteAll();1301 deleteLineBoxes(); 1302 1302 else if (!m_linesDirty) 1303 1303 m_lineBoxes.dirtyAll(); 1304 1304 m_linesDirty = false; 1305 } 1306 1307 void RenderText::deleteLineBoxes() 1308 { 1309 m_lineBoxes.deleteAll(); 1305 1310 } 1306 1311 -
trunk/Source/WebCore/rendering/RenderText.h
r256196 r259611 72 72 InlineTextBox* createInlineTextBox() { return m_lineBoxes.createAndAppendLineBox(*this); } 73 73 void dirtyLineBoxes(bool fullLayout); 74 void deleteLineBoxes(); 74 75 75 76 void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const final;
Note:
See TracChangeset
for help on using the changeset viewer.