Bug 204347 - CSSFastPaths::parseColor should handle more color specifications
Summary: CSSFastPaths::parseColor should handle more color specifications
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 182686
  Show dependency treegraph
 
Reported: 2019-11-19 03:13 PST by Chris Lord
Modified: 2019-11-20 03:52 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Lord 2019-11-19 03:13:15 PST
Currently, the fast path handles keywords, hex colours and rgb/rgba, but doesn't handle rgb/rgba when the colour is terminated early and doesn't handle hsl/hsla. It would be helpful to handle those other cases, mainly so that OffscreenCanvas doesn't need to use the full parser to parse colours. Though this would be a small perf win in some (what I expect are) uncommon situations, this is mainly to help with OffscreenCanvas.
Comment 1 Chris Lord 2019-11-20 03:52:59 PST
I no longer think this is a good idea, given better understanding of the colour spec. I don't think hsl(a) is used often enough to warrant maintaining a fast-path for, and I don't think the various odd but accepted ways of specifying colours make sense to complicate this code over.

Regards to OffscreenCanvas, I'm taking the path of just making the full parser path verified thread-safe.