[webkit-changes] [WebKit/WebKit] b447da: [@property] Support <color> syntax
Antti Koivisto
noreply at github.com
Sun Dec 11 00:29:39 PST 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b447da998e3c90f628c48b08298167a18e179d1c
https://github.com/WebKit/WebKit/commit/b447da998e3c90f628c48b08298167a18e179d1c
Author: Antti Koivisto <antti at apple.com>
Date: 2022-12-11 (Sun, 11 Dec 2022)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/determine-registration-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/property-cascade-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/register-property-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/register-property-syntax-parsing-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/registered-property-change-style-001-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/registered-property-computation-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/registered-property-cssom-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/registered-property-initial-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/typedom-expected.txt
M Source/WebCore/css/CSSCustomPropertyValue.cpp
M Source/WebCore/css/CSSCustomPropertyValue.h
M Source/WebCore/css/parser/CSSPropertyParser.cpp
M Source/WebCore/css/parser/CSSPropertyParser.h
M Source/WebCore/css/parser/CSSPropertySyntax.cpp
M Source/WebCore/css/parser/CSSPropertySyntax.h
Log Message:
-----------
[@property] Support <color> syntax
https://bugs.webkit.org/show_bug.cgi?id=249071
rdar://103211705
Reviewed by Alan Baradlay.
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/determine-registration-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/property-cascade-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/register-property-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/register-property-syntax-parsing-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/registered-property-change-style-001-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/registered-property-computation-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/registered-property-cssom-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/registered-property-initial-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/typedom-expected.txt:
* Source/WebCore/css/CSSCustomPropertyValue.cpp:
(WebCore::CSSCustomPropertyValue::equals const):
(WebCore::CSSCustomPropertyValue::customCSSText const):
* Source/WebCore/css/CSSCustomPropertyValue.h:
Add a separate variant for syntax values.
* Source/WebCore/css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::parseCustomPropertyValueWithSyntaxDefinition):
Return the syntax type too.
(WebCore::CSSPropertyParser::canParseTypedCustomPropertyValue):
(WebCore::CSSPropertyParser::collectParsedCustomPropertyValueDependencies):
(WebCore::CSSPropertyParser::parseTypedCustomPropertyValue):
Resolve based on the syntax type instead of the primitive value type.
Use this to resolve colors (which may be color name identifiers).
* Source/WebCore/css/parser/CSSPropertyParser.h:
* Source/WebCore/css/parser/CSSPropertySyntax.cpp:
(WebCore::CSSPropertySyntax::parseComponent):
(WebCore::CSSPropertySyntax::parse):
* Source/WebCore/css/parser/CSSPropertySyntax.h:
(WebCore::CSSPropertySyntax::isUniversal):
Canonical link: https://commits.webkit.org/257698@main
More information about the webkit-changes
mailing list