Title: [238961] trunk/Source/WebCore
Revision
238961
Author
[email protected]
Date
2018-12-07 11:25:44 -0800 (Fri, 07 Dec 2018)

Log 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:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (238960 => 238961)


--- trunk/Source/WebCore/ChangeLog	2018-12-07 18:53:34 UTC (rev 238960)
+++ trunk/Source/WebCore/ChangeLog	2018-12-07 19:25:44 UTC (rev 238961)
@@ -1,3 +1,23 @@
+2018-12-07  Antti Koivisto  <[email protected]>
+
+        [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:
+
 2018-12-07  Truitt Savell  <[email protected]>
 
         Unreviewed, rolling out r238947.

Modified: trunk/Source/WebCore/layout/FormattingContext.cpp (238960 => 238961)


--- trunk/Source/WebCore/layout/FormattingContext.cpp	2018-12-07 18:53:34 UTC (rev 238960)
+++ trunk/Source/WebCore/layout/FormattingContext.cpp	2018-12-07 19:25:44 UTC (rev 238961)
@@ -156,7 +156,7 @@
         computeBorderAndPadding(layoutBox);
         computeOutOfFlowHorizontalGeometry(layoutBox);
 
-        layoutState.createFormattingStateForFormattingRootIfNeeded(layoutBox).formattingContext(layoutBox)->layout();
+        layoutState.createFormattingStateForFormattingRootIfNeeded(layoutBox).createFormattingContext(layoutBox)->layout();
 
         computeOutOfFlowVerticalGeometry(layoutBox);
         layoutOutOfFlowDescendants(layoutBox);

Modified: trunk/Source/WebCore/layout/FormattingContextGeometry.cpp (238960 => 238961)


--- trunk/Source/WebCore/layout/FormattingContextGeometry.cpp	2018-12-07 18:53:34 UTC (rev 238960)
+++ trunk/Source/WebCore/layout/FormattingContextGeometry.cpp	2018-12-07 19:25:44 UTC (rev 238961)
@@ -239,7 +239,7 @@
     // Then the shrink-to-fit width is: min(max(preferred minimum width, available width), preferred width).
     auto availableWidth = layoutState.displayBoxForLayoutBox(*formattingRoot.containingBlock()).width();
     auto& formattingState = layoutState.createFormattingStateForFormattingRootIfNeeded(formattingRoot);
-    auto instrinsicWidthConstraints = formattingState.formattingContext(formattingRoot)->instrinsicWidthConstraints();
+    auto instrinsicWidthConstraints = formattingState.createFormattingContext(formattingRoot)->instrinsicWidthConstraints();
     return std::min(std::max(instrinsicWidthConstraints.minimum, availableWidth), instrinsicWidthConstraints.maximum);
 }
 

Modified: trunk/Source/WebCore/layout/FormattingState.h (238960 => 238961)


--- trunk/Source/WebCore/layout/FormattingState.h	2018-12-07 18:53:34 UTC (rev 238960)
+++ trunk/Source/WebCore/layout/FormattingState.h	2018-12-07 19:25:44 UTC (rev 238961)
@@ -46,7 +46,7 @@
 public:
     virtual ~FormattingState();
 
-    virtual std::unique_ptr<FormattingContext>formattingContext(const Box& formattingContextRoot) = 0;
+    virtual std::unique_ptr<FormattingContext> createFormattingContext(const Box& formattingContextRoot) = 0;
 
     FloatingState& floatingState() const { return m_floatingState; }
 

Modified: trunk/Source/WebCore/layout/LayoutFormattingState.cpp (238960 => 238961)


--- trunk/Source/WebCore/layout/LayoutFormattingState.cpp	2018-12-07 18:53:34 UTC (rev 238960)
+++ trunk/Source/WebCore/layout/LayoutFormattingState.cpp	2018-12-07 19:25:44 UTC (rev 238961)
@@ -78,7 +78,7 @@
 {
     RELEASE_ASSERT(layoutRoot.establishesFormattingContext());
     auto& formattingState = createFormattingStateForFormattingRootIfNeeded(layoutRoot);
-    auto formattingContext = formattingState.formattingContext(layoutRoot);
+    auto formattingContext = formattingState.createFormattingContext(layoutRoot);
     formattingContext->layout();
     formattingContext->layoutOutOfFlowDescendants(layoutRoot);
 }

Modified: trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp (238960 => 238961)


--- trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp	2018-12-07 18:53:34 UTC (rev 238960)
+++ trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp	2018-12-07 19:25:44 UTC (rev 238961)
@@ -134,7 +134,7 @@
 
     precomputeVerticalPositionForFormattingRootIfNeeded(layoutBox);
     // Swich over to the new formatting context (the one that the root creates).
-    auto formattingContext = layoutState().createFormattingStateForFormattingRootIfNeeded(layoutBox).formattingContext(layoutBox);
+    auto formattingContext = layoutState().createFormattingStateForFormattingRootIfNeeded(layoutBox).createFormattingContext(layoutBox);
     formattingContext->layout();
 
     // Come back and finalize the root's geometry.
@@ -417,7 +417,7 @@
                 if (!Geometry::instrinsicWidthConstraintsNeedChildrenWidth(childBox))
                     instrinsicWidthConstraints = Geometry::instrinsicWidthConstraints(layoutState, childBox);
                 else if (childBox.establishesFormattingContext())
-                    instrinsicWidthConstraints = layoutState.createFormattingStateForFormattingRootIfNeeded(childBox).formattingContext(childBox)->instrinsicWidthConstraints();
+                    instrinsicWidthConstraints = layoutState.createFormattingStateForFormattingRootIfNeeded(childBox).createFormattingContext(childBox)->instrinsicWidthConstraints();
                 formattingState.setInstrinsicWidthConstraints(childBox, instrinsicWidthConstraints);
 
                 queue.removeLast();

Modified: trunk/Source/WebCore/layout/blockformatting/BlockFormattingState.cpp (238960 => 238961)


--- trunk/Source/WebCore/layout/blockformatting/BlockFormattingState.cpp	2018-12-07 18:53:34 UTC (rev 238960)
+++ trunk/Source/WebCore/layout/blockformatting/BlockFormattingState.cpp	2018-12-07 19:25:44 UTC (rev 238961)
@@ -46,7 +46,7 @@
 {
 }
 
-std::unique_ptr<FormattingContext> BlockFormattingState::formattingContext(const Box& formattingContextRoot)
+std::unique_ptr<FormattingContext> BlockFormattingState::createFormattingContext(const Box& formattingContextRoot)
 {
     ASSERT(formattingContextRoot.establishesBlockFormattingContext());
     return std::make_unique<BlockFormattingContext>(formattingContextRoot, *this);

Modified: trunk/Source/WebCore/layout/blockformatting/BlockFormattingState.h (238960 => 238961)


--- trunk/Source/WebCore/layout/blockformatting/BlockFormattingState.h	2018-12-07 18:53:34 UTC (rev 238960)
+++ trunk/Source/WebCore/layout/blockformatting/BlockFormattingState.h	2018-12-07 19:25:44 UTC (rev 238961)
@@ -41,7 +41,7 @@
     BlockFormattingState(Ref<FloatingState>&&, LayoutState&);
     virtual ~BlockFormattingState();
 
-    std::unique_ptr<FormattingContext> formattingContext(const Box& formattingContextRoot) override;
+    std::unique_ptr<FormattingContext> createFormattingContext(const Box& formattingContextRoot) override;
 };
 
 }

Modified: trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp (238960 => 238961)


--- trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp	2018-12-07 18:53:34 UTC (rev 238960)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp	2018-12-07 19:25:44 UTC (rev 238961)
@@ -373,7 +373,7 @@
     computeBorderAndPadding(root);
     computeWidthAndMargin(root);
     // Swich over to the new formatting context (the one that the root creates).
-    auto formattingContext = layoutState().createFormattingStateForFormattingRootIfNeeded(root).formattingContext(root);
+    auto formattingContext = layoutState().createFormattingStateForFormattingRootIfNeeded(root).createFormattingContext(root);
     formattingContext->layout();
     // Come back and finalize the root's height and margin.
     computeHeightAndMargin(root);

Modified: trunk/Source/WebCore/layout/inlineformatting/InlineFormattingState.cpp (238960 => 238961)


--- trunk/Source/WebCore/layout/inlineformatting/InlineFormattingState.cpp	2018-12-07 18:53:34 UTC (rev 238960)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineFormattingState.cpp	2018-12-07 19:25:44 UTC (rev 238961)
@@ -44,7 +44,7 @@
 {
 }
 
-std::unique_ptr<FormattingContext> InlineFormattingState::formattingContext(const Box& formattingContextRoot)
+std::unique_ptr<FormattingContext> InlineFormattingState::createFormattingContext(const Box& formattingContextRoot)
 {
     ASSERT(formattingContextRoot.establishesInlineFormattingContext());
     return std::make_unique<InlineFormattingContext>(formattingContextRoot, *this);

Modified: trunk/Source/WebCore/layout/inlineformatting/InlineFormattingState.h (238960 => 238961)


--- trunk/Source/WebCore/layout/inlineformatting/InlineFormattingState.h	2018-12-07 18:53:34 UTC (rev 238960)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineFormattingState.h	2018-12-07 19:25:44 UTC (rev 238961)
@@ -43,7 +43,7 @@
     InlineFormattingState(Ref<FloatingState>&&, LayoutState&);
     virtual ~InlineFormattingState();
 
-    std::unique_ptr<FormattingContext> formattingContext(const Box& formattingContextRoot) override;
+    std::unique_ptr<FormattingContext> createFormattingContext(const Box& formattingContextRoot) override;
 
     InlineContent& inlineContent() { return m_inlineContent; }
     InlineItem* lastInlineItem() const { return m_inlineContent.isEmpty() ? nullptr : m_inlineContent.last().get(); }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to