[webkit-changes] [WebKit/WebKit] d2163c: Utilize parser-grammar for the remaining backgroun...
Sam Weinig
noreply at github.com
Sat Dec 17 09:26:41 PST 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d2163c292b7842958e02cda6bd160ccbeab80e68
https://github.com/WebKit/WebKit/commit/d2163c292b7842958e02cda6bd160ccbeab80e68
Author: Sam Weinig <weinig at apple.com>
Date: 2022-12-17 (Sat, 17 Dec 2022)
Changed paths:
M Source/WebCore/css/CSSBackgroundRepeatValue.cpp
M Source/WebCore/css/CSSBackgroundRepeatValue.h
M Source/WebCore/css/CSSProperties.json
M Source/WebCore/css/parser/CSSPropertyParser.cpp
M Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp
M Source/WebCore/css/parser/CSSPropertyParserHelpers.h
Log Message:
-----------
Utilize parser-grammar for the remaining background related properties
https://bugs.webkit.org/show_bug.cgi?id=249493
rdar://103455420
Reviewed by Tim Nguyen.
The remaining background / mask properties can be parsed using just
three custom parts: <position-x>, <position-y> and <repeat-style>.
Utilize that to adopt parser-grammar for these remaining properties.
* Source/WebCore/css/CSSBackgroundRepeatValue.cpp:
(WebCore::CSSBackgroundRepeatValue::CSSBackgroundRepeatValue):
* Source/WebCore/css/CSSBackgroundRepeatValue.h:
Add ability to create from CSSValueIDs.
* Source/WebCore/css/CSSProperties.json:
Update to use parser-grammar in more places.
* Source/WebCore/css/parser/CSSPropertyParser.cpp:
(WebCore::consumeBackgroundComponent):
Moved from CSSPropertyParserHelpers.cpp.
(WebCore::CSSPropertyParser::parseShorthand):
This was the last caller of consumeCommaSeparatedBackgroundComponent
so we can just inline the implementation.
* Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumePositionX):
(WebCore::CSSPropertyParserHelpers::consumePositionY):
(WebCore::CSSPropertyParserHelpers::consumeRepeatStyle):
(WebCore::CSSPropertyParserHelpers::consumeSingleWebkitBackgroundSize):
Update signature to allow being called from generated parsers.
(WebCore::CSSPropertyParserHelpers::consumeRepeatStyleComponent): Deleted.
(WebCore::CSSPropertyParserHelpers::consumeSingleBackgroundRepeat): Deleted.
(WebCore::CSSPropertyParserHelpers::consumeSingleBackgroundPositionX): Deleted.
(WebCore::CSSPropertyParserHelpers::consumeSingleBackgroundPositionY): Deleted.
(WebCore::CSSPropertyParserHelpers::consumeSingleMaskRepeat): Deleted.
(WebCore::CSSPropertyParserHelpers::consumeSingleWebkitMaskPositionX): Deleted.
(WebCore::CSSPropertyParserHelpers::consumeSingleWebkitMaskPositionY): Deleted.
(WebCore::CSSPropertyParserHelpers::consumeBackgroundComponent): Deleted.
(WebCore::CSSPropertyParserHelpers::consumeCommaSeparatedBackgroundComponent): Deleted.
Remove no longer needed helpers.
Canonical link: https://commits.webkit.org/258046@main
More information about the webkit-changes
mailing list