[webkit-changes] [WebKit/WebKit] b957d5: [@property] Allow CSS-wide keywords in registered ...
Antti Koivisto
noreply at github.com
Wed Dec 14 12:52:15 PST 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b957d5f5e295f6a8c8557b75c73ac2ab424f6b6d
https://github.com/WebKit/WebKit/commit/b957d5f5e295f6a8c8557b75c73ac2ab424f6b6d
Author: Antti Koivisto <antti at apple.com>
Date: 2022-12-14 (Wed, 14 Dec 2022)
Changed paths:
M LayoutTests/css-custom-properties-api/inline-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-cssom-expected.txt
M Source/WebCore/css/CSSCustomPropertyValue.cpp
M Source/WebCore/css/CSSCustomPropertyValue.h
M Source/WebCore/css/DOMCSSRegisterCustomProperty.cpp
M Source/WebCore/css/parser/CSSParserTokenRange.h
M Source/WebCore/css/parser/CSSPropertyParser.cpp
M Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp
Log Message:
-----------
[@property] Allow CSS-wide keywords in registered custom properties
https://bugs.webkit.org/show_bug.cgi?id=249305
<rdar://problem/103357146>
Reviewed by Alan Baradlay.
CSS-wide keywords (initial, inherit, unset, revert, revert-layer) should be allowed whatever the syntax is.
* LayoutTests/css-custom-properties-api/inline-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-cssom-expected.txt:
* Source/WebCore/css/CSSCustomPropertyValue.cpp:
(WebCore::CSSCustomPropertyValue::containsCSSWideKeyword const):
Find if this value contains a CSS-wide keyword, including the "*" case where we just have tokens.
* Source/WebCore/css/CSSCustomPropertyValue.h:
* Source/WebCore/css/DOMCSSRegisterCustomProperty.cpp:
(WebCore::DOMCSSRegisterCustomProperty::registerProperty):
CSS-wide keywords are not allowed as the initial value though.
* Source/WebCore/css/parser/CSSParserTokenRange.h:
(WebCore::CSSParserTokenRange::consumeAll):
Add a helper to avoid silly consume loops.
* Source/WebCore/css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::consumeCustomPropertyValueWithSyntax):
(WebCore::CSSPropertyParser::collectParsedCustomPropertyValueDependencies):
(WebCore::CSSPropertyParser::parseTypedCustomPropertyValue):
Canonical link: https://commits.webkit.org/257873@main
More information about the webkit-changes
mailing list