WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
225173
Add support for CanvasRenderingContext2DSettings
https://bugs.webkit.org/show_bug.cgi?id=225173
Summary
Add support for CanvasRenderingContext2DSettings
Sam Weinig
Reported
2021-04-28 16:57:43 PDT
We should support for CanvasRenderingContext2DSettings from
https://html.spec.whatwg.org/multipage/canvas.html#canvasrenderingcontext2dsettings
. These allow disabling alpha and giving a hint to the engine about desynchronization. It is also the mechanism we can use to pass color space information in for
bug 225140
.
Attachments
Patch
(22.00 KB, patch)
2021-04-28 17:18 PDT
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Patch
(40.25 KB, patch)
2021-04-28 18:27 PDT
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Sam Weinig
Comment 1
2021-04-28 17:18:06 PDT
Comment hidden (obsolete)
Created
attachment 427312
[details]
Patch
Sam Weinig
Comment 2
2021-04-28 18:27:59 PDT
Created
attachment 427322
[details]
Patch
Chris Dumez
Comment 3
2021-04-29 08:32:54 PDT
Comment on
attachment 427322
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=427322&action=review
> Source/WebCore/html/canvas/CanvasRenderingContext2DSettings.idl:31 > + // boolean alpha = true;
Not sure why we are commenting this out. I don't see the drawback for fully matching the spec on IDL side (and even in the implementation struct). It's not like the JS can feature-detect if we support a particular dictionary member of not. I personally think we should have alpha in the dictionary and the implementation struct, and add a FIXME comment at the spot where the alpha struct member should be used (but isn't yet).
Sam Weinig
Comment 4
2021-04-29 08:37:04 PDT
(In reply to Chris Dumez from
comment #3
)
> Comment on
attachment 427322
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=427322&action=review
> > > Source/WebCore/html/canvas/CanvasRenderingContext2DSettings.idl:31 > > + // boolean alpha = true; > > Not sure why we are commenting this out. I don't see the drawback for fully > matching the spec on IDL side (and even in the implementation struct). It's > not like the JS can feature-detect if we support a particular dictionary > member of not. > I personally think we should have alpha in the dictionary and the > implementation struct, and add a FIXME comment at the spot where the alpha > struct member should be used (but isn't yet).
I originally didn't have it commented out on the same principle, but it turns out you can feature detect it since HTMLCanvasElement.getContextAttributes() returns one, you can check if the returned object has an 'alpha' property.
Chris Dumez
Comment 5
2021-04-29 08:38:02 PDT
Comment on
attachment 427322
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=427322&action=review
>>> Source/WebCore/html/canvas/CanvasRenderingContext2DSettings.idl:31 >>> + // boolean alpha = true; >> >> Not sure why we are commenting this out. I don't see the drawback for fully matching the spec on IDL side (and even in the implementation struct). It's not like the JS can feature-detect if we support a particular dictionary member of not. >> I personally think we should have alpha in the dictionary and the implementation struct, and add a FIXME comment at the spot where the alpha struct member should be used (but isn't yet). > > I originally didn't have it commented out on the same principle, but it turns out you can feature detect it since HTMLCanvasElement.getContextAttributes() returns one, you can check if the returned object has an 'alpha' property.
Oh, I missed that. Please disregard my comment then.
Sam Weinig
Comment 6
2021-04-29 08:41:48 PDT
Tracking adding support for alpha in
https://bugs.webkit.org/show_bug.cgi?id=225191
.
EWS
Comment 7
2021-04-29 09:09:27 PDT
Committed
r276777
(
237161@main
): <
https://commits.webkit.org/237161@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 427322
[details]
.
Radar WebKit Bug Importer
Comment 8
2021-04-29 09:10:18 PDT
<
rdar://problem/77324253
>
Brent Fulgham
Comment 10
2022-07-01 16:08:23 PDT
***
Bug 193144
has been marked as a duplicate of this bug. ***
Anne van Kesteren
Comment 12
2024-09-03 11:39:55 PDT
***
Bug 196002
has been marked as a duplicate of this bug. ***
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