-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Combine createImageBitmap() / createPattern() / drawImage() checks #3399
Comments
One of the differences is that createImageBitmap is async and drawImage is not. So with creatImageBitmap there is an opportunity to handle objects that are not yet loaded (meaning 2. could be revised). In the case of creatImageBitmap, it is conceivable that 3 may not be verifyable synchronously. The implementation is not that messy because it uses a virtual interfaces through which each object type knows how to check whether it is in a usable state. |
Well, |
Right. I see two ways:
I think 2) is more flexible. It it makes it easy to spec one-off behaviors if necessary:
|
I ran a test with |
In particular, with createPattern() and drawImage(). Tests: web-platform-tests/wpt#9207. Fixes #3399.
In particular, with createPattern() and drawImage(). Tests: web-platform-tests/wpt#9207. Fixes whatwg#3399.
createPattern()
/drawImage()
have these checks:createImageBitmap()
does not have 1, but always throws for 2 (which is a superset). 3 however is seemingly incompatible ascreateImageBitmap()
only throws if sw/sh are not given. 4/5 are compatible.@junov thoughts? Does the implementation look as messy as the specification setup? (And also, there are many checks that
createImageBitmap()
has that are not present in the other two methods. Is that intentional?)The text was updated successfully, but these errors were encountered: