WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
234697
[CSS Color 4] CSS color() function should not clamp channels to the 0-1 range
https://bugs.webkit.org/show_bug.cgi?id=234697
Summary
[CSS Color 4] CSS color() function should not clamp channels to the 0-1 range
Sam Weinig
Reported
2021-12-26 15:45:46 PST
The color() function in CSS Color 4 -
https://drafts.csswg.org/css-color/#color-function
- specifies that component values less than 0% or greater than 100% are not invalid: "An out of gamut color has component values less than 0 or 0%, or greater than 1 or 100%. These are not invalid; instead, for display, they are gamut-mapped using a relative colorimetric intent which brings the values within the range 0/0% to 1/100% at computed-value time." I have some questions about what this means in practice, and if computed value time is the right time to gamut map rather than at use, and I will raise these with the spec editors.
Attachments
Patch
(120.08 KB, patch)
2022-01-10 06:39 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Patch
(147.12 KB, patch)
2022-01-10 07:48 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-01-02 15:46:19 PST
<
rdar://problem/87054230
>
Sam Weinig
Comment 2
2022-01-10 06:39:43 PST
Created
attachment 448744
[details]
Patch
EWS Watchlist
Comment 3
2022-01-10 06:41:06 PST
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
Sam Weinig
Comment 4
2022-01-10 07:48:31 PST
Created
attachment 448751
[details]
Patch
Sam Weinig
Comment 5
2022-01-10 07:48:56 PST
We have a bunch of test duplication with the WPT tests, but I will fix that in another change.
Darin Adler
Comment 6
2022-01-10 08:58:19 PST
Comment on
attachment 448751
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=448751&action=review
> Source/WebCore/ChangeLog:8 > + Allow components outside the the 0-1 range for RGB color function types (e.g. color(srgb -2 15 100)).
Is this only for code paths that already store the components as floating point values? Does this affect performance in any cases that before would round down to [0,255] integers?
Sam Weinig
Comment 7
2022-01-10 09:20:51 PST
(In reply to Darin Adler from
comment #6
)
> Comment on
attachment 448751
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=448751&action=review
> > > Source/WebCore/ChangeLog:8 > > + Allow components outside the the 0-1 range for RGB color function types (e.g. color(srgb -2 15 100)). > > Is this only for code paths that already store the components as floating > point values? Does this affect performance in any cases that before would > round down to [0,255] integers?
It's only for the code paths that we already store as float, no change to cases that before would round down to [0,255] integers.
EWS
Comment 8
2022-01-10 09:40:44 PST
Committed
r287838
(
245890@main
): <
https://commits.webkit.org/245890@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 448751
[details]
.
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