Title: [266780] trunk/Source/WebCore
Revision
266780
Author
[email protected]
Date
2020-09-09 07:55:22 -0700 (Wed, 09 Sep 2020)

Log Message

[LFC][IFC] Line::lineLogicalWidth is really the horizontal constraint value
https://bugs.webkit.org/show_bug.cgi?id=216277

Reviewed by Antti Koivisto.

* layout/inlineformatting/InlineLine.cpp:
(WebCore::Layout::Line::open):
(WebCore::Layout::Line::moveLogicalLeft):
(WebCore::Layout::Line::moveLogicalRight):
* layout/inlineformatting/InlineLine.h:
(WebCore::Layout::Line::horizontalConstraint const):
(WebCore::Layout::Line::availableWidth const):
(WebCore::Layout::Line::lineLogicalWidth const): Deleted.
* layout/inlineformatting/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::layoutInlineContent):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (266779 => 266780)


--- trunk/Source/WebCore/ChangeLog	2020-09-09 14:48:26 UTC (rev 266779)
+++ trunk/Source/WebCore/ChangeLog	2020-09-09 14:55:22 UTC (rev 266780)
@@ -1,3 +1,21 @@
+2020-09-09  Zalan Bujtas  <[email protected]>
+
+        [LFC][IFC] Line::lineLogicalWidth is really the horizontal constraint value
+        https://bugs.webkit.org/show_bug.cgi?id=216277
+
+        Reviewed by Antti Koivisto.
+
+        * layout/inlineformatting/InlineLine.cpp:
+        (WebCore::Layout::Line::open):
+        (WebCore::Layout::Line::moveLogicalLeft):
+        (WebCore::Layout::Line::moveLogicalRight):
+        * layout/inlineformatting/InlineLine.h:
+        (WebCore::Layout::Line::horizontalConstraint const):
+        (WebCore::Layout::Line::availableWidth const):
+        (WebCore::Layout::Line::lineLogicalWidth const): Deleted.
+        * layout/inlineformatting/InlineLineBuilder.cpp:
+        (WebCore::Layout::LineBuilder::layoutInlineContent):
+
 2020-09-09  Aditya Keerthi  <[email protected]>
 
         [macOS] Add editability to input type=time

Modified: trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp (266779 => 266780)


--- trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp	2020-09-09 14:48:26 UTC (rev 266779)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp	2020-09-09 14:55:22 UTC (rev 266780)
@@ -55,9 +55,9 @@
 {
 }
 
-void Line::open(InlineLayoutUnit availableWidth)
+void Line::open(InlineLayoutUnit horizontalConstraint)
 {
-    m_lineLogicalWidth = availableWidth;
+    m_horizontalConstraint = horizontalConstraint;
     clearContent();
 #if ASSERT_ENABLED
     m_isClosed = false;
@@ -211,13 +211,13 @@
         return;
     ASSERT(delta > 0);
     m_lineLogicalLeft += delta;
-    m_lineLogicalWidth -= delta;
+    m_horizontalConstraint -= delta;
 }
 
 void Line::moveLogicalRight(InlineLayoutUnit delta)
 {
     ASSERT(delta > 0);
-    m_lineLogicalWidth -= delta;
+    m_horizontalConstraint -= delta;
 }
 
 void Line::append(const InlineItem& inlineItem, InlineLayoutUnit logicalWidth)

Modified: trunk/Source/WebCore/layout/inlineformatting/InlineLine.h (266779 => 266780)


--- trunk/Source/WebCore/layout/inlineformatting/InlineLine.h	2020-09-09 14:48:26 UTC (rev 266779)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineLine.h	2020-09-09 14:55:22 UTC (rev 266780)
@@ -42,7 +42,7 @@
     Line(const InlineFormattingContext&);
     ~Line();
 
-    void open(InlineLayoutUnit availableLogicalWidth);
+    void open(InlineLayoutUnit horizontalConstraint);
     void close(bool isLastLineWithInlineContent);
     void clearContent();
 
@@ -54,9 +54,9 @@
 
     bool isVisuallyEmpty() const { return m_isVisuallyEmpty; }
 
-    InlineLayoutUnit lineLogicalWidth() const { return m_lineLogicalWidth; }
+    InlineLayoutUnit horizontalConstraint() const { return m_horizontalConstraint; }
     InlineLayoutUnit contentLogicalWidth() const { return m_contentLogicalWidth; }
-    InlineLayoutUnit availableWidth() const { return lineLogicalWidth() - contentLogicalWidth(); }
+    InlineLayoutUnit availableWidth() const { return horizontalConstraint() - contentLogicalWidth(); }
 
     InlineLayoutUnit trimmableTrailingWidth() const { return m_trimmableTrailingContent.width(); }
     bool isTrailingRunFullyTrimmable() const { return m_trimmableTrailingContent.isTrailingRunFullyTrimmable(); }
@@ -179,7 +179,7 @@
     RunList m_runs;
     TrimmableTrailingContent m_trimmableTrailingContent;
     InlineLayoutUnit m_lineLogicalLeft { 0 };
-    InlineLayoutUnit m_lineLogicalWidth { 0 };
+    InlineLayoutUnit m_horizontalConstraint { 0 };
     InlineLayoutUnit m_contentLogicalWidth { 0 };
     bool m_hasIntrusiveFloat { false };
     bool m_isVisuallyEmpty { true };

Modified: trunk/Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp (266779 => 266780)


--- trunk/Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp	2020-09-09 14:48:26 UTC (rev 266779)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp	2020-09-09 14:55:22 UTC (rev 266780)
@@ -303,8 +303,8 @@
     auto lineIsVisuallyEmpty = m_line.isVisuallyEmpty() ? LineBox::IsLineVisuallyEmpty::Yes : LineBox::IsLineVisuallyEmpty::No;
     return LineContent { committedContent.partialTrailingContent, committedRange, m_floats, m_line.hasIntrusiveFloat()
         , lineLogicalTopLeft
-        , m_line.lineLogicalWidth()
-        , LineBox { formattingContext(), m_line.lineLogicalWidth(), m_line.contentLogicalWidth(), m_line.runs(), lineIsVisuallyEmpty
+        , m_line.horizontalConstraint()
+        , LineBox { formattingContext(), m_line.horizontalConstraint(), m_line.contentLogicalWidth(), m_line.runs(), lineIsVisuallyEmpty
         , isLastLine ? LineBox::IsLastLineWithInlineContent::Yes : LineBox::IsLastLineWithInlineContent::No }
         , m_line.runs() };
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to