Changeset 238961 in webkit


Ignore:
Timestamp:
Dec 7, 2018 11:25:44 AM (5 years ago)
Author:
Antti Koivisto
Message:

[LFC] Rename formattingContext() to createFormattingContext()
https://bugs.webkit.org/show_bug.cgi?id=192500

Reviewed by Zalan Bujtas.

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const):

  • layout/FormattingState.h:
  • layout/LayoutFormattingState.cpp:

(WebCore::Layout::LayoutState::layoutFormattingContextSubtree):

  • layout/blockformatting/BlockFormattingState.cpp:

(WebCore::Layout::BlockFormattingState::createFormattingContext):
(WebCore::Layout::BlockFormattingState::formattingContext): Deleted.

  • layout/blockformatting/BlockFormattingState.h:
  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot const):

  • layout/inlineformatting/InlineFormattingState.h:
Location:
trunk/Source/WebCore
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r238958 r238961  
     12018-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
    1212018-12-07  Truitt Savell  <tsavell@apple.com>
    222
  • trunk/Source/WebCore/layout/FormattingContext.cpp

    r238931 r238961  
    157157        computeOutOfFlowHorizontalGeometry(layoutBox);
    158158
    159         layoutState.createFormattingStateForFormattingRootIfNeeded(layoutBox).formattingContext(layoutBox)->layout();
     159        layoutState.createFormattingStateForFormattingRootIfNeeded(layoutBox).createFormattingContext(layoutBox)->layout();
    160160
    161161        computeOutOfFlowVerticalGeometry(layoutBox);
  • trunk/Source/WebCore/layout/FormattingContextGeometry.cpp

    r238667 r238961  
    240240    auto availableWidth = layoutState.displayBoxForLayoutBox(*formattingRoot.containingBlock()).width();
    241241    auto& formattingState = layoutState.createFormattingStateForFormattingRootIfNeeded(formattingRoot);
    242     auto instrinsicWidthConstraints = formattingState.formattingContext(formattingRoot)->instrinsicWidthConstraints();
     242    auto instrinsicWidthConstraints = formattingState.createFormattingContext(formattingRoot)->instrinsicWidthConstraints();
    243243    return std::min(std::max(instrinsicWidthConstraints.minimum, availableWidth), instrinsicWidthConstraints.maximum);
    244244}
  • trunk/Source/WebCore/layout/FormattingState.h

    r237633 r238961  
    4747    virtual ~FormattingState();
    4848
    49     virtual std::unique_ptr<FormattingContext>formattingContext(const Box& formattingContextRoot) = 0;
     49    virtual std::unique_ptr<FormattingContext> createFormattingContext(const Box& formattingContextRoot) = 0;
    5050
    5151    FloatingState& floatingState() const { return m_floatingState; }
  • trunk/Source/WebCore/layout/LayoutFormattingState.cpp

    r238431 r238961  
    7979    RELEASE_ASSERT(layoutRoot.establishesFormattingContext());
    8080    auto& formattingState = createFormattingStateForFormattingRootIfNeeded(layoutRoot);
    81     auto formattingContext = formattingState.formattingContext(layoutRoot);
     81    auto formattingContext = formattingState.createFormattingContext(layoutRoot);
    8282    formattingContext->layout();
    8383    formattingContext->layoutOutOfFlowDescendants(layoutRoot);
  • trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp

    r238931 r238961  
    135135    precomputeVerticalPositionForFormattingRootIfNeeded(layoutBox);
    136136    // 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);
    138138    formattingContext->layout();
    139139
     
    418418                    instrinsicWidthConstraints = Geometry::instrinsicWidthConstraints(layoutState, childBox);
    419419                else if (childBox.establishesFormattingContext())
    420                     instrinsicWidthConstraints = layoutState.createFormattingStateForFormattingRootIfNeeded(childBox).formattingContext(childBox)->instrinsicWidthConstraints();
     420                    instrinsicWidthConstraints = layoutState.createFormattingStateForFormattingRootIfNeeded(childBox).createFormattingContext(childBox)->instrinsicWidthConstraints();
    421421                formattingState.setInstrinsicWidthConstraints(childBox, instrinsicWidthConstraints);
    422422
  • trunk/Source/WebCore/layout/blockformatting/BlockFormattingState.cpp

    r238667 r238961  
    4747}
    4848
    49 std::unique_ptr<FormattingContext> BlockFormattingState::formattingContext(const Box& formattingContextRoot)
     49std::unique_ptr<FormattingContext> BlockFormattingState::createFormattingContext(const Box& formattingContextRoot)
    5050{
    5151    ASSERT(formattingContextRoot.establishesBlockFormattingContext());
  • trunk/Source/WebCore/layout/blockformatting/BlockFormattingState.h

    r237633 r238961  
    4242    virtual ~BlockFormattingState();
    4343
    44     std::unique_ptr<FormattingContext> formattingContext(const Box& formattingContextRoot) override;
     44    std::unique_ptr<FormattingContext> createFormattingContext(const Box& formattingContextRoot) override;
    4545};
    4646
  • trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp

    r238931 r238961  
    374374    computeWidthAndMargin(root);
    375375    // 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);
    377377    formattingContext->layout();
    378378    // Come back and finalize the root's height and margin.
  • trunk/Source/WebCore/layout/inlineformatting/InlineFormattingState.cpp

    r238400 r238961  
    4545}
    4646
    47 std::unique_ptr<FormattingContext> InlineFormattingState::formattingContext(const Box& formattingContextRoot)
     47std::unique_ptr<FormattingContext> InlineFormattingState::createFormattingContext(const Box& formattingContextRoot)
    4848{
    4949    ASSERT(formattingContextRoot.establishesInlineFormattingContext());
  • trunk/Source/WebCore/layout/inlineformatting/InlineFormattingState.h

    r238400 r238961  
    4444    virtual ~InlineFormattingState();
    4545
    46     std::unique_ptr<FormattingContext> formattingContext(const Box& formattingContextRoot) override;
     46    std::unique_ptr<FormattingContext> createFormattingContext(const Box& formattingContextRoot) override;
    4747
    4848    InlineContent& inlineContent() { return m_inlineContent; }
Note: See TracChangeset for help on using the changeset viewer.