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

Log Message

[LFC][IFC] Use content direction for the first "unicode-paragraph" when "unicode-bidi: plaintext" is present
https://bugs.webkit.org/show_bug.cgi?id=235452

Reviewed by Antti Koivisto.

This makes the /css/css-writing-modes/bidi-plaintext-br-* tests pass (not enabled yet).

* layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::layoutInlineContent):

Modified Paths

Diff

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


--- trunk/Source/WebCore/ChangeLog	2022-01-22 22:14:09 UTC (rev 288407)
+++ trunk/Source/WebCore/ChangeLog	2022-01-22 22:20:52 UTC (rev 288408)
@@ -1,5 +1,17 @@
 2022-01-22  Alan Bujtas  <[email protected]>
 
+        [LFC][IFC] Use content direction for the first "unicode-paragraph" when "unicode-bidi: plaintext" is present
+        https://bugs.webkit.org/show_bug.cgi?id=235452
+
+        Reviewed by Antti Koivisto.
+
+        This makes the /css/css-writing-modes/bidi-plaintext-br-* tests pass (not enabled yet).
+
+        * layout/formattingContexts/inline/InlineLineBuilder.cpp:
+        (WebCore::Layout::LineBuilder::layoutInlineContent):
+
+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
 

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


--- trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp	2022-01-22 22:14:09 UTC (rev 288407)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp	2022-01-22 22:20:52 UTC (rev 288408)
@@ -358,11 +358,11 @@
 
     auto inlineBaseDirectionForLineContent = [&] {
         auto& rootStyle = !previousLine ? root().firstLineStyle() : root().style();
-        auto shouldUseBlockDirection = rootStyle.unicodeBidi() != UnicodeBidi::Plaintext || !previousLine;
+        auto shouldUseBlockDirection = rootStyle.unicodeBidi() != UnicodeBidi::Plaintext;
         if (shouldUseBlockDirection)
             return rootStyle.direction();
         // A previous line ending with a line break (<br> or preserved \n) introduces a new unicode paragraph with its own direction.
-        if (!previousLine->endsWithLineBreak)
+        if (previousLine && !previousLine->endsWithLineBreak)
             return previousLine->inlineBaseDirection;
         return TextUtil::directionForTextContent(toString(lineRuns));
     };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to