Changeset 270544 in webkit
- Timestamp:
- Dec 8, 2020, 10:25:26 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 7 edited
-
ChangeLog (modified) (1 diff)
-
layout/integration/LayoutIntegrationLineLayout.cpp (modified) (2 diffs)
-
layout/integration/LayoutIntegrationLineLayout.h (modified) (1 diff)
-
rendering/RenderObject.cpp (modified) (2 diffs)
-
rendering/RenderText.cpp (modified) (1 diff)
-
rendering/updating/RenderTreeBuilder.cpp (modified) (1 diff)
-
rendering/updating/RenderTreeBuilderBlock.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r270541 r270544 1 2020-12-08 Antti Koivisto <antti@apple.com> 2 3 [LFC][Integration] Invalidate line layout path for children of inlines 4 https://bugs.webkit.org/show_bug.cgi?id=219639 5 6 Reviewed by Zalan Bujtas. 7 8 We currently assume you can just invalidate the direct parent. 9 10 * layout/integration/LayoutIntegrationLineLayout.cpp: 11 (WebCore::LayoutIntegration::LineLayout::blockContainer): 12 (WebCore::LayoutIntegration::LineLayout::containing): 13 * layout/integration/LayoutIntegrationLineLayout.h: 14 * rendering/RenderObject.cpp: 15 (WebCore::RenderObject::insertedIntoTree): 16 (WebCore::RenderObject::willBeRemovedFromTree): 17 18 Invalidate here. 19 20 * rendering/RenderText.cpp: 21 (WebCore::RenderText::setText): 22 * rendering/updating/RenderTreeBuilder.cpp: 23 (WebCore::RenderTreeBuilder::attachToRenderElementInternal): 24 * rendering/updating/RenderTreeBuilderBlock.cpp: 25 (WebCore::RenderTreeBuilder::Block::attachIgnoringContinuation): 26 (WebCore::RenderTreeBuilder::Block::detach): 27 1 28 2020-12-08 Rob Buis <rbuis@igalia.com> 2 29 -
trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp
r270485 r270544 69 69 LineLayout::~LineLayout() = default; 70 70 71 LineLayout* LineLayout::containing(RenderObject& renderer) 72 { 73 if (!renderer.isInline()) 74 return nullptr; 75 71 RenderBlockFlow* LineLayout::blockContainer(RenderObject& renderer) 72 { 76 73 // FIXME: These fake renderers have their parent set but are not actually in the tree. 77 74 if (renderer.isReplica() || renderer.isRenderScrollbarPart()) … … 79 76 80 77 for (auto* parent = renderer.parent(); parent; parent = parent->parent()) { 78 if (!parent->childrenInline()) 79 return nullptr; 81 80 if (is<RenderBlockFlow>(*parent)) 82 return downcast<RenderBlockFlow>(*parent).modernLineLayout(); 83 if (!is<RenderInline>(*parent)) 84 return nullptr; 85 } 81 return downcast<RenderBlockFlow>(parent); 82 } 83 84 return nullptr; 85 } 86 87 LineLayout* LineLayout::containing(RenderObject& renderer) 88 { 89 if (!renderer.isInline()) 90 return nullptr; 91 92 if (auto* container = blockContainer(renderer)) 93 return container->modernLineLayout(); 86 94 87 95 return nullptr; -
trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.h
r270539 r270544 57 57 ~LineLayout(); 58 58 59 static RenderBlockFlow* blockContainer(RenderObject&); 59 60 static LineLayout* containing(RenderObject&); 60 61 static const LineLayout* containing(const RenderObject&); -
trunk/Source/WebCore/rendering/RenderObject.cpp
r270539 r270544 1467 1467 void RenderObject::insertedIntoTree() 1468 1468 { 1469 if (auto* container = LayoutIntegration::LineLayout::blockContainer(*this)) 1470 container->invalidateLineLayoutPath(); 1471 1469 1472 // FIXME: We should ASSERT(isRooted()) here but generated content makes some out-of-order insertion. 1470 1473 if (!isFloating() && parent()->childrenInline()) … … 1474 1477 void RenderObject::willBeRemovedFromTree() 1475 1478 { 1479 if (auto* container = LayoutIntegration::LineLayout::blockContainer(*this)) 1480 container->invalidateLineLayoutPath(); 1481 1476 1482 // FIXME: We should ASSERT(isRooted()) but we have some out-of-order removals which would need to be fixed first. 1477 1483 // Update cached boundaries in SVG renderers, if a child is removed. -
trunk/Source/WebCore/rendering/RenderText.cpp
r270539 r270544 1462 1462 m_knownToHaveNoOverflowAndNoFallbackFonts = false; 1463 1463 1464 if ( is<RenderBlockFlow>(*parent()))1465 downcast<RenderBlockFlow>(*parent()).invalidateLineLayoutPath();1464 if (auto* container = LayoutIntegration::LineLayout::blockContainer(*this)) 1465 container->invalidateLineLayoutPath(); 1466 1466 1467 1467 if (AXObjectCache* cache = document().existingAXObjectCache()) -
trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp
r267180 r270544 461 461 if (AXObjectCache* cache = parent.document().axObjectCache()) 462 462 cache->childrenChanged(&parent, newChild); 463 if (is<RenderBlockFlow>(parent)) 464 downcast<RenderBlockFlow>(parent).invalidateLineLayoutPath(); 463 465 464 if (parent.hasOutlineAutoAncestor() || parent.outlineStyleForRepaint().outlineStyleIsAuto() == OutlineIsAuto::On) 466 465 newChild->setHasOutlineAutoAncestor(); -
trunk/Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp
r269954 r270544 244 244 } 245 245 246 parent.invalidateLineLayoutPath();247 248 246 m_builder.attachToRenderElement(parent, WTFMove(child), beforeChild); 249 247 … … 292 290 auto next = makeWeakPtr(oldChild.nextSibling()); 293 291 bool canMergeAnonymousBlocks = canMergeContiguousAnonymousBlocks(oldChild, prev.get(), next.get()); 294 295 parent.invalidateLineLayoutPath();296 292 297 293 auto takenChild = m_builder.detachFromRenderElement(parent, oldChild);
Note:
See TracChangeset
for help on using the changeset viewer.