Summary: | Stop parsing context-sensitive colors in override-color | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Myles C. Maxfield <mmaxfield> | ||||
Component: | Text | Assignee: | Myles C. Maxfield <mmaxfield> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | clopez, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, macpherson, menard, mmaxfield, simon.fraser, webkit-bug-importer, youennf | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 230446 | ||||||
Attachments: |
|
Description
Myles C. Maxfield
2021-09-30 17:45:00 PDT
Created attachment 439954 [details]
Patch
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 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) Committed r283537 (242502@main): <https://commits.webkit.org/242502@main> |