-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up code for internal CSS values
https://bugs.webkit.org/show_bug.cgi?id=267520 rdar://121019340 Reviewed by Darin Adler. Right now, if you want to make a certain value internal, you have to do 2 changes: 1) Add "status": "internal" to CSSProperties.json 2) Change isValueAllowedInMode() to include your value This is error prone, as it's easy to think that the first step is sufficient. With this change: - the first step will be sufficient to make a value UA-sheet only - isValueAllowedInMode is now named isColorKeywordAllowedInMode as it's now only used for color parsing. - we now validate that all values starting with "-internal-" have "status": "internal" in CSSProperties.json Also use isUASheetBehavior whenever possible. * Source/WebCore/css/parser/CSSParserContext.cpp: (WebCore::CSSParserContext::CSSParserContext): * Source/WebCore/css/parser/CSSParserFastPaths.cpp: (WebCore::parseColor): * Source/WebCore/css/parser/CSSParserIdioms.cpp: (WebCore::isColorKeywordAllowedInMode): (WebCore::isValueAllowedInMode): Deleted. * Source/WebCore/css/parser/CSSParserIdioms.h: * Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp: (WebCore::CSSPropertyParserHelpers::LengthRawKnownTokenTypeDimensionConsumer::consume): (WebCore::CSSPropertyParserHelpers::consumeColorWorkerSafe): (WebCore::CSSPropertyParserHelpers::consumeColor): (WebCore::CSSPropertyParserHelpers::consumeCounterStyleNameInPrelude): (WebCore::CSSPropertyParserHelpers::consumeDisplay): * Source/WebCore/css/parser/CSSSelectorParser.cpp: (WebCore::extractCompoundFlags): (WebCore::CSSSelectorParser::consumeSimpleSelector): (WebCore::CSSSelectorParser::splitCompoundAtImplicitShadowCrossingCombinator): * Source/WebCore/css/process-css-properties.py: Directly check for UASheetMode and add validation for `-internal-` values that they use correct "status" field. * Source/WebCore/css/process-css-pseudo-selectors.py: The .join() case also works fine for when there's only one condition. Canonical link: https://commits.webkit.org/273071@main
- Loading branch information
Showing
8 changed files
with
18 additions
and
21 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
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
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