Title: [287394] trunk/Source/WebCore
Revision
287394
Author
za...@apple.com
Date
2021-12-23 06:42:49 -0800 (Thu, 23 Dec 2021)

Log Message

[LFC][IFC] Empty bidi inline boxes should not make the line taller
https://bugs.webkit.org/show_bug.cgi?id=234621

Reviewed by Antti Koivisto.

We perform the same check for non-bidi inline boxes (also see FIXME).

* layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:
(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (287393 => 287394)


--- trunk/Source/WebCore/ChangeLog	2021-12-23 14:13:41 UTC (rev 287393)
+++ trunk/Source/WebCore/ChangeLog	2021-12-23 14:42:49 UTC (rev 287394)
@@ -1,5 +1,17 @@
 2021-12-23  Alan Bujtas  <za...@apple.com>
 
+        [LFC][IFC] Empty bidi inline boxes should not make the line taller
+        https://bugs.webkit.org/show_bug.cgi?id=234621
+
+        Reviewed by Antti Koivisto.
+
+        We perform the same check for non-bidi inline boxes (also see FIXME).
+
+        * layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:
+        (WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):
+
+2021-12-23  Alan Bujtas  <za...@apple.com>
+
         [LFC][IFC] Add support for RTL scrollable overflow
         https://bugs.webkit.org/show_bug.cgi?id=234617
 

Modified: trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp (287393 => 287394)


--- trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp	2021-12-23 14:13:41 UTC (rev 287393)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp	2021-12-23 14:42:49 UTC (rev 287394)
@@ -596,8 +596,13 @@
                 // some cases where the inline box has some content on the paragraph level (at bidi split) but line breaking renders it empty
                 // or their content is completely collapsed.
                 // Such inline boxes should also be handled here.
-                appendInlineDisplayBoxAtBidiBoundary(layoutBox, boxes);
-                createdDisplayBoxNodeForContainerBoxAndPushToAncestorStack(downcast<ContainerBox>(layoutBox), boxes.size() - 1, parentDisplayBoxNodeIndex, displayBoxTree, ancestorStack);
+                if (lineBox.hasContent()) {
+                    appendInlineDisplayBoxAtBidiBoundary(layoutBox, boxes);
+                    createdDisplayBoxNodeForContainerBoxAndPushToAncestorStack(downcast<ContainerBox>(layoutBox), boxes.size() - 1, parentDisplayBoxNodeIndex, displayBoxTree, ancestorStack);
+                } else {
+                    // FIXME: It's expected to not have any inline boxes on empty lines. They make the line taller. We should reconsider this.
+                    setInlineBoxGeometry(layoutBox, { { }, { } }, true);
+                }
                 continue;
             }
             ASSERT_NOT_REACHED();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to