Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CanvasDrawImage uses CanvasImageSource union that contains types not exposed to workers #2326

Closed
jdm opened this issue Feb 6, 2017 · 4 comments

Comments

@jdm
Copy link
Member

jdm commented Feb 6, 2017

OffscreenCanvasRenderingContext implements the CanvasImageSource interface, so they're both marked Exposed=(Window,Worker). However, CanvasImageSource contains HTMLVideoElement, HTMLCanvasElement, and HTMLOrSVGImageElement which are only exposed in Window.

@domenic
Copy link
Member

domenic commented Feb 6, 2017

OffscreenCanvasRenderingContext implements the CanvasImageSource interface

Assuming you mean OffscreenCanvasRenderingContext2D, this doesn't appear to be true; I can't find implements CanvasImageSource anywhere in its definition.

@jdm
Copy link
Member Author

jdm commented Feb 6, 2017

Sorry, I meant it implements the CanvasDrawImage interface, which uses the CanvasImageSource union.

@domenic
Copy link
Member

domenic commented Feb 6, 2017

I see. Is this a problem? I assume that just means you'd never be able to pass a HTMLVideoElement etc. to the drawImage method, which seems working as intended.

@jdm
Copy link
Member Author

jdm commented Feb 6, 2017

Having read through relevant sections of the WebIDL spec about exposing things, it seems Gecko/Servo's parser has more restrictive rules than the specification about exposing interfaces through operations to globals in which those interfaces are otherwise not exposed. I guess that's a problem we need to sort out, rather than this specification.

@jdm jdm closed this as completed Feb 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants