[webkit-changes] [WebKit/WebKit] 424dee: [css-values] Implement rcap / rex / ric / rch units
Tim Nguyen
noreply at github.com
Sat Aug 26 02:08:39 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 424dee4815091e03fcc4c9035af6e7a9a8128184
https://github.com/WebKit/WebKit/commit/424dee4815091e03fcc4c9035af6e7a9a8128184
Author: Tim Nguyen <ntim at apple.com>
Date: 2023-08-26 (Sat, 26 Aug 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/font-relative-units-dynamic-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/font-relative-units-expected.txt
A LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/rcap-in-monospace-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/rcap-in-monospace-ref.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/rcap-in-monospace.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/rch-in-monospace-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/rch-in-monospace-ref.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/rch-in-monospace.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/rex-in-monospace-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/rex-in-monospace-ref.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/rex-in-monospace.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/ric-in-monospace-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/ric-in-monospace-ref.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/ric-in-monospace.html
M LayoutTests/imported/w3c/web-platform-tests/css/css-values/rcap-invalidation-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-values/rch-invalidation-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-values/rex-invalidation-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-values/ric-invalidation-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-values/rlh-invalidation-expected.txt
M Source/WebCore/css/CSSPrimitiveValue.cpp
M Source/WebCore/css/CSSPrimitiveValue.h
M Source/WebCore/css/CSSUnits.cpp
M Source/WebCore/css/CSSUnits.h
M Source/WebCore/css/calc/CSSCalcCategoryMapping.cpp
M Source/WebCore/css/parser/CSSParserToken.cpp
M Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp
M Source/WebCore/css/typedom/CSSNumericFactory.h
M Source/WebCore/css/typedom/CSSStyleValueFactory.cpp
M Source/WebCore/style/StyleTreeResolver.cpp
Log Message:
-----------
[css-values] Implement rcap / rex / ric / rch units
https://bugs.webkit.org/show_bug.cgi?id=260648
rdar://114367871
Reviewed by Cameron McCormack.
Implement new units as per https://drafts.csswg.org/css-values/#font-relative-lengths
Invalidation support is also added by invalidating when the root font cascade / line height changes.
Also add a bunch of tests for root font units in monospace.
* LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/font-relative-units-dynamic-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/font-relative-units-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/rcap-in-monospace-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/rcap-in-monospace-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/rcap-in-monospace.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/rch-in-monospace-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/rch-in-monospace-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/rch-in-monospace.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/rex-in-monospace-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/rex-in-monospace-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/rex-in-monospace.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/ric-in-monospace-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/ric-in-monospace-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/ric-in-monospace.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/rcap-invalidation-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/rch-invalidation-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/rex-invalidation-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/ric-invalidation-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/rlh-invalidation-expected.txt:
* Source/WebCore/css/CSSPrimitiveValue.cpp:
(WebCore::isValidCSSUnitTypeForDoubleConversion):
(WebCore::isStringType):
(WebCore::CSSPrimitiveValue::~CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::computeUnzoomedNonCalcLengthDouble):
(WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble):
(WebCore::CSSPrimitiveValue::unitTypeString):
(WebCore::CSSPrimitiveValue::serializeInternal const):
(WebCore::CSSPrimitiveValue::equals const):
(WebCore::CSSPrimitiveValue::addDerivedHash const):
(WebCore::CSSPrimitiveValue::collectComputedStyleDependencies const):
* Source/WebCore/css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::isRootFontRelativeLength):
(WebCore::CSSPrimitiveValue::isFontRelativeLength):
(WebCore::CSSPrimitiveValue::isLength):
* Source/WebCore/css/CSSUnits.cpp:
(WebCore::unitCategory):
(WebCore::operator<<):
* Source/WebCore/css/CSSUnits.h:
* Source/WebCore/css/calc/CSSCalcCategoryMapping.cpp:
(WebCore::calcUnitCategory):
(WebCore::calculationCategoryForCombination):
(WebCore::hasDoubleValue):
* Source/WebCore/css/parser/CSSParserToken.cpp:
(WebCore::cssPrimitiveValueUnitFromTrie):
* Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::LengthRawKnownTokenTypeDimensionConsumer::consume):
* Source/WebCore/css/typedom/CSSNumericFactory.h:
* Source/WebCore/css/typedom/CSSStyleValueFactory.cpp:
(WebCore::CSSStyleValueFactory::reifyValue):
* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::styleChangeAffectsRelativeUnits):
Canonical link: https://commits.webkit.org/267321@main
More information about the webkit-changes
mailing list