Changeset 238961 in webkit
- Timestamp:
- Dec 7, 2018 11:25:44 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r238958 r238961 1 2018-12-07 Antti Koivisto <antti@apple.com> 2 3 [LFC] Rename formattingContext() to createFormattingContext() 4 https://bugs.webkit.org/show_bug.cgi?id=192500 5 6 Reviewed by Zalan Bujtas. 7 8 * layout/FormattingContext.cpp: 9 (WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const): 10 * layout/FormattingState.h: 11 * layout/LayoutFormattingState.cpp: 12 (WebCore::Layout::LayoutState::layoutFormattingContextSubtree): 13 * layout/blockformatting/BlockFormattingState.cpp: 14 (WebCore::Layout::BlockFormattingState::createFormattingContext): 15 (WebCore::Layout::BlockFormattingState::formattingContext): Deleted. 16 * layout/blockformatting/BlockFormattingState.h: 17 * layout/inlineformatting/InlineFormattingContext.cpp: 18 (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot const): 19 * layout/inlineformatting/InlineFormattingState.h: 20 1 21 2018-12-07 Truitt Savell <tsavell@apple.com> 2 22 -
trunk/Source/WebCore/layout/FormattingContext.cpp
r238931 r238961 157 157 computeOutOfFlowHorizontalGeometry(layoutBox); 158 158 159 layoutState.createFormattingStateForFormattingRootIfNeeded(layoutBox). formattingContext(layoutBox)->layout();159 layoutState.createFormattingStateForFormattingRootIfNeeded(layoutBox).createFormattingContext(layoutBox)->layout(); 160 160 161 161 computeOutOfFlowVerticalGeometry(layoutBox); -
trunk/Source/WebCore/layout/FormattingContextGeometry.cpp
r238667 r238961 240 240 auto availableWidth = layoutState.displayBoxForLayoutBox(*formattingRoot.containingBlock()).width(); 241 241 auto& formattingState = layoutState.createFormattingStateForFormattingRootIfNeeded(formattingRoot); 242 auto instrinsicWidthConstraints = formattingState. formattingContext(formattingRoot)->instrinsicWidthConstraints();242 auto instrinsicWidthConstraints = formattingState.createFormattingContext(formattingRoot)->instrinsicWidthConstraints(); 243 243 return std::min(std::max(instrinsicWidthConstraints.minimum, availableWidth), instrinsicWidthConstraints.maximum); 244 244 } -
trunk/Source/WebCore/layout/FormattingState.h
r237633 r238961 47 47 virtual ~FormattingState(); 48 48 49 virtual std::unique_ptr<FormattingContext> formattingContext(const Box& formattingContextRoot) = 0;49 virtual std::unique_ptr<FormattingContext> createFormattingContext(const Box& formattingContextRoot) = 0; 50 50 51 51 FloatingState& floatingState() const { return m_floatingState; } -
trunk/Source/WebCore/layout/LayoutFormattingState.cpp
r238431 r238961 79 79 RELEASE_ASSERT(layoutRoot.establishesFormattingContext()); 80 80 auto& formattingState = createFormattingStateForFormattingRootIfNeeded(layoutRoot); 81 auto formattingContext = formattingState. formattingContext(layoutRoot);81 auto formattingContext = formattingState.createFormattingContext(layoutRoot); 82 82 formattingContext->layout(); 83 83 formattingContext->layoutOutOfFlowDescendants(layoutRoot); -
trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp
r238931 r238961 135 135 precomputeVerticalPositionForFormattingRootIfNeeded(layoutBox); 136 136 // Swich over to the new formatting context (the one that the root creates). 137 auto formattingContext = layoutState().createFormattingStateForFormattingRootIfNeeded(layoutBox). formattingContext(layoutBox);137 auto formattingContext = layoutState().createFormattingStateForFormattingRootIfNeeded(layoutBox).createFormattingContext(layoutBox); 138 138 formattingContext->layout(); 139 139 … … 418 418 instrinsicWidthConstraints = Geometry::instrinsicWidthConstraints(layoutState, childBox); 419 419 else if (childBox.establishesFormattingContext()) 420 instrinsicWidthConstraints = layoutState.createFormattingStateForFormattingRootIfNeeded(childBox). formattingContext(childBox)->instrinsicWidthConstraints();420 instrinsicWidthConstraints = layoutState.createFormattingStateForFormattingRootIfNeeded(childBox).createFormattingContext(childBox)->instrinsicWidthConstraints(); 421 421 formattingState.setInstrinsicWidthConstraints(childBox, instrinsicWidthConstraints); 422 422 -
trunk/Source/WebCore/layout/blockformatting/BlockFormattingState.cpp
r238667 r238961 47 47 } 48 48 49 std::unique_ptr<FormattingContext> BlockFormattingState:: formattingContext(const Box& formattingContextRoot)49 std::unique_ptr<FormattingContext> BlockFormattingState::createFormattingContext(const Box& formattingContextRoot) 50 50 { 51 51 ASSERT(formattingContextRoot.establishesBlockFormattingContext()); -
trunk/Source/WebCore/layout/blockformatting/BlockFormattingState.h
r237633 r238961 42 42 virtual ~BlockFormattingState(); 43 43 44 std::unique_ptr<FormattingContext> formattingContext(const Box& formattingContextRoot) override;44 std::unique_ptr<FormattingContext> createFormattingContext(const Box& formattingContextRoot) override; 45 45 }; 46 46 -
trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp
r238931 r238961 374 374 computeWidthAndMargin(root); 375 375 // Swich over to the new formatting context (the one that the root creates). 376 auto formattingContext = layoutState().createFormattingStateForFormattingRootIfNeeded(root). formattingContext(root);376 auto formattingContext = layoutState().createFormattingStateForFormattingRootIfNeeded(root).createFormattingContext(root); 377 377 formattingContext->layout(); 378 378 // Come back and finalize the root's height and margin. -
trunk/Source/WebCore/layout/inlineformatting/InlineFormattingState.cpp
r238400 r238961 45 45 } 46 46 47 std::unique_ptr<FormattingContext> InlineFormattingState:: formattingContext(const Box& formattingContextRoot)47 std::unique_ptr<FormattingContext> InlineFormattingState::createFormattingContext(const Box& formattingContextRoot) 48 48 { 49 49 ASSERT(formattingContextRoot.establishesInlineFormattingContext()); -
trunk/Source/WebCore/layout/inlineformatting/InlineFormattingState.h
r238400 r238961 44 44 virtual ~InlineFormattingState(); 45 45 46 std::unique_ptr<FormattingContext> formattingContext(const Box& formattingContextRoot) override;46 std::unique_ptr<FormattingContext> createFormattingContext(const Box& formattingContextRoot) override; 47 47 48 48 InlineContent& inlineContent() { return m_inlineContent; }
Note: See TracChangeset
for help on using the changeset viewer.