Title: [287438] trunk/Source/WebCore
- Revision
- 287438
- Author
- [email protected]
- Date
- 2021-12-25 10:34:35 -0800 (Sat, 25 Dec 2021)
Log Message
[LFC][IFC] Fully collapsible whitespace content should always stay on the current line
https://bugs.webkit.org/show_bug.cgi?id=234667
Reviewed by Antti Koivisto.
Fully collapsible trailing whitespace content (normal/nowrap/preline) gets removed at
the trimming phase so it always "fits" the current line.
This is also in preparation for decoupling removeable and hanging trailing content.
* layout/formattingContexts/inline/InlineContentBreaker.cpp:
(WebCore::Layout::InlineContentBreaker::processOverflowingContent const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (287437 => 287438)
--- trunk/Source/WebCore/ChangeLog 2021-12-25 15:36:13 UTC (rev 287437)
+++ trunk/Source/WebCore/ChangeLog 2021-12-25 18:34:35 UTC (rev 287438)
@@ -1,5 +1,19 @@
2021-12-25 Alan Bujtas <[email protected]>
+ [LFC][IFC] Fully collapsible whitespace content should always stay on the current line
+ https://bugs.webkit.org/show_bug.cgi?id=234667
+
+ Reviewed by Antti Koivisto.
+
+ Fully collapsible trailing whitespace content (normal/nowrap/preline) gets removed at
+ the trimming phase so it always "fits" the current line.
+ This is also in preparation for decoupling removeable and hanging trailing content.
+
+ * layout/formattingContexts/inline/InlineContentBreaker.cpp:
+ (WebCore::Layout::InlineContentBreaker::processOverflowingContent const):
+
+2021-12-25 Alan Bujtas <[email protected]>
+
[LFC][IFC] InlineContentBreaker should know about the hanging content width
https://bugs.webkit.org/show_bug.cgi?id=234662
Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp (287437 => 287438)
--- trunk/Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp 2021-12-25 15:36:13 UTC (rev 287437)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp 2021-12-25 18:34:35 UTC (rev 287438)
@@ -170,16 +170,15 @@
if (continuousContent.hasCollapsibleContent()) {
// Check if the content fits if we collapsed it.
if (continuousContent.isFullyCollapsible()) {
- if (lineStatus.hasFullyCollapsibleTrailingContent || lineStatus.availableWidth >= 0) {
- // If this new content is fully collapsible, it should surely fit.
- return InlineContentBreaker::Result { Result::Action::Keep, IsEndOfLine::No };
- }
+ // If this new content is fully collapsible, it should surely fit.
+ return InlineContentBreaker::Result { Result::Action::Keep };
+ } else {
+ auto spaceRequired = continuousContent.logicalWidth() - continuousContent.trailingCollapsibleWidth();
+ if (lineStatus.hasFullyCollapsibleTrailingContent)
+ spaceRequired -= continuousContent.leadingCollapsibleWidth();
+ if (spaceRequired <= lineStatus.availableWidth)
+ return InlineContentBreaker::Result { Result::Action::Keep };
}
- auto spaceRequired = continuousContent.logicalWidth() - continuousContent.trailingCollapsibleWidth();
- if (lineStatus.hasFullyCollapsibleTrailingContent)
- spaceRequired -= continuousContent.leadingCollapsibleWidth();
- if (spaceRequired <= lineStatus.availableWidth)
- return InlineContentBreaker::Result { Result::Action::Keep, IsEndOfLine::No };
}
auto canIgnoreNonContentTrailingRuns = lineStatus.collapsibleOrHangingWidth && isNonContentRunsOnly(continuousContent);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes