Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[@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
- Loading branch information
Showing
15 changed files
with
164 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
FAIL Registering a property does not affect cascade The given initial value does not parse for the given syntax. | ||
FAIL Registering a property does not affect parsing The given initial value does not parse for the given syntax. | ||
PASS Registering a property does not affect cascade | ||
PASS Registering a property does not affect parsing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
FAIL New registered property declaration The given initial value does not parse for the given syntax. | ||
FAIL Registered property overrides a previous declaration The given initial value does not parse for the given syntax. | ||
PASS New registered property declaration | ||
PASS Registered property overrides a previous declaration | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
|
||
FAIL CSSOM setters function as expected for unregistered properties assert_equals: expected " 10px" but got "10px" | ||
FAIL CSS.registerProperty The given initial value does not parse for the given syntax. | ||
PASS CSS.registerProperty | ||
FAIL Formerly valid values are still readable from inline styles but are computed as the unset value assert_equals: expected "5" but got "" | ||
FAIL Values not matching the registered type can still be set assert_equals: expected "hi" but got "" | ||
FAIL Values can be removed from inline styles assert_equals: expected "rgb(255, 0, 0)" but got "red" | ||
PASS Values can be removed from inline styles | ||
FAIL Stylesheets can be modified by CSSOM assert_equals: expected "0px" but got "10px" | ||
FAIL Valid values can be set on inline styles assert_equals: expected "rgb(255, 192, 203)" but got "pink" | ||
FAIL Valid values can be set on inline styles assert_equals: expected "inherit" but got "pink" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.