Title: [268654] trunk/Source/WebCore
Revision
268654
Author
za...@apple.com
Date
2020-10-18 05:42:22 -0700 (Sun, 18 Oct 2020)

Log Message

[LFC][IFC] Inline level boxes are at the incorrect position when line is horizontally aligned
https://bugs.webkit.org/show_bug.cgi?id=217887

Reviewed by Antti Koivisto.

Inline boxes (as opposed to runs) are constructed after the horizontal alignment is computed so their position
already includes the horizontal offset. No need to offset the again at logicalRectForInlineLevelBox.

* layout/inlineformatting/InlineLineBox.cpp:
(WebCore::Layout::LineBox::logicalRectForInlineLevelBox const):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (268653 => 268654)


--- trunk/Source/WebCore/ChangeLog	2020-10-18 12:33:30 UTC (rev 268653)
+++ trunk/Source/WebCore/ChangeLog	2020-10-18 12:42:22 UTC (rev 268654)
@@ -1,5 +1,18 @@
 2020-10-18  Zalan Bujtas  <za...@apple.com>
 
+        [LFC][IFC] Inline level boxes are at the incorrect position when line is horizontally aligned
+        https://bugs.webkit.org/show_bug.cgi?id=217887
+
+        Reviewed by Antti Koivisto.
+
+        Inline boxes (as opposed to runs) are constructed after the horizontal alignment is computed so their position
+        already includes the horizontal offset. No need to offset the again at logicalRectForInlineLevelBox.
+
+        * layout/inlineformatting/InlineLineBox.cpp:
+        (WebCore::Layout::LineBox::logicalRectForInlineLevelBox const):
+
+2020-10-18  Zalan Bujtas  <za...@apple.com>
+
         [LFC][IFC] Add quirks mode for root inline box height stretching
         https://bugs.webkit.org/show_bug.cgi?id=217881
 

Modified: trunk/Source/WebCore/layout/inlineformatting/InlineLineBox.cpp (268653 => 268654)


--- trunk/Source/WebCore/layout/inlineformatting/InlineLineBox.cpp	2020-10-18 12:33:30 UTC (rev 268653)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineLineBox.cpp	2020-10-18 12:42:22 UTC (rev 268654)
@@ -91,7 +91,7 @@
         ASSERT(inlineBox->isInlineBox());
         inlineBoxAbsolutelogicalTop += inlineBox->logicalTop();
     }
-    return { inlineBoxAbsolutelogicalTop, m_horizontalAlignmentOffset.valueOr(InlineLayoutUnit { }) + inlineBoxLogicalRect.left(), inlineBoxLogicalRect.width(), inlineBoxLogicalRect.height() };
+    return { inlineBoxAbsolutelogicalTop, inlineBoxLogicalRect.left(), inlineBoxLogicalRect.width(), inlineBoxLogicalRect.height() };
 }
 
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to