WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
204347
CSSFastPaths::parseColor should handle more color specifications
https://bugs.webkit.org/show_bug.cgi?id=204347
Summary
CSSFastPaths::parseColor should handle more color specifications
Chris Lord
Reported
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.
Attachments
Add attachment
proposed patch, testcase, etc.
Chris Lord
Comment 1
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.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug