Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8c497617ec2a904ffb93e425f5b6ca882e1fe56a
https://github.com/WebKit/WebKit/commit/8c497617ec2a904ffb93e425f5b6ca882e1fe56a
Author: Alan Baradlay <[email protected]>
Date: 2023-05-13 (Sat, 13 May 2023)
Changed paths:
M LayoutTests/TestExpectations
M
LayoutTests/fast/block/zero-width-block-with-line-clamp-multiple-lines-expected.html
M LayoutTests/fast/flexbox/line-clamp-with-anchor-content-only-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/webkit-line-clamp-038-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/webkit-line-clamp-038.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/webkit-line-clamp-039-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/webkit-line-clamp-039.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/webkit-line-clamp-040-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/webkit-line-clamp-040.html
M LayoutTests/platform/ios/fast/overflow/line-clamp-expected.txt
M LayoutTests/platform/mac/fast/overflow/line-clamp-expected.txt
M
Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp
M
Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.h
M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h
M Source/WebCore/rendering/RenderBlockFlow.cpp
M Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp
M Source/WebCore/rendering/RenderDeprecatedFlexibleBox.h
M Source/WebCore/rendering/RenderLayoutState.h
Log Message:
-----------
REGRESSION(STP169): wpt/css/css-overflow/webkit-line-clamp-040.html
https://bugs.webkit.org/show_bug.cgi?id=256371
<rdar://108949870>
Reviewed by Antti Koivisto.
This is a partial revert of 263289@main where we stopped painting _clamped_
content.
This behavior violates the most recent version of -webkit-line-clamp spec which
says (and I am paraphrasing here)
_clamped_ content should get painted as is and let clipping do its work to hide
when applicable.
We may produce content like this:
second line is
where we clamp...
but we keep painting content
because reasons
263289@main fixed some overlapping (clamped) content by not painting it, where
this patch takes a different approach
where we size the flex box based on the clamped content (and let the flex items
expand to their unclamped size).
1. LineLayout::contentBoxLogicalHeight now ignores the block direction clamping
and clamping logic should
consult LineLayout::clampedContentLogicalHeight to figure out the clamped
content height.
2. Turn clamped content height into a flex box relative content bottom.
3. Use clamped content bottom to size the flex box.
*
LayoutTests/fast/block/zero-width-block-with-line-clamp-multiple-lines-expected.html:
back to pre-263289@main behavior.
* LayoutTests/fast/flexbox/line-clamp-with-anchor-content-only-expected.html:
back to pre-263289@main behavior.
* LayoutTests/TestExpectations:
* LayoutTests/fast/inline/line-clamp-with-text-align-expected.html:
* LayoutTests/fast/inline/line-clamp-with-text-align.html:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/webkit-line-clamp-038-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/webkit-line-clamp-038.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/webkit-line-clamp-039-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/webkit-line-clamp-039.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/webkit-line-clamp-040-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/webkit-line-clamp-040.html:
Added.
* LayoutTests/platform/ios/fast/overflow/line-clamp-expected.txt:
* LayoutTests/platform/mac/fast/overflow/line-clamp-expected.txt:
*
Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:
(WebCore::Layout::InlineDisplayContentBuilder::InlineDisplayContentBuilder):
*
Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.h:
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::clampedContentLogicalHeight const):
(WebCore::LayoutIntegration::LineLayout::contentBoxLogicalHeight const):
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h:
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutModernLines):
* Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
(WebCore::RenderDeprecatedFlexibleBox::applyModernLineClamp):
(WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
* Source/WebCore/rendering/RenderDeprecatedFlexibleBox.h:
* Source/WebCore/rendering/RenderLayoutState.h:
Canonical link: https://commits.webkit.org/264048@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes