Changeset 268798 in webkit
- Timestamp:
- Oct 21, 2020, 9:21:04 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 11 edited
-
ChangeLog (modified) (1 diff)
-
layout/integration/LayoutIntegrationBoxTree.cpp (modified) (4 diffs)
-
layout/integration/LayoutIntegrationBoxTree.h (modified) (2 diffs)
-
layout/integration/LayoutIntegrationInlineContent.cpp (modified) (1 diff)
-
layout/integration/LayoutIntegrationInlineContent.h (modified) (1 diff)
-
layout/integration/LayoutIntegrationLineIteratorModernPath.h (modified) (2 diffs)
-
layout/integration/LayoutIntegrationLineLayout.cpp (modified) (18 diffs)
-
layout/integration/LayoutIntegrationLineLayout.h (modified) (7 diffs)
-
layout/integration/LayoutIntegrationRunIteratorModernPath.h (modified) (1 diff)
-
rendering/RenderBlockFlow.cpp (modified) (3 diffs)
-
rendering/RenderBox.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r268797 r268798 1 2020-10-21 Antti Koivisto <antti@apple.com> 2 3 [LFC][Integration] Update style of contained layout boxes 4 https://bugs.webkit.org/show_bug.cgi?id=218017 5 6 Reviewed by Zalan Bujtas. 7 8 Update layout box style on style change as needed. This fixes at least fast/replaced/max-width-percent.html with 9 image support enabled. 10 11 The patch also contains refactoring to make BoxTree non-const and moves the style update code there. 12 13 * layout/integration/LayoutIntegrationBoxTree.cpp: 14 (WebCore::LayoutIntegration::BoxTree::BoxTree): 15 (WebCore::LayoutIntegration::BoxTree::buildTree): 16 (WebCore::LayoutIntegration::BoxTree::updateStyle): 17 (WebCore::LayoutIntegration::BoxTree::layoutBoxForRenderer): 18 (WebCore::LayoutIntegration::BoxTree::layoutBoxForRenderer const): 19 (WebCore::LayoutIntegration::BoxTree::rendererForLayoutBox): 20 (WebCore::LayoutIntegration::BoxTree::rendererForLayoutBox const): 21 * layout/integration/LayoutIntegrationBoxTree.h: 22 (WebCore::LayoutIntegration::BoxTree::flow const): 23 (WebCore::LayoutIntegration::BoxTree::flow): 24 * layout/integration/LayoutIntegrationInlineContent.cpp: 25 (WebCore::LayoutIntegration::InlineContent::rendererForLayoutBox const): 26 * layout/integration/LayoutIntegrationInlineContent.h: 27 * layout/integration/LayoutIntegrationLineIteratorModernPath.h: 28 (WebCore::LayoutIntegration::LineIteratorModernPath::logicalStartRunWithNode const): 29 (WebCore::LayoutIntegration::LineIteratorModernPath::logicalEndRunWithNode const): 30 * layout/integration/LayoutIntegrationLineLayout.cpp: 31 (WebCore::LayoutIntegration::LineLayout::LineLayout): 32 (WebCore::LayoutIntegration::LineLayout::containing): 33 (WebCore::LayoutIntegration::LineLayout::updateReplacedDimensions): 34 (WebCore::LayoutIntegration::LineLayout::updateStyle): 35 (WebCore::LayoutIntegration::LineLayout::constructContent): 36 (WebCore::LayoutIntegration::LineLayout::textRunsFor const): 37 (WebCore::LayoutIntegration::LineLayout::runFor const): 38 (WebCore::LayoutIntegration::LineLayout::rendererForLayoutBox const): 39 (WebCore::LayoutIntegration::LineLayout::paint): 40 (WebCore::LayoutIntegration::LineLayout::hitTest): 41 * layout/integration/LayoutIntegrationLineLayout.h: 42 * layout/integration/LayoutIntegrationRunIteratorModernPath.h: 43 (WebCore::LayoutIntegration::RunIteratorModernPath::renderer const): 44 * rendering/RenderBlockFlow.cpp: 45 (WebCore::RenderBlockFlow::styleDidChange): 46 * rendering/RenderBox.cpp: 47 (WebCore::RenderBox::styleDidChange): 48 49 Update the line layout style. 50 1 51 2020-10-21 Philippe Normand <pnormand@igalia.com> 2 52 -
trunk/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp
r268660 r268798 49 49 } 50 50 51 BoxTree::BoxTree(const RenderBlockFlow& flow) 52 : m_root(rootBoxStyle(flow.style())) 51 BoxTree::BoxTree(RenderBlockFlow& flow) 52 : m_flow(flow) 53 , m_root(rootBoxStyle(flow.style())) 53 54 { 54 55 if (flow.isAnonymous()) 55 56 m_root.setIsAnonymous(); 56 57 57 buildTree( flow);58 buildTree(); 58 59 } 59 60 60 void BoxTree::buildTree( const RenderBlockFlow& flow)61 void BoxTree::buildTree() 61 62 { 62 for (auto& childRenderer : childrenOfType<RenderObject>( flow)) {63 for (auto& childRenderer : childrenOfType<RenderObject>(m_flow)) { 63 64 std::unique_ptr<Layout::Box> childBox; 64 65 if (is<RenderText>(childRenderer)) { … … 83 84 } 84 85 85 const Layout::Box* BoxTree::layoutBoxForRenderer(const RenderObject& renderer) const 86 void BoxTree::updateStyle(const RenderBoxModelObject& renderer) 86 87 { 88 auto& layoutBox = layoutBoxForRenderer(renderer); 89 auto& style = renderer.style(); 90 91 layoutBox.updateStyle(style); 92 93 if (&layoutBox == &m_root) { 94 for (auto* child = m_root.firstChild(); child; child = child->nextSibling()) { 95 if (child->isAnonymous()) 96 child->updateStyle(RenderStyle::createAnonymousStyleWithDisplay(style, DisplayType::Inline)); 97 } 98 } 99 } 100 101 Layout::Box& BoxTree::layoutBoxForRenderer(const RenderObject& renderer) 102 { 103 if (&renderer == &m_flow) 104 return m_root; 105 87 106 if (m_boxes.size() <= smallTreeThreshold) { 88 107 auto index = m_boxes.findMatching([&](auto& entry) { 89 108 return entry.renderer == &renderer; 90 109 }); 91 if (index == notFound) 92 return nullptr; 93 return m_boxes[index].box.get(); 110 ASSERT(index != notFound); 111 return *m_boxes[index].box; 94 112 } 95 113 … … 98 116 m_rendererToBoxMap.add(entry.renderer, entry.box.get()); 99 117 } 100 return m_rendererToBoxMap.get(&renderer);118 return *m_rendererToBoxMap.get(&renderer); 101 119 } 102 120 103 const RenderObject* BoxTree::rendererForLayoutBox(const Layout::Box& box) const121 const Layout::Box& BoxTree::layoutBoxForRenderer(const RenderObject& renderer) const 104 122 { 123 return const_cast<BoxTree&>(*this).layoutBoxForRenderer(renderer); 124 } 125 126 RenderObject& BoxTree::rendererForLayoutBox(const Layout::Box& box) 127 { 128 if (&box == &m_root) 129 return m_flow; 130 105 131 if (m_boxes.size() <= smallTreeThreshold) { 106 132 auto index = m_boxes.findMatching([&](auto& entry) { 107 133 return entry.box.get() == &box; 108 134 }); 109 if (index == notFound) 110 return nullptr; 111 return m_boxes[index].renderer; 135 ASSERT(index != notFound); 136 return *m_boxes[index].renderer; 112 137 } 113 138 … … 116 141 m_boxToRendererMap.add(entry.box.get(), entry.renderer); 117 142 } 118 return m_boxToRendererMap.get(&box); 143 return *m_boxToRendererMap.get(&box); 144 } 145 146 const RenderObject& BoxTree::rendererForLayoutBox(const Layout::Box& box) const 147 { 148 return const_cast<BoxTree&>(*this).rendererForLayoutBox(box); 119 149 } 120 150 -
trunk/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.h
r258820 r268798 35 35 36 36 class RenderBlockFlow; 37 class RenderBoxModelObject; 37 38 38 39 namespace LayoutIntegration { … … 40 41 class BoxTree { 41 42 public: 42 BoxTree(const RenderBlockFlow&); 43 BoxTree(RenderBlockFlow&); 44 45 void updateStyle(const RenderBoxModelObject&); 46 47 const RenderBlockFlow& flow() const { return m_flow; } 48 RenderBlockFlow& flow() { return m_flow; } 43 49 44 50 const Layout::InitialContainingBlock& rootLayoutBox() const { return m_root; } 45 51 Layout::InitialContainingBlock& rootLayoutBox() { return m_root; } 46 52 47 const Layout::Box* layoutBoxForRenderer(const RenderObject&) const; 48 const RenderObject* rendererForLayoutBox(const Layout::Box&) const; 53 const Layout::Box& layoutBoxForRenderer(const RenderObject&) const; 54 Layout::Box& layoutBoxForRenderer(const RenderObject&); 55 56 const RenderObject& rendererForLayoutBox(const Layout::Box&) const; 57 RenderObject& rendererForLayoutBox(const Layout::Box&); 49 58 50 59 private: 51 void buildTree( const RenderBlockFlow&);60 void buildTree(); 52 61 62 RenderBlockFlow& m_flow; 53 63 Layout::InitialContainingBlock m_root; 54 64 struct BoxAndRenderer { 55 std::unique_ptr< constLayout::Box> box;56 constRenderObject* renderer { nullptr };65 std::unique_ptr<Layout::Box> box; 66 RenderObject* renderer { nullptr }; 57 67 }; 58 68 Vector<BoxAndRenderer, 1> m_boxes; 59 69 60 mutable HashMap<const RenderObject*, constLayout::Box*> m_rendererToBoxMap;61 mutable HashMap<const Layout::Box*, constRenderObject*> m_boxToRendererMap;70 HashMap<const RenderObject*, Layout::Box*> m_rendererToBoxMap; 71 HashMap<const Layout::Box*, RenderObject*> m_boxToRendererMap; 62 72 }; 63 73 -
trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContent.cpp
r268055 r268798 62 62 } 63 63 64 const RenderObject *InlineContent::rendererForLayoutBox(const Layout::Box& layoutBox) const64 const RenderObject& InlineContent::rendererForLayoutBox(const Layout::Box& layoutBox) const 65 65 { 66 66 return m_lineLayout->rendererForLayoutBox(layoutBox); -
trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContent.h
r268202 r268798 62 62 63 63 const LineLayout& lineLayout() const; 64 const RenderObject *rendererForLayoutBox(const Layout::Box&) const;64 const RenderObject& rendererForLayoutBox(const Layout::Box&) const; 65 65 66 66 private: -
trunk/Source/WebCore/layout/integration/LayoutIntegrationLineIteratorModernPath.h
r268260 r268798 100 100 auto endIndex = startIndex + line().runCount(); 101 101 for (auto runIndex = startIndex; runIndex < endIndex; ++runIndex) { 102 auto& renderer = *m_inlineContent->rendererForLayoutBox(m_inlineContent->runs[runIndex].layoutBox());102 auto& renderer = m_inlineContent->rendererForLayoutBox(m_inlineContent->runs[runIndex].layoutBox()); 103 103 if (renderer.node()) 104 104 return { *m_inlineContent, runIndex }; … … 112 112 auto endIndex = startIndex + line().runCount(); 113 113 for (auto runIndex = endIndex; runIndex-- > startIndex;) { 114 auto& renderer = *m_inlineContent->rendererForLayoutBox(m_inlineContent->runs[runIndex].layoutBox());114 auto& renderer = m_inlineContent->rendererForLayoutBox(m_inlineContent->runs[runIndex].layoutBox()); 115 115 if (renderer.node()) 116 116 return { *m_inlineContent, runIndex }; -
trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp
r268764 r268798 56 56 namespace LayoutIntegration { 57 57 58 LineLayout::LineLayout(const RenderBlockFlow& flow) 59 : m_flow(flow) 60 , m_boxTree(flow) 61 , m_layoutState(m_flow.document(), rootLayoutBox()) 58 LineLayout::LineLayout(RenderBlockFlow& flow) 59 : m_boxTree(flow) 60 , m_layoutState(flow.document(), rootLayoutBox()) 62 61 , m_inlineFormattingState(m_layoutState.ensureInlineFormattingState(rootLayoutBox())) 63 62 { 64 m_layoutState.setIsIntegratedRootBoxFirstChild( m_flow.parent()->firstChild() == &m_flow);63 m_layoutState.setIsIntegratedRootBoxFirstChild(flow.parent()->firstChild() == &flow); 65 64 } 66 65 67 66 LineLayout::~LineLayout() = default; 67 68 LineLayout* LineLayout::containing(RenderObject& renderer) 69 { 70 if (auto* parent = renderer.parent()) { 71 if (is<RenderBlockFlow>(*parent)) 72 return downcast<RenderBlockFlow>(*parent).layoutFormattingContextLineLayout(); 73 } 74 75 return nullptr; 76 } 77 78 const LineLayout* LineLayout::containing(const RenderObject& renderer) 79 { 80 return containing(const_cast<RenderObject&>(renderer)); 81 } 68 82 69 83 bool LineLayout::isEnabled() … … 88 102 void LineLayout::updateReplacedDimensions(const RenderBox& replaced) 89 103 { 90 auto& layoutBox = *m_boxTree.layoutBoxForRenderer(replaced);91 auto& replacedBox = const_cast<Layout::ReplacedBox&>(downcast<Layout::ReplacedBox>(layoutBox));104 auto& layoutBox = m_boxTree.layoutBoxForRenderer(replaced); 105 auto& replacedBox = downcast<Layout::ReplacedBox>(layoutBox); 92 106 93 107 replacedBox.setContentSizeForIntegration({ replaced.contentLogicalWidth(), replaced.contentLogicalHeight() }); 94 108 } 95 109 96 void LineLayout::updateStyle() 97 { 98 auto& root = rootLayoutBox(); 99 100 // FIXME: Encapsulate style updates better. 101 root.updateStyle(m_flow.style()); 102 103 for (auto* child = root.firstChild(); child; child = child->nextSibling()) { 104 if (child->isAnonymous()) 105 child->updateStyle(RenderStyle::createAnonymousStyleWithDisplay(root.style(), DisplayType::Inline)); 106 } 110 void LineLayout::updateStyle(const RenderBoxModelObject& renderer) 111 { 112 m_boxTree.updateStyle(renderer); 107 113 } 108 114 … … 119 125 120 126 auto invalidationState = Layout::InvalidationState { }; 121 auto horizontalConstraints = Layout::HorizontalConstraints { m_flow.borderAndPaddingStart(), m_flow.contentSize().width() };122 auto verticalConstraints = Layout::VerticalConstraints { m_flow.borderAndPaddingBefore(), { } };127 auto horizontalConstraints = Layout::HorizontalConstraints { flow().borderAndPaddingStart(), flow().contentSize().width() }; 128 auto verticalConstraints = Layout::VerticalConstraints { flow().borderAndPaddingBefore(), { } }; 123 129 124 130 inlineFormattingContext.layoutInFlowContent(invalidationState, { horizontalConstraints, verticalConstraints }); … … 169 175 170 176 if (layoutBox.isReplacedBox()) { 171 auto& renderer = downcast<RenderBox>( *rendererForLayoutBox(layoutBox));177 auto& renderer = downcast<RenderBox>(m_boxTree.rendererForLayoutBox(layoutBox)); 172 178 auto borderBoxLocation = FloatPoint { runRect.x(), runRect.y() + m_layoutState.geometryForBox(layoutBox).marginBefore() }; 173 const_cast<RenderBox&>(renderer).setLocation(flooredLayoutPoint(borderBoxLocation));179 renderer.setLocation(flooredLayoutPoint(borderBoxLocation)); 174 180 } 175 181 } … … 187 193 auto overflowWidth = [&] { 188 194 // FIXME: It's the copy of the lets-adjust-overflow-for-the-caret behavior from ComplexLineLayout::addOverflowFromInlineChildren. 189 auto endPadding = m_flow.hasOverflowClip() ? m_flow.paddingEnd() : 0_lu;195 auto endPadding = flow().hasOverflowClip() ? flow().paddingEnd() : 0_lu; 190 196 if (!endPadding) 191 endPadding = m_flow.endPaddingWidthForCaret();192 if ( m_flow.hasOverflowClip() && !endPadding && m_flow.element() && m_flow.element()->isRootEditableElement())197 endPadding = flow().endPaddingWidthForCaret(); 198 if (flow().hasOverflowClip() && !endPadding && flow().element() && flow().element()->isRootEditableElement()) 193 199 endPadding = 1; 194 200 auto lineBoxLogicalWidth = lineBoxLogicalRect.width() + endPadding; … … 220 226 void LineLayout::prepareLayoutState() 221 227 { 222 m_layoutState.setViewportSize( m_flow.frame().view()->size());228 m_layoutState.setViewportSize(flow().frame().view()->size()); 223 229 224 230 auto& rootGeometry = m_layoutState.ensureGeometryForBox(rootLayoutBox()); 225 rootGeometry.setContentBoxWidth( m_flow.contentSize().width());231 rootGeometry.setContentBoxWidth(flow().contentSize().width()); 226 232 rootGeometry.setPadding({ { } }); 227 233 rootGeometry.setBorder({ }); … … 235 241 floatingState.clear(); 236 242 237 if (! m_flow.containsFloats())243 if (!flow().containsFloats()) 238 244 return; 239 245 240 for (auto& floatingObject : * m_flow.floatingObjectSet()) {246 for (auto& floatingObject : *flow().floatingObjectSet()) { 241 247 auto& rect = floatingObject->frameRect(); 242 248 auto position = floatingObject->type() == FloatingObject::FloatRight … … 302 308 } 303 309 304 void LineLayout::adjustForPagination(RenderBlockFlow& flow) 305 { 306 ASSERT(&flow == &m_flow); 307 auto paginedInlineContent = adjustLinePositionsForPagination(*m_inlineContent, flow); 310 void LineLayout::adjustForPagination() 311 { 312 auto paginedInlineContent = adjustLinePositionsForPagination(*m_inlineContent, flow()); 308 313 if (paginedInlineContent.ptr() == m_inlineContent) { 309 314 m_paginatedHeight = { }; … … 317 322 } 318 323 319 void LineLayout::collectOverflow(RenderBlockFlow& flow) 320 { 321 ASSERT(&flow == &m_flow); 322 324 void LineLayout::collectOverflow() 325 { 323 326 for (auto& line : inlineContent()->lines) { 324 flow .addLayoutOverflow(Layout::toLayoutRect(line.scrollableOverflow()));325 if (!flow .hasOverflowClip())326 flow .addVisualOverflow(Layout::toLayoutRect(line.inkOverflow()));327 flow().addLayoutOverflow(Layout::toLayoutRect(line.scrollableOverflow())); 328 if (!flow().hasOverflowClip()) 329 flow().addVisualOverflow(Layout::toLayoutRect(line.inkOverflow())); 327 330 } 328 331 } … … 339 342 if (!m_inlineContent) 340 343 return { }; 341 auto* layoutBox = m_boxTree.layoutBoxForRenderer(renderText); 342 ASSERT(layoutBox); 344 auto& layoutBox = m_boxTree.layoutBoxForRenderer(renderText); 343 345 344 346 auto firstIndex = [&]() -> Optional<size_t> { 345 347 for (size_t i = 0; i < m_inlineContent->runs.size(); ++i) { 346 if (&m_inlineContent->runs[i].layoutBox() == layoutBox)348 if (&m_inlineContent->runs[i].layoutBox() == &layoutBox) 347 349 return i; 348 350 } … … 360 362 if (!m_inlineContent) 361 363 return { }; 362 auto* layoutBox = m_boxTree.layoutBoxForRenderer(renderElement); 363 ASSERT(layoutBox); 364 auto& layoutBox = m_boxTree.layoutBoxForRenderer(renderElement); 364 365 365 366 for (size_t i = 0; i < m_inlineContent->runs.size(); ++i) { 366 367 auto& run = m_inlineContent->runs[i]; 367 if (&run.layoutBox() == layoutBox)368 if (&run.layoutBox() == &layoutBox) 368 369 return { RunIteratorModernPath(*m_inlineContent, i) }; 369 370 } … … 372 373 } 373 374 374 const RenderObject *LineLayout::rendererForLayoutBox(const Layout::Box& layoutBox) const375 const RenderObject& LineLayout::rendererForLayoutBox(const Layout::Box& layoutBox) const 375 376 { 376 377 return m_boxTree.rendererForLayoutBox(layoutBox); … … 396 397 397 398 auto& inlineContent = *m_inlineContent; 398 float deviceScaleFactor = m_flow.document().deviceScaleFactor();399 float deviceScaleFactor = flow().document().deviceScaleFactor(); 399 400 400 401 auto paintRect = paintInfo.rect; … … 403 404 for (auto& run : inlineContent.runsForRect(paintRect)) { 404 405 if (!run.textContent()) { 405 auto *renderer = m_boxTree.rendererForLayoutBox(run.layoutBox());406 if (renderer && renderer->isReplaced() && is<RenderBox>(*renderer)) {407 auto& renderBox = const_cast<RenderBox&>(downcast<RenderBox>(*renderer));406 auto& renderer = m_boxTree.rendererForLayoutBox(run.layoutBox()); 407 if (renderer.isReplaced() && is<RenderBox>(renderer)) { 408 auto& renderBox = downcast<RenderBox>(renderer); 408 409 if (renderBox.hasSelfPaintingLayer()) 409 410 continue; … … 450 451 TextPainter textPainter(paintInfo.context()); 451 452 textPainter.setFont(style.fontCascade()); 452 textPainter.setStyle(computeTextPaintStyle( m_flow.frame(), style, paintInfo));453 textPainter.setStyle(computeTextPaintStyle(flow().frame(), style, paintInfo)); 453 454 if (auto* debugShadow = debugTextShadow()) 454 455 textPainter.setShadow(debugShadow); … … 459 460 if (!style.textDecorationsInEffect().isEmpty()) { 460 461 // FIXME: Use correct RenderText. 461 if (auto* textRenderer = childrenOfType<RenderText>( m_flow).first()) {462 if (auto* textRenderer = childrenOfType<RenderText>(flow()).first()) { 462 463 auto painter = TextDecorationPainter { paintInfo.context(), style.textDecorationsInEffect(), *textRenderer, false, style.fontCascade() }; 463 464 painter.setWidth(rect.width()); … … 490 491 continue; 491 492 492 auto& renderer = const_cast<RenderObject&>(*m_boxTree.rendererForLayoutBox(run.layoutBox()));493 auto& renderer = m_boxTree.rendererForLayoutBox(run.layoutBox()); 493 494 494 495 renderer.updateHitTestResult(result, locationInContainer.point() - toLayoutSize(accumulatedOffset)); … … 502 503 ShadowData* LineLayout::debugTextShadow() 503 504 { 504 if (! m_flow.settings().simpleLineLayoutDebugBordersEnabled())505 if (!flow().settings().simpleLineLayoutDebugBordersEnabled()) 505 506 return nullptr; 506 507 -
trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.h
r268598 r268798 43 43 class RenderBlockFlow; 44 44 class RenderBox; 45 class RenderBoxModelObject; 45 46 struct PaintInfo; 46 47 … … 52 53 WTF_MAKE_FAST_ALLOCATED; 53 54 public: 54 LineLayout( constRenderBlockFlow&);55 LineLayout(RenderBlockFlow&); 55 56 ~LineLayout(); 57 58 static LineLayout* containing(RenderObject&); 59 static const LineLayout* containing(const RenderObject&); 56 60 57 61 static bool isEnabled(); … … 60 64 61 65 void updateReplacedDimensions(const RenderBox&); 62 void updateStyle( );66 void updateStyle(const RenderBoxModelObject&); 63 67 void layout(); 64 68 … … 69 73 LayoutUnit lastLineBaseline() const; 70 74 71 void adjustForPagination( RenderBlockFlow&);72 void collectOverflow( RenderBlockFlow&);75 void adjustForPagination(); 76 void collectOverflow(); 73 77 74 78 const InlineContent* inlineContent() const { return m_inlineContent.get(); } … … 81 85 RunIterator runFor(const RenderElement&) const; 82 86 83 const RenderObject *rendererForLayoutBox(const Layout::Box&) const;87 const RenderObject& rendererForLayoutBox(const Layout::Box&) const; 84 88 85 89 static void releaseCaches(RenderView&); … … 91 95 InlineContent& ensureInlineContent(); 92 96 97 RenderBlockFlow& flow() { return m_boxTree.flow(); } 98 const RenderBlockFlow& flow() const { return m_boxTree.flow(); } 99 93 100 const Layout::ContainerBox& rootLayoutBox() const; 94 101 Layout::ContainerBox& rootLayoutBox(); … … 96 103 void releaseInlineItemCache(); 97 104 98 const RenderBlockFlow& m_flow;99 105 BoxTree m_boxTree; 100 106 Layout::LayoutState m_layoutState; -
trunk/Source/WebCore/layout/integration/LayoutIntegrationRunIteratorModernPath.h
r268520 r268798 118 118 const RenderObject& renderer() const 119 119 { 120 return *m_inlineContent->rendererForLayoutBox(run().layoutBox());120 return m_inlineContent->rendererForLayoutBox(run().layoutBox()); 121 121 } 122 122 -
trunk/Source/WebCore/rendering/RenderBlockFlow.cpp
r268667 r268798 2104 2104 if (shouldInvalidateLineLayoutPath()) 2105 2105 invalidateLineLayoutPath(); 2106 2107 #if ENABLE(LAYOUT_FORMATTING_CONTEXT) 2108 if (auto* lineLayout = layoutFormattingContextLineLayout()) 2109 lineLayout->updateStyle(*this); 2110 #endif 2106 2111 } 2107 2112 2108 2113 if (multiColumnFlow()) 2109 2114 updateStylesForColumnChildren(); 2110 2111 #if ENABLE(LAYOUT_FORMATTING_CONTEXT)2112 if (layoutFormattingContextLineLayout())2113 layoutFormattingContextLineLayout()->updateStyle();2114 #endif2115 2115 } 2116 2116 … … 2989 2989 #if ENABLE(LAYOUT_FORMATTING_CONTEXT) 2990 2990 if (layoutFormattingContextLineLayout()) { 2991 layoutFormattingContextLineLayout()->collectOverflow( *this);2991 layoutFormattingContextLineLayout()->collectOverflow(); 2992 2992 return; 2993 2993 } … … 3677 3677 3678 3678 if (view().frameView().layoutContext().layoutState()->isPaginated()) 3679 layoutFormattingContextLineLayout.adjustForPagination( *this);3679 layoutFormattingContextLineLayout.adjustForPagination(); 3680 3680 3681 3681 auto contentHeight = layoutFormattingContextLineLayout.contentLogicalHeight(); -
trunk/Source/WebCore/rendering/RenderBox.cpp
r268666 r268798 48 48 #include "HitTestResult.h" 49 49 #include "InlineElementBox.h" 50 #include "LayoutIntegrationLineLayout.h" 50 51 #include "Page.h" 51 52 #include "PaintInfo.h" … … 408 409 if (isOutOfFlowPositioned() && parent() && parent()->style().isDisplayFlexibleOrGridBox()) 409 410 clearOverrideContentSize(); 411 412 if (diff == StyleDifference::Layout) { 413 if (auto* lineLayout = LayoutIntegration::LineLayout::containing(*this)) 414 lineLayout->updateStyle(*this); 415 } 410 416 } 411 417
Note:
See TracChangeset
for help on using the changeset viewer.