diff options
Diffstat (limited to 'components/script/dom/webidls')
-rw-r--r-- | components/script/dom/webidls/CanvasGradient.webidl | 13 | ||||
-rw-r--r-- | components/script/dom/webidls/CanvasPattern.webidl | 10 | ||||
-rw-r--r-- | components/script/dom/webidls/CanvasRenderingContext2D.webidl | 43 | ||||
-rw-r--r-- | components/script/dom/webidls/DOMMatrix.webidl | 24 | ||||
-rw-r--r-- | components/script/dom/webidls/ImageData.webidl | 22 |
5 files changed, 37 insertions, 75 deletions
diff --git a/components/script/dom/webidls/CanvasGradient.webidl b/components/script/dom/webidls/CanvasGradient.webidl deleted file mode 100644 index 46578087beb..00000000000 --- a/components/script/dom/webidls/CanvasGradient.webidl +++ /dev/null @@ -1,13 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ - -// https://html.spec.whatwg.org/multipage/#canvasgradient -[Exposed=(Window, PaintWorklet, Worker)] -interface CanvasGradient { - // opaque object - [Throws] - undefined addColorStop(double offset, DOMString color); -}; - - diff --git a/components/script/dom/webidls/CanvasPattern.webidl b/components/script/dom/webidls/CanvasPattern.webidl deleted file mode 100644 index bfd33b082f8..00000000000 --- a/components/script/dom/webidls/CanvasPattern.webidl +++ /dev/null @@ -1,10 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ - -// https://html.spec.whatwg.org/multipage/#canvaspattern -[Exposed=(Window, PaintWorklet, Worker)] -interface CanvasPattern { - //void setTransform(SVGMatrix matrix); -}; - diff --git a/components/script/dom/webidls/CanvasRenderingContext2D.webidl b/components/script/dom/webidls/CanvasRenderingContext2D.webidl index 436a39a57ee..dcb310d6849 100644 --- a/components/script/dom/webidls/CanvasRenderingContext2D.webidl +++ b/components/script/dom/webidls/CanvasRenderingContext2D.webidl @@ -13,6 +13,7 @@ typedef (HTMLOrSVGImageElement or HTMLCanvasElement or /*ImageBitmap or*/ OffscreenCanvas or + /*VideoFrame or*/ /*CSSImageValue*/ CSSStyleValue) CanvasImageSource; enum CanvasFillRule { "nonzero", "evenodd" }; @@ -39,14 +40,12 @@ CanvasRenderingContext2D includes CanvasPathDrawingStyles; CanvasRenderingContext2D includes CanvasTextDrawingStyles; CanvasRenderingContext2D includes CanvasPath; -[Exposed=(PaintWorklet, Window, Worker)] interface mixin CanvasState { // state undefined save(); // push state on state stack undefined restore(); // pop state stack and restore state }; -[Exposed=(PaintWorklet, Window, Worker)] interface mixin CanvasTransform { // transformations (default transform is the identity matrix) undefined scale(unrestricted double x, unrestricted double y); @@ -70,21 +69,18 @@ interface mixin CanvasTransform { undefined resetTransform(); }; -[Exposed=(PaintWorklet, Window, Worker)] interface mixin CanvasCompositing { // compositing attribute unrestricted double globalAlpha; // (default 1.0) attribute DOMString globalCompositeOperation; // (default source-over) }; -[Exposed=(PaintWorklet, Window, Worker)] interface mixin CanvasImageSmoothing { // image smoothing attribute boolean imageSmoothingEnabled; // (default true) // attribute ImageSmoothingQuality imageSmoothingQuality; // (default low) }; -[Exposed=(PaintWorklet, Window, Worker)] interface mixin CanvasFillStrokeStyles { // colours and styles (see also the CanvasDrawingStyles interface) attribute (DOMString or CanvasGradient or CanvasPattern) strokeStyle; // (default black) @@ -96,7 +92,6 @@ interface mixin CanvasFillStrokeStyles { CanvasPattern? createPattern(CanvasImageSource image, [LegacyNullToEmptyString] DOMString repetition); }; -[Exposed=(PaintWorklet, Window, Worker)] interface mixin CanvasShadowStyles { // shadows attribute unrestricted double shadowOffsetX; // (default 0) @@ -105,13 +100,11 @@ interface mixin CanvasShadowStyles { attribute DOMString shadowColor; // (default transparent black) }; -[Exposed=(PaintWorklet, Window, Worker)] interface mixin CanvasFilters { // filters //attribute DOMString filter; // (default "none") }; -[Exposed=(PaintWorklet, Window, Worker)] interface mixin CanvasRect { // rects undefined clearRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h); @@ -119,7 +112,6 @@ interface mixin CanvasRect { undefined strokeRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h); }; -[Exposed=(PaintWorklet, Window, Worker)] interface mixin CanvasDrawPath { // path API (see also CanvasPath) undefined beginPath(); @@ -137,7 +129,6 @@ interface mixin CanvasDrawPath { //boolean isPointInStroke(Path2D path, unrestricted double x, unrestricted double y); }; -[Exposed=(PaintWorklet, Window)] interface mixin CanvasUserInterface { //void drawFocusIfNeeded(Element element); //void drawFocusIfNeeded(Path2D path, Element element); @@ -145,7 +136,6 @@ interface mixin CanvasUserInterface { //void scrollPathIntoView(Path2D path); }; -[Exposed=(PaintWorklet, Window, Worker)] interface mixin CanvasText { // text (see also the CanvasPathDrawingStyles and CanvasTextDrawingStyles interfaces) [Pref="dom.canvas_text.enabled"] @@ -157,7 +147,6 @@ interface mixin CanvasText { TextMetrics measureText(DOMString text); }; -[Exposed=(PaintWorklet, Window, Worker)] interface mixin CanvasDrawImage { // drawing images [Throws] @@ -172,7 +161,6 @@ interface mixin CanvasDrawImage { unrestricted double dw, unrestricted double dh); }; -[Exposed=(Window, Worker)] interface mixin CanvasImageData { // pixel manipulation [Throws] @@ -194,7 +182,6 @@ enum CanvasTextAlign { "start", "end", "left", "right", "center" }; enum CanvasTextBaseline { "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" }; enum CanvasDirection { "ltr", "rtl", "inherit" }; -[Exposed=(PaintWorklet, Window, Worker)] interface mixin CanvasPathDrawingStyles { // line caps/joins attribute unrestricted double lineWidth; // (default 1) @@ -208,7 +195,6 @@ interface mixin CanvasPathDrawingStyles { //attribute unrestricted double lineDashOffset; }; -[Exposed=(PaintWorklet, Window, Worker)] interface mixin CanvasTextDrawingStyles { // text attribute DOMString font; // (default 10px sans-serif) @@ -218,7 +204,6 @@ interface mixin CanvasTextDrawingStyles { attribute CanvasDirection direction; // "ltr", "rtl", "inherit" (default: "inherit") }; -[Exposed=(PaintWorklet, Window, Worker)] interface mixin CanvasPath { // shared path API methods undefined closePath(); @@ -250,3 +235,29 @@ interface mixin CanvasPath { unrestricted double radius_y, unrestricted double rotation, unrestricted double startAngle, unrestricted double endAngle, optional boolean anticlockwise = false); }; + +[Exposed=(Window, PaintWorklet, Worker)] +interface CanvasGradient { + // opaque object + [Throws] + undefined addColorStop(double offset, DOMString color); +}; + +[Exposed=(Window, PaintWorklet, Worker)] +interface CanvasPattern { + // opaque object + //undefined setTransform(optional DOMMatrix2DInit transform = {}); +}; + +[Exposed=(Window,Worker), + Serializable] +interface ImageData { + [Throws] constructor(unsigned long sw, unsigned long sh/*, optional ImageDataSettings settings = {}*/); + [Throws] constructor(/* Uint8ClampedArray */ object data, unsigned long sw, optional unsigned long sh + /*, optional ImageDataSettings settings = {}*/); + + readonly attribute unsigned long width; + readonly attribute unsigned long height; + readonly attribute Uint8ClampedArray data; + //readonly attribute PredefinedColorSpace colorSpace; +}; diff --git a/components/script/dom/webidls/DOMMatrix.webidl b/components/script/dom/webidls/DOMMatrix.webidl index eaef16c3906..e0518bce659 100644 --- a/components/script/dom/webidls/DOMMatrix.webidl +++ b/components/script/dom/webidls/DOMMatrix.webidl @@ -1,14 +1,8 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -/* - * The origin of this IDL file is - * https://drafts.fxtf.org/geometry-1/#DOMMatrix - * - * Copyright: - * To the extent possible under law, the editors have waived all copyright and - * related or neighboring rights to this work. - */ + +// https://drafts.fxtf.org/geometry/#dommatrix [Exposed=(Window,Worker,PaintWorklet), LegacyWindowAlias=WebKitCSSMatrix] @@ -76,8 +70,7 @@ interface DOMMatrix : DOMMatrixReadOnly { // DOMMatrix setMatrixValue(DOMString transformList); }; - -dictionary DOMMatrixInit { +dictionary DOMMatrix2DInit { unrestricted double a; unrestricted double b; unrestricted double c; @@ -86,18 +79,21 @@ dictionary DOMMatrixInit { unrestricted double f; unrestricted double m11; unrestricted double m12; - unrestricted double m13 = 0; - unrestricted double m14 = 0; unrestricted double m21; unrestricted double m22; + unrestricted double m41; + unrestricted double m42; +}; + +dictionary DOMMatrixInit : DOMMatrix2DInit { + unrestricted double m13 = 0; + unrestricted double m14 = 0; unrestricted double m23 = 0; unrestricted double m24 = 0; unrestricted double m31 = 0; unrestricted double m32 = 0; unrestricted double m33 = 1; unrestricted double m34 = 0; - unrestricted double m41; - unrestricted double m42; unrestricted double m43 = 0; unrestricted double m44 = 1; boolean is2D; diff --git a/components/script/dom/webidls/ImageData.webidl b/components/script/dom/webidls/ImageData.webidl deleted file mode 100644 index b05e201f42a..00000000000 --- a/components/script/dom/webidls/ImageData.webidl +++ /dev/null @@ -1,22 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -/* - * The origin of this IDL file is - * https://html.spec.whatwg.org/multipage/#imagedata - * - * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and Opera Software ASA. - * You are granted a license to use, reproduce and create derivative works of this document. - */ - -[Exposed=(Window,Worker)] -interface ImageData { - [Throws] constructor(unsigned long sw, unsigned long sh); - [Throws] constructor(/* Uint8ClampedArray */ object data, unsigned long sw, optional unsigned long sh); - //[Constant] - readonly attribute unsigned long width; - //[Constant] - readonly attribute unsigned long height; - //[Constant, StoreInSlot] - readonly attribute Uint8ClampedArray data; -}; |