From c019f667c2e1bb4dcbc734e0eb2d43763574c24f Mon Sep 17 00:00:00 2001
From: Anne van Kesteren When a When a When a When a The image argument is not origin-clean if it is an
HTMLCanvasElement
(canvas
elements)CanvasRenderingContext2D
ImageBitmap
CanvasImageSource
object represents an HTMLCanvasElement
, the
element's bitmap must be used as the source image.CanvasImageSource
object represents a
- CanvasRenderingContext2D
, the object's output bitmap must be used as
- the source image.CanvasImageSource
object represents an element that is being
rendered and that element has been resized, the original image data of the source image
must be used, not the image as it is rendered (e.g. width
and
@@ -61933,15 +61926,11 @@ try {
CanvasImageSource
object represents an ImageBitmap
, the
object's bitmap image data must be used as the source image.HTMLOrSVGImageElement
or HTMLVideoElement
whose origin is
not the same as the origin specified by the
entry settings object, or if it is an HTMLCanvasElement
whose bitmap's
- origin-clean flag is false, or if it is a
- CanvasRenderingContext2D
object whose origin-clean flag is false.
When a canvas
or CanvasRenderingContext2D
object is
- drawn onto itself, the drawing model requires the source to be copied before the
- image is drawn, so it is possible to copy parts of a canvas
or output
- bitmap onto overlapping parts of itself.
When a canvas
element is drawn onto itself, the drawing
+ model requires the source to be copied before the image is drawn, so it is possible to
+ copy parts of a canvas
element onto overlapping parts of itself.
If the original image data is a bitmap image, the value painted at a point in the destination rectangle is computed by filtering the original image data. The user agent may use any filtering @@ -91277,12 +91265,9 @@ interface ImageBitmap { void close(); }; -typedef (HTMLOrSVGImageElement or - HTMLVideoElement or - HTMLCanvasElement or +typedef (CanvasImageSource or Blob or - ImageData or - ImageBitmap) ImageBitmapSource; + ImageData) ImageBitmapSource; enum ImageOrientation { "none", "flipY" }; enum PremultiplyAlpha { "none", "premultiply", "default" }; @@ -91332,10 +91317,9 @@ dictionary ImageBitmapOptions {
Rejects the promise with an "InvalidStateError
"
DOMException
if the source image is not in a valid state (e.g. an img
- element that hasn't loaded successfully, or a CanvasRenderingContext2D
object whose
- bitmap data has zero length along one or both dimensions, an ImageBitmap
object
- whose [[Detached]] internal slot value is true, an ImageData
object
- whose data
attribute value's [[Detached]]
+ element that hasn't loaded successfully, an ImageBitmap
object whose
+ [[Detached]] internal slot value is true, an ImageData
object whose
+ data
attribute value's [[Detached]]
internal slot value is true, or a Blob
whose data cannot be interpreted as a bitmap
image).