WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
235071
CSS Gradients: interpolation mode should default to OKLab if any non-legacy color syntax colors are used in the stops
https://bugs.webkit.org/show_bug.cgi?id=235071
Summary
CSS Gradients: interpolation mode should default to OKLab if any non-legacy c...
Sam Weinig
Reported
2022-01-11 08:53:27 PST
CSS Gradients: interpolation mode should default to OKLab if any non-legacy color syntax colors are used in the stops
Attachments
Patch
(25.12 KB, patch)
2022-01-11 11:18 PST
,
Sam Weinig
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(25.13 KB, patch)
2022-01-11 14:06 PST
,
Sam Weinig
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(547.86 KB, patch)
2022-01-15 10:43 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Patch
(550.81 KB, patch)
2022-01-15 11:34 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Patch
(551.26 KB, patch)
2022-01-15 12:11 PST
,
Sam Weinig
darin
: review+
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(555.31 KB, patch)
2022-01-15 19:28 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Sam Weinig
Comment 1
2022-01-11 11:18:26 PST
Comment hidden (obsolete)
Created
attachment 448862
[details]
Patch
Sam Weinig
Comment 2
2022-01-11 14:06:30 PST
Comment hidden (obsolete)
Created
attachment 448877
[details]
Patch
Sam Weinig
Comment 3
2022-01-15 10:43:29 PST
Comment hidden (obsolete)
Created
attachment 449257
[details]
Patch
EWS Watchlist
Comment 4
2022-01-15 10:44:30 PST
Comment hidden (obsolete)
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 5
2022-01-15 11:34:27 PST
Comment hidden (obsolete)
Created
attachment 449259
[details]
Patch
Sam Weinig
Comment 6
2022-01-15 12:11:25 PST
Comment hidden (obsolete)
Created
attachment 449262
[details]
Patch
Darin Adler
Comment 7
2022-01-15 14:24:27 PST
Comment on
attachment 449262
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=449262&action=review
> Source/WebCore/css/CSSGradientValue.cpp:651 > + && m_defaultColorInterpolationMethod == other.m_defaultColorInterpolationMethod
Gosh can’t wait until we get enough C++20 support that we can stop writing these functions.
> Source/WebCore/css/CSSGradientValue.h:72 > - > +
Please don’t add the spaces here.
> Source/WebCore/css/CSSGradientValue.h:143 > + static Ref<CSSLinearGradientValue> create(CSSGradientRepeat repeat, CSSGradientType gradientType, ColorInterpolationMethod colorInterpolationMethod, CSSGradientDefaultColorInterpolationMethod defaultColorInterpolationMethod, CSSGradientColorStopList stops)
Frustrating how long these argument names and types are.
> Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:3132 > + downcast<CSSRadialGradientValue>(result.get())->setFirstRadius(WTFMove(firstRadius)); > + downcast<CSSRadialGradientValue>(result.get())->setSecondRadius(WTFMove(secondRadius));
Can use (*result). here instead of (result.get())->
> Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:3567 > + auto [computedColorInterpolationMethod, computedDefaultColorInterpolationMethod] = computeGradientColorInterpolationMethod(context, colorInterpolationMethod, *stops);
Reading this over and over again makes me wonder why we don’t pass these two around together as a struct.
Sam Weinig
Comment 8
2022-01-15 19:28:14 PST
Created
attachment 449280
[details]
Patch
Sam Weinig
Comment 9
2022-01-15 19:50:34 PST
(In reply to Darin Adler from
comment #7
)
> Comment on
attachment 449262
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=449262&action=review
> > > > Source/WebCore/css/CSSGradientValue.h:72 > > - > > + > > Please don’t add the spaces here.
Fixed.
> > Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:3132 > > + downcast<CSSRadialGradientValue>(result.get())->setFirstRadius(WTFMove(firstRadius)); > > + downcast<CSSRadialGradientValue>(result.get())->setSecondRadius(WTFMove(secondRadius)); > > Can use (*result). here instead of (result.get())->
Fixed.
> > Source/WebCore/css/CSSGradientValue.h:143 > > + static Ref<CSSLinearGradientValue> create(CSSGradientRepeat repeat, CSSGradientType gradientType, ColorInterpolationMethod colorInterpolationMethod, CSSGradientDefaultColorInterpolationMethod defaultColorInterpolationMethod, CSSGradientColorStopList stops) > > Frustrating how long these argument names and types are. > > > > Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:3567 > > + auto [computedColorInterpolationMethod, computedDefaultColorInterpolationMethod] = computeGradientColorInterpolationMethod(context, colorInterpolationMethod, *stops); > > Reading this over and over again makes me wonder why we don’t pass these two > around together as a struct.
Yeah, I agree. Fixed.
EWS
Comment 10
2022-01-15 22:23:49 PST
Committed
r288071
(
246091@main
): <
https://commits.webkit.org/246091@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 449280
[details]
.
Radar WebKit Bug Importer
Comment 11
2022-01-15 22:24:17 PST
<
rdar://problem/87645870
>
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