Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0e801491f720645c2d7bc4248a5beec261070015
https://github.com/WebKit/WebKit/commit/0e801491f720645c2d7bc4248a5beec261070015
Author: Tim Nguyen <[email protected]>
Date: 2026-09-11 (Fri, 11 Sep 2026)
Changed paths:
M LayoutTests/TestExpectations
M
LayoutTests/imported/w3c/web-platform-tests/css/css-text/animations/hyphen-limit-chars-interpolation-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-text/animations/hyphen-no-interpolation-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/hyphenate-limit-chars-computed-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/hyphenate-limit-chars-valid-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-rounds-to-integer-expected.txt
M Source/WebCore/css/CSSProperties.json
M Source/WebCore/css/CSSPropertyInitialValues.cpp
M Source/WebCore/css/CSSPropertyInitialValues.h
M Source/WebCore/css/ShorthandSerializer.cpp
M Source/WebCore/css/parser/CSSPropertyParserCustom.h
M Source/WebCore/css/scripts/process-css-properties.py
M Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp
M Source/WebCore/rendering/RenderText.cpp
M Source/WebCore/rendering/RenderText.h
M Source/WebCore/style/StyleDifference.cpp
M Source/WebCore/style/StyleExtractorCustom.h
M Source/WebCore/style/computed/data/StyleInheritedRareData.cpp
M Source/WebCore/style/computed/data/StyleInheritedRareData.h
Log Message:
-----------
[css-text] Support hyphenate-limit-chars
https://bugs.webkit.org/show_bug.cgi?id=67786
rdar://23309642
Reviewed by Alan Baradlay.
This commit implements hyphenate-limit-chars as a shorthand of:
- -internal-hyphenate-limit-chars-word
- -webkit-hyphenate-limit-before
- -webkit-hyphenate-limit-after
for legacy compatibility for the 2 -webkit- longhands.
https://drafts.csswg.org/css-text-4/#propdef-hyphenate-limit-chars
If three values are specified, the first value is the required minimum for the
total characters in a word,
the second value is the minimum for characters before the hyphenation point,
and the third value is the
minimum for characters after the hyphenation point.
If the third value is missing, it is the same as the second.
If the second value is missing, then it is auto.
The auto value means that the UA chooses a value that adapts to the current
layout.
* LayoutTests/TestExpectations:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/hyphenate-limit-chars-computed-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/hyphenate-limit-chars-valid-expected.txt:
* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/css/ShorthandSerializer.cpp:
(WebCore::ShorthandSerializer::serialize):
(WebCore::ShorthandSerializer::serializeHyphenateLimitChars const):
(WebCore::ShorthandSerializer::commonSerializationChecks):
* Source/WebCore/css/parser/CSSPropertyParserCustom.h:
(WebCore::CSS::PropertyParserCustom::consumeHyphenateLimitCharsShorthand):
* Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp:
(WebCore::Layout::limitWordValue):
(WebCore::Layout::hasEnoughContentForHyphenation):
* Source/WebCore/rendering/RenderText.cpp:
(WebCore::RenderText::maxWordFragmentWidth):
(WebCore::RenderText::computeMinMaxIntrinsicLogicalWidths):
* Source/WebCore/rendering/RenderText.h:
* Source/WebCore/style/StyleDifference.cpp:
* Source/WebCore/style/StyleExtractorCustom.h:
(WebCore::Style::ExtractorCustom::extractHyphenateLimitCharsShorthand):
(WebCore::Style::ExtractorCustom::extractHyphenateLimitCharsShorthandSerialization):
* Source/WebCore/style/computed/data/StyleInheritedRareData.cpp:
(WebCore::Style::InheritedRareData::InheritedRareData):
(WebCore::Style::InheritedRareData::operator== const):
(WebCore::Style::InheritedRareData::dumpDifferences const):
* Source/WebCore/style/computed/data/StyleInheritedRareData.h:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text/animations/hyphen-limit-chars-interpolation-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-text/animations/hyphen-no-interpolation-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-rounds-to-integer-expected.txt:
* Source/WebCore/css/CSSPropertyInitialValues.cpp:
(WebCore::initialCSSValueForLonghand):
* Source/WebCore/css/CSSPropertyInitialValues.h:
* Source/WebCore/css/scripts/process-css-properties.py:
(GenerateCSSPropertyInitialValues._generate_css_property_initial_values_generated_inlines_h_initial_value_for_longhand):
Canonical link: https://commits.webkit.org/320965@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications