Changeset 282506 in webkit
- Timestamp:
- Sep 16, 2021, 1:31:45 AM (5 years ago)
- Location:
- releases/WebKitGTK/webkit-2.32/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
rendering/updating/RenderTreeBuilder.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog
r282505 r282506 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 Carlos Garcia Campos <cgarcia@igalia.com> 2 16 -
releases/WebKitGTK/webkit-2.32/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp
r280906 r282506 485 485 attachToRenderElementInternal(to, WTFMove(childToMove), beforeChild, ReinsertAfterMove::Yes); 486 486 } 487 488 auto findBFCRootAndDestroyInlineTree = [&] { 489 auto* containingBlock = &from; 490 while (containingBlock) { 491 containingBlock->setNeedsLayout(); 492 if (is<RenderBlockFlow>(*containingBlock)) { 493 downcast<RenderBlockFlow>(*containingBlock).deleteLines(); 494 break; 495 } 496 containingBlock = containingBlock->containingBlock(); 497 } 498 }; 499 // 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. 500 // 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.) 501 if (is<RenderInline>(child)) 502 findBFCRootAndDestroyInlineTree(); 487 503 } 488 504
Note:
See TracChangeset
for help on using the changeset viewer.