mirror of
https://github.com/servo/servo.git
synced 2025-07-23 23:33:43 +01:00
Clean up and merge some canvas-related WebIDLs (#30606)
* Clean up and merge some canvas-related WebIDLs * Apply `./mach fmt` * WebIDL has `test-tidy` support???
This commit is contained in:
parent
a3d2f0c586
commit
26a3dffd95
9 changed files with 64 additions and 91 deletions
|
@ -30,9 +30,8 @@ use style_traits::values::ToCss;
|
||||||
use crate::dom::bindings::cell::DomRefCell;
|
use crate::dom::bindings::cell::DomRefCell;
|
||||||
use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::{
|
use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::{
|
||||||
CanvasDirection, CanvasFillRule, CanvasImageSource, CanvasLineCap, CanvasLineJoin,
|
CanvasDirection, CanvasFillRule, CanvasImageSource, CanvasLineCap, CanvasLineJoin,
|
||||||
CanvasTextAlign, CanvasTextBaseline,
|
CanvasTextAlign, CanvasTextBaseline, ImageDataMethods,
|
||||||
};
|
};
|
||||||
use crate::dom::bindings::codegen::Bindings::ImageDataBinding::ImageDataMethods;
|
|
||||||
use crate::dom::bindings::codegen::UnionTypes::StringOrCanvasGradientOrCanvasPattern;
|
use crate::dom::bindings::codegen::UnionTypes::StringOrCanvasGradientOrCanvasPattern;
|
||||||
use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
|
use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
|
||||||
use crate::dom::bindings::inheritance::Castable;
|
use crate::dom::bindings::inheritance::Castable;
|
||||||
|
|
|
@ -9,7 +9,7 @@ use cssparser::{Color as CSSColor, Parser, ParserInput, RGBA};
|
||||||
use dom_struct::dom_struct;
|
use dom_struct::dom_struct;
|
||||||
|
|
||||||
use crate::dom::bindings::cell::DomRefCell;
|
use crate::dom::bindings::cell::DomRefCell;
|
||||||
use crate::dom::bindings::codegen::Bindings::CanvasGradientBinding::CanvasGradientMethods;
|
use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasGradientMethods;
|
||||||
use crate::dom::bindings::error::{Error, ErrorResult};
|
use crate::dom::bindings::error::{Error, ErrorResult};
|
||||||
use crate::dom::bindings::num::Finite;
|
use crate::dom::bindings::num::Finite;
|
||||||
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
||||||
|
|
|
@ -749,12 +749,24 @@ pub fn entries_to_matrix(entries: &[f64]) -> Fallible<(bool, Transform3D<f64>)>
|
||||||
// https://drafts.fxtf.org/geometry-1/#validate-and-fixup
|
// https://drafts.fxtf.org/geometry-1/#validate-and-fixup
|
||||||
pub fn dommatrixinit_to_matrix(dict: &DOMMatrixInit) -> Fallible<(bool, Transform3D<f64>)> {
|
pub fn dommatrixinit_to_matrix(dict: &DOMMatrixInit) -> Fallible<(bool, Transform3D<f64>)> {
|
||||||
// Step 1.
|
// Step 1.
|
||||||
if dict.a.is_some() && dict.m11.is_some() && dict.a.unwrap() != dict.m11.unwrap() ||
|
if dict.parent.a.is_some() &&
|
||||||
dict.b.is_some() && dict.m12.is_some() && dict.b.unwrap() != dict.m12.unwrap() ||
|
dict.parent.m11.is_some() &&
|
||||||
dict.c.is_some() && dict.m21.is_some() && dict.c.unwrap() != dict.m21.unwrap() ||
|
dict.parent.a.unwrap() != dict.parent.m11.unwrap() ||
|
||||||
dict.d.is_some() && dict.m22.is_some() && dict.d.unwrap() != dict.m22.unwrap() ||
|
dict.parent.b.is_some() &&
|
||||||
dict.e.is_some() && dict.m41.is_some() && dict.e.unwrap() != dict.m41.unwrap() ||
|
dict.parent.m12.is_some() &&
|
||||||
dict.f.is_some() && dict.m42.is_some() && dict.f.unwrap() != dict.m42.unwrap() ||
|
dict.parent.b.unwrap() != dict.parent.m12.unwrap() ||
|
||||||
|
dict.parent.c.is_some() &&
|
||||||
|
dict.parent.m21.is_some() &&
|
||||||
|
dict.parent.c.unwrap() != dict.parent.m21.unwrap() ||
|
||||||
|
dict.parent.d.is_some() &&
|
||||||
|
dict.parent.m22.is_some() &&
|
||||||
|
dict.parent.d.unwrap() != dict.parent.m22.unwrap() ||
|
||||||
|
dict.parent.e.is_some() &&
|
||||||
|
dict.parent.m41.is_some() &&
|
||||||
|
dict.parent.e.unwrap() != dict.parent.m41.unwrap() ||
|
||||||
|
dict.parent.f.is_some() &&
|
||||||
|
dict.parent.m42.is_some() &&
|
||||||
|
dict.parent.f.unwrap() != dict.parent.m42.unwrap() ||
|
||||||
dict.is2D.is_some() &&
|
dict.is2D.is_some() &&
|
||||||
dict.is2D.unwrap() &&
|
dict.is2D.unwrap() &&
|
||||||
(dict.m31 != 0.0 ||
|
(dict.m31 != 0.0 ||
|
||||||
|
@ -772,17 +784,17 @@ pub fn dommatrixinit_to_matrix(dict: &DOMMatrixInit) -> Fallible<(bool, Transfor
|
||||||
} else {
|
} else {
|
||||||
let mut is_2d = dict.is2D;
|
let mut is_2d = dict.is2D;
|
||||||
// Step 2.
|
// Step 2.
|
||||||
let m11 = dict.m11.unwrap_or(dict.a.unwrap_or(1.0));
|
let m11 = dict.parent.m11.unwrap_or(dict.parent.a.unwrap_or(1.0));
|
||||||
// Step 3.
|
// Step 3.
|
||||||
let m12 = dict.m12.unwrap_or(dict.b.unwrap_or(0.0));
|
let m12 = dict.parent.m12.unwrap_or(dict.parent.b.unwrap_or(0.0));
|
||||||
// Step 4.
|
// Step 4.
|
||||||
let m21 = dict.m21.unwrap_or(dict.c.unwrap_or(0.0));
|
let m21 = dict.parent.m21.unwrap_or(dict.parent.c.unwrap_or(0.0));
|
||||||
// Step 5.
|
// Step 5.
|
||||||
let m22 = dict.m22.unwrap_or(dict.d.unwrap_or(1.0));
|
let m22 = dict.parent.m22.unwrap_or(dict.parent.d.unwrap_or(1.0));
|
||||||
// Step 6.
|
// Step 6.
|
||||||
let m41 = dict.m41.unwrap_or(dict.e.unwrap_or(0.0));
|
let m41 = dict.parent.m41.unwrap_or(dict.parent.e.unwrap_or(0.0));
|
||||||
// Step 7.
|
// Step 7.
|
||||||
let m42 = dict.m42.unwrap_or(dict.f.unwrap_or(0.0));
|
let m42 = dict.parent.m42.unwrap_or(dict.parent.f.unwrap_or(0.0));
|
||||||
// Step 8.
|
// Step 8.
|
||||||
if is_2d.is_none() &&
|
if is_2d.is_none() &&
|
||||||
(dict.m31 != 0.0 ||
|
(dict.m31 != 0.0 ||
|
||||||
|
|
|
@ -15,7 +15,7 @@ use js::jsapi::{Heap, JSObject};
|
||||||
use js::rust::{HandleObject, Runtime};
|
use js::rust::{HandleObject, Runtime};
|
||||||
use js::typedarray::{CreateWith, Uint8ClampedArray};
|
use js::typedarray::{CreateWith, Uint8ClampedArray};
|
||||||
|
|
||||||
use crate::dom::bindings::codegen::Bindings::ImageDataBinding::ImageDataMethods;
|
use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::ImageDataMethods;
|
||||||
use crate::dom::bindings::error::{Error, Fallible};
|
use crate::dom::bindings::error::{Error, Fallible};
|
||||||
use crate::dom::bindings::reflector::{reflect_dom_object_with_proto, Reflector};
|
use crate::dom::bindings::reflector::{reflect_dom_object_with_proto, Reflector};
|
||||||
use crate::dom::bindings::root::DomRoot;
|
use crate::dom::bindings::root::DomRoot;
|
||||||
|
|
|
@ -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);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
|
@ -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);
|
|
||||||
};
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ typedef (HTMLOrSVGImageElement or
|
||||||
HTMLCanvasElement or
|
HTMLCanvasElement or
|
||||||
/*ImageBitmap or*/
|
/*ImageBitmap or*/
|
||||||
OffscreenCanvas or
|
OffscreenCanvas or
|
||||||
|
/*VideoFrame or*/
|
||||||
/*CSSImageValue*/ CSSStyleValue) CanvasImageSource;
|
/*CSSImageValue*/ CSSStyleValue) CanvasImageSource;
|
||||||
|
|
||||||
enum CanvasFillRule { "nonzero", "evenodd" };
|
enum CanvasFillRule { "nonzero", "evenodd" };
|
||||||
|
@ -39,14 +40,12 @@ CanvasRenderingContext2D includes CanvasPathDrawingStyles;
|
||||||
CanvasRenderingContext2D includes CanvasTextDrawingStyles;
|
CanvasRenderingContext2D includes CanvasTextDrawingStyles;
|
||||||
CanvasRenderingContext2D includes CanvasPath;
|
CanvasRenderingContext2D includes CanvasPath;
|
||||||
|
|
||||||
[Exposed=(PaintWorklet, Window, Worker)]
|
|
||||||
interface mixin CanvasState {
|
interface mixin CanvasState {
|
||||||
// state
|
// state
|
||||||
undefined save(); // push state on state stack
|
undefined save(); // push state on state stack
|
||||||
undefined restore(); // pop state stack and restore state
|
undefined restore(); // pop state stack and restore state
|
||||||
};
|
};
|
||||||
|
|
||||||
[Exposed=(PaintWorklet, Window, Worker)]
|
|
||||||
interface mixin CanvasTransform {
|
interface mixin CanvasTransform {
|
||||||
// transformations (default transform is the identity matrix)
|
// transformations (default transform is the identity matrix)
|
||||||
undefined scale(unrestricted double x, unrestricted double y);
|
undefined scale(unrestricted double x, unrestricted double y);
|
||||||
|
@ -70,21 +69,18 @@ interface mixin CanvasTransform {
|
||||||
undefined resetTransform();
|
undefined resetTransform();
|
||||||
};
|
};
|
||||||
|
|
||||||
[Exposed=(PaintWorklet, Window, Worker)]
|
|
||||||
interface mixin CanvasCompositing {
|
interface mixin CanvasCompositing {
|
||||||
// compositing
|
// compositing
|
||||||
attribute unrestricted double globalAlpha; // (default 1.0)
|
attribute unrestricted double globalAlpha; // (default 1.0)
|
||||||
attribute DOMString globalCompositeOperation; // (default source-over)
|
attribute DOMString globalCompositeOperation; // (default source-over)
|
||||||
};
|
};
|
||||||
|
|
||||||
[Exposed=(PaintWorklet, Window, Worker)]
|
|
||||||
interface mixin CanvasImageSmoothing {
|
interface mixin CanvasImageSmoothing {
|
||||||
// image smoothing
|
// image smoothing
|
||||||
attribute boolean imageSmoothingEnabled; // (default true)
|
attribute boolean imageSmoothingEnabled; // (default true)
|
||||||
// attribute ImageSmoothingQuality imageSmoothingQuality; // (default low)
|
// attribute ImageSmoothingQuality imageSmoothingQuality; // (default low)
|
||||||
};
|
};
|
||||||
|
|
||||||
[Exposed=(PaintWorklet, Window, Worker)]
|
|
||||||
interface mixin CanvasFillStrokeStyles {
|
interface mixin CanvasFillStrokeStyles {
|
||||||
// colours and styles (see also the CanvasDrawingStyles interface)
|
// colours and styles (see also the CanvasDrawingStyles interface)
|
||||||
attribute (DOMString or CanvasGradient or CanvasPattern) strokeStyle; // (default black)
|
attribute (DOMString or CanvasGradient or CanvasPattern) strokeStyle; // (default black)
|
||||||
|
@ -96,7 +92,6 @@ interface mixin CanvasFillStrokeStyles {
|
||||||
CanvasPattern? createPattern(CanvasImageSource image, [LegacyNullToEmptyString] DOMString repetition);
|
CanvasPattern? createPattern(CanvasImageSource image, [LegacyNullToEmptyString] DOMString repetition);
|
||||||
};
|
};
|
||||||
|
|
||||||
[Exposed=(PaintWorklet, Window, Worker)]
|
|
||||||
interface mixin CanvasShadowStyles {
|
interface mixin CanvasShadowStyles {
|
||||||
// shadows
|
// shadows
|
||||||
attribute unrestricted double shadowOffsetX; // (default 0)
|
attribute unrestricted double shadowOffsetX; // (default 0)
|
||||||
|
@ -105,13 +100,11 @@ interface mixin CanvasShadowStyles {
|
||||||
attribute DOMString shadowColor; // (default transparent black)
|
attribute DOMString shadowColor; // (default transparent black)
|
||||||
};
|
};
|
||||||
|
|
||||||
[Exposed=(PaintWorklet, Window, Worker)]
|
|
||||||
interface mixin CanvasFilters {
|
interface mixin CanvasFilters {
|
||||||
// filters
|
// filters
|
||||||
//attribute DOMString filter; // (default "none")
|
//attribute DOMString filter; // (default "none")
|
||||||
};
|
};
|
||||||
|
|
||||||
[Exposed=(PaintWorklet, Window, Worker)]
|
|
||||||
interface mixin CanvasRect {
|
interface mixin CanvasRect {
|
||||||
// rects
|
// rects
|
||||||
undefined clearRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h);
|
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);
|
undefined strokeRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h);
|
||||||
};
|
};
|
||||||
|
|
||||||
[Exposed=(PaintWorklet, Window, Worker)]
|
|
||||||
interface mixin CanvasDrawPath {
|
interface mixin CanvasDrawPath {
|
||||||
// path API (see also CanvasPath)
|
// path API (see also CanvasPath)
|
||||||
undefined beginPath();
|
undefined beginPath();
|
||||||
|
@ -137,7 +129,6 @@ interface mixin CanvasDrawPath {
|
||||||
//boolean isPointInStroke(Path2D path, unrestricted double x, unrestricted double y);
|
//boolean isPointInStroke(Path2D path, unrestricted double x, unrestricted double y);
|
||||||
};
|
};
|
||||||
|
|
||||||
[Exposed=(PaintWorklet, Window)]
|
|
||||||
interface mixin CanvasUserInterface {
|
interface mixin CanvasUserInterface {
|
||||||
//void drawFocusIfNeeded(Element element);
|
//void drawFocusIfNeeded(Element element);
|
||||||
//void drawFocusIfNeeded(Path2D path, Element element);
|
//void drawFocusIfNeeded(Path2D path, Element element);
|
||||||
|
@ -145,7 +136,6 @@ interface mixin CanvasUserInterface {
|
||||||
//void scrollPathIntoView(Path2D path);
|
//void scrollPathIntoView(Path2D path);
|
||||||
};
|
};
|
||||||
|
|
||||||
[Exposed=(PaintWorklet, Window, Worker)]
|
|
||||||
interface mixin CanvasText {
|
interface mixin CanvasText {
|
||||||
// text (see also the CanvasPathDrawingStyles and CanvasTextDrawingStyles interfaces)
|
// text (see also the CanvasPathDrawingStyles and CanvasTextDrawingStyles interfaces)
|
||||||
[Pref="dom.canvas_text.enabled"]
|
[Pref="dom.canvas_text.enabled"]
|
||||||
|
@ -157,7 +147,6 @@ interface mixin CanvasText {
|
||||||
TextMetrics measureText(DOMString text);
|
TextMetrics measureText(DOMString text);
|
||||||
};
|
};
|
||||||
|
|
||||||
[Exposed=(PaintWorklet, Window, Worker)]
|
|
||||||
interface mixin CanvasDrawImage {
|
interface mixin CanvasDrawImage {
|
||||||
// drawing images
|
// drawing images
|
||||||
[Throws]
|
[Throws]
|
||||||
|
@ -172,7 +161,6 @@ interface mixin CanvasDrawImage {
|
||||||
unrestricted double dw, unrestricted double dh);
|
unrestricted double dw, unrestricted double dh);
|
||||||
};
|
};
|
||||||
|
|
||||||
[Exposed=(Window, Worker)]
|
|
||||||
interface mixin CanvasImageData {
|
interface mixin CanvasImageData {
|
||||||
// pixel manipulation
|
// pixel manipulation
|
||||||
[Throws]
|
[Throws]
|
||||||
|
@ -194,7 +182,6 @@ enum CanvasTextAlign { "start", "end", "left", "right", "center" };
|
||||||
enum CanvasTextBaseline { "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" };
|
enum CanvasTextBaseline { "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" };
|
||||||
enum CanvasDirection { "ltr", "rtl", "inherit" };
|
enum CanvasDirection { "ltr", "rtl", "inherit" };
|
||||||
|
|
||||||
[Exposed=(PaintWorklet, Window, Worker)]
|
|
||||||
interface mixin CanvasPathDrawingStyles {
|
interface mixin CanvasPathDrawingStyles {
|
||||||
// line caps/joins
|
// line caps/joins
|
||||||
attribute unrestricted double lineWidth; // (default 1)
|
attribute unrestricted double lineWidth; // (default 1)
|
||||||
|
@ -208,7 +195,6 @@ interface mixin CanvasPathDrawingStyles {
|
||||||
//attribute unrestricted double lineDashOffset;
|
//attribute unrestricted double lineDashOffset;
|
||||||
};
|
};
|
||||||
|
|
||||||
[Exposed=(PaintWorklet, Window, Worker)]
|
|
||||||
interface mixin CanvasTextDrawingStyles {
|
interface mixin CanvasTextDrawingStyles {
|
||||||
// text
|
// text
|
||||||
attribute DOMString font; // (default 10px sans-serif)
|
attribute DOMString font; // (default 10px sans-serif)
|
||||||
|
@ -218,7 +204,6 @@ interface mixin CanvasTextDrawingStyles {
|
||||||
attribute CanvasDirection direction; // "ltr", "rtl", "inherit" (default: "inherit")
|
attribute CanvasDirection direction; // "ltr", "rtl", "inherit" (default: "inherit")
|
||||||
};
|
};
|
||||||
|
|
||||||
[Exposed=(PaintWorklet, Window, Worker)]
|
|
||||||
interface mixin CanvasPath {
|
interface mixin CanvasPath {
|
||||||
// shared path API methods
|
// shared path API methods
|
||||||
undefined closePath();
|
undefined closePath();
|
||||||
|
@ -250,3 +235,29 @@ interface mixin CanvasPath {
|
||||||
unrestricted double radius_y, unrestricted double rotation, unrestricted double startAngle,
|
unrestricted double radius_y, unrestricted double rotation, unrestricted double startAngle,
|
||||||
unrestricted double endAngle, optional boolean anticlockwise = false);
|
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;
|
||||||
|
};
|
||||||
|
|
|
@ -1,14 +1,8 @@
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
/* 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
|
* 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/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
/*
|
|
||||||
* The origin of this IDL file is
|
// https://drafts.fxtf.org/geometry/#dommatrix
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
[Exposed=(Window,Worker,PaintWorklet),
|
[Exposed=(Window,Worker,PaintWorklet),
|
||||||
LegacyWindowAlias=WebKitCSSMatrix]
|
LegacyWindowAlias=WebKitCSSMatrix]
|
||||||
|
@ -76,8 +70,7 @@ interface DOMMatrix : DOMMatrixReadOnly {
|
||||||
// DOMMatrix setMatrixValue(DOMString transformList);
|
// DOMMatrix setMatrixValue(DOMString transformList);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
dictionary DOMMatrix2DInit {
|
||||||
dictionary DOMMatrixInit {
|
|
||||||
unrestricted double a;
|
unrestricted double a;
|
||||||
unrestricted double b;
|
unrestricted double b;
|
||||||
unrestricted double c;
|
unrestricted double c;
|
||||||
|
@ -86,18 +79,21 @@ dictionary DOMMatrixInit {
|
||||||
unrestricted double f;
|
unrestricted double f;
|
||||||
unrestricted double m11;
|
unrestricted double m11;
|
||||||
unrestricted double m12;
|
unrestricted double m12;
|
||||||
unrestricted double m13 = 0;
|
|
||||||
unrestricted double m14 = 0;
|
|
||||||
unrestricted double m21;
|
unrestricted double m21;
|
||||||
unrestricted double m22;
|
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 m23 = 0;
|
||||||
unrestricted double m24 = 0;
|
unrestricted double m24 = 0;
|
||||||
unrestricted double m31 = 0;
|
unrestricted double m31 = 0;
|
||||||
unrestricted double m32 = 0;
|
unrestricted double m32 = 0;
|
||||||
unrestricted double m33 = 1;
|
unrestricted double m33 = 1;
|
||||||
unrestricted double m34 = 0;
|
unrestricted double m34 = 0;
|
||||||
unrestricted double m41;
|
|
||||||
unrestricted double m42;
|
|
||||||
unrestricted double m43 = 0;
|
unrestricted double m43 = 0;
|
||||||
unrestricted double m44 = 1;
|
unrestricted double m44 = 1;
|
||||||
boolean is2D;
|
boolean is2D;
|
||||||
|
|
|
@ -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;
|
|
||||||
};
|
|
Loading…
Add table
Add a link
Reference in a new issue