RESOLVED FIXED 165086
Make CanvasRenderingContext2D use WebIDL unions / Variants for createPattern and drawImage
https://bugs.webkit.org/show_bug.cgi?id=165086
Summary Make CanvasRenderingContext2D use WebIDL unions / Variants for createPattern ...
Sam Weinig
Reported 2016-11-27 16:43:25 PST
Make CanvasRenderingContext2D use WebIDL unions / Variants for createPattern and drawImage
Attachments
Patch (19.14 KB, patch)
2016-11-27 16:45 PST, Sam Weinig
no flags
Patch (19.61 KB, patch)
2016-11-28 10:41 PST, Sam Weinig
no flags
Patch (19.66 KB, patch)
2016-11-28 15:28 PST, Sam Weinig
no flags
Sam Weinig
Comment 1 2016-11-27 16:45:31 PST
Chris Dumez
Comment 2 2016-11-28 09:16:54 PST
Comment on attachment 295475 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=295475&action=review r=me but please check GTK/EFL build. > Source/WebCore/html/canvas/CanvasRenderingContext2D.idl:137 > + // FIXME: All the unrestricted float arguments below should be unrestricted doubles. I think we can get away with doing this change in tis patch (only in the IDL).
Darin Adler
Comment 3 2016-11-28 09:19:51 PST
Comment on attachment 295475 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=295475&action=review Some compilation problems with gcc on the GTK and EFL bots. Not sure what’s going on there. Maybe [&] isn’t supposed to capture "this"? > Source/WebCore/html/canvas/CanvasRenderingContext2D.h:58 > +using CanvasImageSource = Variant<RefPtr<HTMLImageElement>, RefPtr<HTMLVideoElement>, RefPtr<HTMLCanvasElement>>; So sad that these all have to be RefPtr, when none are allowed to be null.
Sam Weinig
Comment 4 2016-11-28 10:41:02 PST
Sam Weinig
Comment 5 2016-11-28 15:28:38 PST
Sam Weinig
Comment 6 2016-11-28 15:42:33 PST
(In reply to comment #3) > Comment on attachment 295475 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=295475&action=review > > Some compilation problems with gcc on the GTK and EFL bots. Not sure what’s > going on there. Maybe [&] isn’t supposed to capture "this"? It's a GCC bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61636) I can work around it using an explicit this->. > > > Source/WebCore/html/canvas/CanvasRenderingContext2D.h:58 > > +using CanvasImageSource = Variant<RefPtr<HTMLImageElement>, RefPtr<HTMLVideoElement>, RefPtr<HTMLCanvasElement>>; > > So sad that these all have to be RefPtr, when none are allowed to be null. Yeah, it's something I would like to improve at some point, but I am not quite sure how yet.
Sam Weinig
Comment 7 2016-11-28 17:04:05 PST
Note You need to log in before you can comment on or make changes to this bug.