[webkit-changes] [WebKit/WebKit] 71f363: [IFC][Integration][Line clamp] Block children star...
Ethan Wong
noreply at github.com
Tue Apr 18 10:11:51 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 71f363c22510a871c79e265d62436443c7802743
https://github.com/WebKit/WebKit/commit/71f363c22510a871c79e265d62436443c7802743
Author: Ethan Wong <e1hanw0ng at gmail.com>
Date: 2023-04-18 (Tue, 18 Apr 2023)
Changed paths:
A LayoutTests/fast/text/layout-overflow-hidden-for-line-clamped-content-expected.html
A LayoutTests/fast/text/layout-overflow-hidden-for-line-clamped-content.html
M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
Log Message:
-----------
[IFC][Integration][Line clamp] Block children starting with lines exceeding `maximumLineCountForLineClamp` should be fully collapsed.
https://bugs.webkit.org/show_bug.cgi?id=255487
Reviewed by Alan Baradlay.
`-webkit-line-clamp` expects the logical height of the content box to be
collapsed to the last visible line.
At `LineLayout::lastLineIndexForContentHeight()`, `visibleLineCountForLineClamp`
of the current layout state may be greater than `maximumLineCountForLineClamp`
when multiple children are being laid out within the same context of line clamp.
In this case, the last line index should be returned as empty in order for the
individual child block to be fully collapsed.
* LayoutTests/fast/text/layout-overflow-hidden-for-line-clamped-content-expected.html: Added.
* LayoutTests/fast/text/layout-overflow-hidden-for-line-clamped-content.html: Added.
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::lastLineIndexForContentHeight const):
Canonical link: https://commits.webkit.org/263079@main
More information about the webkit-changes
mailing list