Changeset 254378 in webkit
- Timestamp:
- Jan 10, 2020 4:13:12 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r254376 r254378 1 2020-01-10 Antti Koivisto <antti@apple.com> 2 3 [LFC][Integration] Update style for layout boxes 4 https://bugs.webkit.org/show_bug.cgi?id=206074 5 6 Reviewed by Zalan Bujtas. 7 8 * fast/css/simple-color-change-expected.html: Added. 9 * fast/css/simple-color-change.html: Added. 10 1 11 2020-01-10 Brent Fulgham <bfulgham@apple.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r254374 r254378 1 2020-01-10 Antti Koivisto <antti@apple.com> 2 3 [LFC][Integration] Update style for layout boxes 4 https://bugs.webkit.org/show_bug.cgi?id=206074 5 6 Reviewed by Zalan Bujtas. 7 8 Test: fast/css/simple-color-change.html 9 10 For simple style changes we may keep the existing layout boxes. In this case we need to update the style. 11 12 * layout/integration/LayoutIntegrationLineLayout.cpp: 13 (WebCore::LayoutIntegration::LineLayout::updateStyle): 14 15 Update style in layout boxes. 16 17 (WebCore::LayoutIntegration::LineLayout::rootLayoutBox): 18 * layout/integration/LayoutIntegrationLineLayout.h: 19 20 Make root non-const. 21 22 * layout/layouttree/LayoutBox.h: 23 (WebCore::Layout::Box::nextSibling): 24 * layout/layouttree/LayoutContainer.h: 25 26 Expose non-const accessors. 27 28 * rendering/RenderBlockFlow.cpp: 29 (WebCore::RenderBlockFlow::styleDidChange): 30 31 Invoke LineLayout::updateStyle 32 1 33 2020-01-10 John Wilander <wilander@apple.com> 2 34 -
trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp
r254371 r254378 77 77 } 78 78 79 void LineLayout::updateStyle() 80 { 81 auto& root = rootLayoutBox(); 82 83 // FIXME: Encapsulate style updates better. 84 root.updateStyle(m_flow.style()); 85 86 for (auto* child = root.firstChild(); child; child = child->nextSibling()) { 87 if (child->isAnonymous()) 88 child->updateStyle(RenderStyle::createAnonymousStyleWithDisplay(root.style(), DisplayType::Inline)); 89 } 90 } 91 79 92 void LineLayout::layout() 80 93 { … … 200 213 } 201 214 215 Layout::Container& LineLayout::rootLayoutBox() 216 { 217 return m_treeContent->rootLayoutBox(); 218 } 219 202 220 void LineLayout::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) 203 221 { -
trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.h
r253287 r254378 61 61 static bool canUseFor(const RenderBlockFlow&); 62 62 63 void updateStyle(); 63 64 void layout(); 64 65 … … 81 82 private: 82 83 const Layout::Container& rootLayoutBox() const; 84 Layout::Container& rootLayoutBox(); 83 85 void prepareRootGeometryForLayout(); 84 86 ShadowData* debugTextShadow(); 85 87 86 88 const RenderBlockFlow& m_flow; 87 std::unique_ptr< constLayout::LayoutTreeContent> m_treeContent;89 std::unique_ptr<Layout::LayoutTreeContent> m_treeContent; 88 90 std::unique_ptr<Layout::LayoutState> m_layoutState; 89 91 LayoutUnit m_contentLogicalHeight; -
trunk/Source/WebCore/layout/layouttree/LayoutBox.h
r253985 r254378 131 131 const Box* previousInFlowOrFloatingSibling() const; 132 132 133 // FIXME: This is currently needed for style updates. 134 Box* nextSibling() { return m_nextSibling; } 135 133 136 bool isContainer() const { return m_baseTypeFlags & ContainerFlag; } 134 137 bool isBlockContainer() const { return isBlockLevelBox() && isContainer(); } -
trunk/Source/WebCore/layout/layouttree/LayoutContainer.h
r248290 r254378 49 49 const Box* lastInFlowOrFloatingChild() const; 50 50 51 // FIXME: This is currently needed for style updates. 52 Box* firstChild() { return m_firstChild; } 53 51 54 bool hasChild() const { return firstChild(); } 52 55 bool hasInFlowChild() const { return firstInFlowChild(); } -
trunk/Source/WebCore/rendering/RenderBlockFlow.cpp
r254087 r254378 2105 2105 if (multiColumnFlow()) 2106 2106 updateStylesForColumnChildren(); 2107 2108 #if ENABLE(LAYOUT_FORMATTING_CONTEXT) 2109 if (layoutFormattingContextLineLayout()) 2110 layoutFormattingContextLineLayout()->updateStyle(); 2111 #endif 2107 2112 } 2108 2113
Note: See TracChangeset
for help on using the changeset viewer.