Changeset 248364 in webkit
- Timestamp:
- Aug 7, 2019, 7:23:54 AM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 added
- 9 edited
-
ChangeLog (modified) (1 diff)
-
Sources.txt (modified) (1 diff)
-
WebCore.xcodeproj/project.pbxproj (modified) (3 diffs)
-
layout/LayoutPhase.cpp (added)
-
layout/LayoutPhase.h (added)
-
layout/LayoutState.cpp (modified) (3 diffs)
-
layout/LayoutState.h (modified) (1 diff)
-
layout/floats/FloatingContext.cpp (modified) (1 diff)
-
layout/inlineformatting/InlineLine.cpp (modified) (1 diff)
-
layout/layouttree/LayoutBox.cpp (modified) (4 diffs)
-
layout/layouttree/LayoutTreeBuilder.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r248362 r248364 1 2019-08-07 Zalan Bujtas <zalan@apple.com> 2 3 [LFC] Introduce Layout::Phase class 4 https://bugs.webkit.org/show_bug.cgi?id=200473 5 <rdar://problem/53996061> 6 7 Reviewed by Antti Koivisto. 8 9 It helps to check whether we could run certain actions like layout while constructing the tree. 10 11 * Sources.txt: 12 * WebCore.xcodeproj/project.pbxproj: 13 * layout/LayoutState.h: 14 * layout/floats/FloatingContext.cpp: 15 * layout/inlineformatting/InlineLine.cpp: 16 * layout/layouttree/LayoutBox.cpp: 17 (WebCore::Layout::Box::establishesFormattingContext const): 18 (WebCore::Layout::Box::containingBlock const): 19 (WebCore::Layout::Box::formattingContextRoot const): 20 * layout/layouttree/LayoutTreeBuilder.cpp: 21 (WebCore::Layout::TreeBuilder::createLayoutTree): 22 1 23 2019-08-07 Chris Lord <clord@igalia.com> 2 24 -
trunk/Source/WebCore/Sources.txt
r248310 r248364 1386 1386 layout/FormattingContextQuirks.cpp 1387 1387 layout/FormattingState.cpp 1388 layout/LayoutPhase.cpp 1388 1389 layout/LayoutState.cpp 1389 1390 layout/Verification.cpp -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r248310 r248364 9135 9135 6F3E1F5F2136141700A65A08 /* FloatBox.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FloatBox.cpp; sourceTree = "<group>"; }; 9136 9136 6F3E1F612136141700A65A08 /* FloatBox.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FloatBox.h; sourceTree = "<group>"; }; 9137 6F4A5BD522F9F16B00A80F25 /* LayoutPhase.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutPhase.cpp; sourceTree = "<group>"; }; 9137 9138 6F73918C2106CEDD006AF262 /* LayoutUnits.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LayoutUnits.h; sourceTree = "<group>"; }; 9138 9139 6F7CA3C4208C2956002F29AB /* LayoutState.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LayoutState.h; sourceTree = "<group>"; }; … … 9185 9186 6FE7CFA02177EEF1005B1573 /* InlineItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InlineItem.h; sourceTree = "<group>"; }; 9186 9187 6FE9F09222211035004C5082 /* ContentChangeObserver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ContentChangeObserver.cpp; sourceTree = "<group>"; }; 9188 6FEFE81D22F9D22A00114927 /* LayoutPhase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LayoutPhase.h; sourceTree = "<group>"; }; 9187 9189 6FFDC43E212EFF1600A9CA91 /* FloatAvoider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FloatAvoider.cpp; sourceTree = "<group>"; }; 9188 9190 6FFDC440212EFF1600A9CA91 /* FloatAvoider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FloatAvoider.h; sourceTree = "<group>"; }; … … 16351 16353 115CFA74208AFE30001E6991 /* FormattingState.h */, 16352 16354 115F7805209CBCBD00739C13 /* Invalidation.h */, 16355 6F4A5BD522F9F16B00A80F25 /* LayoutPhase.cpp */, 16356 6FEFE81D22F9D22A00114927 /* LayoutPhase.h */, 16353 16357 6F7CA3C5208C2956002F29AB /* LayoutState.cpp */, 16354 16358 6F7CA3C4208C2956002F29AB /* LayoutState.h */, -
trunk/Source/WebCore/layout/LayoutState.cpp
r248290 r248364 39 39 #include "LayoutBox.h" 40 40 #include "LayoutContainer.h" 41 #include "LayoutPhase.h" 41 42 #include "LayoutTreeBuilder.h" 42 43 #include "RenderView.h" … … 72 73 void LayoutState::updateLayout() 73 74 { 75 PhaseScope scope(Phase::Type::Layout); 76 74 77 ASSERT(!m_formattingContextRootListForLayout.isEmpty()); 75 78 for (auto* layoutRoot : m_formattingContextRootListForLayout) … … 95 98 void LayoutState::styleChanged(const Box& layoutBox, StyleDiff styleDiff) 96 99 { 100 PhaseScope scope(Phase::Type::Invalidation); 101 97 102 auto& formattingState = formattingStateForBox(layoutBox); 98 103 const Container* invalidationRoot = nullptr; -
trunk/Source/WebCore/layout/LayoutState.h
r248290 r248364 37 37 namespace WebCore { 38 38 39 #if ENABLE(LAYOUT_FORMATTING_CONTEXT)40 39 class RenderView; 41 #endif42 40 43 41 namespace Display { -
trunk/Source/WebCore/layout/floats/FloatingContext.cpp
r245776 r248364 32 32 #include "FloatAvoider.h" 33 33 #include "FloatBox.h" 34 #include "FormattingContext.h" 34 35 #include "LayoutBox.h" 35 36 #include "LayoutContainer.h" -
trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp
r248200 r248364 29 29 #if ENABLE(LAYOUT_FORMATTING_CONTEXT) 30 30 31 #include "InlineFormattingContext.h" 32 #include "TextUtil.h" 31 33 #include <wtf/IsoMallocInlines.h> 32 34 -
trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp
r248200 r248364 30 30 31 31 #include "LayoutContainer.h" 32 #include "LayoutPhase.h" 32 33 #include "RenderStyle.h" 33 34 #include <wtf/IsoMallocInlines.h> … … 66 67 bool Box::establishesFormattingContext() const 67 68 { 69 // We need the final tree structure to tell whether a box establishes a certain formatting context. 70 ASSERT(!Phase::isInTreeBuilding()); 68 71 return establishesBlockFormattingContext() || establishesInlineFormattingContext() || establishesTableFormattingContext(); 69 72 } … … 178 181 const Container* Box::containingBlock() const 179 182 { 183 // Finding the containing block by traversing the tree during tree construction could provide incorrect result. 184 ASSERT(!Phase::isInTreeBuilding()); 180 185 // The containing block in which the root element lives is a rectangle called the initial containing block. 181 186 // For other elements, if the element's position is 'relative' or 'static', the containing block is formed by the … … 211 216 const Container& Box::formattingContextRoot() const 212 217 { 218 // Finding the context root by traversing the tree during tree construction could provide incorrect result. 219 ASSERT(!Phase::isInTreeBuilding()); 213 220 // We should never need to ask this question on the ICB. 214 221 ASSERT(!isInitialContainingBlock()); -
trunk/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp
r248290 r248364 36 36 #include "LayoutContainer.h" 37 37 #include "LayoutDescendantIterator.h" 38 #include "LayoutPhase.h" 38 39 #include "LayoutState.h" 39 40 #include "RenderBlock.h" … … 70 71 std::unique_ptr<Container> TreeBuilder::createLayoutTree(const RenderView& renderView) 71 72 { 73 PhaseScope scope(Phase::Type::TreeBuilding); 74 72 75 auto style = RenderStyle::clone(renderView.style()); 73 76 style.setLogicalWidth(Length(renderView.width(), Fixed));
Note:
See TracChangeset
for help on using the changeset viewer.