[webkit-changes] [WebKit/WebKit] cf9c0a: know[IFC][Intrinsic width] Maximum content size ma...
Alan Baradlay
noreply at github.com
Thu Jan 11 08:06:25 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: cf9c0a062241fde66ab4bf2bc5a033bfc75e14a5
https://github.com/WebKit/WebKit/commit/cf9c0a062241fde66ab4bf2bc5a033bfc75e14a5
Author: Alan Baradlay <zalan at apple.com>
Date: 2024-01-11 (Thu, 11 Jan 2024)
Changed paths:
A LayoutTests/fast/text/pre-wrap-max-content-expected.html
A LayoutTests/fast/text/pre-wrap-max-content.html
M Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp
M Source/WebCore/layout/formattingContexts/inline/IntrinsicWidthHandler.cpp
M Source/WebCore/layout/formattingContexts/inline/IntrinsicWidthHandler.h
Log Message:
-----------
know[IFC][Intrinsic width] Maximum content size may be computed during minimum phase in some limited cases
https://bugs.webkit.org/show_bug.cgi?id=267312
Reviewed by Antti Koivisto.
Let's compute the maximum content width between 2 forced line breaks and cache it.
'Preserve whitespace' type of text only content may reuse it as maximum content size.
* Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp: Hanging content is still there, it just does not count as content width.
(WebCore::Layout::Line::handleTrailingHangingContent):
* Source/WebCore/layout/formattingContexts/inline/IntrinsicWidthHandler.cpp:
(WebCore::Layout::mayUseContentWidthBetweenLineBreaksAsMaximumSize):
(WebCore::Layout::IntrinsicWidthHandler::maximumContentSize):
(WebCore::Layout::IntrinsicWidthHandler::computedIntrinsicWidthForConstraint):
* Source/WebCore/layout/formattingContexts/inline/IntrinsicWidthHandler.h:
Canonical link: https://commits.webkit.org/272913@main
More information about the webkit-changes
mailing list