RESOLVED FIXED 231052
Stop parsing context-sensitive colors in override-color
https://bugs.webkit.org/show_bug.cgi?id=231052
Summary Stop parsing context-sensitive colors in override-color
Attachments
Patch (15.14 KB, patch)
2021-10-01 22:53 PDT, Myles C. Maxfield
simon.fraser: review+
Radar WebKit Bug Importer
Comment 1 2021-09-30 17:45:34 PDT
Myles C. Maxfield
Comment 2 2021-10-01 22:53:30 PDT
EWS Watchlist
Comment 3 2021-10-01 22:54:55 PDT
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Simon Fraser (smfr)
Comment 4 2021-10-04 20:52:14 PDT
Comment on attachment 439954 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=439954&action=review > Source/WebCore/css/StyleColor.cpp:54 > + return (id >= CSSValueAqua && id <= CSSValueYellow) || (id >= CSSValueAliceblue && id <= CSSValueYellowgreen) || id == CSSValueGrey || id == CSSValueAlpha || id == CSSValueTransparent; We should make some helpers to contain these color range tests > Source/WebCore/css/parser/CSSPropertyParserHelpers.h:118 > +enum class AcceptableColorSyntax : uint8_t { Not sure I like "Acceptable" here. Might be nicer to just have: enum class CSSColorType { Absolute = 1 << 0, Current = 1 << 1, System = 1 << 2, }; consumeColor(CSSParserTokenRange&, const CSSParserContext&, bool acceptQuirkyColors = false, OptionSet<CSSColorTypes> allowedColorTypes)
Myles C. Maxfield
Comment 5 2021-10-04 22:11:06 PDT
Note You need to log in before you can comment on or make changes to this bug.