Changeset 276014 in webkit
- Timestamp:
- Apr 15, 2021, 3:07:42 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
rendering/updating/RenderTreeBuilder.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r276013 r276014 1 2021-04-15 Zalan Bujtas <zalan@apple.com> 2 3 [RenderTreeBuilder] Cleanup the inline tree when moving subtrees 4 https://bugs.webkit.org/show_bug.cgi?id=224342 5 <rdar://76349279> 6 7 Reviewed by Antti Koivisto. 8 9 When an inline box is moved over to a different BFC (<span>), any inline level descendant (<span><img></span>) should be invalidated. The safest way to do this is 10 to destroy the inline tree (the "subtree moving" will eventually be replaced by "destroy followed by construct" activity). 11 12 * rendering/updating/RenderTreeBuilder.cpp: 13 (WebCore::RenderTreeBuilder::move): 14 1 15 2021-04-15 Youenn Fablet <youenn@apple.com> 2 16 -
trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp
r275852 r276014 487 487 attachToRenderElementInternal(to, WTFMove(childToMove), beforeChild, RenderObject::IsInternalMove::Yes); 488 488 } 489 490 auto findBFCRootAndDestroyInlineTree = [&] { 491 auto* containingBlock = &from; 492 while (containingBlock) { 493 containingBlock->setNeedsLayout(); 494 if (is<RenderBlockFlow>(*containingBlock)) { 495 downcast<RenderBlockFlow>(*containingBlock).deleteLines(); 496 break; 497 } 498 containingBlock = containingBlock->containingBlock(); 499 } 500 }; 501 // When moving a subtree out of a BFC we need to make sure that the line boxes generated for the inline tree are not accessible anymore from the renderers. 502 // Let's find the BFC root and nuke the inline tree (At some point we are going to destroy the subtree instead of moving these renderers around.) 503 if (is<RenderInline>(child)) 504 findBFCRootAndDestroyInlineTree(); 489 505 } 490 506
Note:
See TracChangeset
for help on using the changeset viewer.