[webkit-changes] [WebKit/WebKit] a8f83c: Add support for generating a consumer for the CSS ...
Sam Weinig
noreply at github.com
Wed Feb 26 19:35:48 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a8f83c87872d0a51a56b77c6b10032d639fdca5b
https://github.com/WebKit/WebKit/commit/a8f83c87872d0a51a56b77c6b10032d639fdca5b
Author: Sam Weinig <sam at webkit.org>
Date: 2025-02-26 (Wed, 26 Feb 2025)
Changed paths:
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/css/CSSProperties.json
M Source/WebCore/css/calc/CSSCalcTree+Parser.cpp
M Source/WebCore/css/parser/CSSParserIdioms.h
M Source/WebCore/css/parser/CSSPropertyParser.cpp
M Source/WebCore/css/parser/CSSPropertyParserConsumer+Background.cpp
R Source/WebCore/css/parser/CSSPropertyParserConsumer+Conditional.cpp
R Source/WebCore/css/parser/CSSPropertyParserConsumer+Conditional.h
M Source/WebCore/css/parser/CSSPropertyParserConsumer+CounterStyles.cpp
M Source/WebCore/css/parser/CSSPropertyParserConsumer+Font.cpp
M Source/WebCore/css/parser/CSSPropertyParserConsumer+Ident.h
M Source/WebCore/css/parser/CSSPropertyParserConsumer+List.h
M Source/WebCore/css/parser/CSSPropertyParserConsumer+PositionTry.cpp
M Source/WebCore/css/parser/CSSPropertyParserConsumer+Timeline.cpp
M Source/WebCore/css/parser/CSSPropertyParserConsumer+ViewTransition.cpp
M Source/WebCore/css/parser/CSSPropertyParserConsumer+ViewTransition.h
M Source/WebCore/css/process-css-properties.py
M Source/WebCore/css/query/ContainerQueryParser.cpp
M Tools/Scripts/check-for-weak-vtables-and-externals
Log Message:
-----------
Add support for generating a consumer for the CSS property 'container-name'
https://bugs.webkit.org/show_bug.cgi?id=288380
Reviewed by Darin Adler.
Adds enough support in process-css-properties.py for generating a consumer
for the CSS property 'container-name'.
This requires:
- adding syntax to define a list of excluded values for <custom-ident>:
e.g. <custom-ident excluding=none,auto>
- adding generation support for the '+' multiplier.
This also allowed for generating 'view-transition-class', which has a very
similar grammar.
To add support for the excluding syntax, the existing term attributes such
as 'unitless-allowed' in <length unitless-allowed> were updated to use the
same syntax as excluding, making it now, 'unitless=allowed'.
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Conditional.cpp: Removed.
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Conditional.h: Removed.
- Removes no longer needed CSSPropertyParserConsumer+Conditional.h/cpp
* Source/WebCore/css/process-css-properties.py:
- Overhauls reference term attribute processing to support a new syntax for
attributes: <my-term foo=bar,baz,...>
- Support for range attributes remains.
- Builtin processing of those attributes has changed to use the name of the
attribute (the 'foo' in 'foo=bar,baz,...') as the descriptor name and now
only a single range attribute is supported, which is necessary as these don't
have a name associated with them.
- Range attribute also store their min/max values faithfully, rather than
eagerly stringifying them. This will allow us to use the values for parameters
in the future.
* Source/WebCore/css/CSSProperties.json:
- Update grammars that use <custom-ident> and need to exclude terms to use
the new excluding= syntax.
- Update grammars that use the old production parameter syntax using a single
string to use the new foo=bar syntax. (e.g. unitless-allowed -> unitless=allowed)
- Update parser-grammar-unused-comments to remove now supported productions.
- Export <single-container-name> so it can be used by the container query parser.
* Source/WebCore/css/query/ContainerQueryParser.cpp:
(WebCore::CQ::ContainerQueryParser::consumeContainerQuery):
- Use newly generated and exported CSSPropertyParsing::consumeSingleContainerName.
* Source/WebCore/css/parser/CSSParserIdioms.h:
* Source/WebCore/css/calc/CSSCalcTree+Parser.cpp:
- Move isValidContainerNameIdentifier to CSSParserIdioms and make it also
do the custom-ident check, simplifying caller.
* Source/WebCore/css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::consumeContainerShorthand):
- Use parseSingleValue and pass the current shorthand to ensure expectations
of shorthand parsing is followed, and allowing us not to export the container-name
consumer function.
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Ident.h:
(WebCore::CSSPropertyParserHelpers::consumeCustomIdentExcluding):
- Add new consumer for custom-idents that takes a list of CSSValueIDs to disallow.
* Source/WebCore/css/parser/CSSPropertyParserConsumer+List.h:
(WebCore::CSSPropertyParserHelpers::consumeListSeparatedBy):
- Adds support for consuming space separated lists.
- Adds support for indicating minimum and maximum list length constraints. By default,
all list consumers have no constraints applied.
- Refactor list consumers into a single template function.
* Source/WebCore/css/parser/CSSPropertyParserConsumer+ViewTransition.cpp:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+ViewTransition.h:
- Remove now unneeded hand written consumer for 'view-transition-class'.
* Tools/Scripts/check-for-weak-vtables-and-externals:
- Extend opt out to all external template parameter object symbols.
Canonical link: https://commits.webkit.org/291193@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list