[LFC] Fix spelling error.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Feb 2019 06:17:53 +0000 (06:17 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Feb 2019 06:17:53 +0000 (06:17 +0000)
https://bugs.webkit.org/show_bug.cgi?id=194489

Reviewed by Simon Fraser.

instrinsic -> intrinsic

* layout/FormattingContext.h:
* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
* layout/FormattingState.h:
(WebCore::Layout::FormattingState::setIntrinsicWidthConstraints):
(WebCore::Layout::FormattingState::clearIntrinsicWidthConstraints):
(WebCore::Layout::FormattingState::intrinsicWidthConstraints const):
(WebCore::Layout::FormattingState::setInstrinsicWidthConstraints): Deleted.
(WebCore::Layout::FormattingState::clearInstrinsicWidthConstraints): Deleted.
(WebCore::Layout::FormattingState::instrinsicWidthConstraints const): Deleted.
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::intrinsicWidthConstraints const):
(WebCore::Layout::BlockFormattingContext::instrinsicWidthConstraints const): Deleted.
* layout/blockformatting/BlockFormattingContext.h:
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::intrinsicWidthConstraintsNeedChildrenWidth):
(WebCore::Layout::BlockFormattingContext::Geometry::intrinsicWidthConstraints):
(WebCore::Layout::BlockFormattingContext::Geometry::instrinsicWidthConstraintsNeedChildrenWidth): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::instrinsicWidthConstraints): Deleted.
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::intrinsicWidthConstraints const):
(WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingContextRoot const):
(WebCore::Layout::InlineFormattingContext::instrinsicWidthConstraints const): Deleted.
* layout/inlineformatting/InlineFormattingContext.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241257 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/layout/FormattingContext.h
Source/WebCore/layout/FormattingContextGeometry.cpp
Source/WebCore/layout/FormattingState.h
Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp
Source/WebCore/layout/blockformatting/BlockFormattingContext.h
Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp
Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp
Source/WebCore/layout/inlineformatting/InlineFormattingContext.h

index 1725004..e5e6676 100644 (file)
@@ -1,3 +1,37 @@
+2019-02-10  Zalan Bujtas  <zalan@apple.com>
+
+        [LFC] Fix spelling error.
+        https://bugs.webkit.org/show_bug.cgi?id=194489
+
+        Reviewed by Simon Fraser.
+
+        instrinsic -> intrinsic
+
+        * layout/FormattingContext.h:
+        * layout/FormattingContextGeometry.cpp:
+        (WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
+        * layout/FormattingState.h:
+        (WebCore::Layout::FormattingState::setIntrinsicWidthConstraints):
+        (WebCore::Layout::FormattingState::clearIntrinsicWidthConstraints):
+        (WebCore::Layout::FormattingState::intrinsicWidthConstraints const):
+        (WebCore::Layout::FormattingState::setInstrinsicWidthConstraints): Deleted.
+        (WebCore::Layout::FormattingState::clearInstrinsicWidthConstraints): Deleted.
+        (WebCore::Layout::FormattingState::instrinsicWidthConstraints const): Deleted.
+        * layout/blockformatting/BlockFormattingContext.cpp:
+        (WebCore::Layout::BlockFormattingContext::intrinsicWidthConstraints const):
+        (WebCore::Layout::BlockFormattingContext::instrinsicWidthConstraints const): Deleted.
+        * layout/blockformatting/BlockFormattingContext.h:
+        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
+        (WebCore::Layout::BlockFormattingContext::Geometry::intrinsicWidthConstraintsNeedChildrenWidth):
+        (WebCore::Layout::BlockFormattingContext::Geometry::intrinsicWidthConstraints):
+        (WebCore::Layout::BlockFormattingContext::Geometry::instrinsicWidthConstraintsNeedChildrenWidth): Deleted.
+        (WebCore::Layout::BlockFormattingContext::Geometry::instrinsicWidthConstraints): Deleted.
+        * layout/inlineformatting/InlineFormattingContext.cpp:
+        (WebCore::Layout::InlineFormattingContext::intrinsicWidthConstraints const):
+        (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingContextRoot const):
+        (WebCore::Layout::InlineFormattingContext::instrinsicWidthConstraints const): Deleted.
+        * layout/inlineformatting/InlineFormattingContext.h:
+
 2019-02-10  Darin Adler  <darin@apple.com>
 
         Switch uses of StringBuilder with String::format for hex numbers to use HexNumber.h instead
index 62530a3..821bdf7 100644 (file)
@@ -52,11 +52,11 @@ public:
     virtual void layout() const = 0;
     void layoutOutOfFlowDescendants(const Box&) const;
 
-    struct InstrinsicWidthConstraints {
+    struct IntrinsicWidthConstraints {
         LayoutUnit minimum;
         LayoutUnit maximum;
     };
-    virtual InstrinsicWidthConstraints instrinsicWidthConstraints() const = 0;
+    virtual IntrinsicWidthConstraints intrinsicWidthConstraints() const = 0;
 
     static Display::Box mapBoxToAncestor(const LayoutState&, const Box&, const Container& ancestor);
     static LayoutUnit mapTopToAncestor(const LayoutState&, const Box&, const Container& ancestor);
index afa0bc4..1b96a39 100644 (file)
@@ -248,8 +248,8 @@ LayoutUnit FormattingContext::Geometry::shrinkToFitWidth(LayoutState& layoutStat
     // Then the shrink-to-fit width is: min(max(preferred minimum width, available width), preferred width).
     ASSERT(usedValues.containingBlockWidth.hasValue());
     auto availableWidth = *usedValues.containingBlockWidth;
-    auto instrinsicWidthConstraints = layoutState.createFormattingContext(formattingRoot)->instrinsicWidthConstraints();
-    return std::min(std::max(instrinsicWidthConstraints.minimum, availableWidth), instrinsicWidthConstraints.maximum);
+    auto intrinsicWidthConstraints = layoutState.createFormattingContext(formattingRoot)->intrinsicWidthConstraints();
+    return std::min(std::max(intrinsicWidthConstraints.minimum, availableWidth), intrinsicWidthConstraints.maximum);
 }
 
 VerticalGeometry FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry(const LayoutState& layoutState, const Box& layoutBox, UsedVerticalValues usedValues)
index 0c34c70..7bdc711 100644 (file)
@@ -51,9 +51,9 @@ public:
     void markNeedsLayout(const Box&, StyleDiff);
     bool needsLayout(const Box&);
 
-    void setInstrinsicWidthConstraints(const Box&,  FormattingContext::InstrinsicWidthConstraints);
-    void clearInstrinsicWidthConstraints(const Box&);
-    Optional<FormattingContext::InstrinsicWidthConstraints> instrinsicWidthConstraints(const Box&) const;
+    void setIntrinsicWidthConstraints(const Box&,  FormattingContext::IntrinsicWidthConstraints);
+    void clearIntrinsicWidthConstraints(const Box&);
+    Optional<FormattingContext::IntrinsicWidthConstraints> intrinsicWidthConstraints(const Box&) const;
 
     bool isBlockFormattingState() const { return m_type == Type::Block; }
     bool isInlineFormattingState() const { return m_type == Type::Inline; }
@@ -67,27 +67,27 @@ protected:
 private:
     LayoutState& m_layoutState;
     Ref<FloatingState> m_floatingState;
-    HashMap<const Box*, FormattingContext::InstrinsicWidthConstraints> m_instrinsicWidthConstraints;
+    HashMap<const Box*, FormattingContext::IntrinsicWidthConstraints> m_intrinsicWidthConstraints;
     Type m_type;
 };
 
-inline void FormattingState::setInstrinsicWidthConstraints(const Box& layoutBox, FormattingContext::InstrinsicWidthConstraints instrinsicWidthConstraints)
+inline void FormattingState::setIntrinsicWidthConstraints(const Box& layoutBox, FormattingContext::IntrinsicWidthConstraints intrinsicWidthConstraints)
 {
-    ASSERT(!m_instrinsicWidthConstraints.contains(&layoutBox));
+    ASSERT(!m_intrinsicWidthConstraints.contains(&layoutBox));
     ASSERT(&m_layoutState.formattingStateForBox(layoutBox) == this);
-    m_instrinsicWidthConstraints.set(&layoutBox, instrinsicWidthConstraints);
+    m_intrinsicWidthConstraints.set(&layoutBox, intrinsicWidthConstraints);
 }
 
-inline void FormattingState::clearInstrinsicWidthConstraints(const Box& layoutBox)
+inline void FormattingState::clearIntrinsicWidthConstraints(const Box& layoutBox)
 {
-    m_instrinsicWidthConstraints.remove(&layoutBox);
+    m_intrinsicWidthConstraints.remove(&layoutBox);
 }
 
-inline Optional<FormattingContext::InstrinsicWidthConstraints> FormattingState::instrinsicWidthConstraints(const Box& layoutBox) const
+inline Optional<FormattingContext::IntrinsicWidthConstraints> FormattingState::intrinsicWidthConstraints(const Box& layoutBox) const
 {
     ASSERT(&m_layoutState.formattingStateForBox(layoutBox) == this);
-    auto iterator = m_instrinsicWidthConstraints.find(&layoutBox);
-    if (iterator == m_instrinsicWidthConstraints.end())
+    auto iterator = m_intrinsicWidthConstraints.find(&layoutBox);
+    if (iterator == m_intrinsicWidthConstraints.end())
         return { };
     return iterator->value;
 }
index 557d1ea..c769000 100644 (file)
@@ -392,19 +392,19 @@ void BlockFormattingContext::computeHeightAndMargin(const Box& layoutBox) const
     MarginCollapse::updateMarginAfterForPreviousSibling(layoutState, layoutBox);
 }
 
-FormattingContext::InstrinsicWidthConstraints BlockFormattingContext::instrinsicWidthConstraints() const
+FormattingContext::IntrinsicWidthConstraints BlockFormattingContext::intrinsicWidthConstraints() const
 {
     auto& layoutState = this->layoutState();
     auto& formattingRoot = root();
     auto& formattingStateForRoot = layoutState.formattingStateForBox(formattingRoot);
-    if (auto instrinsicWidthConstraints = formattingStateForRoot.instrinsicWidthConstraints(formattingRoot))
-        return *instrinsicWidthConstraints;
+    if (auto intrinsicWidthConstraints = formattingStateForRoot.intrinsicWidthConstraints(formattingRoot))
+        return *intrinsicWidthConstraints;
 
     // Can we just compute them without checking the children?
-    if (!Geometry::instrinsicWidthConstraintsNeedChildrenWidth(formattingRoot)) {
-        auto instrinsicWidthConstraints = Geometry::instrinsicWidthConstraints(layoutState, formattingRoot);
-        formattingStateForRoot.setInstrinsicWidthConstraints(formattingRoot, instrinsicWidthConstraints);
-        return instrinsicWidthConstraints;
+    if (!Geometry::intrinsicWidthConstraintsNeedChildrenWidth(formattingRoot)) {
+        auto intrinsicWidthConstraints = Geometry::intrinsicWidthConstraints(layoutState, formattingRoot);
+        formattingStateForRoot.setIntrinsicWidthConstraints(formattingRoot, intrinsicWidthConstraints);
+        return intrinsicWidthConstraints;
     }
 
     // Visit the in-flow descendants and compute their min/max intrinsic width if needed.
@@ -421,15 +421,15 @@ FormattingContext::InstrinsicWidthConstraints BlockFormattingContext::instrinsic
     while (!queue.isEmpty()) {
         while (true) {
             auto& childBox = *queue.last();
-            auto skipDescendants = formattingState.instrinsicWidthConstraints(childBox) || !Geometry::instrinsicWidthConstraintsNeedChildrenWidth(childBox) || childBox.establishesFormattingContext();
+            auto skipDescendants = formattingState.intrinsicWidthConstraints(childBox) || !Geometry::intrinsicWidthConstraintsNeedChildrenWidth(childBox) || childBox.establishesFormattingContext();
 
             if (skipDescendants) {
-                InstrinsicWidthConstraints instrinsicWidthConstraints;
-                if (!Geometry::instrinsicWidthConstraintsNeedChildrenWidth(childBox))
-                    instrinsicWidthConstraints = Geometry::instrinsicWidthConstraints(layoutState, childBox);
+                IntrinsicWidthConstraints intrinsicWidthConstraints;
+                if (!Geometry::intrinsicWidthConstraintsNeedChildrenWidth(childBox))
+                    intrinsicWidthConstraints = Geometry::intrinsicWidthConstraints(layoutState, childBox);
                 else if (childBox.establishesFormattingContext())
-                    instrinsicWidthConstraints = layoutState.createFormattingContext(childBox)->instrinsicWidthConstraints();
-                formattingState.setInstrinsicWidthConstraints(childBox, instrinsicWidthConstraints);
+                    intrinsicWidthConstraints = layoutState.createFormattingContext(childBox)->intrinsicWidthConstraints();
+                formattingState.setIntrinsicWidthConstraints(childBox, intrinsicWidthConstraints);
 
                 queue.removeLast();
                 if (!childBox.nextInFlowOrFloatingSibling())
@@ -443,7 +443,7 @@ FormattingContext::InstrinsicWidthConstraints BlockFormattingContext::instrinsic
         // Compute min/max intrinsic width bottom up.
         while (!queue.isEmpty()) {
             auto& childBox = *queue.takeLast();
-            formattingState.setInstrinsicWidthConstraints(childBox, Geometry::instrinsicWidthConstraints(layoutState, childBox)); 
+            formattingState.setIntrinsicWidthConstraints(childBox, Geometry::intrinsicWidthConstraints(layoutState, childBox)); 
             // Move over to the next sibling or take the next box in the queue.
             if (!is<Container>(childBox) || !downcast<Container>(childBox).nextInFlowOrFloatingSibling())
                 continue;
@@ -451,9 +451,9 @@ FormattingContext::InstrinsicWidthConstraints BlockFormattingContext::instrinsic
         }
     }
 
-    auto instrinsicWidthConstraints = Geometry::instrinsicWidthConstraints(layoutState, formattingRoot);
-    formattingStateForRoot.setInstrinsicWidthConstraints(formattingRoot, instrinsicWidthConstraints); 
-    return instrinsicWidthConstraints;
+    auto intrinsicWidthConstraints = Geometry::intrinsicWidthConstraints(layoutState, formattingRoot);
+    formattingStateForRoot.setIntrinsicWidthConstraints(formattingRoot, intrinsicWidthConstraints); 
+    return intrinsicWidthConstraints;
 }
 
 LayoutUnit BlockFormattingContext::verticalPositionWithMargin(const Box& layoutBox, const UsedVerticalMargin& verticalMargin) const
index 7d95cb4..99d4df9 100644 (file)
@@ -67,7 +67,7 @@ private:
     void computeEstimatedVerticalPositionForFormattingRoot(const Box&) const;
     void computeEstimatedVerticalPositionForFloatClear(const FloatingContext&, const Box&) const;
 
-    InstrinsicWidthConstraints instrinsicWidthConstraints() const override;
+    IntrinsicWidthConstraints intrinsicWidthConstraints() const override;
     LayoutUnit verticalPositionWithMargin(const Box&, const UsedVerticalMargin&) const;
 
     // This class implements positioning and sizing for boxes participating in a block formatting context.
@@ -78,8 +78,8 @@ private:
 
         static Point staticPosition(const LayoutState&, const Box&);
 
-        static bool instrinsicWidthConstraintsNeedChildrenWidth(const Box&);
-        static InstrinsicWidthConstraints instrinsicWidthConstraints(const LayoutState&, const Box&);
+        static bool intrinsicWidthConstraintsNeedChildrenWidth(const Box&);
+        static IntrinsicWidthConstraints intrinsicWidthConstraints(const LayoutState&, const Box&);
 
     private:
         static HeightAndMargin inFlowNonReplacedHeightAndMargin(const LayoutState&, const Box&, UsedVerticalValues);
index d4359d2..7e37ebb 100644 (file)
@@ -279,14 +279,14 @@ WidthAndMargin BlockFormattingContext::Geometry::inFlowWidthAndMargin(const Layo
     return inFlowReplacedWidthAndMargin(layoutState, layoutBox, usedValues);
 }
 
-bool BlockFormattingContext::Geometry::instrinsicWidthConstraintsNeedChildrenWidth(const Box& layoutBox)
+bool BlockFormattingContext::Geometry::intrinsicWidthConstraintsNeedChildrenWidth(const Box& layoutBox)
 {
     if (!is<Container>(layoutBox) || !downcast<Container>(layoutBox).hasInFlowOrFloatingChild())
         return false;
     return layoutBox.style().width().isAuto();
 }
 
-FormattingContext::InstrinsicWidthConstraints BlockFormattingContext::Geometry::instrinsicWidthConstraints(const LayoutState& layoutState, const Box& layoutBox)
+FormattingContext::IntrinsicWidthConstraints BlockFormattingContext::Geometry::intrinsicWidthConstraints(const LayoutState& layoutState, const Box& layoutBox)
 {
     auto& style = layoutBox.style();
     if (auto width = fixedValue(style.logicalWidth()))
@@ -307,8 +307,8 @@ FormattingContext::InstrinsicWidthConstraints BlockFormattingContext::Geometry::
             continue;
         auto& formattingState = layoutState.formattingStateForBox(child);
         ASSERT(formattingState.isBlockFormattingState());
-        auto childInstrinsicWidthConstraints = formattingState.instrinsicWidthConstraints(child);
-        ASSERT(childInstrinsicWidthConstraints);
+        auto childIntrinsicWidthConstraints = formattingState.intrinsicWidthConstraints(child);
+        ASSERT(childIntrinsicWidthConstraints);
         
         auto& style = child.style();
         auto horizontalMarginBorderAndPadding = fixedValue(style.marginStart()).valueOr(0)
@@ -318,8 +318,8 @@ FormattingContext::InstrinsicWidthConstraints BlockFormattingContext::Geometry::
             + LayoutUnit { style.borderRightWidth() }
             + fixedValue(style.marginEnd()).valueOr(0);
 
-        minimumIntrinsicWidth = std::max(minimumIntrinsicWidth, childInstrinsicWidthConstraints->minimum + horizontalMarginBorderAndPadding); 
-        maximumIntrinsicWidth = std::max(maximumIntrinsicWidth, childInstrinsicWidthConstraints->maximum + horizontalMarginBorderAndPadding); 
+        minimumIntrinsicWidth = std::max(minimumIntrinsicWidth, childIntrinsicWidthConstraints->minimum + horizontalMarginBorderAndPadding); 
+        maximumIntrinsicWidth = std::max(maximumIntrinsicWidth, childIntrinsicWidthConstraints->maximum + horizontalMarginBorderAndPadding); 
     }
 
     return { minimumIntrinsicWidth, maximumIntrinsicWidth };
index 93762c6..d9486ce 100644 (file)
@@ -92,14 +92,14 @@ void InlineFormattingContext::layout() const
     LOG_WITH_STREAM(FormattingContextLayout, stream << "[End] -> inline formatting context -> formatting root(" << &root << ")");
 }
 
-FormattingContext::InstrinsicWidthConstraints InlineFormattingContext::instrinsicWidthConstraints() const
+FormattingContext::IntrinsicWidthConstraints InlineFormattingContext::intrinsicWidthConstraints() const
 {
     ASSERT(is<Container>(root()));
 
     auto& layoutState = this->layoutState();
     auto& root = downcast<Container>(this->root());
-    if (auto instrinsicWidthConstraints = layoutState.formattingStateForBox(root).instrinsicWidthConstraints(root))
-        return *instrinsicWidthConstraints;
+    if (auto intrinsicWidthConstraints = layoutState.formattingStateForBox(root).intrinsicWidthConstraints(root))
+        return *intrinsicWidthConstraints;
 
     Vector<const Box*> formattingContextRootList;
     auto usedValues = UsedHorizontalValues { };
@@ -134,8 +134,8 @@ FormattingContext::InstrinsicWidthConstraints InlineFormattingContext::instrinsi
 
         // Switch to the min/max formatting root width values before formatting the lines.
         for (auto* formattingRoot : formattingContextRootList) {
-            auto instrinsicWidths = layoutState.formattingStateForBox(*formattingRoot).instrinsicWidthConstraints(*formattingRoot);
-            layoutState.displayBoxForLayoutBox(*formattingRoot).setContentBoxWidth(availableWidth ? instrinsicWidths->maximum : instrinsicWidths->minimum);
+            auto intrinsicWidths = layoutState.formattingStateForBox(*formattingRoot).intrinsicWidthConstraints(*formattingRoot);
+            layoutState.displayBoxForLayoutBox(*formattingRoot).setContentBoxWidth(availableWidth ? intrinsicWidths->maximum : intrinsicWidths->minimum);
         }
 
         while (auto run = lineBreaker.nextRun(lineLogicalRight, availableWidth, !lineLogicalRight)) {
@@ -148,9 +148,9 @@ FormattingContext::InstrinsicWidthConstraints InlineFormattingContext::instrinsi
         return maxContentLogicalRight;
     };
 
-    auto instrinsicWidthConstraints = FormattingContext::InstrinsicWidthConstraints { maximumLineWidth(0), maximumLineWidth(LayoutUnit::max()) };
-    layoutState.formattingStateForBox(root).setInstrinsicWidthConstraints(root, instrinsicWidthConstraints);
-    return instrinsicWidthConstraints;
+    auto intrinsicWidthConstraints = FormattingContext::IntrinsicWidthConstraints { maximumLineWidth(0), maximumLineWidth(LayoutUnit::max()) };
+    layoutState.formattingStateForBox(root).setIntrinsicWidthConstraints(root, intrinsicWidthConstraints);
+    return intrinsicWidthConstraints;
 }
 
 void InlineFormattingContext::computeIntrinsicWidthForFormattingContextRoot(const Box& layoutBox) const
@@ -160,7 +160,7 @@ void InlineFormattingContext::computeIntrinsicWidthForFormattingContextRoot(cons
     auto usedValues = UsedHorizontalValues { };
     computeBorderAndPadding(layoutBox, usedValues);
     computeMargin(downcast<InlineContainer>(layoutBox), usedValues);
-    layoutState().createFormattingContext(layoutBox)->instrinsicWidthConstraints();
+    layoutState().createFormattingContext(layoutBox)->intrinsicWidthConstraints();
 }
 
 void InlineFormattingContext::computeMargin(const InlineContainer& inlineContainer, UsedHorizontalValues usedValues) const
index 6f9c7ac..8150358 100644 (file)
@@ -94,7 +94,7 @@ private:
     void computeWidthAndMargin(const Box&, UsedHorizontalValues) const;
 
     void collectInlineContent(InlineRunProvider&) const;
-    InstrinsicWidthConstraints instrinsicWidthConstraints() const override;
+    IntrinsicWidthConstraints intrinsicWidthConstraints() const override;
 
     InlineFormattingState& formattingState() const { return downcast<InlineFormattingState>(FormattingContext::formattingState()); }
 };