Changeset 229474 in webkit
- Timestamp:
- Mar 9, 2018, 11:14:23 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r229469 r229474 1 2018-03-09 Zalan Bujtas <zalan@apple.com> 2 3 RenderTreeBuilder::splitAnonymousBoxesAroundChild should take multicolumn spanners into account. 4 https://bugs.webkit.org/show_bug.cgi?id=183493 5 <rdar://problem/38030461> 6 7 Reviewed by Antti Koivisto. 8 9 * fast/multicol/adjust-beforeChild-for-spanner-crash-expected.txt: Added. 10 * fast/multicol/adjust-beforeChild-for-spanner-crash.html: Added. 11 1 12 2018-03-09 Basuke Suzuki <Basuke.Suzuki@sony.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r229472 r229474 1 2018-03-09 Zalan Bujtas <zalan@apple.com> 2 3 RenderTreeBuilder::splitAnonymousBoxesAroundChild should take multicolumn spanners into account. 4 https://bugs.webkit.org/show_bug.cgi?id=183493 5 <rdar://problem/38030461> 6 7 Reviewed by Antti Koivisto. 8 9 Multicolumn spanners are taken out of their original position and placed next 10 to a RenderMultiColumnSet. splitAnonymousBoxesAroundChild needs to know the original parent (in the render tree context). 11 12 Test: fast/multicol/adjust-beforeChild-for-spanner-crash.html 13 14 * rendering/updating/RenderTreeBuilder.cpp: 15 (WebCore::RenderTreeBuilder::splitAnonymousBoxesAroundChild): 16 * rendering/updating/RenderTreeBuilder.h: 17 * rendering/updating/RenderTreeBuilderBlock.cpp: 18 (WebCore::RenderTreeBuilder::Block::attachIgnoringContinuation): 19 * rendering/updating/RenderTreeBuilderMultiColumn.cpp: 20 (WebCore::RenderTreeBuilder::MultiColumn::adjustBeforeChildForMultiColumnSpannerIfNeeded): 21 * rendering/updating/RenderTreeBuilderMultiColumn.h: 22 * rendering/updating/RenderTreeBuilderRuby.cpp: 23 (WebCore::RenderTreeBuilder::Ruby::moveChildrenInternal): 24 * rendering/updating/RenderTreeBuilderTable.cpp: 25 (WebCore::RenderTreeBuilder::Table::attach): 26 1 27 2018-03-09 Jer Noble <jer.noble@apple.com> 2 28 -
trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp
r229200 r229474 38 38 #include "RenderMathMLFenced.h" 39 39 #include "RenderMenuList.h" 40 #include "RenderMultiColumnFlow.h" 40 41 #include "RenderRuby.h" 41 42 #include "RenderRubyBase.h" … … 600 601 } 601 602 602 RenderObject* RenderTreeBuilder::splitAnonymousBoxesAroundChild(RenderBox& parent, RenderObject* beforeChild) 603 { 603 RenderObject* RenderTreeBuilder::splitAnonymousBoxesAroundChild(RenderBox& parent, RenderObject& originalBeforeChild) 604 { 605 // Adjust beforeChild if it is a column spanner and has been moved out of its original position. 606 auto* beforeChild = RenderTreeBuilder::MultiColumn::adjustBeforeChildForMultiColumnSpannerIfNeeded(originalBeforeChild); 604 607 bool didSplitParentAnonymousBoxes = false; 605 608 -
trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.h
r229200 r229474 81 81 void moveAllChildren(RenderBoxModelObject& from, RenderBoxModelObject& to, RenderObject* beforeChild, NormalizeAfterInsertion); 82 82 83 RenderObject* splitAnonymousBoxesAroundChild(RenderBox& parent, RenderObject * beforeChild);83 RenderObject* splitAnonymousBoxesAroundChild(RenderBox& parent, RenderObject& originalBeforeChild); 84 84 void makeChildrenNonInline(RenderBlock& parent, RenderObject* insertionPoint = nullptr); 85 85 void removeAnonymousWrappersForInlineChildrenIfNeeded(RenderElement& parent); -
trunk/Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp
r228938 r229474 194 194 } 195 195 196 beforeChild = m_builder.splitAnonymousBoxesAroundChild(parent, beforeChild);196 beforeChild = m_builder.splitAnonymousBoxesAroundChild(parent, *beforeChild); 197 197 198 198 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(beforeChild->parent() == &parent); -
trunk/Source/WebCore/rendering/updating/RenderTreeBuilderMultiColumn.cpp
r228938 r229474 408 408 } 409 409 410 } 410 RenderObject* RenderTreeBuilder::MultiColumn::adjustBeforeChildForMultiColumnSpannerIfNeeded(RenderObject& beforeChild) 411 { 412 if (!is<RenderBox>(beforeChild)) 413 return &beforeChild; 414 415 auto* nextSibling = beforeChild.nextSibling(); 416 if (!nextSibling) 417 return &beforeChild; 418 419 if (!is<RenderMultiColumnSet>(*nextSibling)) 420 return &beforeChild; 421 422 auto* multiColumnFlow = downcast<RenderMultiColumnSet>(*nextSibling).multiColumnFlow(); 423 if (!multiColumnFlow) 424 return &beforeChild; 425 426 return multiColumnFlow->findColumnSpannerPlaceholder(downcast<RenderBox>(&beforeChild)); 427 } 428 429 } -
trunk/Source/WebCore/rendering/updating/RenderTreeBuilderMultiColumn.h
r228954 r229474 44 44 void multiColumnDescendantInserted(RenderMultiColumnFlow&, RenderObject& newDescendant); 45 45 void multiColumnRelativeWillBeRemoved(RenderMultiColumnFlow&, RenderObject& relative); 46 static RenderObject* adjustBeforeChildForMultiColumnSpannerIfNeeded(RenderObject& beforeChild); 46 47 47 48 private: -
trunk/Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp
r228938 r229474 184 184 // and appends them to toBase. 185 185 if (beforeChild && beforeChild->parent() != &from) 186 beforeChild = m_builder.splitAnonymousBoxesAroundChild(from, beforeChild);186 beforeChild = m_builder.splitAnonymousBoxesAroundChild(from, *beforeChild); 187 187 188 188 if (from.childrenInline()) -
trunk/Source/WebCore/rendering/updating/RenderTreeBuilderTable.cpp
r228938 r229474 165 165 { 166 166 if (beforeChild && beforeChild->parent() != &parent) 167 beforeChild = m_builder.splitAnonymousBoxesAroundChild(parent, beforeChild);167 beforeChild = m_builder.splitAnonymousBoxesAroundChild(parent, *beforeChild); 168 168 169 169 auto& newChild = *child.get(); … … 178 178 { 179 179 if (beforeChild && beforeChild->parent() != &parent) 180 beforeChild = m_builder.splitAnonymousBoxesAroundChild(parent, beforeChild);180 beforeChild = m_builder.splitAnonymousBoxesAroundChild(parent, *beforeChild); 181 181 182 182 // FIXME: child should always be a RenderTableRow at this point. … … 190 190 { 191 191 if (beforeChild && beforeChild->parent() != &parent) 192 beforeChild = m_builder.splitAnonymousBoxesAroundChild(parent, beforeChild);192 beforeChild = m_builder.splitAnonymousBoxesAroundChild(parent, *beforeChild); 193 193 194 194 auto& newChild = *child.get();
Note:
See TracChangeset
for help on using the changeset viewer.