Changeset 245158 in webkit
- Timestamp:
- May 9, 2019, 2:37:56 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/ruby/continuation-and-column-spanner-crash-expected.txt (added)
-
LayoutTests/fast/ruby/continuation-and-column-spanner-crash.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/updating/RenderTreeBuilder.cpp (modified) (1 diff)
-
Source/WebCore/rendering/updating/RenderTreeBuilderContinuation.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r245157 r245158 1 2019-05-08 Zalan Bujtas <zalan@apple.com> 2 3 Do not mix inline and block level boxes. 4 https://bugs.webkit.org/show_bug.cgi?id=197462 5 <rdar://problem/50369362> 6 7 Reviewed by Antti Koivisto. 8 9 * fast/ruby/continuation-and-column-spanner-crash-expected.txt: Added. 10 * fast/ruby/continuation-and-column-spanner-crash.html: Added. 11 1 12 2019-05-09 Ryan Haddad <ryanhaddad@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r245156 r245158 1 2019-05-09 Zalan Bujtas <zalan@apple.com> 2 3 Do not mix inline and block level boxes. 4 https://bugs.webkit.org/show_bug.cgi?id=197462 5 <rdar://problem/50369362> 6 7 Reviewed by Antti Koivisto. 8 9 This patch tightens the remove-anonymous-wrappers logic by checking if the removal would 10 produce an inline-block sibling mix. 11 When a block level box is removed from the tree, we check if after the removal the anonymous sibling block 12 boxes are still needed or whether we can removed them as well (and have only inline level child boxes). 13 In addition to checking if the container is anonymous and is part of a continuation, we also need to check 14 if collapsing it (and by that moving its children one level up) would cause a inline-block box mix. 15 16 Test: fast/ruby/continuation-and-column-spanner-crash.html 17 18 * rendering/updating/RenderTreeBuilder.cpp: 19 (WebCore::RenderTreeBuilder::removeAnonymousWrappersForInlineChildrenIfNeeded): 20 * rendering/updating/RenderTreeBuilderContinuation.cpp: 21 (WebCore::RenderTreeBuilder::Continuation::cleanupOnDestroy): 22 1 23 2019-05-09 Eric Carlson <eric.carlson@apple.com> 2 24 -
trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp
r244115 r245158 685 685 // FIXME: We should also handle split inlines here - we exclude them at the moment by returning 686 686 // if we find a continuation. 687 auto* current = blockParent.firstChild(); 688 while (current && ((current->isAnonymousBlock() && !downcast<RenderBlock>(*current).isContinuation()) || current->style().isFloating() || current->style().hasOutOfFlowPosition())) 689 current = current->nextSibling(); 690 691 if (current) 692 return; 693 694 RenderObject* next; 695 for (current = blockParent.firstChild(); current; current = next) { 687 Optional<bool> shouldAllChildrenBeInline; 688 for (auto* current = blockParent.firstChild(); current; current = current->nextSibling()) { 689 if (current->style().isFloating() || current->style().hasOutOfFlowPosition()) 690 continue; 691 if (!current->isAnonymousBlock() || downcast<RenderBlock>(*current).isContinuation()) 692 return; 693 // Anonymous block not in continuation. Check if it holds a set of inline or block children and try not to mix them. 694 auto* firstChild = current->firstChildSlow(); 695 if (!firstChild) 696 continue; 697 auto isInlineLevelBox = firstChild->isInline(); 698 if (!shouldAllChildrenBeInline.hasValue()) { 699 shouldAllChildrenBeInline = isInlineLevelBox; 700 continue; 701 } 702 // Mixing inline and block level boxes? 703 if (*shouldAllChildrenBeInline != isInlineLevelBox) 704 return; 705 } 706 707 RenderObject* next = nullptr; 708 for (auto* current = blockParent.firstChild(); current; current = next) { 696 709 next = current->nextSibling(); 697 710 if (current->isAnonymousBlock()) -
trunk/Source/WebCore/rendering/updating/RenderTreeBuilderContinuation.cpp
r228938 r245158 38 38 void RenderTreeBuilder::Continuation::cleanupOnDestroy(RenderBoxModelObject& renderer) 39 39 { 40 if (!renderer.continuation() || renderer.isContinuation()) 40 if (!renderer.continuation() || renderer.isContinuation()) { 41 if (renderer.hasContinuationChainNode()) 42 renderer.removeFromContinuationChain(); 41 43 return; 44 } 42 45 43 46 ASSERT(renderer.hasContinuationChainNode());
Note:
See TracChangeset
for help on using the changeset viewer.