Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8c17e28a36747ee6d670008d6dc5652cce71667e
https://github.com/WebKit/WebKit/commit/8c17e28a36747ee6d670008d6dc5652cce71667e
Author: Alan Baradlay <[email protected]>
Date: 2025-10-17 (Fri, 17 Oct 2025)
Changed paths:
M LayoutTests/platform/mac-wk2/TestExpectations
M
Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineLine.h
Log Message:
-----------
ASSERT in WebCore::Layout::Line::restoreTrimmedTrailingWhitespace on
`insertHTML-before-comment-at-end-of-editing-host.html` test case
https://bugs.webkit.org/show_bug.cgi?id=300864#
Reviewed by Antti Koivisto.
Line::restoreTrimmedTrailingWhitespace takes care of restoring the trimmed
whitespace
when we re-use layout result from intrinsic width computation for the final
layout
(and while intrinsic width computation trims whitespace, final layout needs it)
Add support for this special case where trimmed whitespace comes from a
dedicated layout box.
Normally trimmed whitespace is just part of the larger (previous) content and
not tied to a separate node. In cases where it has a dedicated layout box,
instead of expanding the
existing run, we need to create a new one and append it as a trailing content.
(This only has perf impact as asserting/returning false just means we can't
use the cached content and will need to run proper layout.)
* LayoutTests/platform/mac-wk2/TestExpectations:
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::createDisplayContentForLineFromCachedContent):
* Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp:
(WebCore::Layout::Line::appendTrailingInlineItemAsTrailingRun):
(WebCore::Layout::Line::restoreTrimmedTrailingWhitespace):
* Source/WebCore/layout/formattingContexts/inline/InlineLine.h:
Canonical link: https://commits.webkit.org/301727@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes