BREAKING(web-sys): Remove support for CanvasRenderingContext2D
and BufferSource
from createImageBitmap
#3231
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #3227
Both APIs are broken, to some extent, which is why I think it makes sense to remove them despite the potential breakage.
Calling
createImageBitmap
with aBufferSource
will instantly throw an error, and calling it with aCanvasRenderingContext2D
will also fail except in Firefox, where it gives a deprecation warning.BufferSource
was there as part of the abandoned video capture worker API (https://w3c.github.io/mediacapture-worker). It looks like we inherited it from Firefox, which supported it behind a flag at the time we copied our WebIDL from it but later removed it. I also removed the rest of that API while I was at it.CanvasRenderingContext2D
is there because, for whatever reason, Firefox non-standardly accepts it increateImageBitmap
, and we took our WebIDL from them. It's deprecated, and https://bugzilla.mozilla.org/show_bug.cgi?id=1500782 talks about removing it, but it hasn't been done yet.