Title: [254274] trunk/Source/WebCore
Revision
254274
Author
[email protected]
Date
2020-01-09 10:34:47 -0800 (Thu, 09 Jan 2020)

Log Message

[LFC] Add missing HorizontalConstraints/VerticalConstraints
https://bugs.webkit.org/show_bug.cgi?id=205987
<rdar://problem/58432728>

Reviewed by Antti Koivisto.

* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
(WebCore::Layout::InlineFormattingContext::lineLayout):
(WebCore::Layout::InlineFormattingContext::constraintsForLine):
* layout/inlineformatting/InlineFormattingContext.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (254273 => 254274)


--- trunk/Source/WebCore/ChangeLog	2020-01-09 18:33:02 UTC (rev 254273)
+++ trunk/Source/WebCore/ChangeLog	2020-01-09 18:34:47 UTC (rev 254274)
@@ -1,5 +1,21 @@
 2020-01-09  Zalan Bujtas  <[email protected]>
 
+        [LFC] Add missing HorizontalConstraints/VerticalConstraints
+        https://bugs.webkit.org/show_bug.cgi?id=205987
+        <rdar://problem/58432728>
+
+        Reviewed by Antti Koivisto.
+
+        * layout/blockformatting/BlockFormattingContext.cpp:
+        (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
+        * layout/inlineformatting/InlineFormattingContext.cpp:
+        (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
+        (WebCore::Layout::InlineFormattingContext::lineLayout):
+        (WebCore::Layout::InlineFormattingContext::constraintsForLine):
+        * layout/inlineformatting/InlineFormattingContext.h:
+
+2020-01-09  Zalan Bujtas  <[email protected]>
+
         [LFC] Decouple UsedHorizontal(Vertical)Values and Horizontal(Vertical)Constraints
         https://bugs.webkit.org/show_bug.cgi?id=205985
         <rdar://problem/58431985>

Modified: trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp (254273 => 254274)


--- trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp	2020-01-09 18:33:02 UTC (rev 254273)
+++ trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp	2020-01-09 18:34:47 UTC (rev 254274)
@@ -102,7 +102,7 @@
         ASSERT(containingBlock);
         if (containingBlock == &formattingRoot)
             return rootVerticalConstraints;
-        return Geometry::verticalConstraintsForInFlow(geometryForBox(*layoutBox.containingBlock()));
+        return Geometry::verticalConstraintsForInFlow(geometryForBox(*containingBlock));
     };
     // This is a post-order tree traversal layout.
     // The root container layout is done in the formatting context it lives in, not that one it creates, so let's start with the first child.

Modified: trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp (254273 => 254274)


--- trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp	2020-01-09 18:33:02 UTC (rev 254273)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp	2020-01-09 18:34:47 UTC (rev 254274)
@@ -83,14 +83,14 @@
     }
 
     collectInlineContentIfNeeded();
-    lineLayout(horizontalConstraints);
+    lineLayout(horizontalConstraints, verticalConstraints);
     LOG_WITH_STREAM(FormattingContextLayout, stream << "[End] -> inline formatting context -> formatting root(" << &root() << ")");
 }
 
-void InlineFormattingContext::lineLayout(const HorizontalConstraints& horizontalConstraints)
+void InlineFormattingContext::lineLayout(const HorizontalConstraints& horizontalConstraints, const VerticalConstraints& verticalConstraints)
 {
     auto& inlineItems = formattingState().inlineItems();
-    auto lineLogicalTop = geometryForBox(root()).contentBoxTop();
+    auto lineLogicalTop = verticalConstraints.logicalTop;
     unsigned leadingInlineItemIndex = 0;
     Optional<unsigned> partialLeadingContentLength;
     auto lineBuilder = LineBuilder { *this, root().style().textAlign(), LineBuilder::IntrinsicSizing::No };
@@ -377,7 +377,7 @@
 
 LineBuilder::Constraints InlineFormattingContext::constraintsForLine(const HorizontalConstraints& horizontalConstraints, InlineLayoutUnit lineLogicalTop)
 {
-    auto lineLogicalLeft = geometryForBox(root()).contentBoxLeft();
+    auto lineLogicalLeft = horizontalConstraints.logicalLeft;
     auto lineLogicalRight = lineLogicalLeft + horizontalConstraints.logicalWidth;
     auto lineIsConstrainedByFloat = false;
 
@@ -389,7 +389,6 @@
         if (floatConstraints.left && floatConstraints.left->x <= lineLogicalLeft)
             floatConstraints.left = { };
 
-        auto lineLogicalRight = geometryForBox(root()).contentBoxRight();
         if (floatConstraints.right && floatConstraints.right->x >= lineLogicalRight)
             floatConstraints.right = { };
 

Modified: trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.h (254273 => 254274)


--- trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.h	2020-01-09 18:33:02 UTC (rev 254273)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.h	2020-01-09 18:34:47 UTC (rev 254274)
@@ -77,7 +77,7 @@
     };
     InlineFormattingContext::Geometry geometry() const { return Geometry(*this); }
 
-    void lineLayout(const HorizontalConstraints&);
+    void lineLayout(const HorizontalConstraints&, const VerticalConstraints&);
     void layoutFormattingContextRoot(const Box&, InvalidationState&, const HorizontalConstraints&, const VerticalConstraints&);
     void computeHorizontalAndVerticalGeometry(const Box&, const HorizontalConstraints&);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to