Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c572e93fff3901b92c092a4f389e66ffc317c8c1
https://github.com/WebKit/WebKit/commit/c572e93fff3901b92c092a4f389e66ffc317c8c1
Author: Rob Buis <[email protected]>
Date: 2026-09-30 (Wed, 30 Sep 2026)
Changed paths:
M LayoutTests/TestExpectations
M LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt
M
LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/parsing/webkit-line-clamp-computed-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/cssom/shorthand-values-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/shadow-dom-expected.txt
M
LayoutTests/platform/glib/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
M
LayoutTests/platform/ios-26/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
M
LayoutTests/platform/ios/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
M
LayoutTests/platform/ipad/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
M LayoutTests/svg/css/getComputedStyle-basic-expected.txt
M Source/WebCore/Headers.cmake
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/css/CSSProperties.json
M Source/WebCore/css/ShorthandSerializer.cpp
M Source/WebCore/css/parser/CSSPropertyParserCustom.h
M Source/WebCore/rendering/LineClampUpdater.h
M Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp
M Source/WebCore/rendering/RenderLayer.cpp
M Source/WebCore/rendering/RenderLayerScrollableArea.cpp
M Source/WebCore/rendering/TextAutoSizing.cpp
M Source/WebCore/rendering/style/AutosizeStatus.cpp
M Source/WebCore/style/StyleAdjuster.cpp
M Source/WebCore/style/StyleDifference.cpp
M Source/WebCore/style/StyleExtractorCustom.h
M Source/WebCore/style/computed/StyleComputedStyleBase+GettersInlines.h
M Source/WebCore/style/computed/StyleComputedStyleBase.h
M Source/WebCore/style/computed/data/StyleNonInheritedRareData.cpp
M Source/WebCore/style/computed/data/StyleNonInheritedRareData.h
R Source/WebCore/style/values/non-standard/StyleWebKitLineClamp.h
M Source/WebCore/style/values/overflow/StyleBlockEllipsis.h
M Source/WebCore/style/values/overflow/StyleMaximumLines.h
Log Message:
-----------
[line-clamp] Share line-clamp and -webkit-line-clamp storage in ComputedStyle
https://bugs.webkit.org/show_bug.cgi?id=323303
Reviewed by Tim Nguyen and Sam Weinig.
Share line-clamp and -webkit-line-clamp storage in ComputedStyle since in the
latest draft
specification both map to the max-lines, block-ellipsis, and continue
properties [1, 2].
Since -webkit-line-clamp now becomes a shorthand, getComputedStyle results
change and some test
results have to be adjusted.
This patch tries to share as much code as possible for serializing and parsing
the
two line-clamp properties.
One benefit of this new approach is that it reflects better CSS cascade for the
two line clamp
properties, causing line-clamp-034.html to now pass.
[1] https://drafts.csswg.org/css-overflow-4/#line-clamp
[2] https://drafts.csswg.org/css-overflow-4/#webkit-line-clamp
* LayoutTests/TestExpectations:
* LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt:
*
LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/parsing/webkit-line-clamp-computed-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/css/cssom/shorthand-values-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/shadow-dom-expected.txt:
*
LayoutTests/platform/glib/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
*
LayoutTests/platform/ios-26/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
*
LayoutTests/platform/ios/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
*
LayoutTests/platform/ipad/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
* LayoutTests/svg/css/getComputedStyle-basic-expected.txt:
* Source/WebCore/Headers.cmake:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/css/ShorthandSerializer.cpp:
(WebCore::ShorthandSerializer::serialize):
(WebCore::ShorthandSerializer::serializeLegacyLineClamp const):
* Source/WebCore/css/parser/CSSPropertyParserCustom.h:
(WebCore::CSS::PropertyParserCustom::consumeLineClampShorthand):
* Source/WebCore/rendering/LineClampUpdater.h:
(WebCore::LineClampUpdater::LineClampUpdater):
* Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::styleWillChange):
(WebCore::RenderDeprecatedFlexibleBox::hasClampingAndNoFlexing const):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
(WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::shouldTryToScrollForScrollIntoView const):
* Source/WebCore/rendering/RenderLayerScrollableArea.cpp:
(WebCore::RenderLayerScrollableArea::scrollByRecursively):
* Source/WebCore/rendering/TextAutoSizing.cpp:
(WebCore::TextAutoSizingHashTranslator::hash):
(WebCore::TextAutoSizingHashTranslator::equal):
* Source/WebCore/rendering/style/AutosizeStatus.cpp:
(WebCore::AutosizeStatus::probablyContainsASmallFixedNumberOfLines):
* Source/WebCore/style/StyleAdjuster.cpp:
(WebCore::Style::Adjuster::adjust const):
* Source/WebCore/style/StyleDifference.cpp:
* Source/WebCore/style/StyleExtractorCustom.h:
(WebCore::Style::ExtractorCustom::extractWebkitLineClampShorthand):
(WebCore::Style::ExtractorCustom::extractWebkitLineClampShorthandSerialization):
* Source/WebCore/style/computed/StyleComputedStyleBase+GettersInlines.h:
(WebCore::Style::ComputedStyleBase::hasLegacyLineClamp const):
* Source/WebCore/style/computed/StyleComputedStyleBase.h:
* Source/WebCore/style/computed/data/StyleNonInheritedRareData.cpp:
(WebCore::Style::NonInheritedRareData::NonInheritedRareData):
(WebCore::Style::NonInheritedRareData::operator== const):
(WebCore::Style::NonInheritedRareData::dumpDifferences const):
* Source/WebCore/style/computed/data/StyleNonInheritedRareData.h:
* Source/WebCore/style/values/non-standard/StyleWebKitLineClamp.h: Removed.
* Source/WebCore/style/values/overflow/StyleBlockEllipsis.h:
* Source/WebCore/style/values/overflow/StyleMaximumLines.h:
Canonical link: https://commits.webkit.org/322292@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications