Title: [288371] trunk
- Revision
- 288371
- Author
- [email protected]
- Date
- 2022-01-21 13:07:04 -0800 (Fri, 21 Jan 2022)
Log Message
[LFC][IFC] Inline boxes with collapsible content only should not be considered opaque bidi items
https://bugs.webkit.org/show_bug.cgi?id=235447
Reviewed by Antti Koivisto.
Source/WebCore:
We don't normally submit inline boxes with content to ubidi re-ordering since their content drives the visual
position unless they are empty. While empty inline boxes do not usually produce visual artifacts (except ones with decoration)
they still need to be able to answer "bounding box" type of questions.
So in order to have geometry generated for inline boxes, they either
1, need to have some content so that while processing their content, we also compute their geometries
2, have to participate in ubidi's visual re-ordering so that they show up in the visual list (which is the input to the display box create function)
This patch treats inline boxes with fully collapsible content empty so that they fall into group #2.
* layout/formattingContexts/inline/InlineItemsBuilder.cpp:
(WebCore::Layout::InlineItemsBuilder::breakAndComputeBidiLevels):
LayoutTests:
* TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (288370 => 288371)
--- trunk/LayoutTests/ChangeLog 2022-01-21 21:02:59 UTC (rev 288370)
+++ trunk/LayoutTests/ChangeLog 2022-01-21 21:07:04 UTC (rev 288371)
@@ -1,3 +1,12 @@
+2022-01-21 Alan Bujtas <[email protected]>
+
+ [LFC][IFC] Inline boxes with collapsible content only should not be considered opaque bidi items
+ https://bugs.webkit.org/show_bug.cgi?id=235447
+
+ Reviewed by Antti Koivisto.
+
+ * TestExpectations:
+
2022-01-21 Robert Jenner <[email protected]>
[ iOS EWS ] imported/w3c/web-platform-tests/dom/events/focus-event-document-move.html is a constant text failure
Modified: trunk/LayoutTests/TestExpectations (288370 => 288371)
--- trunk/LayoutTests/TestExpectations 2022-01-21 21:02:59 UTC (rev 288370)
+++ trunk/LayoutTests/TestExpectations 2022-01-21 21:07:04 UTC (rev 288371)
@@ -2745,7 +2745,6 @@
webkit.org/b/195275 imported/w3c/web-platform-tests/css/css-text/white-space/tab-stop-threshold-006.html [ ImageOnlyFailure ]
webkit.org/b/195275 imported/w3c/web-platform-tests/css/css-text/white-space/control-chars-000.html [ ImageOnlyFailure ]
webkit.org/b/195275 imported/w3c/web-platform-tests/css/css-text/white-space/text-space-collapse-preserve-breaks-001.xht [ ImageOnlyFailure ]
-webkit.org/b/214290 [ Debug ] imported/w3c/web-platform-tests/css/css-text/white-space/eol-spaces-bidi-001.html [ Skip ]
webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/white-space/seg-break-transformation-018.html [ ImageOnlyFailure ]
webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/white-space/seg-break-transformation-019.html [ ImageOnlyFailure ]
webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/white-space/textarea-pre-wrap-012.html [ ImageOnlyFailure ]
Modified: trunk/Source/WebCore/ChangeLog (288370 => 288371)
--- trunk/Source/WebCore/ChangeLog 2022-01-21 21:02:59 UTC (rev 288370)
+++ trunk/Source/WebCore/ChangeLog 2022-01-21 21:07:04 UTC (rev 288371)
@@ -1,3 +1,23 @@
+2022-01-21 Alan Bujtas <[email protected]>
+
+ [LFC][IFC] Inline boxes with collapsible content only should not be considered opaque bidi items
+ https://bugs.webkit.org/show_bug.cgi?id=235447
+
+ Reviewed by Antti Koivisto.
+
+ We don't normally submit inline boxes with content to ubidi re-ordering since their content drives the visual
+ position unless they are empty. While empty inline boxes do not usually produce visual artifacts (except ones with decoration)
+ they still need to be able to answer "bounding box" type of questions.
+
+ So in order to have geometry generated for inline boxes, they either
+ 1, need to have some content so that while processing their content, we also compute their geometries
+ 2, have to participate in ubidi's visual re-ordering so that they show up in the visual list (which is the input to the display box create function)
+
+ This patch treats inline boxes with fully collapsible content empty so that they fall into group #2.
+
+ * layout/formattingContexts/inline/InlineItemsBuilder.cpp:
+ (WebCore::Layout::InlineItemsBuilder::breakAndComputeBidiLevels):
+
2022-01-21 Antti Koivisto <[email protected]>
WPT version of css/css-cascade/parsing/layer-import-parsing.html crashes with nullptr
Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp (288370 => 288371)
--- trunk/Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp 2022-01-21 21:02:59 UTC (rev 288370)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp 2022-01-21 21:07:04 UTC (rev 288371)
@@ -428,7 +428,8 @@
continue;
}
// Mark the inline box stack with "content yes", when we come across a content type of inline item.
- inlineBoxContentFlagStack.fill(InlineBoxHasContent::Yes);
+ if (!inlineItem.isText() || !downcast<InlineTextItem>(inlineItem).isWhitespace() || TextUtil::shouldPreserveSpacesAndTabs(inlineItem.layoutBox()))
+ inlineBoxContentFlagStack.fill(InlineBoxHasContent::Yes);
}
};
setBidiLevelForOpaqueInlineItems();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes