Title: [272312] trunk/Source/WebCore
- Revision
- 272312
- Author
- [email protected]
- Date
- 2021-02-03 06:40:46 -0800 (Wed, 03 Feb 2021)
Log Message
[LFC][IFC] Handles cases when the candidate content is overflowing from the get-go
https://bugs.webkit.org/show_bug.cgi?id=221306
Reviewed by Antti Koivisto.
This is the case when we keep adding content to a line with "white-space: nowrap". At some point the candidate content overlaps from
the get-go and while the run is breakable, there's no trailing run.
(see imported/w3c/web-platform-tests/css/css-text/white-space/white-space-pre-wrap-trailing-spaces-011.html).
* layout/inlineformatting/InlineContentBreaker.cpp:
(WebCore::Layout::InlineContentBreaker::processOverflowingTextContent const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (272311 => 272312)
--- trunk/Source/WebCore/ChangeLog 2021-02-03 14:38:52 UTC (rev 272311)
+++ trunk/Source/WebCore/ChangeLog 2021-02-03 14:40:46 UTC (rev 272312)
@@ -1,3 +1,17 @@
+2021-02-03 Zalan Bujtas <[email protected]>
+
+ [LFC][IFC] Handles cases when the candidate content is overflowing from the get-go
+ https://bugs.webkit.org/show_bug.cgi?id=221306
+
+ Reviewed by Antti Koivisto.
+
+ This is the case when we keep adding content to a line with "white-space: nowrap". At some point the candidate content overlaps from
+ the get-go and while the run is breakable, there's no trailing run.
+ (see imported/w3c/web-platform-tests/css/css-text/white-space/white-space-pre-wrap-trailing-spaces-011.html).
+
+ * layout/inlineformatting/InlineContentBreaker.cpp:
+ (WebCore::Layout::InlineContentBreaker::processOverflowingTextContent const):
+
2021-02-03 Sam Weinig <[email protected]>
Add support for color(xyz ...) as part of CSS Color 4
Modified: trunk/Source/WebCore/layout/inlineformatting/InlineContentBreaker.cpp (272311 => 272312)
--- trunk/Source/WebCore/layout/inlineformatting/InlineContentBreaker.cpp 2021-02-03 14:38:52 UTC (rev 272311)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineContentBreaker.cpp 2021-02-03 14:40:46 UTC (rev 272312)
@@ -373,7 +373,10 @@
// We are at "breakable", <span> is at index - 1 and the trailing run is at index - 2.
ASSERT(runs[index - 1].inlineItem.isInlineBoxStart());
auto trailingRunIndex = findTrailingRunIndex(index);
- ASSERT(trailingRunIndex);
+ if (!trailingRunIndex) {
+ // This continuous content did not fit from the get-go. No trailing run.
+ return OverflowingTextContent::BreakingPosition { };
+ }
// At worst we are back to the overflowing run, like in the example above.
ASSERT(*trailingRunIndex >= overflowingRunIndex);
return OverflowingTextContent::BreakingPosition { *trailingRunIndex, OverflowingTextContent::BreakingPosition::TrailingContent { true } };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes