Title: [289425] trunk/Source/WebCore
Revision
289425
Author
[email protected]
Date
2022-02-08 13:45:59 -0800 (Tue, 08 Feb 2022)

Log Message

[LFC][Integration] LineIteratorModernPath::baselineType should consult Display::Line
https://bugs.webkit.org/show_bug.cgi?id=236308

Reviewed by Antti Koivisto.

LineBox -> Display::Line -> LineIteratorModernPath (and the soon-to-be-removed LayoutIntegration::Line middleman).

* layout/formattingContexts/inline/InlineLineBox.h:
(WebCore::Layout::LineBox::baselineType const):
(WebCore::Layout::LineBox::setBaselineType):
* layout/formattingContexts/inline/display/InlineDisplayLine.h:
(WebCore::InlineDisplay::Line::baselineType const):
(WebCore::InlineDisplay::Line::Line):
* layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp:
(WebCore::Layout::InlineDisplayLineBuilder::build const):
* layout/integration/InlineIteratorLineModernPath.h:
(WebCore::InlineIterator::LineIteratorModernPath::baselineType const):
* layout/integration/LayoutIntegrationInlineContentBuilder.cpp:
(WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLines const):
* layout/integration/LayoutIntegrationLine.h:
(WebCore::LayoutIntegration::Line::Line):
(WebCore::LayoutIntegration::Line::baselineType const):
* layout/integration/LayoutIntegrationPagination.cpp:
(WebCore::LayoutIntegration::makeAdjustedContent):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (289424 => 289425)


--- trunk/Source/WebCore/ChangeLog	2022-02-08 21:40:09 UTC (rev 289424)
+++ trunk/Source/WebCore/ChangeLog	2022-02-08 21:45:59 UTC (rev 289425)
@@ -1,3 +1,30 @@
+2022-02-08  Alan Bujtas  <[email protected]>
+
+        [LFC][Integration] LineIteratorModernPath::baselineType should consult Display::Line
+        https://bugs.webkit.org/show_bug.cgi?id=236308
+
+        Reviewed by Antti Koivisto.
+
+        LineBox -> Display::Line -> LineIteratorModernPath (and the soon-to-be-removed LayoutIntegration::Line middleman).
+
+        * layout/formattingContexts/inline/InlineLineBox.h:
+        (WebCore::Layout::LineBox::baselineType const):
+        (WebCore::Layout::LineBox::setBaselineType):
+        * layout/formattingContexts/inline/display/InlineDisplayLine.h:
+        (WebCore::InlineDisplay::Line::baselineType const):
+        (WebCore::InlineDisplay::Line::Line):
+        * layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp:
+        (WebCore::Layout::InlineDisplayLineBuilder::build const):
+        * layout/integration/InlineIteratorLineModernPath.h:
+        (WebCore::InlineIterator::LineIteratorModernPath::baselineType const):
+        * layout/integration/LayoutIntegrationInlineContentBuilder.cpp:
+        (WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLines const):
+        * layout/integration/LayoutIntegrationLine.h:
+        (WebCore::LayoutIntegration::Line::Line):
+        (WebCore::LayoutIntegration::Line::baselineType const):
+        * layout/integration/LayoutIntegrationPagination.cpp:
+        (WebCore::LayoutIntegration::makeAdjustedContent):
+
 2022-02-08  Chris Dumez  <[email protected]>
 
         http/tests/cache-storage/cache-origins.https.html is flaky

Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBox.h (289424 => 289425)


--- trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBox.h	2022-02-08 21:40:09 UTC (rev 289424)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBox.h	2022-02-08 21:45:59 UTC (rev 289425)
@@ -80,6 +80,7 @@
     const InlineLevelBoxList& nonRootInlineLevelBoxes() const { return m_nonRootInlineLevelBoxList; }
 
     InlineLayoutUnit rootInlineBoxAlignmentOffset() const { return m_rootInlineBoxAlignmentOffset; }
+    FontBaseline baselineType() const { return m_baselineType; }
 
     const InlineRect& logicalRect() const { return m_logicalRect; }
 
@@ -97,6 +98,7 @@
 
     void setLogicalRect(const InlineRect& logicalRect) { m_logicalRect = logicalRect; }
     void setHasContent(bool hasContent) { m_hasContent = hasContent; }
+    void setBaselineType(FontBaseline baselineType) { m_baselineType = baselineType; }
 
 private:
     bool m_hasContent { false };
@@ -104,6 +106,7 @@
     OptionSet<InlineLevelBox::Type> m_boxTypes;
 
     InlineLayoutUnit m_rootInlineBoxAlignmentOffset { 0 };
+    FontBaseline m_baselineType { AlphabeticBaseline };
     InlineLevelBox m_rootInlineBox;
     InlineLevelBoxList m_nonRootInlineLevelBoxList;
 

Modified: trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLine.h (289424 => 289425)


--- trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLine.h	2022-02-08 21:40:09 UTC (rev 289424)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLine.h	2022-02-08 21:45:59 UTC (rev 289425)
@@ -40,7 +40,7 @@
         float top { 0 };
         float bottom { 0 };
     };
-    Line(const FloatRect& lineBoxRect, const FloatRect& scrollableOverflow, EnclosingTopAndBottom, float aligmentBaseline, float contentLeft, float contentLogicalWidth);
+    Line(const FloatRect& lineBoxRect, const FloatRect& scrollableOverflow, EnclosingTopAndBottom, float aligmentBaseline, FontBaseline baselineType, float contentLeft, float contentLogicalWidth);
 
     float left() const { return m_lineBoxRect.x(); }
     float right() const { return m_lineBoxRect.maxX(); }
@@ -55,6 +55,7 @@
     EnclosingTopAndBottom enclosingTopAndBottom() const { return m_enclosingTopAndBottom; }
 
     float baseline() const { return m_aligmentBaseline; }
+    FontBaseline baselineType() const { return m_baselineType; }
 
     float contentLeft() const { return m_contentLeft; }
     float contentLogicalWidth() const { return m_contentLogicalWidth; }
@@ -72,9 +73,10 @@
     float m_aligmentBaseline { 0 };
     float m_contentLeft { 0 };
     float m_contentLogicalWidth { 0 };
+    FontBaseline m_baselineType { AlphabeticBaseline };
 };
 
-inline Line::Line(const FloatRect& lineBoxRect, const FloatRect& scrollableOverflow, EnclosingTopAndBottom enclosingTopAndBottom, float aligmentBaseline, float contentLeft, float contentLogicalWidth)
+inline Line::Line(const FloatRect& lineBoxRect, const FloatRect& scrollableOverflow, EnclosingTopAndBottom enclosingTopAndBottom, float aligmentBaseline, FontBaseline baselineType, float contentLeft, float contentLogicalWidth)
     : m_lineBoxRect(lineBoxRect)
     , m_scrollableOverflow(scrollableOverflow)
     , m_enclosingTopAndBottom(enclosingTopAndBottom)
@@ -81,6 +83,7 @@
     , m_aligmentBaseline(aligmentBaseline)
     , m_contentLeft(contentLeft)
     , m_contentLogicalWidth(contentLogicalWidth)
+    , m_baselineType(baselineType)
 {
 }
 

Modified: trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp (289424 => 289425)


--- trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp	2022-02-08 21:40:09 UTC (rev 289424)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp	2022-02-08 21:45:59 UTC (rev 289425)
@@ -100,6 +100,7 @@
         , flipLogicalLineRectToVisualForWritingMode(enclosingLineGeometry.scrollableOverflowRect, writingMode)
         , enclosingLineGeometry.enclosingTopAndBottom
         , rootInlineBox.logicalTop() + rootInlineBox.ascent()
+        , lineBox.baselineType()
         , contentVisualLeft
         , rootInlineBox.logicalWidth()
     };

Modified: trunk/Source/WebCore/layout/integration/InlineIteratorLineModernPath.h (289424 => 289425)


--- trunk/Source/WebCore/layout/integration/InlineIteratorLineModernPath.h	2022-02-08 21:40:09 UTC (rev 289424)
+++ trunk/Source/WebCore/layout/integration/InlineIteratorLineModernPath.h	2022-02-08 21:45:59 UTC (rev 289425)
@@ -67,7 +67,7 @@
     float y() const { return lineBoxTop(); }
     float logicalHeight() const { return lineBoxBottom() - lineBoxTop(); }
     bool isHorizontal() const { return true; }
-    FontBaseline baselineType() const { return AlphabeticBaseline; }
+    FontBaseline baselineType() const { return line().baselineType(); }
 
     const RenderBlockFlow& containingBlock() const { return m_inlineContent->containingBlock(); }
     const LegacyRootInlineBox* legacyRootInlineBox() const { return nullptr; }

Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContentBuilder.cpp (289424 => 289425)


--- trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContentBuilder.cpp	2022-02-08 21:40:09 UTC (rev 289424)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContentBuilder.cpp	2022-02-08 21:45:59 UTC (rev 289425)
@@ -137,7 +137,7 @@
         }
 
         auto boxCount = boxIndex - firstBoxIndex;
-        inlineContent.lines.append({ firstBoxIndex, boxCount, FloatRect { line.lineBoxRect() }, line.enclosingTopAndBottom().top, line.enclosingTopAndBottom().bottom, scrollableOverflowRect, lineInkOverflowRect, line.baseline(), line.contentLeft(), line.contentLogicalWidth() });
+        inlineContent.lines.append({ firstBoxIndex, boxCount, FloatRect { line.lineBoxRect() }, line.enclosingTopAndBottom().top, line.enclosingTopAndBottom().bottom, scrollableOverflowRect, lineInkOverflowRect, line.baseline(), line.baselineType(), line.contentLeft(), line.contentLogicalWidth() });
     }
 }
 

Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationLine.h (289424 => 289425)


--- trunk/Source/WebCore/layout/integration/LayoutIntegrationLine.h	2022-02-08 21:40:09 UTC (rev 289424)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationLine.h	2022-02-08 21:45:59 UTC (rev 289425)
@@ -36,7 +36,7 @@
 class Line {
     WTF_MAKE_FAST_ALLOCATED;
 public:
-    Line(size_t firstBoxIndex, size_t boxCount, const FloatRect& lineBoxRect, float enclosingContentTop, float enclosingContentBottom, const FloatRect& scrollableOverflow, const FloatRect& inkOverflow, float baseline, float contentLeft, float contentLogicalWidth)
+    Line(size_t firstBoxIndex, size_t boxCount, const FloatRect& lineBoxRect, float enclosingContentTop, float enclosingContentBottom, const FloatRect& scrollableOverflow, const FloatRect& inkOverflow, float baseline, FontBaseline baselineType, float contentLeft, float contentLogicalWidth)
         : m_firstBoxIndex(firstBoxIndex)
         , m_boxCount(boxCount)
         , m_lineBoxRect(lineBoxRect)
@@ -47,6 +47,7 @@
         , m_baseline(baseline)
         , m_contentLeft(contentLeft)
         , m_contentLogicalWidth(contentLogicalWidth)
+        , m_baselineType(baselineType)
     {
     }
 
@@ -65,6 +66,7 @@
     const FloatRect& inkOverflow() const { return m_inkOverflow; }
 
     float baseline() const { return m_baseline; }
+    FontBaseline baselineType() const { return m_baselineType; }
 
     float contentLeft() const { return m_contentLeft; }
     float contentLogicalWidth() const { return m_contentLogicalWidth; }
@@ -84,6 +86,7 @@
     float m_baseline { 0 };
     float m_contentLeft { 0 };
     float m_contentLogicalWidth { 0 };
+    FontBaseline m_baselineType { AlphabeticBaseline }; 
 };
 
 }

Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationPagination.cpp (289424 => 289425)


--- trunk/Source/WebCore/layout/integration/LayoutIntegrationPagination.cpp	2022-02-08 21:40:09 UTC (rev 289424)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationPagination.cpp	2022-02-08 21:45:59 UTC (rev 289425)
@@ -135,6 +135,7 @@
             moveVertically(line.scrollableOverflow(), offset),
             moveVertically(line.inkOverflow(), offset),
             line.baseline(),
+            line.baselineType(),
             line.contentLeft(),
             line.contentLogicalWidth()
         };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to