From c019f667c2e1bb4dcbc734e0eb2d43763574c24f Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Fri, 20 May 2016 16:20:05 +0200 Subject: [PATCH] Define ImageBitmapSource in terms of CanvasImageSource Also remove erroneous mentions of CanvasRenderingContext2D as a CanvasImageSource type. Further cleanup of #790. See 740634d0f30a3b76e9da166ac2fa8835fcc073ab and 43ad288bc5dfc567c232afb292d16be1929a51e2 for prior commits in this area. Fixes #893. --- source | 34 +++++++++------------------------- 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/source b/source index ed300e57e12..4f540040816 100644 --- a/source +++ b/source @@ -59276,7 +59276,6 @@ callback BlobCallback = void (Blob? blob); typedef (HTMLOrSVGImageElement or HTMLVideoElement or HTMLCanvasElement or - CanvasRenderingContext2D or ImageBitmap) CanvasImageSource; enum CanvasFillRule { "nonzero", "evenodd" }; @@ -61847,8 +61846,6 @@ try {
  • HTMLCanvasElement (canvas elements)
  • -
  • CanvasRenderingContext2D
  • -
  • ImageBitmap
  • @@ -61919,10 +61916,6 @@ try {

    When a CanvasImageSource object represents an HTMLCanvasElement, the element's bitmap must be used as the source image.

    -

    When a CanvasImageSource object represents a - CanvasRenderingContext2D, the object's output bitmap must be used as - the source image.

    -

    When a 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 {

    When a CanvasImageSource object represents an ImageBitmap, the object's bitmap image data must be used as the source image.

    -

    The image argument is not origin-clean if it is an 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.

    - + origin-clean flag is false.

    @@ -63294,10 +63283,9 @@ v6DVT (also check for '- -' bits in the part above) --> data-x="dom-context-2d-imageSmoothingEnabled">imageSmoothingEnabled attribute is set to true.

    -

    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).