Title: [291529] trunk/Source/WebCore
Revision
291529
Author
[email protected]
Date
2022-03-19 11:21:43 -0700 (Sat, 19 Mar 2022)

Log Message

[IFC][Integration] InlineIterator::Line::enclosingBottom should read enclosingBottomAdjustedForFollowingLine
https://bugs.webkit.org/show_bug.cgi?id=238084

Reviewed by Antti Koivisto.

* layout/integration/InlineIteratorLine.h:
(WebCore::InlineIterator::Line::enclosingBottomAdjustedForFollowingLine const):
(WebCore::InlineIterator::Line::enclosingBottom const): Deleted.
* layout/integration/InlineIteratorLineLegacyPath.h:
(WebCore::InlineIterator::LineIteratorLegacyPath::enclosingBottomAdjustedForFollowingLine const):
(WebCore::InlineIterator::LineIteratorLegacyPath::enclosingBottom const): Deleted.
* layout/integration/InlineIteratorLineModernPath.h:
(WebCore::InlineIterator::LineIteratorModernPath::enclosingBottomAdjustedForFollowingLine const):
(WebCore::InlineIterator::LineIteratorModernPath::enclosingBottom const): Deleted.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (291528 => 291529)


--- trunk/Source/WebCore/ChangeLog	2022-03-19 15:39:53 UTC (rev 291528)
+++ trunk/Source/WebCore/ChangeLog	2022-03-19 18:21:43 UTC (rev 291529)
@@ -1,5 +1,22 @@
 2022-03-19  Alan Bujtas  <[email protected]>
 
+        [IFC][Integration] InlineIterator::Line::enclosingBottom should read enclosingBottomAdjustedForFollowingLine
+        https://bugs.webkit.org/show_bug.cgi?id=238084
+
+        Reviewed by Antti Koivisto.
+
+        * layout/integration/InlineIteratorLine.h:
+        (WebCore::InlineIterator::Line::enclosingBottomAdjustedForFollowingLine const):
+        (WebCore::InlineIterator::Line::enclosingBottom const): Deleted.
+        * layout/integration/InlineIteratorLineLegacyPath.h:
+        (WebCore::InlineIterator::LineIteratorLegacyPath::enclosingBottomAdjustedForFollowingLine const):
+        (WebCore::InlineIterator::LineIteratorLegacyPath::enclosingBottom const): Deleted.
+        * layout/integration/InlineIteratorLineModernPath.h:
+        (WebCore::InlineIterator::LineIteratorModernPath::enclosingBottomAdjustedForFollowingLine const):
+        (WebCore::InlineIterator::LineIteratorModernPath::enclosingBottom const): Deleted.
+
+2022-03-19  Alan Bujtas  <[email protected]>
+
         [IFC][Integration] Move selection specific code from InlineIterator::Line to LineSelection
         https://bugs.webkit.org/show_bug.cgi?id=238083
 

Modified: trunk/Source/WebCore/layout/integration/InlineIteratorLine.cpp (291528 => 291529)


--- trunk/Source/WebCore/layout/integration/InlineIteratorLine.cpp	2022-03-19 15:39:53 UTC (rev 291528)
+++ trunk/Source/WebCore/layout/integration/InlineIteratorLine.cpp	2022-03-19 18:21:43 UTC (rev 291529)
@@ -159,7 +159,7 @@
 
 int Line::blockDirectionPointInLine() const
 {
-    return !containingBlock().style().isFlippedBlocksWritingMode() ? std::max(top(), enclosingTopForHitTesting()) : std::min(bottom(), enclosingBottom());
+    return !containingBlock().style().isFlippedBlocksWritingMode() ? std::max(top(), enclosingTopForHitTesting()) : std::min(bottom(), enclosingBottomAdjustedForFollowingLine());
 }
 
 }

Modified: trunk/Source/WebCore/layout/integration/InlineIteratorLine.h (291528 => 291529)


--- trunk/Source/WebCore/layout/integration/InlineIteratorLine.h	2022-03-19 15:39:53 UTC (rev 291528)
+++ trunk/Source/WebCore/layout/integration/InlineIteratorLine.h	2022-03-19 18:21:43 UTC (rev 291529)
@@ -95,8 +95,8 @@
     // FIXME: This is temporary.
     friend class WebCore::LineSelection;
 
-    LayoutUnit enclosingBottom() const;
     LayoutUnit enclosingTopAdjustedForPrecedingLine() const;
+    LayoutUnit enclosingBottomAdjustedForFollowingLine() const;
 
     PathVariant m_pathVariant;
 };
@@ -167,10 +167,10 @@
     });
 }
 
-inline LayoutUnit Line::enclosingBottom() const
+inline LayoutUnit Line::enclosingBottomAdjustedForFollowingLine() const
 {
     return WTF::switchOn(m_pathVariant, [](const auto& path) {
-        return path.enclosingBottom();
+        return path.enclosingBottomAdjustedForFollowingLine();
     });
 }
 

Modified: trunk/Source/WebCore/layout/integration/InlineIteratorLineLegacyPath.h (291528 => 291529)


--- trunk/Source/WebCore/layout/integration/InlineIteratorLineLegacyPath.h	2022-03-19 15:39:53 UTC (rev 291528)
+++ trunk/Source/WebCore/layout/integration/InlineIteratorLineLegacyPath.h	2022-03-19 18:21:43 UTC (rev 291529)
@@ -47,7 +47,7 @@
     LayoutUnit bottom() const { return m_rootInlineBox->lineBottom(); }
     LayoutUnit enclosingTopAdjustedForPrecedingLine() const { return m_rootInlineBox->selectionTop(); }
     LayoutUnit enclosingTopForHitTesting() const { return m_rootInlineBox->selectionTop(LegacyRootInlineBox::ForHitTesting::Yes); }
-    LayoutUnit enclosingBottom() const { return m_rootInlineBox->selectionBottom(); }
+    LayoutUnit enclosingBottomAdjustedForFollowingLine() const { return m_rootInlineBox->selectionBottom(); }
     LayoutUnit lineBoxTop() const { return m_rootInlineBox->lineBoxTop(); }
     LayoutUnit lineBoxBottom() const { return m_rootInlineBox->lineBoxBottom(); }
 

Modified: trunk/Source/WebCore/layout/integration/InlineIteratorLineModernPath.h (291528 => 291529)


--- trunk/Source/WebCore/layout/integration/InlineIteratorLineModernPath.h	2022-03-19 15:39:53 UTC (rev 291528)
+++ trunk/Source/WebCore/layout/integration/InlineIteratorLineModernPath.h	2022-03-19 18:21:43 UTC (rev 291529)
@@ -54,13 +54,13 @@
     LayoutUnit lineBoxTop() const { return LayoutUnit::fromFloatRound(line().lineBoxTop()); }
     LayoutUnit lineBoxBottom() const { return LayoutUnit::fromFloatRound(line().lineBoxBottom()); }
 
-    LayoutUnit enclosingTopAdjustedForPrecedingLine() const { return !m_lineIndex ? top() : LineIteratorModernPath(*m_inlineContent, m_lineIndex - 1).enclosingBottom(); }
+    LayoutUnit enclosingTopAdjustedForPrecedingLine() const { return !m_lineIndex ? top() : LineIteratorModernPath(*m_inlineContent, m_lineIndex - 1).enclosingBottomAdjustedForFollowingLine(); }
     // FIXME: Remove the containingBlock().borderAndPaddingBefore() offset after retiring legacy line layout. It also requires changes in RenderText::positionForPoint to find the first line with offset.
     // - the "before" value is already factored in to the line offset
     // - this logic negates the first line's natural offset (e.g. block has no border/padding but the first line has a computed offset).
     LayoutUnit enclosingTopForHitTesting() const { return !m_lineIndex ? containingBlock().borderAndPaddingBefore() : enclosingTopAdjustedForPrecedingLine(); };
-    // FIXME: Implement or replace.
-    LayoutUnit enclosingBottom() const { return bottom(); }
+    // FIXME: Implement.
+    LayoutUnit enclosingBottomAdjustedForFollowingLine() const { return bottom(); }
 
     float contentLogicalLeft() const { return line().lineBoxLeft() + line().contentLogicalOffset(); }
     float contentLogicalRight() const { return contentLogicalLeft() + line().contentLogicalWidth(); }

Modified: trunk/Source/WebCore/layout/integration/LineSelection.h (291528 => 291529)


--- trunk/Source/WebCore/layout/integration/LineSelection.h	2022-03-19 15:39:53 UTC (rev 291528)
+++ trunk/Source/WebCore/layout/integration/LineSelection.h	2022-03-19 18:21:43 UTC (rev 291529)
@@ -33,11 +33,11 @@
 class LineSelection {
 public:
     static LayoutUnit logicalTop(const InlineIterator::Line& line) { return line.enclosingTopAdjustedForPrecedingLine(); }
-    static LayoutUnit logicalBottom(const InlineIterator::Line& line) { return line.enclosingBottom(); }
+    static LayoutUnit logicalBottom(const InlineIterator::Line& line) { return line.enclosingBottomAdjustedForFollowingLine(); }
 
     static LayoutRect logicalRect(const InlineIterator::Line& line)
     {
-        return { LayoutPoint { line.contentLogicalLeft(), line.enclosingTopAdjustedForPrecedingLine() }, LayoutPoint { line.contentLogicalRight(), line.enclosingBottom() } };
+        return { LayoutPoint { line.contentLogicalLeft(), line.enclosingTopAdjustedForPrecedingLine() }, LayoutPoint { line.contentLogicalRight(), line.enclosingBottomAdjustedForFollowingLine() } };
     }
 
     static LayoutRect physicalRect(const InlineIterator::Line& line)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to