[webkit-changes] [WebKit/WebKit] 455447: [@property] Save parsed syntax in property registr...
Antti Koivisto
noreply at github.com
Mon Dec 12 09:32:20 PST 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4554478211f3dcf8f7020b20b9d58b815b3a3bad
https://github.com/WebKit/WebKit/commit/4554478211f3dcf8f7020b20b9d58b815b3a3bad
Author: Antti Koivisto <antti at apple.com>
Date: 2022-12-12 (Mon, 12 Dec 2022)
Changed paths:
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/typedom-expected.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/css/CSSRegisteredCustomProperty.cpp
M Source/WebCore/css/CSSRegisteredCustomProperty.h
M Source/WebCore/css/CSSVariableData.h
M Source/WebCore/css/CSSVariableReferenceValue.cpp
M Source/WebCore/css/ComputedStyleExtractor.cpp
M Source/WebCore/css/DOMCSSRegisterCustomProperty.cpp
M Source/WebCore/css/StyleProperties.cpp
M Source/WebCore/css/parser/CSSParser.cpp
M Source/WebCore/css/parser/CSSParser.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
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
M Source/WebCore/style/StyleBuilder.cpp
Log Message:
-----------
[@property] Save parsed syntax in property registration
https://bugs.webkit.org/show_bug.cgi?id=249127
rdar://103244818
Reviewed by Simon Fraser.
Avoid repeated syntax string parsing during property resolution.
* 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/typedom-expected.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/css/CSSRegisteredCustomProperty.cpp:
(WebCore::CSSRegisteredCustomProperty::CSSRegisteredCustomProperty):
* Source/WebCore/css/CSSRegisteredCustomProperty.h:
Save the parsed syntax instead of a string.
Use AtomString for the name.
* Source/WebCore/css/CSSVariableData.h:
* Source/WebCore/css/CSSVariableReferenceValue.cpp:
(WebCore::resolveVariableReference):
* Source/WebCore/css/ComputedStyleExtractor.cpp:
(WebCore::ComputedStyleExtractor::customPropertyValue):
* Source/WebCore/css/DOMCSSRegisterCustomProperty.cpp:
(WebCore::DOMCSSRegisterCustomProperty::registerProperty):
* Source/WebCore/css/StyleProperties.cpp:
(WebCore::MutableStyleProperties::setCustomProperty):
* Source/WebCore/css/parser/CSSParser.cpp:
(WebCore::CSSParser::parseValueWithVariableReferences):
* Source/WebCore/css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::canParseTypedCustomPropertyValue):
(WebCore::CSSPropertyParser::parseTypedCustomPropertyValue):
(WebCore::CSSPropertyParser::collectParsedCustomPropertyValueDependencies):
(WebCore::CSSPropertyParser::consumeCustomPropertyValueWithSyntax):
(WebCore::CSSPropertyParser::parseCustomPropertyValueWithSyntaxDefinition): Deleted.
* Source/WebCore/css/parser/CSSPropertyParser.h:
* Source/WebCore/css/parser/CSSPropertySyntax.cpp:
(WebCore::CSSPropertySyntax::parse):
* Source/WebCore/css/parser/CSSPropertySyntax.h:
Also turn CSSPropertySyntax into an instantiated struct.
(WebCore::CSSPropertySyntax::isUniversal const):
(WebCore::CSSPropertySyntax::universal):
(WebCore::CSSPropertySyntax::isUniversal): Deleted.
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::registerCSSCustomProperty):
(WebCore::Document::registerCSSProperty): Deleted.
* Source/WebCore/dom/Document.h:
Stop including CSSRegisteredCustomProperty.h and its dependencies everywhere.
(WebCore::Document::registeredCSSCustomProperties const):
(WebCore::Document::getCSSRegisteredCustomPropertySet const): Deleted.
Rename to better match WebKit style.
* Source/WebCore/style/StyleBuilder.cpp:
(WebCore::Style::Builder::applyProperty):
Canonical link: https://commits.webkit.org/257732@main
More information about the webkit-changes
mailing list