Title: [288407] trunk/Source/WebCore
Revision
288407
Author
[email protected]
Date
2022-01-22 14:14:09 -0800 (Sat, 22 Jan 2022)

Log Message

[LFC][IFC] Alignment logic should take the line specific direction (which may be different from the root direction)
https://bugs.webkit.org/show_bug.cgi?id=235460

Reviewed by Antti Koivisto.

This makes the the /html/dom/elements/global-attributes/dir_auto-* tests pass (not enabled yet).

* layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:
(WebCore::Layout::LineBoxBuilder::build):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (288406 => 288407)


--- trunk/Source/WebCore/ChangeLog	2022-01-22 20:55:22 UTC (rev 288406)
+++ trunk/Source/WebCore/ChangeLog	2022-01-22 22:14:09 UTC (rev 288407)
@@ -1,3 +1,15 @@
+2022-01-22  Alan Bujtas  <[email protected]>
+
+        [LFC][IFC] Alignment logic should take the line specific direction (which may be different from the root direction)
+        https://bugs.webkit.org/show_bug.cgi?id=235460
+
+        Reviewed by Antti Koivisto.
+
+        This makes the the /html/dom/elements/global-attributes/dir_auto-* tests pass (not enabled yet).
+
+        * layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:
+        (WebCore::Layout::LineBoxBuilder::build):
+
 2022-01-22  Andres Gonzalez  <[email protected]>
 
         Create ancestry of isolated objects instead of generating the entire subtree for an ancestor.

Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp (288406 => 288407)


--- trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp	2022-01-22 20:55:22 UTC (rev 288406)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp	2022-01-22 22:14:09 UTC (rev 288407)
@@ -106,7 +106,7 @@
 LineBoxBuilder::LineBoxAndHeight LineBoxBuilder::build(const LineBuilder::LineContent& lineContent, size_t lineIndex)
 {
     auto& rootStyle = lineIndex ? rootBox().firstLineStyle() : rootBox().style();
-    auto rootInlineBoxAlignmentOffset = valueOrDefault(Layout::horizontalAlignmentOffset(rootStyle.textAlign(), lineContent, rootStyle.isLeftToRightDirection()));
+    auto rootInlineBoxAlignmentOffset = valueOrDefault(Layout::horizontalAlignmentOffset(rootStyle.textAlign(), lineContent, lineContent.inlineBaseDirection == TextDirection::LTR));
     // FIXME: The overflowing hanging content should be part of the ink overflow.  
     auto lineBox = LineBox { rootBox(), rootInlineBoxAlignmentOffset, lineContent.contentLogicalWidth - lineContent.hangingContentWidth, lineIndex, lineContent.nonSpanningInlineLevelBoxCount };
     auto lineBoxLogicalHeight = constructAndAlignInlineLevelBoxes(lineBox, lineContent, lineIndex);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to