# Geometry Interfaces Module Level 1

## Editor’s Draft, 1 January 1970

This version:
  https://drafts.fxtf.org/geometry/
Latest published version:
  https://www.w3.org/TR/geometry-1/
Previous Versions:
  https://www.w3.org/TR/2014/CR-geometry-1-20141125/
  https://www.w3.org/TR/2014/WD-geometry-1-20140918/
  https://www.w3.org/TR/2014/WD-geometry-1-20140626/
  https://www.w3.org/TR/2014/WD-geometry-1-20140522/
  https://www.w3.org/TR/2013/WD-matrix-20130919/
Test Suite:
  http://test.csswg.org/suites/geometry-1_dev/nightly-unstable/
Editors:
  Dirk Schulze (Adobe Inc.)
  Chris Harrelson (Google Inc.)
Former Editors:
  Simon Pieters (Opera Software AS)
  Rik Cabanier (Magic Leap)
Issue Tracking:
  GitHub Issues
Suggest an Edit for this Spec:
  GitHub Editor

Copyright © 1970 W3C® (MIT, ERCIM, Keio, Beihang). W3C liability, trademark and permissive document license rules apply.

## Abstract

This specification provides basic geometric interfaces to represent points, rectangles, quadrilaterals and transformation matrices that can be used by other modules or specifications.

## Status of this document

This is a public copy of the editors’ draft. It is provided for discussion only and may change at any moment. Its publication here does not imply endorsement of its contents by W3C. Don’t cite this document other than as work in progress.

GitHub Issues are preferred for discussion of this specification. When filing an issue, please put the text “geometry” in the title, preferably like this: “[geometry] …summary of comment…”. All issues and comments are archived, and there is also a historical archive.

This document was produced by the CSS Working Group (part of the Style Activity).

This document was produced by a group operating under the W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.

This document is governed by the 1 March 2019 W3C Process Document.

## 1. Introduction

This section is non-normative.

This specification describes several geometry interfaces for the representation of points, rectangles, quadrilaterals and transformation matrices with the dimension of 3x2 and 4x4.

The SVG interfaces `SVGPoint`, `SVGRect` and `SVGMatrix` are aliasing the here defined interfaces in favor for common interfaces used by SVG, Canvas 2D Context and CSS Transforms. [SVG11] [HTML] [CSS3-TRANSFORMS]

## 2. The DOMPoint interfaces

A 2D or a 3D point can be represented by the following WebIDL interfaces:

    [Exposed=(Window,Worker),
     Serializable]
    interface DOMPointReadOnly {
        constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
                optional unrestricted double z = 0, optional unrestricted double w = 1);

        [NewObject] static DOMPointReadOnly fromPoint(optional DOMPointInit other = {});

        readonly attribute unrestricted double x;
        readonly attribute unrestricted double y;
        readonly attribute unrestricted double z;
        readonly attribute unrestricted double w;

        [NewObject] DOMPoint matrixTransform(optional DOMMatrixInit matrix = {});

        [Default] object toJSON();
    };

    [Exposed=(Window,Worker),
     Serializable,
     LegacyWindowAlias=SVGPoint]
    interface DOMPoint : DOMPointReadOnly {
        constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
                optional unrestricted double z = 0, optional unrestricted double w = 1);

        [NewObject] static DOMPoint fromPoint(optional DOMPointInit other = {});

        inherit attribute unrestricted double x;
        inherit attribute unrestricted double y;
        inherit attribute unrestricted double z;
        inherit attribute unrestricted double w;
    };

    dictionary DOMPointInit {
        unrestricted double x = 0;
        unrestricted double y = 0;
        unrestricted double z = 0;
        unrestricted double w = 1;
    };

The following algorithms assume that `DOMPointReadOnly` objects have the internal member variables x coordinate, y coordinate, z coordinate and w perspective. `DOMPointReadOnly` as well as the inheriting interface `DOMPoint` must be able to access and set the value of these variables.

An interface returning an `DOMPointReadOnly` object by an attribute or function may be able to modify internal member variable values. Such an interface must specify this ability explicitly in prose.

Internal member variables must not be exposed in any way.

The `DOMPointReadOnly(x, y, z, w)` and `DOMPoint(x, y, z, w)` constructors, when invoked, must run the following steps:

1. Let point be a new `DOMPointReadOnly` or `DOMPoint` object as appropriate.

2. Set point’s variables x coordinate to x, y coordinate to y, z coordinate to z and w perspective to w.

3. Return point.

The `fromPoint(other)` static method on `DOMPointReadOnly` must create a `DOMPointReadOnly` from the dictionary other.

The `fromPoint(other)` static method on `DOMPoint` must create a `DOMPoint` from the dictionary other.

To create a `DOMPointReadOnly` from a dictionary other, or to create a `DOMPoint` from a dictionary other, follow these steps:

1. Let point be a new `DOMPointReadOnly` or `DOMPoint` as appropriate.

2. Set point’s variables x coordinate to other’s `x` dictionary member, y coordinate to other’s `y` dictionary member, z coordinate to other’s `z` dictionary member and w perspective to other’s `w` dictionary member.

3. Return point.

The `x` attribute, on getting, must return the x coordinate value. For the `DOMPoint` interface, setting the `x` attribute must set the x coordinate to the new value.

The `y` attribute, on getting, must return the y coordinate value. For the `DOMPoint` interface, setting the `y` attribute must set the y coordinate to the new value.

The `z` attribute, on getting, must return the z coordinate value. For the `DOMPoint` interface, setting the `z` attribute must set the z coordinate to the new value.

The `w` attribute, on getting, must return the w perspective value. For the `DOMPoint` interface, setting the `w` attribute must set the w perspective to the new value.

The `matrixTransform(matrix)` method, when invoked, must run the following steps:

1. Let matrixObject be the result of invoking create a `DOMMatrix` from the dictionary matrix.

2. Return the result of invoking transform a point with a matrix, given the current point and matrixObject. The current point does not get modified.

In this example the method `matrixTransform()` on a `DOMPoint` instance is called with a `DOMMatrix` instance as argument.

    var point = new DOMPoint(5, 4);
    var matrix = new DOMMatrix([2, 0, 0, 2, 10, 10]);
    var transformedPoint = point.matrixTransform(matrix);

The point variable is set to a new `DOMPoint` object with x coordinate initialized to 5 and y coordinate initialized to 4. This new `DOMPoint` is now scaled and the translated by matrix. This resulting transformedPoint has the x coordinate 20 and y coordinate 18.

### 2.1. Transforming a point with a matrix

To transform a point with a matrix, given point and matrix:

1. Let x be point’s x coordinate.

2. Let y be point’s y coordinate.

3. Let z be point’s z coordinate.

4. Let w be point’s w perspective.

5. Let pointVector be a new column vector with the elements being x, y, z, and w, respectively.

   x y z w

6. Set pointVector to pointVector post-multiplied by matrix.

7. Let transformedPoint be a new `DOMPoint` object.

8. Set transformedPoint’s x coordinate to pointVector’s first element.

9. Set transformedPoint’s y coordinate to pointVector’s second element.

10. Set transformedPoint’s z coordinate to pointVector’s third element.

11. Set transformedPoint’s w perspective to pointVector’s fourth element.

12. Return transformedPoint.

Note: If matrix’s is 2D is true, point’s z coordinate is 0 or -0, and point’s w perspective is 1, then this is a 2D transformation. Otherwise this is a 3D transformation.

## 3. The DOMRect interfaces

Objects implementing the `DOMRectReadOnly` interface represent a rectangle.

Rectangles have the following properties:

origin

  When the rectangle has a non-negative width dimension, the rectangle’s horizontal origin is the left edge; otherwise, it is the right edge. Similarly, when the rectangle has a non-negative height dimension, the rectangle’s vertical origin is the top edge; otherwise, it is the bottom edge.

x coordinate

  The horizontal distance between the viewport’s left edge and the rectangle’s origin.

y coordinate

  The vertical distance between the viewport’s top edge and the rectangle’s origin.

width dimension

  The width of the rectangle. Can be negative.

height dimension

  The height of the rectangle. Can be negative.

    [Exposed=(Window,Worker),
     Serializable]
    interface DOMRectReadOnly {
        constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
                optional unrestricted double width = 0, optional unrestricted double height = 0);

        [NewObject] static DOMRectReadOnly fromRect(optional DOMRectInit other = {});

        readonly attribute unrestricted double x;
        readonly attribute unrestricted double y;
        readonly attribute unrestricted double width;
        readonly attribute unrestricted double height;
        readonly attribute unrestricted double top;
        readonly attribute unrestricted double right;
        readonly attribute unrestricted double bottom;
        readonly attribute unrestricted double left;

        [Default] object toJSON();
    };

    [Exposed=(Window,Worker),
     Serializable,
     LegacyWindowAlias=SVGRect]
    interface DOMRect : DOMRectReadOnly {
        constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
                optional unrestricted double width = 0, optional unrestricted double height = 0);

        [NewObject] static DOMRect fromRect(optional DOMRectInit other = {});

        inherit attribute unrestricted double x;
        inherit attribute unrestricted double y;
        inherit attribute unrestricted double width;
        inherit attribute unrestricted double height;
    };

    dictionary DOMRectInit {
        unrestricted double x = 0;
        unrestricted double y = 0;
        unrestricted double width = 0;
        unrestricted double height = 0;
    };

The following algorithms assume that `DOMRectReadOnly` objects have the internal member variables x coordinate, y coordinate, width dimension and height dimension. `DOMRectReadOnly` as well as the inheriting interface `DOMRect` must be able to access and set the value of these variables.

An interface returning an `DOMRectReadOnly` object by an attribute or function may be able to modify internal member variable values. Such an interface must specify this ability explicitly in prose.

Internal member variables must not be exposed in any way.

The `DOMRectReadOnly(x, y, width, height)` and `DOMRect(x, y, width, height)` constructors, when invoked, must run the following steps:

1. Let rect be a new `DOMRectReadOnly` or `DOMRect` object as appropriate.

2. Set rect’s variables x coordinate to x, y coordinate to y, width dimension to width and height dimension to height.

3. Return rect.

The `fromRect(other)` static method on `DOMRectReadOnly` must create a `DOMRectReadOnly` from the dictionary other.

The `fromRect(other)` static method on `DOMRect` must create a `DOMRect` from the dictionary other.

To create a `DOMRectReadOnly` from a dictionary other, or to create a `DOMRect` from a dictionary other, follow these steps:

1. Let rect be a new `DOMRectReadOnly` or `DOMRect` as appropriate.

2. Set rect’s variables x coordinate to other’s `x` dictionary member, y coordinate to other’s `y` dictionary member, width dimension to other’s `width` dictionary member and height dimension to other’s `height` dictionary member.

3. Return rect.

The `x` attribute, on getting, must return the x coordinate value. For the `DOMRect` interface, setting the `x` attribute must set the x coordinate to the new value.

The `y` attribute, on getting, it must return the y coordinate value. For the `DOMRect` interface, setting the `y` attribute must set the y coordinate to the new value.

The `width` attribute, on getting, must return the width dimension value. For the `DOMRect` interface, setting the `width` attribute must set the width dimension to the new value.

The `height` attribute, on getting, must return the height dimension value. For the `DOMRect` interface, setting the `height` attribute must set the height dimension value to the new value.

The `top` attribute, on getting, must return min(y coordinate, y coordinate + height dimension).

The `right` attribute, on getting, must return max(x coordinate, x coordinate + width dimension).

The `bottom` attribute, on getting, must return max(y coordinate, y coordinate + height dimension).

The `left` attribute, on getting, must return min(x coordinate, x coordinate + width dimension).

## 4. The DOMRectList interface

    [Exposed=Window]
    interface DOMRectList {
        readonly attribute unsigned long length;
        getter DOMRect? item(unsigned long index);
    };

The `length` attribute must return the total number of `DOMRect` objects associated with the object.

The `item(index)` method, when invoked, must return null when index is greater than or equal to the number of `DOMRect` objects associated with the `DOMRectList`. Otherwise, the `DOMRect` object at index must be returned. Indices are zero-based.

`DOMRectList` only exists for compatibility with legacy Web content. When specifying a new API, `DOMRectList` must not be used. Use `sequence<DOMRect>` instead. [WEBIDL]

## 5. The DOMQuad interface

Objects implementing the `DOMQuad` interface represents a quadrilateral.

    [Exposed=(Window,Worker),
     Serializable]
    interface DOMQuad {
        constructor(optional DOMPointInit p1 = {}, optional DOMPointInit p2 = {},
                optional DOMPointInit p3 = {}, optional DOMPointInit p4 = {});

        [NewObject] static DOMQuad fromRect(optional DOMRectInit other = {});
        [NewObject] static DOMQuad fromQuad(optional DOMQuadInit other = {});

        [SameObject] readonly attribute DOMPoint p1;
        [SameObject] readonly attribute DOMPoint p2;
        [SameObject] readonly attribute DOMPoint p3;
        [SameObject] readonly attribute DOMPoint p4;
        [NewObject] DOMRect getBounds();

        [Default] object toJSON();
    };

    dictionary DOMQuadInit {
      DOMPointInit p1;
      DOMPointInit p2;
      DOMPointInit p3;
      DOMPointInit p4;
    };

The following algorithms assume that `DOMQuad` objects have the internal member variables point 1, point 2, point 3, and point 4, which are `DOMPoint` objects. `DOMQuad` must be able to access and set the value of these variables. The author can modify these `DOMPoint` objects, which directly affects the quadrilateral.

An interface returning a `DOMQuad` object by an attribute or function may be able to modify internal member variable values. Such an interface must specify this ability explicitly in prose.

Internal member variables must not be exposed in any way.

The `DOMQuad(p1, p2, p3, p4)` constructor, when invoked, must run the following steps:

1. Let point1 be a new `DOMPoint` object with its attributes set to the values of the namesake dictionary members in p1.

2. Let point2 be a new `DOMPoint` object with its attributes set to the values of the namesake dictionary members in p2.

3. Let point3 be a new `DOMPoint` object with its attributes set to the values of the namesake dictionary members in p3.

4. Let point4 be a new `DOMPoint` object with its attributes set to the values of the namesake dictionary members in p4.

5. Return a new `DOMQuad` with point 1 set to point1, point 2 set to point2, point 3 set to point3 and point 4 set to point4.

Note: It is possible to pass `DOMPoint`/`DOMPointReadOnly` arguments as well. The passed arguments will be transformed to the correct object type internally following the WebIDL rules. [WEBIDL]

The `fromRect(other)` static method on `DOMQuad` must create a `DOMQuad` from the `DOMRectInit` dictionary other.

To create a `DOMQuad` from a `DOMRectInit` dictionary other, follow these steps:

1. Let x, y, width and height be the value of other’s `x`, `y`, `width` and `height` dictionary members, respectively.

2. Let point1 be a new `DOMPoint` object with x coordinate set to x, y coordinate set to y, z coordinate set to 0 and w perspective set to 1.

3. Let point2 be a new `DOMPoint` object with x coordinate set to x + width, y coordinate set to y, z coordinate set to 0 and w perspective set to 1.

4. Let point3 be a new `DOMPoint` object with x coordinate set to x + width, y coordinate set to y + height, z coordinate set to 0 and w perspective set to 1.

5. Let point4 be a new `DOMPoint` object with x coordinate set to x, y coordinate set to y + height, z coordinate set to 0 and w perspective set to 1.

6. Return a new `DOMQuad` with point 1 set to point1, point 2 set to point2, point 3 set to point3 and point 4 set to point4.

The `fromQuad(other)` static method on `DOMQuad` must create a `DOMQuad` from the `DOMQuadInit` dictionary other.

To create a `DOMQuad` from a `DOMQuadInit` dictionary other, follow these steps:

1. Let point1 be the result of invoking create a `DOMPoint` from the dictionary `p1` dictionary member of other, if it exists.

2. Let point2 be the result of invoking create a `DOMPoint` from the dictionary `p2` dictionary member of other, if it exists.

3. Let point3 be the result of invoking create a `DOMPoint` from the dictionary `p3` dictionary member of other, if it exists.

4. Let point4 be the result of invoking create a `DOMPoint` from the dictionary `p4` dictionary member of other, if it exists.

5. Return a new `DOMQuad` with point 1 set to point1, point 2 set to point2, point 3 set to point3 and point 4 set to point4.

The `p1` attribute must return point 1.

The `p2` attribute must return point 2.

The `p3` attribute must return point 3.

The `p4` attribute must return point 4.

The `getBounds()` method, when invoked, must run the following algorithm:

1. Let bounds be a `DOMRect` object.

2. Let left be the minimum of point 1’s x coordinate, point 2’s x coordinate, point 3’s x coordinate and point 4’s x coordinate.

3. Let top be the minimum of point 1’s y coordinate, point 2’s y coordinate, point 3’s y coordinate and point 4’s y coordinate.

4. Let right be the maximum of point 1’s x coordinate, point 2’s x coordinate, point 3’s x coordinate and point 4’s x coordinate.

5. Let bottom be the maximum of point 1’s y coordinate, point 2’s y coordinate, point 3’s y coordinate and point 4’s y coordinate.

6. Set x coordinate of bounds to left, y coordinate of bounds to top, width dimension of bounds to right - left and height dimension of bounds to bottom - top.

7. Return bounds.

In this example the `DOMQuad` constructor is called with arguments of type `DOMPoint` and `DOMPointInit`. Both arguments are accepted and can be used.

    var point = new DOMPoint(2, 0);
    var quad1 = new DOMQuad(point, {x: 12, y: 0}, {x: 12, y: 10}, {x: 2, y: 10});

The attribute values of the resulting `DOMQuad` quad1 above are also equivalent to the attribute values of the following `DOMQuad` quad2:

    var rect = new DOMRect(2, 0, 10, 10);
    var quad2 = DOMQuad.fromRect(rect);

This is an example of an irregular quadrilateral:

    new DOMQuad({x: 40, y: 25}, {x: 180, y: 8}, {x: 210, y: 150}, {x: 10, y: 180});

An irregular quadrilateral represented by a `DOMQuad`. The four red colored circles represent the `DOMPoint` attributes `p1` to `p4`. The dashed rectangle represents the bounding rectangle returned by the `getBounds()` method of the `DOMQuad`.

## 6. The DOMMatrix interfaces

The `DOMMatrix` and `DOMMatrixReadOnly` interfaces each represent a mathematical matrix with the purpose of describing transformations in a graphical context. The following sections describe the details of the interface.

m 11 m 21 m 31 m 41 m 12 m 22 m 32 m 42 m 13 m 23 m 33 m 43 m 14 m 24 m 34 m 44
A 4x4 abstract matrix with items m11 to m44.

In the following sections, terms have the following meaning:

post-multiply

  Term A post-multiplied by term B is equal to A · B.

pre-multiply

  Term A pre-multiplied by term B is equal to B · A.

multiply

  Multiply term A by term B is equal to A · B.

    [Exposed=(Window,Worker),
     Serializable]
    interface DOMMatrixReadOnly {
        constructor(optional (DOMString or sequence<unrestricted double>) init);

        [NewObject] static DOMMatrixReadOnly fromMatrix(optional DOMMatrixInit other = {});
        [NewObject] static DOMMatrixReadOnly fromFloat32Array(Float32Array array32);
        [NewObject] static DOMMatrixReadOnly fromFloat64Array(Float64Array array64);

        // These attributes are simple aliases for certain elements of the 4x4 matrix
        readonly attribute unrestricted double a;
        readonly attribute unrestricted double b;
        readonly attribute unrestricted double c;
        readonly attribute unrestricted double d;
        readonly attribute unrestricted double e;
        readonly attribute unrestricted double f;

        readonly attribute unrestricted double m11;
        readonly attribute unrestricted double m12;
        readonly attribute unrestricted double m13;
        readonly attribute unrestricted double m14;
        readonly attribute unrestricted double m21;
        readonly attribute unrestricted double m22;
        readonly attribute unrestricted double m23;
        readonly attribute unrestricted double m24;
        readonly attribute unrestricted double m31;
        readonly attribute unrestricted double m32;
        readonly attribute unrestricted double m33;
        readonly attribute unrestricted double m34;
        readonly attribute unrestricted double m41;
        readonly attribute unrestricted double m42;
        readonly attribute unrestricted double m43;
        readonly attribute unrestricted double m44;

        readonly attribute boolean is2D;
        readonly attribute boolean isIdentity;

        // Immutable transform methods
        [NewObject] DOMMatrix translate(optional unrestricted double tx = 0,
                                        optional unrestricted double ty = 0,
                                        optional unrestricted double tz = 0);
        [NewObject] DOMMatrix scale(optional unrestricted double scaleX = 1,
                                    optional unrestricted double scaleY,
                                    optional unrestricted double scaleZ = 1,
                                    optional unrestricted double originX = 0,
                                    optional unrestricted double originY = 0,
                                    optional unrestricted double originZ = 0);
        [NewObject] DOMMatrix scaleNonUniform(optional unrestricted double scaleX = 1,
                                              optional unrestricted double scaleY = 1);
        [NewObject] DOMMatrix scale3d(optional unrestricted double scale = 1,
                                      optional unrestricted double originX = 0,
                                      optional unrestricted double originY = 0,
                                      optional unrestricted double originZ = 0);
        [NewObject] DOMMatrix rotate(optional unrestricted double rotX = 0,
                                     optional unrestricted double rotY,
                                     optional unrestricted double rotZ);
        [NewObject] DOMMatrix rotateFromVector(optional unrestricted double x = 0,
                                               optional unrestricted double y = 0);
        [NewObject] DOMMatrix rotateAxisAngle(optional unrestricted double x = 0,
                                              optional unrestricted double y = 0,
                                              optional unrestricted double z = 0,
                                              optional unrestricted double angle = 0);
        [NewObject] DOMMatrix skewX(optional unrestricted double sx = 0);
        [NewObject] DOMMatrix skewY(optional unrestricted double sy = 0);
        [NewObject] DOMMatrix multiply(optional DOMMatrixInit other = {});
        [NewObject] DOMMatrix flipX();
        [NewObject] DOMMatrix flipY();
        [NewObject] DOMMatrix inverse();

        [NewObject] DOMPoint transformPoint(optional DOMPointInit point = {});
        [NewObject] Float32Array toFloat32Array();
        [NewObject] Float64Array toFloat64Array();

        [Exposed=Window] stringifier;
        [Default] object toJSON();
    };

    [Exposed=(Window,Worker),
     Serializable,
     LegacyWindowAlias=(SVGMatrix,WebKitCSSMatrix)]
    interface DOMMatrix : DOMMatrixReadOnly {
        constructor(optional (DOMString or sequence<unrestricted double>) init);

        [NewObject] static DOMMatrix fromMatrix(optional DOMMatrixInit other = {});
        [NewObject] static DOMMatrix fromFloat32Array(Float32Array array32);
        [NewObject] static DOMMatrix fromFloat64Array(Float64Array array64);

        // These attributes are simple aliases for certain elements of the 4x4 matrix
        inherit attribute unrestricted double a;
        inherit attribute unrestricted double b;
        inherit attribute unrestricted double c;
        inherit attribute unrestricted double d;
        inherit attribute unrestricted double e;
        inherit attribute unrestricted double f;

        inherit attribute unrestricted double m11;
        inherit attribute unrestricted double m12;
        inherit attribute unrestricted double m13;
        inherit attribute unrestricted double m14;
        inherit attribute unrestricted double m21;
        inherit attribute unrestricted double m22;
        inherit attribute unrestricted double m23;
        inherit attribute unrestricted double m24;
        inherit attribute unrestricted double m31;
        inherit attribute unrestricted double m32;
        inherit attribute unrestricted double m33;
        inherit attribute unrestricted double m34;
        inherit attribute unrestricted double m41;
        inherit attribute unrestricted double m42;
        inherit attribute unrestricted double m43;
        inherit attribute unrestricted double m44;

        // Mutable transform methods
        DOMMatrix multiplySelf(optional DOMMatrixInit other = {});
        DOMMatrix preMultiplySelf(optional DOMMatrixInit other = {});
        DOMMatrix translateSelf(optional unrestricted double tx = 0,
                                optional unrestricted double ty = 0,
                                optional unrestricted double tz = 0);
        DOMMatrix scaleSelf(optional unrestricted double scaleX = 1,
                            optional unrestricted double scaleY,
                            optional unrestricted double scaleZ = 1,
                            optional unrestricted double originX = 0,
                            optional unrestricted double originY = 0,
                            optional unrestricted double originZ = 0);
        DOMMatrix scale3dSelf(optional unrestricted double scale = 1,
                              optional unrestricted double originX = 0,
                              optional unrestricted double originY = 0,
                              optional unrestricted double originZ = 0);
        DOMMatrix rotateSelf(optional unrestricted double rotX = 0,
                             optional unrestricted double rotY,
                             optional unrestricted double rotZ);
        DOMMatrix rotateFromVectorSelf(optional unrestricted double x = 0,
                                       optional unrestricted double y = 0);
        DOMMatrix rotateAxisAngleSelf(optional unrestricted double x = 0,
                                      optional unrestricted double y = 0,
                                      optional unrestricted double z = 0,
                                      optional unrestricted double angle = 0);
        DOMMatrix skewXSelf(optional unrestricted double sx = 0);
        DOMMatrix skewYSelf(optional unrestricted double sy = 0);
        DOMMatrix invertSelf();

        [Exposed=Window] DOMMatrix setMatrixValue(DOMString transformList);
    };

    dictionary DOMMatrix2DInit {
        unrestricted double a;
        unrestricted double b;
        unrestricted double c;
        unrestricted double d;
        unrestricted double e;
        unrestricted double f;
        unrestricted double m11;
        unrestricted double m12;
        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 m43 = 0;
        unrestricted double m44 = 1;
        boolean is2D;
    };

The following algorithms assume that `DOMMatrixReadOnly` objects have the internal member variables m11 element, m12 element, m13 element, m14 element, m21 element, m22 element, m23 element, m24 element, m31 element, m32 element, m33 element, m34 element, m41 element, m42 element, m43 element, m44 element and is 2D. `DOMMatrixReadOnly` as well as the inheriting interface `DOMMatrix` must be able to access and set the value of these variables.

An interface returning an `DOMMatrixReadOnly` object by an attribute or function may be able to modify internal member variable values. Such an interface must specify this ability explicitly in prose.

Internal member variables must not be exposed in any way.

The `DOMMatrix` and `DOMMatrixReadOnly` interfaces replace the `SVGMatrix` interface from SVG. [SVG11]

### 6.1. DOMMatrix2DInit and DOMMatrixInit dictionaries

To validate and fixup (2D) a `DOMMatrix2DInit` or `DOMMatrixInit` dictionary dict, run the following steps:

1. If if at least one of the following conditions are true for dict, then throw a `TypeError` exception and abort these steps.

   - `a` and `m11` are both present and SameValueZero(`a`, `m11`) is `false`.

   - `b` and `m12` are both present and SameValueZero(`b`, `m12`) is `false`.

   - `c` and `m21` are both present and SameValueZero(`c`, `m21`) is `false`.

   - `d` and `m22` are both present and SameValueZero(`d`, `m22`) is `false`.

   - `e` and `m41` are both present and SameValueZero(`e`, `m41`) is `false`.

   - `f` and `m42` are both present and SameValueZero(`f`, `m42`) is `false`.

2. If `m11` is not present then set it to the value of member `a`, or value 1 if `a` is also not present.

3. If `m12` is not present then set it to the value of member `b`, or value 0 if `b` is also not present.

4. If `m21` is not present then set it to the value of member `c`, or value 0 if `c` is also not present.

5. If `m22` is not present then set it to the value of member `d`, or value 1 if `d` is also not present.

6. If `m41` is not present then set it to the value of member `e`, or value 0 if `e` is also not present.

7. If `m42` is not present then set it to the value of member `f`, or value 0 if `f` is also not present.

Note: The SameValueZero comparison algorithm returns `true` for two NaN values, and also for 0 and -0. [ECMA-262]

To validate and fixup a `DOMMatrixInit` dictionary dict, run the following steps:

1. Validate and fixup (2D) dict.

2. If `is2D` is `true` and: at least one of `m13`, `m14`, `m23`, `m24`, `m31`, `m32`, `m34`, `m43` are present with a value other than 0 or -0, or at least one of `m33`, `m44` are present with a value other than 1, then throw a `TypeError` exception and abort these steps.

3. If `is2D` is not present and at least one of `m13`, `m14`, `m23`, `m24`, `m31`, `m32`, `m34`, `m43` are present with a value other than 0 or -0, or at least one of `m33`, `m44` are present with a value other than 1, set `is2D` to `false`.

4. If `is2D` is still not present, set it to `true`.

### 6.2. Parsing a string into an abstract matrix

To parse a string into an abstract matrix, given a string transformList, means to run the following steps. It will either return a 4x4 abstract matrix and a boolean 2dTransform, or failure.

1. If transformList is the empty string, set it to the string "`matrix(1, 0, 0, 1, 0, 0)`".

2. Parse transformList into parsedValue given the grammar for the CSS transform property. The result will be a <transform-list>, the keyword none, or failure. If parsedValue is failure, or any <transform-function> has <length> values without absolute length units, or any keyword other than none is used, then return failure. [CSS3-SYNTAX] [CSS3-TRANSFORMS]

3. If parsedValue is none, set parsedValue to a <transform-list> containing a single identity matrix.

4. Let 2dTransform track the 2D/3D dimension status of parsedValue.

   If parsedValue consists of any three-dimensional transform functions

     Set 2dTransform to `false`.

   Otherwise

     Set 2dTransform to `true`.

5. Transform all <transform-function>s to 4x4 abstract matrices by following the “Mathematical Description of Transform Functions”. [CSS3-TRANSFORMS]

6. Let matrix be a 4x4 abstract matrix as shown in the initial figure of this section. Post-multiply all matrices from left to right and set matrix to this product.

7. Return matrix and 2dTransform.

### 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects

To create a 2d matrix of type type being either `DOMMatrixReadOnly` or `DOMMatrix`, with a sequence init of 6 elements, follow these steps:

1. Let matrix be a new instance of type.

2. Set m11 element, m12 element, m21 element, m22 element, m41 element and m42 element to the values of init in order starting with the first value.

3. Set m13 element, m14 element, m23 element, m24 element, m31 element, m32 element, m34 element, and m43 element to 0.

4. Set m33 element and m44 element to 1.

5. Set is 2D to `true`.

6. Return matrix

To create a 3d matrix with type being either `DOMMatrixReadOnly` or `DOMMatrix`, with a sequence init of 16 elements, follow these steps:

1. Let matrix be a new instance of type.

2. Set m11 element to m44 element to the values of init in column-major order.

3. Set is 2D to `false`.

4. Return matrix

The `DOMMatrixReadOnly(init)` and the `DOMMatrix(init)` constructors must follow these steps:

If init is omitted

  Return the result of invoking create a 2d matrix of type `DOMMatrixReadOnly` or `DOMMatrix` as appropriate, with the sequence [1, 0, 0, 1, 0, 0].

If init is a `DOMString`

  1. If current global object is not a `Window` object, then throw a `TypeError` exception.

  2. Parse init into an abstract matrix, and let matrix and 2dTransform be the result. If the result is failure, then throw a "`SyntaxError`" `DOMException`.

  3. If 2dTransform is `true`

       Return the result of invoking create a 2d matrix of type `DOMMatrixReadOnly` or `DOMMatrix` as appropriate, with a sequence of numbers, the values being the elements m11, m12, m21, m22, m41 and m42 of matrix.

     Otherwise

       Return the result of invoking create a 3d matrix of type `DOMMatrixReadOnly` or `DOMMatrix` as appropriate, with a sequence of numbers, the values being the 16 elements of matrix.

If init is a sequence with 6 elements

  Return the result of invoking create a 2d matrix of type `DOMMatrixReadOnly` or `DOMMatrix` as appropriate, with the sequence init.

If init is a sequence with 16 elements

  Return the result of invoking create a 3d matrix of type `DOMMatrixReadOnly` or `DOMMatrix` as appropriate, with the sequence init.

Otherwise

  Throw a `TypeError` exception.

The `fromMatrix(other)` static method on `DOMMatrixReadOnly` must create a `DOMMatrixReadOnly` from the dictionary other.

The `fromMatrix(other)` static method on `DOMMatrix` must create a `DOMMatrix` from the dictionary other.

To create a `DOMMatrixReadOnly` from a 2D dictionary other or to create a `DOMMatrix` from a 2D dictionary other, follow these steps:

1. Validate and fixup (2D) other.

2. Return the result of invoking create a 2d matrix of type `DOMMatrixReadOnly` or `DOMMatrix` as appropriate, with a sequence of numbers, the values being the 6 elements `m11`, `m12`, `m21`, `m22`, `m41` and `m42` of other in the given order.

To create a `DOMMatrixReadOnly` from a dictionary other or to create a `DOMMatrix` from a dictionary other, follow these steps:

1. Validate and fixup other.

2. If the `is2D` dictionary member of other is `true`

     Return the result of invoking create a 2d matrix of type `DOMMatrixReadOnly` or `DOMMatrix` as appropriate, with a sequence of numbers, the values being the 6 elements `m11`, `m12`, `m21`, `m22`, `m41` and `m42` of other in the given order.

   Otherwise

     Return the result of invoking create a 3d matrix of type `DOMMatrixReadOnly` or `DOMMatrix` as appropriate, with a sequence of numbers, the values being the 16 elements `m11`, `m12`, `m13`, ..., `m44` of other in the given order.

The `fromFloat32Array(array32)` static method on `DOMMatrixReadOnly` and the `fromFloat32Array(array32)` static method on `DOMMatrix` must follow these steps:

If array32 has 6 elements

  Return the result of invoking create a 2d matrix of type `DOMMatrixReadOnly` or `DOMMatrix` as appropriate, with a sequence of numbers taking the values from array32 in the provided order.

If array32 has 16 elements

  Return the result of invoking create a 3d matrix of type `DOMMatrixReadOnly` or `DOMMatrix` as appropriate, with a sequence of numbers taking the values from array32 in the provided order.

Otherwise

  Throw a `TypeError` exception.

The `fromFloat64Array(array64)` static method on `DOMMatrixReadOnly` and the `fromFloat64Array(array64)` static method on `DOMMatrix` must follow these steps:

If array64 has 6 elements

  Return the result of invoking create a 2d matrix of type `DOMMatrixReadOnly` or `DOMMatrix` as appropriate, with a sequence of numbers taking the values from array64 in the provided order.

If array32 has 16 elements

  Return the result of invoking create a 3d matrix of type `DOMMatrixReadOnly` or `DOMMatrix` as appropriate, with a sequence of numbers taking the values from array64 in the provided order.

Otherwise

  Throw a `TypeError` exception.

### 6.4. DOMMatrix attributes

The following attributes `m11` to `m44` correspond to the 16 items of the matrix interfaces.

The `m11` and `a` attributes, on getting, must return the m11 element value. For the `DOMMatrix` interface, setting the `m11` or the `a` attribute must set the m11 element to the new value.

The `m12` and `b` attributes, on getting, must return the m12 element value. For the `DOMMatrix` interface, setting the `m12` or the `b` attribute must set the m12 element to the new value.

The `m13` attribute, on getting, must return the m13 element value. For the `DOMMatrix` interface, setting the `m13` attribute must set the m13 element to the new value and, if the new value is not 0 or -0, set is 2D to `false`.

The `m14` attribute, on getting, must return the m14 element value. For the `DOMMatrix` interface, setting the `m14` attribute must set the m14 element to the new value and, if the new value is not 0 or -0, set is 2D to `false`.

The `m21` and `c` attributes, on getting, must return the m21 element value. For the `DOMMatrix` interface, setting the `m21` or the `c` attribute must set the m21 element to the new value.

The `m22` and `d` attributes, on getting, must return the m22 element value. For the `DOMMatrix` interface, setting the `m22` or the `d` attribute must set the m22 element to the new value.

The `m23` attribute, on getting, must return the m23 element value. For the `DOMMatrix` interface, setting the `m23` attribute must set the m23 element to the new value and, if the new value is not 0 or -0, set is 2D to `false`.

The `m24` attribute, on getting, must return the m24 element value. For the `DOMMatrix` interface, setting the `m24` attribute must set the m24 element to the new value and, if the new value is not 0 or -0, set is 2D to `false`.

The `m31` attribute, on getting, must return the m31 element value. For the `DOMMatrix` interface, setting the `m31` attribute must set the m31 element to the new value and, if the new value is not 0 or -0, set is 2D to `false`.

The `m32` attribute, on getting, must return the m32 element value. For the `DOMMatrix` interface, setting the `m32` attribute must set the m32 element to the new value and, if the new value is not 0 or -0, set is 2D to `false`.

The `m33` attribute, on getting, must return the m33 element value. For the `DOMMatrix` interface, setting the `m33` attribute must set the m33 element to the new value and, if the new value is not 1, set is 2D to `false`.

The `m34` attribute, on getting, must return the m34 element value. For the `DOMMatrix` interface, setting the `m34` attribute must set the m34 element to the new value and, if the new value is not 0 or -0, set is 2D to `false`.

The `m41` and `e` attributes, on getting, must return the m41 element value. For the `DOMMatrix` interface, setting the `m41` or the `e` attribute must set the m41 element to the new value.

The `m42` and `f` attributes, on getting, must return the m42 element value. For the `DOMMatrix` interface, setting the `m42` or the `f` attribute must set the m42 element to the new value.

The `m43` attribute, on getting, must return the m43 element value. For the `DOMMatrix` interface, setting the `m43` attribute must set the m43 element to the new value and, if the new value is not 0 or -0, set is 2D to `false`.

The `m44` attribute, on getting, must return the m44 element value. For the `DOMMatrix` interface, setting the `m44` attribute must set the m44 element to the new value and, if the new value is not 1, set is 2D to `false`.

The following attributes `a` to `f` correspond to the 2D components of the matrix interfaces.

The `a` attribute is an alias to the `m11` attribute.

The `b` attribute is an alias to the `m12` attribute.

The `c` attribute is an alias to the `m21` attribute.

The `d` attribute is an alias to the `m22` attribute.

The `e` attribute is an alias to the `m41` attribute.

The `f` attribute is an alias to the `m42` attribute.

The following attributes provide status information about `DOMMatrixReadOnly`.

The `is2D` attribute must return the value of is 2D.

The `isIdentity` attribute must return `true` if m12 element, m13 element, m14 element, m21 element, m23 element, m24 element, m31 element, m32 element, m34 element, m41 element, m42 element, m43 element are 0 or -0 and m11 element, m22 element, m33 element, m44 element are 1. Otherwise it must return `false`.

Every `DOMMatrixReadOnly` object must be flagged with a boolean is 2D. This flag indicates that:

1. The current matrix was initialized as a 2D matrix. See individual creators for more details.

2. Only 2D transformation operations were applied. Each mutable or immutable transformation method defines if is 2D must be set to `false`.

Note: Is 2D can never be set to `true` when it was set to `false` before on a `DOMMatrix` object with the exception of calling the `setMatrixValue()` method.

### 6.5. Immutable transformation methods

The following methods do not modify the current matrix and return a new `DOMMatrix` object.

`translate(tx, ty, tz)`

  1. Let result be the resulting matrix initialized to the values of the current matrix.

  2. Perform a `translateSelf()` transformation on result with the arguments tx, ty, tz.

  3. Return result.

  The current matrix is not modified.

`scale(scaleX, scaleY, scaleZ, originX, originY, originZ)`

  1. If scaleY is missing, set scaleY to the value of scaleX.

  2. Let result be the resulting matrix initialized to the values of the current matrix.

  3. Perform a `scaleSelf()` transformation on result with the arguments scaleX, scaleY, scaleZ, originX, originY, originZ.

  4. Return result.

  The current matrix is not modified.

`scaleNonUniform(scaleX, scaleY)`

  Note: Supported for legacy reasons to be compatible with `SVGMatrix` as defined in SVG 1.1 [SVG11]. Authors are encouraged to use `scale()` instead.

  1. Let result be the resulting matrix initialized to the values of the current matrix.

  2. Perform a `scaleSelf()` transformation on result with the arguments scaleX, scaleY, 1, 0, 0, 0.

  3. Return result.

  The current matrix is not modified.

`scale3d(scale, originX, originY, originZ)`

  1. Let result be the resulting matrix initialized to the values of the current matrix.

  2. Perform a `scale3dSelf()` transformation on result with the arguments scale, originX, originY, originZ.

  3. Return result.

  The current matrix is not modified.

`rotate(rotX, rotY, rotZ)`

  1. Let result be the resulting matrix initialized to the values of the current matrix.

  2. Perform a `rotateSelf()` transformation on result with the arguments rotX, rotY, rotZ.

  3. Return result.

  The current matrix is not modified.

`rotateFromVector(x, y)`

  1. Let result be the resulting matrix initialized to the values of the current matrix.

  2. Perform a `rotateFromVectorSelf()` transformation on result with the arguments x, y.

  3. Return result.

  The current matrix is not modified.

`rotateAxisAngle(x, y, z, angle)`

  1. Let result be the resulting matrix initialized to the values of the current matrix.

  2. Perform a `rotateAxisAngleSelf()` transformation on result with the arguments x, y, z, angle.

  3. Return result.

  The current matrix is not modified.

`skewX(sx)`

  1. Let result be the resulting matrix initialized to the values of the current matrix.

  2. Perform a `skewXSelf()` transformation on result with the argument sx.

  3. Return result.

  The current matrix is not modified.

`skewY(sy)`

  1. Let result be the resulting matrix initialized to the values of the current matrix.

  2. Perform a `skewYSelf()` transformation on result with the argument sy.

  3. Return result.

  The current matrix is not modified.

`multiply(other)`

  1. Let result be the resulting matrix initialized to the values of the current matrix.

  2. Perform a `multiplySelf()` transformation on result with the argument other.

  3. Return result.

  The current matrix is not modified.

`flipX()`

  1. Let result be the resulting matrix initialized to the values of the current matrix.

  2. Post-multiply result with `new DOMMatrix([-1, 0, 0, 1, 0, 0])`.

  3. Return result.

  The current matrix is not modified.

`flipY()`

  1. Let result be the resulting matrix initialized to the values of the current matrix.

  2. Post-multiply result with `new DOMMatrix([1, 0, 0, -1, 0, 0])`.

  3. Return result.

  The current matrix is not modified.

`inverse()`

  1. Let result be the resulting matrix initialized to the values of the current matrix.

  2. Perform a `invertSelf()` transformation on result.

  3. Return result.

  The current matrix is not modified.

The following methods do not modify the current matrix.

`transformPoint(point)`

  Let pointObject be the result of invoking create a `DOMPoint` from the dictionary point. Return the result of invoking transform a point with a matrix, given pointObject and the current matrix. The passed argument does not get modified.

`toFloat32Array()`

  Returns the serialized 16 elements `m11` to `m44` of the current matrix in column-major order as `Float32Array`.

`toFloat64Array()`

  Returns the serialized 16 elements `m11` to `m44` of the current matrix in column-major order as `Float64Array`.

stringification behavior

  1. If one or more of m11 element through m44 element are a non-finite value, then throw an "`InvalidStateError`" `DOMException`.

     Note: The CSS syntax cannot represent NaN or Infinity values.

  2. Let string be the empty string.

  3. If is 2D is `true`, then:

     1. Append "`matrix(`" to string.

     2. Append ! ToString(m11 element) to string.

     3. Append "`,` " to string.

     4. Append ! ToString(m12 element) to string.

     5. Append "`,` " to string.

     6. Append ! ToString(m21 element) to string.

     7. Append "`,` " to string.

     8. Append ! ToString(m22 element) to string.

     9. Append "`,` " to string.

     10. Append ! ToString(m41 element) to string.

     11. Append "`,` " to string.

     12. Append ! ToString(m42 element) to string.

     13. Append "`)`" to string.

     Note: The string will be in the form of a a CSS Transforms <matrix()> function. [CSS3-TRANSFORMS]

  4. Otherwise:

     1. Append "`matrix3d(`" to string.

     2. Append ! ToString(m11 element) to string.

     3. Append "`,` " to string.

     4. Append ! ToString(m12 element) to string.

     5. Append "`,` " to string.

     6. Append ! ToString(m13 element) to string.

     7. Append "`,` " to string.

     8. Append ! ToString(m14 element) to string.

     9. Append "`,` " to string.

     10. Append ! ToString(m21 element) to string.

     11. Append "`,` " to string.

     12. Append ! ToString(m22 element) to string.

     13. Append "`,` " to string.

     14. Append ! ToString(m23 element) to string.

     15. Append "`,` " to string.

     16. Append ! ToString(m24 element) to string.

     17. Append "`,` " to string.

     18. Append ! ToString(m41 element) to string.

     19. Append "`,` " to string.

     20. Append ! ToString(m42 element) to string.

     21. Append "`,` " to string.

     22. Append ! ToString(m43 element) to string.

     23. Append "`,` " to string.

     24. Append ! ToString(m44 element) to string.

     25. Append "`)`" to string.

     Note: The string will be in the form of a a CSS Transforms <matrix3d()> function. [CSS3-TRANSFORMS]

  5. Return string.

In this example, a matrix is created and several 2D transformation methods are called:

    var matrix = new DOMMatrix();
    matrix.scaleSelf(2);
    matrix.translateSelf(20,20);
    console.assert(matrix.toString() ===
                    "matrix(2, 0, 0, 2, 40, 40)");

In the following example, a matrix is created and several 3D transformation methods are called:

    var matrix = new DOMMatrix();
    matrix.scale3dSelf(2);
    console.assert(matrix.toString() ===
                    "matrix3d(2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1)");

For 3D operations, the stringifier returns a string representing a 3D matrix.

This example will throw an exception because there are non-finite values in the matrix.

    var matrix = new DOMMatrix([NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN]);
    var string = matrix + " Batman!";

### 6.6. Mutable transformation methods

The following methods modify the current matrix, so that each method returns the matrix where it was invoked on. The primary benefit of this is allowing content creators to chain method calls.

The following code example:

    var matrix = new DOMMatrix();
    matrix.translateSelf(20, 20);
    matrix.scaleSelf(2);
    matrix.translateSelf(-20, -20);

is equivalent to:

    var matrix = new DOMMatrix();
    matrix.translateSelf(20, 20).scaleSelf(2).translateSelf(-20, -20);

Note: Authors who use chained method calls are advised to use mutable transformation methods to avoid unnecessary memory allocations due to creation of intermediate `DOMMatrix` objects in user agents.

`multiplySelf(other)`

  1. Let otherObject be the result of invoking create a `DOMMatrix` from the dictionary other.

  2. The otherObject matrix gets post-multiplied to the current matrix.

  3. If is 2D of otherObject is `false`, set is 2D of the current matrix to `false`.

  4. Return the current matrix.

`preMultiplySelf(other)`

  1. Let otherObject be the result of invoking create a `DOMMatrix` from the dictionary other.

  2. The otherObject matrix gets pre-multiplied to the current matrix.

  3. If is 2D of otherObject is `false`, set is 2D of the current matrix to `false`.

  4. Return the current matrix.

`translateSelf(tx, ty, tz)`

  1. Post-multiply a translation transformation on the current matrix. The 3D translation matrix is described in CSS Transforms. [CSS3-TRANSFORMS]

  2. If tz is specified and not 0 or -0, set is 2D of the current matrix to `false`.

  3. Return the current matrix.

`scaleSelf(scaleX, scaleY, scaleZ, originX, originY, originZ)`

  1. Perform a `translateSelf()` transformation on the current matrix with the arguments originX, originY, originZ.

  2. If scaleY is missing, set scaleY to the value of scaleX.

  3. Post-multiply a non-uniform scale transformation on the current matrix. The 3D scale matrix is described in CSS Transforms with sx = scaleX, sy = scaleY and sz = scaleZ. [CSS3-TRANSFORMS]

  4. Negate originX, originY and originZ.

  5. Perform a `translateSelf()` transformation on the current matrix with the arguments originX, originY, originZ.

  6. If scaleZ is not 1, set is 2D of the current matrix to `false`.

  7. Return the current matrix.

`scale3dSelf(scale, originX, originY, originZ)`

  1. Apply a `translateSelf()` transformation to the current matrix with the arguments originX, originY, originZ.

  2. Post-multiply a uniform 3D scale transformation (`m11` = `m22` = `m33` = scale) on the current matrix. The 3D scale matrix is described in CSS Transforms with sx = sy = sz = scale. [CSS3-TRANSFORMS]

  3. Apply a `translateSelf()` transformation to the current matrix with the arguments -originX, -originY, -originZ.

  4. If scale is not 1, set is 2D of the current matrix to `false`.

  5. Return the current matrix.

`rotateSelf(rotX, rotY, rotZ)`

  1. If rotY and rotZ are both missing, set rotZ to the value of rotX and set rotX and rotY to 0.

  2. If rotY is still missing, set rotY to 0.

  3. If rotZ is still missing, set rotZ to 0.

  4. If rotX or rotY are not 0 or -0, set is 2D of the current matrix to `false`.

  5. Post-multiply a rotation transformation on the current matrix around the vector 0, 0, 1 by the specified rotation rotZ in degrees. The 3D rotation matrix is described in CSS Transforms with alpha = rotZ in degrees. [CSS3-TRANSFORMS]

  6. Post-multiply a rotation transformation on the current matrix around the vector 0, 1, 0 by the specified rotation rotY in degrees. The 3D rotation matrix is described in CSS Transforms with alpha = rotY in degrees. [CSS3-TRANSFORMS]

  7. Post-multiply a rotation transformation on the current matrix around the vector 1, 0, 0 by the specified rotation rotX in degrees. The 3D rotation matrix is described in CSS Transforms with alpha = rotX in degrees. [CSS3-TRANSFORMS]

  8. Return the current matrix.

`rotateFromVectorSelf(x, y)`

  1. Post-multiply a rotation transformation on the current matrix. The rotation angle is determined by the angle between the vector (1,0)T and (x,y)T in the clockwise direction. If x and y should both be 0 or -0, the angle is specified as 0. The 2D rotation matrix is described in CSS Transforms where `alpha` is the angle between the vector (1,0)T and (x,y)T in degrees. [CSS3-TRANSFORMS]

  2. Return the current matrix.

`rotateAxisAngleSelf(x, y, z, angle)`

  1. Post-multiply a rotation transformation on the current matrix around the specified vector x, y, z by the specified rotation angle in degrees. The 3D rotation matrix is described in CSS Transforms with alpha = angle in degrees. [CSS3-TRANSFORMS]

  2. If x or y are not 0 or -0, set is 2D of the current matrix to `false`.

  3. Return the current matrix.

`skewXSelf(sx)`

  1. Post-multiply a skewX transformation on the current matrix by the specified angle sx in degrees. The 2D skewX matrix is described in CSS Transforms with alpha = sx in degrees. [CSS3-TRANSFORMS]

  2. Return the current matrix.

`skewYSelf(sy)`

  1. Post-multiply a skewX transformation on the current matrix by the specified angle sy in degrees. The 2D skewY matrix is described in CSS Transforms with beta = sy in degrees. [CSS3-TRANSFORMS]

  2. Return the current matrix.

`invertSelf()`

  1. Invert the current matrix.

  2. If the current matrix is not invertible set all attributes to NaN and set is 2D to `false`.

  3. Return the current matrix.

`setMatrixValue(transformList)`

  1. Parse transformList into an abstract matrix, and let matrix and 2dTransform be the result. If the result is failure, then throw a "`SyntaxError`" `DOMException`.

  2. Set is 2D to the value of 2dTransform.

  3. Set m11 element through m44 element to the element values of matrix in column-major order.

  4. Return the current matrix.

## 7. Structured serialization

`DOMPointReadOnly`, `DOMPoint`, `DOMRectReadOnly`, `DOMRect`, `DOMQuad`, `DOMMatrixReadOnly`, and `DOMMatrix` objects are serializable objects. [HTML]

The serialization steps for `DOMPointReadOnly` and `DOMPoint`, given value and serialized, are:

1. Set serialized.[[X]] to value’s x coordinate.

2. Set serialized.[[Y]] to value’s y coordinate.

3. Set serialized.[[Z]] to value’s z coordinate.

4. Set serialized.[[W]] to value’s w perspective.

Their deserialization steps, given serialized and value, are:

1. Set value’s x coordinate to serialized.[[X]].

2. Set value’s y coordinate to serialized.[[Y]].

3. Set value’s z coordinate to serialized.[[Z]].

4. Set value’s w perspective to serialized.[[W]].

The serialization steps for `DOMRectReadOnly` and `DOMRect`, given value and serialized, are:

1. Set serialized.[[X]] to value’s x coordinate.

2. Set serialized.[[Y]] to value’s y coordinate.

3. Set serialized.[[Width]] to value’s width dimension.

4. Set serialized.[[Height]] to value’s height dimension.

Their deserialization steps, given serialized and value, are:

1. Set value’s x coordinate to serialized.[[X]].

2. Set value’s y coordinate to serialized.[[Y]].

3. Set value’s width dimension to serialized.[[Width]].

4. Set value’s height dimension to serialized.[[Height]].

The serialization steps for `DOMQuad`, given value and serialized, are:

1. Set serialized.[[P1]] to the sub-serialization of value’s point 1.

2. Set serialized.[[P2]] to the sub-serialization of value’s point 2.

3. Set serialized.[[P3]] to the sub-serialization of value’s point 3.

4. Set serialized.[[P4]] to the sub-serialization of value’s point 4.

Their deserialization steps, given serialized and value, are:

1. Set value’s point 1 to the sub-deserialization of serialized.[[P1]].

2. Set value’s point 2 to the sub-deserialization of serialized.[[P2]].

3. Set value’s point 3 to the sub-deserialization of serialized.[[P3]].

4. Set value’s point 4 to the sub-deserialization of serialized.[[P4]].

The serialization steps for `DOMMatrixReadOnly` and `DOMMatrix`, given value and serialized, are:

1. If value’s is 2D is `true`:

   1. Set serialized.[[M11]] to value’s m11 element.

   2. Set serialized.[[M12]] to value’s m12 element.

   3. Set serialized.[[M21]] to value’s m21 element.

   4. Set serialized.[[M22]] to value’s m22 element.

   5. Set serialized.[[M41]] to value’s m41 element.

   6. Set serialized.[[M42]] to value’s m42 element.

   7. Set serialized.[[Is2D]] to `true`.

   Note: It is possible for a 2D `DOMMatrix` or `DOMMatrixReadOnly` to have -0 for some of the other elements, e.g., the m13 element, which will not be roundtripped by this algorithm.

2. Otherwise:

   1. Set serialized.[[M11]] to value’s m11 element.

   2. Set serialized.[[M12]] to value’s m12 element.

   3. Set serialized.[[M13]] to value’s m13 element.

   4. Set serialized.[[M14]] to value’s m14 element.

   5. Set serialized.[[M21]] to value’s m21 element.

   6. Set serialized.[[M22]] to value’s m22 element.

   7. Set serialized.[[M23]] to value’s m23 element.

   8. Set serialized.[[M24]] to value’s m24 element.

   9. Set serialized.[[M31]] to value’s m31 element.

   10. Set serialized.[[M32]] to value’s m32 element.

   11. Set serialized.[[M33]] to value’s m33 element.

   12. Set serialized.[[M34]] to value’s m34 element.

   13. Set serialized.[[M41]] to value’s m41 element.

   14. Set serialized.[[M42]] to value’s m42 element.

   15. Set serialized.[[M43]] to value’s m43 element.

   16. Set serialized.[[M44]] to value’s m44 element.

   17. Set serialized.[[Is2D]] to `false`.

   Their deserialization steps, given serialized and value, are:

   1. If serialized.[[Is2D]] is `true`:

      1. Set value’s m11 element to serialized.[[M11]].

      2. Set value’s m12 element to serialized.[[M12]].

      3. Set value’s m13 element to 0.

      4. Set value’s m14 element to 0.

      5. Set value’s m21 element to serialized.[[M21]].

      6. Set value’s m22 element to serialized.[[M22]].

      7. Set value’s m23 element to 0.

      8. Set value’s m24 element to 0.

      9. Set value’s m31 element to 0.

      10. Set value’s m32 element to 0.

      11. Set value’s m33 element to 1.

      12. Set value’s m34 element to 0.

      13. Set value’s m41 element to serialized.[[M41]].

      14. Set value’s m42 element to serialized.[[M42]].

      15. Set value’s m43 element to 0.

      16. Set value’s m44 element to 1.

      17. Set value’s is 2D to `true`.

   2. Otherwise:

      1. Set value’s m11 element to serialized.[[M11]].

      2. Set value’s m12 element to serialized.[[M12]].

      3. Set value’s m13 element to serialized.[[M13]].

      4. Set value’s m14 element to serialized.[[M14]].

      5. Set value’s m21 element to serialized.[[M21]].

      6. Set value’s m22 element to serialized.[[M22]].

      7. Set value’s m23 element to serialized.[[M23]].

      8. Set value’s m24 element to serialized.[[M24]].

      9. Set value’s m31 element to serialized.[[M31]].

      10. Set value’s m32 element to serialized.[[M32]].

      11. Set value’s m33 element to serialized.[[M33]].

      12. Set value’s m34 element to serialized.[[M34]].

      13. Set value’s m41 element to serialized.[[M41]].

      14. Set value’s m42 element to serialized.[[M42]].

      15. Set value’s m43 element to serialized.[[M43]].

      16. Set value’s m44 element to serialized.[[M44]].

      17. Set value’s is 2D to `false`.

## 8. Privacy and Security Considerations

The `DOMMatrix` and `DOMMatrixReadOnly` interfaces have entry-points to parsing a string with CSS syntax. Therefore the privacy and security considerations of the CSS Syntax specification applies. [CSS3-SYNTAX]

This could potentially be used to exploit bugs in the CSS parser in a user agent.

There are no other known security or privacy impacts of the interfaces defined in this specification. However, other specifications that have APIs that use the interfaces defined in this specification could potentially introduce security or privacy issues.

For example, the `getBoundingClientRect()` API defined in CSSOM View returns a `DOMRect` that could be used to measure the size of an inline element containing some text of a particular font, which exposes information about whether the user has that font installed. That information, if used to test many common fonts, can then be personally-identifiable information. [CSSOM-VIEW]

## 9. Historical

This section is non-normative.

The interfaces in this specification are intended to replace earlier similar interfaces found in various specifications as well as proprietary interfaces found in some user agents. This section attempts to enumerate these interfaces.

### 9.1. CSSOM View

Earlier revisions of CSSOM View defined a `ClientRect` interface, which is replaced by `DOMRect`. Implementations conforming to this specification will not support `ClientRect`. [CSSOM-VIEW]

### 9.2. SVG

Earlier revisions of SVG defined `SVGPoint`, `SVGRect`, `SVGMatrix`, which are defined in this specifications as aliases to `DOMPoint`, `DOMRect`, `DOMMatrix`, respectively. [SVG11]

### 9.3. Non-standard

Some user agents supported a `WebKitPoint` interface. Implementations conforming to this specification will not support `WebKitPoint`.

Several user agents supported a `WebKitCSSMatrix` interface, which is also widely used on the Web. It is defined in this specification as an alias to `DOMMatrix`.

Some user agents supported a `MSCSSMatrix` interface. Implementations conforming to this specification will not support `MSCSSMatrix`.

## Changes since last publication

This section is non-normative.

The following changes were made since the 25 November 2014 Candidate Recommendation.

- Changed the interfaces to generally use specific static operations for construction instead of using overloaded constructors, and made the interfaces more consistent. However, `DOMMatrix` still uses an overloaded constructor for compatibility with `WebKitCSSMatrix`.

- Introduced the `DOMMatrixInit` dictionary.

- Added JSON serializers for the interfaces.

- Changed `DOMMatrixReadOnly` and `DOMMatrix` to be compatible with `WebKitCSSMatrix`:

  - Changed `rotate()` and `rotateSelf()` arguments from `(angle, originX, originY)` to `(rotX, rotY, rotZ)`.

  - Changed the `scale()` and `scaleSelf()` methods to be more like the previous `scaleNonUniform()`/`scaleNonUniformSelf()` methods, and dropped the `scaleNonUniformSelf()` method. Keep support for `scaleNonUniform()` for legacy reasons.

  - Made all arguments optional for `DOMMatrix`/`DOMMatrixReadOnly` methods, except for `setMatrixValue()`.

  - Added no-argument constructor.

  - Defined `WebKitCSSMatrix` to be a legacy window alias for `DOMMatrix`.

- In workers, `DOMMatrix` and `DOMMatrixReadOnly` do not support parsing or stringifying with CSS syntax.

- Defined structured serialization of the interfaces.

- The live `bounds` attribute on `DOMQuad` was replaced with a non-live `getBounds()` method. The "associated bounding rectangle" concept was also removed.

- Changed the string parser for `DOMMatrix` and `DOMMatrixReadOnly` to use CSS rules instead of SVG rules.

- The stringifier for `DOMMatrix` and `DOMMatrixReadOnly` now throws if there are non-finite values, and otherwise uses the ToString algorithm. [ECMA-262]

- Made comparisons treat 0 and -0 as equal throughout.

- Added § 8 Privacy and Security Considerations and § 9 Historical sections.

The following changes were made since the 18 September 2014 Working Draft.

- Exposed `DOMPointReadOnly`, `DOMPoint`, `DOMRectReadOnly`, `DOMRect`, `DOMQuad`, `DOMMatrixReadOnly` and `DOMMatrix` to `Window` and `Worker`. Defined cloning of the interface.

The following changes were made since the 26 June 2014 Last Call Public Working Draft.

- `DOMPointReadOnly` got a constructor taking 4 arguments.

- `DOMRectReadOnly` got a constructor taking 4 arguments.

- `DOMMatrixReadOnly` got a constructor taking a sequence of numbers as argument.

- `DOMRectList` turned to an ArrayClass. The interfaces can just be used for legacy interfaces.

- Put `DOMRectList` on at-Risk awaiting browser feedback.

- All interfaces are described in the sense of internal elements to describe the read-only/writable and inheriting behavior.

- Replace `IndexSizeError` exception with `TypeError`.

The following changes were made since the 22 May 2014 First Public Working Draft.

- Renamed mutable transformation methods *By to *Self. (E.g. `translateBy()` got renamed to `translateSelf()`.)

- Renamed `invert()` to `invertSelf()`.

- Added `setMatrixValue()` which takes a transformation list as `DOMString`.

- `is2D` and `isIdentity` are read-only attributes now.

- `DOMMatrixReadOnly` gets flagged to track 3D transformation and attribute settings for `is2D`.

- `invertSelf()` and `inverse()` do not throw exceptions anymore.

## Acknowledgments

The editors would like to thank Robert O’Callahan for contributing to this specification. Many thanks to Dean Jackson for his initial proposal of DOMMatrix. Thanks to Adenilson Cavalcanti, Benoit Jacob, Boris Zbarsky, Brian Birtles, Cameron McCormack, Domenic Denicola, Kari Pihkala, Max Vujovic, Mike Taylor, Peter Hall, Philip Jägenstedt, Simon Fraser, and Timothy Loh for their careful reviews, comments, and corrections.

## Conformance

### Document conventions

Conformance requirements are expressed with a combination of descriptive assertions and RFC 2119 terminology. The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in the normative parts of this document are to be interpreted as described in RFC 2119. However, for readability, these words do not appear in all uppercase letters in this specification.

All of the text of this specification is normative except sections explicitly marked as non-normative, examples, and notes. [RFC2119]

Examples in this specification are introduced with the words “for example” or are set apart from the normative text with `class="example"`, like this:

This is an example of an informative example.

Informative notes begin with the word “Note” and are set apart from the normative text with `class="note"`, like this:

Note, this is an informative note.

Advisements are normative sections styled to evoke special attention and are set apart from other normative text with `<strong class="advisement">`, like this: UAs MUST provide an accessible alternative.

### Conformance classes

Conformance to this specification is defined for three conformance classes:

style sheet
  A CSS style sheet.
renderer
  A UA that interprets the semantics of a style sheet and renders documents that use them.
authoring tool
  A UA that writes a style sheet.

A style sheet is conformant to this specification if all of its statements that use syntax defined in this module are valid according to the generic CSS grammar and the individual grammars of each feature defined in this module.

A renderer is conformant to this specification if, in addition to interpreting the style sheet as defined by the appropriate specifications, it supports all the features defined by this specification by parsing them correctly and rendering the document accordingly. However, the inability of a UA to correctly render a document due to limitations of the device does not make the UA non-conformant. (For example, a UA is not required to render color on a monochrome monitor.)

An authoring tool is conformant to this specification if it writes style sheets that are syntactically correct according to the generic CSS grammar and the individual grammars of each feature in this module, and meet all other conformance requirements of style sheets as described in this module.

### Requirements for Responsible Implementation of CSS

The following sections define several conformance requirements for implementing CSS responsibly, in a way that promotes interoperability in the present and future.

#### Partial Implementations

So that authors can exploit the forward-compatible parsing rules to assign fallback values, CSS renderers must treat as invalid (and ignore as appropriate) any at-rules, properties, property values, keywords, and other syntactic constructs for which they have no usable level of support. In particular, user agents must not selectively ignore unsupported property values and honor supported values in a single multi-value property declaration: if any value is considered invalid (as unsupported values must be), CSS requires that the entire declaration be ignored.

#### Implementations of Unstable and Proprietary Features

To avoid clashes with future stable CSS features, the CSSWG recommends following best practices for the implementation of unstable features and proprietary extensions to CSS.

#### Implementations of CR-level Features

Once a specification reaches the Candidate Recommendation stage, implementers should release an unprefixed implementation of any CR-level feature they can demonstrate to be correctly implemented according to spec, and should avoid exposing a prefixed variant of that feature.

To establish and maintain the interoperability of CSS across implementations, the CSS Working Group requests that non-experimental CSS renderers submit an implementation report (and, if necessary, the testcases used for that implementation report) to the W3C before releasing an unprefixed implementation of any CSS features. Testcases submitted to W3C are subject to review and correction by the CSS Working Group.

Further information on submitting testcases and implementation reports can be found from on the CSS Working Group’s website at http://www.w3.org/Style/CSS/Test/. Questions should be directed to the public-css-testsuite@w3.org mailing list.

Support: Android Browser67+Baidu Browser (limited)7.12+Blackberry Browser (limited)10+Chrome (limited)8+Chrome for Android74+Edge (limited)12+Firefox (limited)33+Firefox for Android66+IE (limited)10+IE Mobile (limited)10+KaiOS Browser (limited)2.5+Opera (limited)15+Opera MiniNoneOpera Mobile (limited)46+QQ Browser (limited)1.2+Safari (limited)5+Samsung Internet (limited)4+UC Browser for Android (limited)11.8+iOS Safari (limited)5.0+

Source: caniuse.com as of 2019-06-04

## Index

### Terms defined by this specification

- 4x4 abstract matrix, in §6
- a
  - attribute for DOMMatrixReadOnly, DOMMatrix, in §6.4
  - dict-member for DOMMatrix2DInit, in §6
- b
  - attribute for DOMMatrixReadOnly, DOMMatrix, in §6.4
  - dict-member for DOMMatrix2DInit, in §6
- bottom
  - attribute for DOMRectReadOnly, in §3
  - attribute for DOMRectReadOnly DOMRect, in §3
- c
  - attribute for DOMMatrixReadOnly, DOMMatrix, in §6.4
  - dict-member for DOMMatrix2DInit, in §6
- constructor()
  - constructor for DOMMatrix, in §6.3
  - constructor for DOMMatrixReadOnly, in §6.3
  - constructor for DOMPoint, in §2
  - constructor for DOMPointReadOnly, in §2
  - constructor for DOMQuad, in §5
  - constructor for DOMRect, in §3
  - constructor for DOMRectReadOnly, in §3
- constructor(init)
  - constructor for DOMMatrix, in §6.3
  - constructor for DOMMatrixReadOnly, in §6.3
- constructor(p1), in §5
- constructor(p1, p2), in §5
- constructor(p1, p2, p3), in §5
- constructor(p1, p2, p3, p4), in §5
- constructor(x)
  - constructor for DOMPoint, in §2
  - constructor for DOMPointReadOnly, in §2
  - constructor for DOMRect, in §3
  - constructor for DOMRectReadOnly, in §3
- constructor(x, y)
  - constructor for DOMPoint, in §2
  - constructor for DOMPointReadOnly, in §2
  - constructor for DOMRect, in §3
  - constructor for DOMRectReadOnly, in §3
- constructor(x, y, width)
  - constructor for DOMRect, in §3
  - constructor for DOMRectReadOnly, in §3
- constructor(x, y, width, height)
  - constructor for DOMRect, in §3
  - constructor for DOMRectReadOnly, in §3
- constructor(x, y, z)
  - constructor for DOMPoint, in §2
  - constructor for DOMPointReadOnly, in §2
- constructor(x, y, z, w)
  - constructor for DOMPoint, in §2
  - constructor for DOMPointReadOnly, in §2
- create a 2d matrix, in §6.3
- create a 3d matrix, in §6.3
- create a DOMMatrix from the 2D dictionary, in §6.3
- create a DOMMatrix from the dictionary, in §6.3
- create a DOMMatrixReadOnly from the 2D dictionary, in §6.3
- create a DOMMatrixReadOnly from the dictionary, in §6.3
- create a DOMPoint from the dictionary, in §2
- create a DOMPointReadOnly from the dictionary, in §2
- create a DOMQuad from the DOMQuadInit dictionary, in §5
- create a DOMQuad from the DOMRectInit dictionary, in §5
- create a DOMRect from the dictionary, in §3
- create a DOMRectReadOnly from the dictionary, in §3
- d
  - attribute for DOMMatrixReadOnly, DOMMatrix, in §6.4
  - dict-member for DOMMatrix2DInit, in §6
- DOMMatrix, in §6
- DOMMatrix(), in §6.3
- DOMMatrix2DInit, in §6
- DOMMatrix(init), in §6.3
- DOMMatrixInit, in §6
- DOMMatrixReadOnly, in §6
- DOMMatrixReadOnly(), in §6.3
- DOMMatrixReadOnly(init), in §6.3
- DOMPoint, in §2
- DOMPoint(), in §2
- DOMPointInit, in §2
- DOMPointReadOnly, in §2
- DOMPointReadOnly(), in §2
- DOMPointReadOnly(x), in §2
- DOMPointReadOnly(x, y), in §2
- DOMPointReadOnly(x, y, z), in §2
- DOMPointReadOnly(x, y, z, w), in §2
- DOMPoint(x), in §2
- DOMPoint(x, y), in §2
- DOMPoint(x, y, z), in §2
- DOMPoint(x, y, z, w), in §2
- DOMQuad, in §5
- DOMQuad(), in §5
- DOMQuadInit, in §5
- DOMQuad(p1), in §5
- DOMQuad(p1, p2), in §5
- DOMQuad(p1, p2, p3), in §5
- DOMQuad(p1, p2, p3, p4), in §5
- DOMRect, in §3
- DOMRect(), in §3
- DOMRectInit, in §3
- DOMRectList, in §4
- DOMRectReadOnly, in §3
- DOMRectReadOnly(), in §3
- DOMRectReadOnly(x), in §3
- DOMRectReadOnly(x, y), in §3
- DOMRectReadOnly(x, y, width), in §3
- DOMRectReadOnly(x, y, width, height), in §3
- DOMRect(x), in §3
- DOMRect(x, y), in §3
- DOMRect(x, y, width), in §3
- DOMRect(x, y, width, height), in §3
- e
  - attribute for DOMMatrixReadOnly, DOMMatrix, in §6.4
  - dict-member for DOMMatrix2DInit, in §6
- f
  - attribute for DOMMatrixReadOnly, DOMMatrix, in §6.4
  - dict-member for DOMMatrix2DInit, in §6
- flipX(), in §6.5
- flipY(), in §6.5
- fromFloat32Array(array32)
  - method for DOMMatrix, in §6.3
  - method for DOMMatrixReadOnly, in §6.3
- fromFloat64Array(array64)
  - method for DOMMatrix, in §6.3
  - method for DOMMatrixReadOnly, in §6.3
- fromMatrix()
  - method for DOMMatrix, in §6.3
  - method for DOMMatrixReadOnly, in §6.3
- fromMatrix(other)
  - method for DOMMatrix, in §6.3
  - method for DOMMatrixReadOnly, in §6.3
- fromPoint()
  - method for DOMPoint, in §2
  - method for DOMPointReadOnly, in §2
- fromPoint(other)
  - method for DOMPoint, in §2
  - method for DOMPointReadOnly, in §2
- fromQuad(), in §5
- fromQuad(other), in §5
- fromRect()
  - method for DOMQuad, in §5
  - method for DOMRect, in §3
  - method for DOMRectReadOnly, in §3
- fromRect(other)
  - method for DOMQuad, in §5
  - method for DOMRect, in §3
  - method for DOMRectReadOnly, in §3
- getBounds(), in §5
- height
  - attribute for DOMRect, in §3
  - attribute for DOMRectReadOnly, in §3
  - attribute for DOMRectReadOnly DOMRect, in §3
  - dict-member for DOMRectInit, in §3
- height dimension, in §3
- inverse(), in §6.5
- invertSelf(), in §6.6
- is 2D, in §6.4
- is2D
  - attribute for DOMMatrixReadOnly, in §6.4
  - dict-member for DOMMatrixInit, in §6
- isIdentity, in §6.4
- item(index), in §4
- left
  - attribute for DOMRectReadOnly, in §3
  - attribute for DOMRectReadOnly DOMRect, in §3
- length, in §4
- m11
  - attribute for DOMMatrixReadOnly, DOMMatrix, in §6.4
  - dict-member for DOMMatrix2DInit, in §6
- m11 element, in §6
- m12
  - attribute for DOMMatrixReadOnly, DOMMatrix, in §6.4
  - dict-member for DOMMatrix2DInit, in §6
- m12 element, in §6
- m13
  - attribute for DOMMatrixReadOnly, DOMMatrix, in §6.4
  - dict-member for DOMMatrixInit, in §6
- m13 element, in §6
- m14
  - attribute for DOMMatrixReadOnly, DOMMatrix, in §6.4
  - dict-member for DOMMatrixInit, in §6
- m14 element, in §6
- m21
  - attribute for DOMMatrixReadOnly, DOMMatrix, in §6.4
  - dict-member for DOMMatrix2DInit, in §6
- m21 element, in §6
- m22
  - attribute for DOMMatrixReadOnly, DOMMatrix, in §6.4
  - dict-member for DOMMatrix2DInit, in §6
- m22 element, in §6
- m23
  - attribute for DOMMatrixReadOnly, DOMMatrix, in §6.4
  - dict-member for DOMMatrixInit, in §6
- m23 element, in §6
- m24
  - attribute for DOMMatrixReadOnly, DOMMatrix, in §6.4
  - dict-member for DOMMatrixInit, in §6
- m24 element, in §6
- m31
  - attribute for DOMMatrixReadOnly, DOMMatrix, in §6.4
  - dict-member for DOMMatrixInit, in §6
- m31 element, in §6
- m32
  - attribute for DOMMatrixReadOnly, DOMMatrix, in §6.4
  - dict-member for DOMMatrixInit, in §6
- m32 element, in §6
- m33
  - attribute for DOMMatrixReadOnly, DOMMatrix, in §6.4
  - dict-member for DOMMatrixInit, in §6
- m33 element, in §6
- m34
  - attribute for DOMMatrixReadOnly, DOMMatrix, in §6.4
  - dict-member for DOMMatrixInit, in §6
- m34 element, in §6
- m41
  - attribute for DOMMatrixReadOnly, DOMMatrix, in §6.4
  - dict-member for DOMMatrix2DInit, in §6
- m41 element, in §6
- m42
  - attribute for DOMMatrixReadOnly, DOMMatrix, in §6.4
  - dict-member for DOMMatrix2DInit, in §6
- m42 element, in §6
- m43
  - attribute for DOMMatrixReadOnly, DOMMatrix, in §6.4
  - dict-member for DOMMatrixInit, in §6
- m43 element, in §6
- m44
  - attribute for DOMMatrixReadOnly, DOMMatrix, in §6.4
  - dict-member for DOMMatrixInit, in §6
- m44 element, in §6
- matrix, in §6
- matrixTransform(), in §2
- matrixTransform(matrix), in §2
- multiply, in §6
- multiply(), in §6.5
- multiply(other), in §6.5
- multiplySelf(), in §6.6
- multiplySelf(other), in §6.6
- origin, in §3
- p1
  - attribute for DOMQuad, in §5
  - dict-member for DOMQuadInit, in §5
- p2
  - attribute for DOMQuad, in §5
  - dict-member for DOMQuadInit, in §5
- p3
  - attribute for DOMQuad, in §5
  - dict-member for DOMQuadInit, in §5
- p4
  - attribute for DOMQuad, in §5
  - dict-member for DOMQuadInit, in §5
- parse a string into an abstract matrix, in §6.2
- point, in §2
- point 1, in §5
- point 2, in §5
- point 3, in §5
- point 4, in §5
- post-multiply, in §6
- pre-multiply, in §6
- preMultiplySelf(), in §6.6
- preMultiplySelf(other), in §6.6
- quadrilateral, in §5
- rectangle, in §3
- right
  - attribute for DOMRectReadOnly, in §3
  - attribute for DOMRectReadOnly DOMRect, in §3
- rotate(), in §6.5
- rotateAxisAngle(), in §6.5
- rotateAxisAngleSelf(), in §6.6
- rotateAxisAngleSelf(x), in §6.6
- rotateAxisAngleSelf(x, y), in §6.6
- rotateAxisAngleSelf(x, y, z), in §6.6
- rotateAxisAngleSelf(x, y, z, angle), in §6.6
- rotateAxisAngle(x), in §6.5
- rotateAxisAngle(x, y), in §6.5
- rotateAxisAngle(x, y, z), in §6.5
- rotateAxisAngle(x, y, z, angle), in §6.5
- rotateFromVector(), in §6.5
- rotateFromVectorSelf(), in §6.6
- rotateFromVectorSelf(x), in §6.6
- rotateFromVectorSelf(x, y), in §6.6
- rotateFromVector(x), in §6.5
- rotateFromVector(x, y), in §6.5
- rotate(rotX), in §6.5
- rotate(rotX, rotY), in §6.5
- rotate(rotX, rotY, rotZ), in §6.5
- rotateSelf(), in §6.6
- rotateSelf(rotX), in §6.6
- rotateSelf(rotX, rotY), in §6.6
- rotateSelf(rotX, rotY, rotZ), in §6.6
- scale(), in §6.5
- scale3d(), in §6.5
- scale3d(scale), in §6.5
- scale3d(scale, originX), in §6.5
- scale3d(scale, originX, originY), in §6.5
- scale3d(scale, originX, originY, originZ), in §6.5
- scale3dSelf(), in §6.6
- scale3dSelf(scale), in §6.6
- scale3dSelf(scale, originX), in §6.6
- scale3dSelf(scale, originX, originY), in §6.6
- scale3dSelf(scale, originX, originY, originZ), in §6.6
- scaleNonUniform(), in §6.5
- scaleNonUniform(scaleX), in §6.5
- scaleNonUniform(scaleX, scaleY), in §6.5
- scale(scaleX), in §6.5
- scale(scaleX, scaleY), in §6.5
- scale(scaleX, scaleY, scaleZ), in §6.5
- scale(scaleX, scaleY, scaleZ, originX), in §6.5
- scale(scaleX, scaleY, scaleZ, originX, originY), in §6.5
- scale(scaleX, scaleY, scaleZ, originX, originY, originZ), in §6.5
- scaleSelf(), in §6.6
- scaleSelf(scaleX), in §6.6
- scaleSelf(scaleX, scaleY), in §6.6
- scaleSelf(scaleX, scaleY, scaleZ), in §6.6
- scaleSelf(scaleX, scaleY, scaleZ, originX), in §6.6
- scaleSelf(scaleX, scaleY, scaleZ, originX, originY), in §6.6
- scaleSelf(scaleX, scaleY, scaleZ, originX, originY, originZ), in §6.6
- setMatrixValue(transformList), in §6.6
- skewX(), in §6.5
- skewXSelf(), in §6.6
- skewXSelf(sx), in §6.6
- skewX(sx), in §6.5
- skewY(), in §6.5
- skewYSelf(), in §6.6
- skewYSelf(sy), in §6.6
- skewY(sy), in §6.5
- stringificationbehavior, in §6.5
- SVGMatrix, in §6
- SVGPoint, in §2
- SVGRect, in §3
- toFloat32Array(), in §6.5
- toFloat64Array(), in §6.5
- toJSON()
  - method for DOMMatrixReadOnly, in §6
  - method for DOMPointReadOnly, in §2
  - method for DOMQuad, in §5
  - method for DOMRectReadOnly, in §3
- top
  - attribute for DOMRectReadOnly, in §3
  - attribute for DOMRectReadOnly DOMRect, in §3
- transform a point with a matrix, in §2.1
- transformPoint(), in §6.5
- transformPoint(point), in §6.5
- translate(), in §6.5
- translateSelf(), in §6.6
- translateSelf(tx), in §6.6
- translateSelf(tx, ty), in §6.6
- translateSelf(tx, ty, tz), in §6.6
- translate(tx), in §6.5
- translate(tx, ty), in §6.5
- translate(tx, ty, tz), in §6.5
- validate and fixup, in §6.1
- validate and fixup (2D), in §6.1
- w
  - attribute for DOMPointReadOnly, DOMPoint, in §2
  - dict-member for DOMPointInit, in §2
- WebKitCSSMatrix, in §6
- width
  - attribute for DOMRect, in §3
  - attribute for DOMRectReadOnly, in §3
  - attribute for DOMRectReadOnly DOMRect, in §3
  - dict-member for DOMRectInit, in §3
- width dimension, in §3
- w perspective, in §2
- x
  - attribute for DOMPointReadOnly, DOMPoint, in §2
  - attribute for DOMRect, in §3
  - attribute for DOMRectReadOnly, in §3
  - attribute for DOMRectReadOnly DOMRect, in §3
  - dict-member for DOMPointInit, in §2
  - dict-member for DOMRectInit, in §3
- x coordinate
  - dfn for point, in §2
  - dfn for rectangle, in §3
- y
  - attribute for DOMPointReadOnly, DOMPoint, in §2
  - attribute for DOMRect, in §3
  - attribute for DOMRectReadOnly, in §3
  - attribute for DOMRectReadOnly DOMRect, in §3
  - dict-member for DOMPointInit, in §2
  - dict-member for DOMRectInit, in §3
- y coordinate
  - dfn for point, in §2
  - dfn for rectangle, in §3
- z
  - attribute for DOMPointReadOnly, DOMPoint, in §2
  - dict-member for DOMPointInit, in §2
- z coordinate, in §2

https://drafts.csswg.org/css-transforms-2/#typedef-transform-function Referenced in:

- 6.2. Parsing a string into an abstract matrix (2)

https://drafts.csswg.org/css-transforms-2/#funcdef-matrix3d Referenced in:

- 6.5. Immutable transformation methods

https://drafts.csswg.org/css-values-3/#length-value Referenced in:

- 6.2. Parsing a string into an abstract matrix

https://drafts.csswg.org/css-values-4/#absolute-length Referenced in:

- 6.2. Parsing a string into an abstract matrix

https://drafts.csswg.org/css-syntax-3/#css-parse-something-according-to-a-css-grammar Referenced in:

- 6.2. Parsing a string into an abstract matrix

https://drafts.csswg.org/css-transforms-1/#typedef-transform-list Referenced in:

- 6.2. Parsing a string into an abstract matrix (2)

https://drafts.csswg.org/css-transforms-1/#funcdef-transform-matrix Referenced in:

- 6.5. Immutable transformation methods

https://drafts.csswg.org/css-transforms-1/#propdef-transform Referenced in:

- 6.2. Parsing a string into an abstract matrix

https://drafts.csswg.org/cssom-view-1/#dom-element-getboundingclientrect Referenced in:

- 8. Privacy and Security Considerations

https://tc39.github.io/ecma262/#sec-algorithm-conventions Referenced in:

- 6.5. Immutable transformation methods (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (14) (15) (16) (17) (18)

https://tc39.github.io/ecma262/#sec-samevaluezero Referenced in:

- 6.1. DOMMatrix2DInit and DOMMatrixInit dictionaries (2) (3) (4) (5) (6) (7)

https://tc39.github.io/ecma262/#sec-tostring Referenced in:

- 6.5. Immutable transformation methods (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (14) (15) (16) (17) (18)
- Changes since last publication

https://html.spec.whatwg.org/multipage/structured-data.html#serializable Referenced in:

- 2. The DOMPoint interfaces (2)
- 3. The DOMRect interfaces (2)
- 5. The DOMQuad interface
- 6. The DOMMatrix interfaces (2)

https://html.spec.whatwg.org/multipage/window-object.html#window Referenced in:

- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects
- Changes since last publication

https://html.spec.whatwg.org/multipage/workers.html#worker Referenced in:

- Changes since last publication

https://html.spec.whatwg.org/multipage/webappapis.html#current-global-object Referenced in:

- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects

https://html.spec.whatwg.org/multipage/structured-data.html#deserialization-steps Referenced in:

- 7. Structured serialization (2) (3) (4)

https://html.spec.whatwg.org/multipage/structured-data.html#serializable-objects Referenced in:

- 7. Structured serialization

https://html.spec.whatwg.org/multipage/structured-data.html#serialization-steps Referenced in:

- 7. Structured serialization (2) (3) (4)

https://html.spec.whatwg.org/multipage/structured-data.html#sub-deserialization Referenced in:

- 7. Structured serialization (2) (3) (4)

https://html.spec.whatwg.org/multipage/structured-data.html#sub-serialization Referenced in:

- 7. Structured serialization (2) (3) (4)

https://heycam.github.io/webidl/#idl-DOMException Referenced in:

- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects
- 6.5. Immutable transformation methods
- 6.6. Mutable transformation methods

https://heycam.github.io/webidl/#idl-DOMString Referenced in:

- 6. The DOMMatrix interfaces (2) (3)
- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects
- Changes since last publication

https://heycam.github.io/webidl/#Default Referenced in:

- 2. The DOMPoint interfaces
- 3. The DOMRect interfaces
- 5. The DOMQuad interface
- 6. The DOMMatrix interfaces

https://heycam.github.io/webidl/#Exposed Referenced in:

- 2. The DOMPoint interfaces (2)
- 3. The DOMRect interfaces (2)
- 4. The DOMRectList interface
- 5. The DOMQuad interface
- 6. The DOMMatrix interfaces (2) (3) (4)

https://heycam.github.io/webidl/#idl-Float32Array Referenced in:

- 6. The DOMMatrix interfaces (2) (3)
- 6.5. Immutable transformation methods

https://heycam.github.io/webidl/#idl-Float64Array Referenced in:

- 6. The DOMMatrix interfaces (2) (3)
- 6.5. Immutable transformation methods

https://heycam.github.io/webidl/#indexsizeerror Referenced in:

- Changes since last publication

https://heycam.github.io/webidl/#invalidstateerror Referenced in:

- 6.5. Immutable transformation methods

https://heycam.github.io/webidl/#LegacyWindowAlias Referenced in:

- 2. The DOMPoint interfaces
- 3. The DOMRect interfaces
- 6. The DOMMatrix interfaces

https://heycam.github.io/webidl/#NewObject Referenced in:

- 2. The DOMPoint interfaces (2) (3)
- 3. The DOMRect interfaces (2)
- 5. The DOMQuad interface (2) (3)
- 6. The DOMMatrix interfaces (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (14) (15) (16) (17) (18) (19) (20) (21) (22)

https://heycam.github.io/webidl/#SameObject Referenced in:

- 5. The DOMQuad interface (2) (3) (4)

https://heycam.github.io/webidl/#syntaxerror Referenced in:

- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects
- 6.6. Mutable transformation methods

https://heycam.github.io/webidl/#exceptiondef-typeerror Referenced in:

- 6.1. DOMMatrix2DInit and DOMMatrixInit dictionaries (2)
- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects (2) (3) (4)
- Changes since last publication

https://heycam.github.io/webidl/#idl-boolean Referenced in:

- 6. The DOMMatrix interfaces (2) (3)

https://heycam.github.io/webidl/#idl-object Referenced in:

- 2. The DOMPoint interfaces
- 3. The DOMRect interfaces
- 5. The DOMQuad interface
- 6. The DOMMatrix interfaces

https://heycam.github.io/webidl/#idl-unrestricted-double Referenced in:

- 2. The DOMPoint interfaces (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (14) (15) (16) (17) (18) (19) (20)
- 3. The DOMRect interfaces (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (14) (15) (16) (17) (18) (19) (20) (21) (22) (23) (24)
- 6. The DOMMatrix interfaces (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (14) (15) (16) (17) (18) (19) (20) (21) (22) (23) (24) (25) (26) (27) (28) (29) (30) (31) (32) (33) (34) (35) (36) (37) (38) (39) (40) (41) (42) (43) (44) (45) (46) (47) (48) (49) (50) (51) (52) (53) (54) (55) (56) (57) (58) (59) (60) (61) (62) (63) (64) (65) (66) (67) (68) (69) (70) (71) (72) (73) (74) (75) (76) (77) (78) (79) (80) (81) (82) (83) (84) (85) (86) (87) (88) (89) (90) (91) (92) (93) (94) (95) (96) (97) (98) (99) (100) (101) (102) (103) (104) (105) (106) (107) (108) (109) (110) (111) (112) (113) (114) (115) (116) (117) (118)

https://heycam.github.io/webidl/#idl-unsigned-long Referenced in:

- 4. The DOMRectList interface (2)

### Terms defined by reference

- [css-transforms-2] defines the following terms:
  - <transform-function>
  - matrix3d()
- [css-values-3] defines the following terms:
  - <length>
- [css-values-4] defines the following terms:
  - absolute length
- [CSS3-SYNTAX] defines the following terms:
  - parse
- [CSS3-TRANSFORMS] defines the following terms:
  - <transform-list>
  - matrix()
  - transform
- [CSSOM-VIEW] defines the following terms:
  - getBoundingClientRect()
- [ECMA-262] defines the following terms:
  - !
  - samevaluezero
  - tostring
- [HTML] defines the following terms:
  - Serializable
  - Window
  - Worker
  - current global object
  - deserialization steps
  - serializable objects
  - serialization steps
  - sub-deserialization
  - sub-serialization
- [WEBIDL] defines the following terms:
  - DOMException
  - DOMString
  - Default
  - Exposed
  - Float32Array
  - Float64Array
  - IndexSizeError
  - InvalidStateError
  - LegacyWindowAlias
  - NewObject
  - SameObject
  - SyntaxError
  - TypeError
  - boolean
  - object
  - unrestricted double
  - unsigned long

## References

### Normative References

[CSS-TRANSFORMS-2]
  CSS Transforms Module Level 2 URL: https://drafts.csswg.org/css-transforms-2/
[CSS-VALUES-3]
  Tab Atkins Jr.; Elika Etemad. CSS Values and Units Module Level 3. 31 January 2019. CR. URL: https://www.w3.org/TR/css-values-3/
[CSS-VALUES-4]
  Tab Atkins Jr.; Elika Etemad. CSS Values and Units Module Level 4. 31 January 2019. WD. URL: https://www.w3.org/TR/css-values-4/
[CSS3-SYNTAX]
  Tab Atkins Jr.; Simon Sapin. CSS Syntax Module Level 3. 20 February 2014. CR. URL: https://www.w3.org/TR/css-syntax-3/
[CSS3-TRANSFORMS]
  Simon Fraser; et al. CSS Transforms Module Level 1. 14 February 2019. CR. URL: https://www.w3.org/TR/css-transforms-1/
[ECMA-262]
  ECMAScript Language Specification. URL: https://tc39.github.io/ecma262/
[HTML]
  Anne van Kesteren; et al. HTML Standard. Living Standard. URL: https://html.spec.whatwg.org/multipage/
[RFC2119]
  S. Bradner. Key words for use in RFCs to Indicate Requirement Levels. March 1997. Best Current Practice. URL: https://tools.ietf.org/html/rfc2119
[WEBIDL]
  Boris Zbarsky. Web IDL. 15 December 2016. ED. URL: https://heycam.github.io/webidl/

### Informative References

[CSSOM-VIEW]
  Simon Pieters. CSSOM View Module. 17 March 2016. WD. URL: https://www.w3.org/TR/cssom-view-1/
[SVG11]
  Erik Dahlström; et al. Scalable Vector Graphics (SVG) 1.1 (Second Edition). 16 August 2011. REC. URL: https://www.w3.org/TR/SVG11/

## IDL Index

    [Exposed=(Window,Worker),
     Serializable]
    interface DOMPointReadOnly {
        constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
                optional unrestricted double z = 0, optional unrestricted double w = 1);

        [NewObject] static DOMPointReadOnly fromPoint(optional DOMPointInit other = {});

        readonly attribute unrestricted double x;
        readonly attribute unrestricted double y;
        readonly attribute unrestricted double z;
        readonly attribute unrestricted double w;

        [NewObject] DOMPoint matrixTransform(optional DOMMatrixInit matrix = {});

        [Default] object toJSON();
    };

    [Exposed=(Window,Worker),
     Serializable,
     LegacyWindowAlias=SVGPoint]
    interface DOMPoint : DOMPointReadOnly {
        constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
                optional unrestricted double z = 0, optional unrestricted double w = 1);

        [NewObject] static DOMPoint fromPoint(optional DOMPointInit other = {});

        inherit attribute unrestricted double x;
        inherit attribute unrestricted double y;
        inherit attribute unrestricted double z;
        inherit attribute unrestricted double w;
    };

    dictionary DOMPointInit {
        unrestricted double x = 0;
        unrestricted double y = 0;
        unrestricted double z = 0;
        unrestricted double w = 1;
    };

    [Exposed=(Window,Worker),
     Serializable]
    interface DOMRectReadOnly {
        constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
                optional unrestricted double width = 0, optional unrestricted double height = 0);

        [NewObject] static DOMRectReadOnly fromRect(optional DOMRectInit other = {});

        readonly attribute unrestricted double x;
        readonly attribute unrestricted double y;
        readonly attribute unrestricted double width;
        readonly attribute unrestricted double height;
        readonly attribute unrestricted double top;
        readonly attribute unrestricted double right;
        readonly attribute unrestricted double bottom;
        readonly attribute unrestricted double left;

        [Default] object toJSON();
    };

    [Exposed=(Window,Worker),
     Serializable,
     LegacyWindowAlias=SVGRect]
    interface DOMRect : DOMRectReadOnly {
        constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
                optional unrestricted double width = 0, optional unrestricted double height = 0);

        [NewObject] static DOMRect fromRect(optional DOMRectInit other = {});

        inherit attribute unrestricted double x;
        inherit attribute unrestricted double y;
        inherit attribute unrestricted double width;
        inherit attribute unrestricted double height;
    };

    dictionary DOMRectInit {
        unrestricted double x = 0;
        unrestricted double y = 0;
        unrestricted double width = 0;
        unrestricted double height = 0;
    };

    [Exposed=Window]
    interface DOMRectList {
        readonly attribute unsigned long length;
        getter DOMRect? item(unsigned long index);
    };

    [Exposed=(Window,Worker),
     Serializable]
    interface DOMQuad {
        constructor(optional DOMPointInit p1 = {}, optional DOMPointInit p2 = {},
                optional DOMPointInit p3 = {}, optional DOMPointInit p4 = {});

        [NewObject] static DOMQuad fromRect(optional DOMRectInit other = {});
        [NewObject] static DOMQuad fromQuad(optional DOMQuadInit other = {});

        [SameObject] readonly attribute DOMPoint p1;
        [SameObject] readonly attribute DOMPoint p2;
        [SameObject] readonly attribute DOMPoint p3;
        [SameObject] readonly attribute DOMPoint p4;
        [NewObject] DOMRect getBounds();

        [Default] object toJSON();
    };

    dictionary DOMQuadInit {
      DOMPointInit p1;
      DOMPointInit p2;
      DOMPointInit p3;
      DOMPointInit p4;
    };

    [Exposed=(Window,Worker),
     Serializable]
    interface DOMMatrixReadOnly {
        constructor(optional (DOMString or sequence<unrestricted double>) init);

        [NewObject] static DOMMatrixReadOnly fromMatrix(optional DOMMatrixInit other = {});
        [NewObject] static DOMMatrixReadOnly fromFloat32Array(Float32Array array32);
        [NewObject] static DOMMatrixReadOnly fromFloat64Array(Float64Array array64);

        // These attributes are simple aliases for certain elements of the 4x4 matrix
        readonly attribute unrestricted double a;
        readonly attribute unrestricted double b;
        readonly attribute unrestricted double c;
        readonly attribute unrestricted double d;
        readonly attribute unrestricted double e;
        readonly attribute unrestricted double f;

        readonly attribute unrestricted double m11;
        readonly attribute unrestricted double m12;
        readonly attribute unrestricted double m13;
        readonly attribute unrestricted double m14;
        readonly attribute unrestricted double m21;
        readonly attribute unrestricted double m22;
        readonly attribute unrestricted double m23;
        readonly attribute unrestricted double m24;
        readonly attribute unrestricted double m31;
        readonly attribute unrestricted double m32;
        readonly attribute unrestricted double m33;
        readonly attribute unrestricted double m34;
        readonly attribute unrestricted double m41;
        readonly attribute unrestricted double m42;
        readonly attribute unrestricted double m43;
        readonly attribute unrestricted double m44;

        readonly attribute boolean is2D;
        readonly attribute boolean isIdentity;

        // Immutable transform methods
        [NewObject] DOMMatrix translate(optional unrestricted double tx = 0,
                                        optional unrestricted double ty = 0,
                                        optional unrestricted double tz = 0);
        [NewObject] DOMMatrix scale(optional unrestricted double scaleX = 1,
                                    optional unrestricted double scaleY,
                                    optional unrestricted double scaleZ = 1,
                                    optional unrestricted double originX = 0,
                                    optional unrestricted double originY = 0,
                                    optional unrestricted double originZ = 0);
        [NewObject] DOMMatrix scaleNonUniform(optional unrestricted double scaleX = 1,
                                              optional unrestricted double scaleY = 1);
        [NewObject] DOMMatrix scale3d(optional unrestricted double scale = 1,
                                      optional unrestricted double originX = 0,
                                      optional unrestricted double originY = 0,
                                      optional unrestricted double originZ = 0);
        [NewObject] DOMMatrix rotate(optional unrestricted double rotX = 0,
                                     optional unrestricted double rotY,
                                     optional unrestricted double rotZ);
        [NewObject] DOMMatrix rotateFromVector(optional unrestricted double x = 0,
                                               optional unrestricted double y = 0);
        [NewObject] DOMMatrix rotateAxisAngle(optional unrestricted double x = 0,
                                              optional unrestricted double y = 0,
                                              optional unrestricted double z = 0,
                                              optional unrestricted double angle = 0);
        [NewObject] DOMMatrix skewX(optional unrestricted double sx = 0);
        [NewObject] DOMMatrix skewY(optional unrestricted double sy = 0);
        [NewObject] DOMMatrix multiply(optional DOMMatrixInit other = {});
        [NewObject] DOMMatrix flipX();
        [NewObject] DOMMatrix flipY();
        [NewObject] DOMMatrix inverse();

        [NewObject] DOMPoint transformPoint(optional DOMPointInit point = {});
        [NewObject] Float32Array toFloat32Array();
        [NewObject] Float64Array toFloat64Array();

        [Exposed=Window] stringifier;
        [Default] object toJSON();
    };

    [Exposed=(Window,Worker),
     Serializable,
     LegacyWindowAlias=(SVGMatrix,WebKitCSSMatrix)]
    interface DOMMatrix : DOMMatrixReadOnly {
        constructor(optional (DOMString or sequence<unrestricted double>) init);

        [NewObject] static DOMMatrix fromMatrix(optional DOMMatrixInit other = {});
        [NewObject] static DOMMatrix fromFloat32Array(Float32Array array32);
        [NewObject] static DOMMatrix fromFloat64Array(Float64Array array64);

        // These attributes are simple aliases for certain elements of the 4x4 matrix
        inherit attribute unrestricted double a;
        inherit attribute unrestricted double b;
        inherit attribute unrestricted double c;
        inherit attribute unrestricted double d;
        inherit attribute unrestricted double e;
        inherit attribute unrestricted double f;

        inherit attribute unrestricted double m11;
        inherit attribute unrestricted double m12;
        inherit attribute unrestricted double m13;
        inherit attribute unrestricted double m14;
        inherit attribute unrestricted double m21;
        inherit attribute unrestricted double m22;
        inherit attribute unrestricted double m23;
        inherit attribute unrestricted double m24;
        inherit attribute unrestricted double m31;
        inherit attribute unrestricted double m32;
        inherit attribute unrestricted double m33;
        inherit attribute unrestricted double m34;
        inherit attribute unrestricted double m41;
        inherit attribute unrestricted double m42;
        inherit attribute unrestricted double m43;
        inherit attribute unrestricted double m44;

        // Mutable transform methods
        DOMMatrix multiplySelf(optional DOMMatrixInit other = {});
        DOMMatrix preMultiplySelf(optional DOMMatrixInit other = {});
        DOMMatrix translateSelf(optional unrestricted double tx = 0,
                                optional unrestricted double ty = 0,
                                optional unrestricted double tz = 0);
        DOMMatrix scaleSelf(optional unrestricted double scaleX = 1,
                            optional unrestricted double scaleY,
                            optional unrestricted double scaleZ = 1,
                            optional unrestricted double originX = 0,
                            optional unrestricted double originY = 0,
                            optional unrestricted double originZ = 0);
        DOMMatrix scale3dSelf(optional unrestricted double scale = 1,
                              optional unrestricted double originX = 0,
                              optional unrestricted double originY = 0,
                              optional unrestricted double originZ = 0);
        DOMMatrix rotateSelf(optional unrestricted double rotX = 0,
                             optional unrestricted double rotY,
                             optional unrestricted double rotZ);
        DOMMatrix rotateFromVectorSelf(optional unrestricted double x = 0,
                                       optional unrestricted double y = 0);
        DOMMatrix rotateAxisAngleSelf(optional unrestricted double x = 0,
                                      optional unrestricted double y = 0,
                                      optional unrestricted double z = 0,
                                      optional unrestricted double angle = 0);
        DOMMatrix skewXSelf(optional unrestricted double sx = 0);
        DOMMatrix skewYSelf(optional unrestricted double sy = 0);
        DOMMatrix invertSelf();

        [Exposed=Window] DOMMatrix setMatrixValue(DOMString transformList);
    };

    dictionary DOMMatrix2DInit {
        unrestricted double a;
        unrestricted double b;
        unrestricted double c;
        unrestricted double d;
        unrestricted double e;
        unrestricted double f;
        unrestricted double m11;
        unrestricted double m12;
        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 m43 = 0;
        unrestricted double m44 = 1;
        boolean is2D;
    };

#point Referenced in:

- 2.1. Transforming a point with a matrix

#dompointreadonly Referenced in:

- 2. The DOMPoint interfaces (2) (3) (4) (5) (6) (7) (8)
- 5. The DOMQuad interface
- 7. Structured serialization (2)
- Changes since last publication (2)

#svgpoint Referenced in:

- 1. Introduction
- 9.2. SVG

#dompoint Referenced in:

- 2. The DOMPoint interfaces (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13)
- 2.1. Transforming a point with a matrix
- 5. The DOMQuad interface (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (14) (15) (16) (17)
- 6. The DOMMatrix interfaces
- 7. Structured serialization (2)
- 9.2. SVG
- Changes since last publication

#dictdef-dompointinit Referenced in:

- 2. The DOMPoint interfaces (2)
- 5. The DOMQuad interface (2) (3) (4) (5) (6) (7) (8) (9)
- 6. The DOMMatrix interfaces

#dom-dompointinit-x Referenced in:

- 2. The DOMPoint interfaces

#dom-dompointinit-y Referenced in:

- 2. The DOMPoint interfaces

#dom-dompointinit-z Referenced in:

- 2. The DOMPoint interfaces

#dom-dompointinit-w Referenced in:

- 2. The DOMPoint interfaces

#point-x-coordinate Referenced in:

- 2. The DOMPoint interfaces (2) (3) (4) (5) (6)
- 2.1. Transforming a point with a matrix (2)
- 5. The DOMQuad interface (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12)
- 7. Structured serialization (2)

#point-y-coordinate Referenced in:

- 2. The DOMPoint interfaces (2) (3) (4) (5) (6)
- 2.1. Transforming a point with a matrix (2)
- 5. The DOMQuad interface (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12)
- 7. Structured serialization (2)

#point-z-coordinate Referenced in:

- 2. The DOMPoint interfaces (2) (3) (4)
- 2.1. Transforming a point with a matrix (2) (3)
- 5. The DOMQuad interface (2) (3) (4)
- 7. Structured serialization (2)

#point-w-perspective Referenced in:

- 2. The DOMPoint interfaces (2) (3) (4)
- 2.1. Transforming a point with a matrix (2) (3)
- 5. The DOMQuad interface (2) (3) (4)
- 7. Structured serialization (2)

#dom-dompointreadonly-dompointreadonly Referenced in:

- 2. The DOMPoint interfaces

#dom-dompoint-dompoint Referenced in:

- 2. The DOMPoint interfaces

#dom-dompointreadonly-frompoint Referenced in:

- 2. The DOMPoint interfaces

#dom-dompoint-frompoint Referenced in:

- 2. The DOMPoint interfaces

#create-a-dompointreadonly-from-the-dictionary Referenced in:

- 2. The DOMPoint interfaces

#create-a-dompoint-from-the-dictionary Referenced in:

- 2. The DOMPoint interfaces
- 5. The DOMQuad interface (2) (3) (4)
- 6.5. Immutable transformation methods

#dom-dompointreadonly-x Referenced in:

- 2. The DOMPoint interfaces (2) (3)

#dom-dompointreadonly-y Referenced in:

- 2. The DOMPoint interfaces (2) (3)

#dom-dompointreadonly-z Referenced in:

- 2. The DOMPoint interfaces (2) (3)

#dom-dompointreadonly-w Referenced in:

- 2. The DOMPoint interfaces (2) (3)

#dom-dompointreadonly-matrixtransform Referenced in:

- 2. The DOMPoint interfaces (2)

#transform-a-point-with-a-matrix Referenced in:

- 2. The DOMPoint interfaces
- 6.5. Immutable transformation methods

#rectangle Referenced in:

- 3. The DOMRect interfaces

#rectangle-origin Referenced in:

- 3. The DOMRect interfaces (2)

#rectangle-x-coordinate Referenced in:

- 3. The DOMRect interfaces (2) (3) (4) (5) (6) (7) (8) (9)
- 5. The DOMQuad interface
- 7. Structured serialization (2)

#rectangle-y-coordinate Referenced in:

- 3. The DOMRect interfaces (2) (3) (4) (5) (6) (7) (8) (9)
- 5. The DOMQuad interface
- 7. Structured serialization (2)

#rectangle-width-dimension Referenced in:

- 3. The DOMRect interfaces (2) (3) (4) (5) (6) (7) (8)
- 5. The DOMQuad interface
- 7. Structured serialization (2)

#rectangle-height-dimension Referenced in:

- 3. The DOMRect interfaces (2) (3) (4) (5) (6) (7) (8)
- 5. The DOMQuad interface
- 7. Structured serialization (2)

#domrectreadonly Referenced in:

- 3. The DOMRect interfaces (2) (3) (4) (5) (6) (7) (8) (9)
- 7. Structured serialization (2)
- Changes since last publication (2)

#svgrect Referenced in:

- 1. Introduction
- 9.2. SVG

#domrect Referenced in:

- 3. The DOMRect interfaces (2) (3) (4) (5) (6) (7) (8) (9)
- 4. The DOMRectList interface (2) (3) (4)
- 5. The DOMQuad interface (2)
- 7. Structured serialization (2)
- 8. Privacy and Security Considerations
- 9.1. CSSOM View
- 9.2. SVG
- Changes since last publication

#dom-domrect-x Referenced in:

- 3. The DOMRect interfaces

#dom-domrect-y Referenced in:

- 3. The DOMRect interfaces

#dom-domrect-width Referenced in:

- 3. The DOMRect interfaces

#dom-domrect-height Referenced in:

- 3. The DOMRect interfaces

#dictdef-domrectinit Referenced in:

- 3. The DOMRect interfaces (2)
- 5. The DOMQuad interface

#dom-domrectinit-x Referenced in:

- 3. The DOMRect interfaces
- 5. The DOMQuad interface

#dom-domrectinit-y Referenced in:

- 3. The DOMRect interfaces
- 5. The DOMQuad interface

#dom-domrectinit-width Referenced in:

- 3. The DOMRect interfaces
- 5. The DOMQuad interface

#dom-domrectinit-height Referenced in:

- 3. The DOMRect interfaces
- 5. The DOMQuad interface

#dom-domrectreadonly-domrectreadonly Referenced in:

- 3. The DOMRect interfaces

#dom-domrect-domrect Referenced in:

- 3. The DOMRect interfaces

#dom-domrectreadonly-fromrect Referenced in:

- 3. The DOMRect interfaces

#dom-domrect-fromrect Referenced in:

- 3. The DOMRect interfaces

#create-a-domrectreadonly-from-the-dictionary Referenced in:

- 3. The DOMRect interfaces

#create-a-domrect-from-the-dictionary Referenced in:

- 3. The DOMRect interfaces

#domrectlist Referenced in:

- 4. The DOMRectList interface (2) (3)
- Changes since last publication (2)

#dom-domrectlist-length Referenced in:

- 4. The DOMRectList interface

#dom-domrectlist-item Referenced in:

- 4. The DOMRectList interface

#domquad Referenced in:

- 5. The DOMQuad interface (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (14) (15) (16)
- 7. Structured serialization (2)
- Changes since last publication (2)

#dictdef-domquadinit Referenced in:

- 5. The DOMQuad interface

#dom-domquadinit-p1 Referenced in:

- 5. The DOMQuad interface

#dom-domquadinit-p2 Referenced in:

- 5. The DOMQuad interface

#dom-domquadinit-p3 Referenced in:

- 5. The DOMQuad interface

#dom-domquadinit-p4 Referenced in:

- 5. The DOMQuad interface

#quadrilateral-point-1 Referenced in:

- 5. The DOMQuad interface (2) (3) (4) (5) (6) (7) (8)
- 7. Structured serialization (2)

#quadrilateral-point-2 Referenced in:

- 5. The DOMQuad interface (2) (3) (4) (5) (6) (7) (8)
- 7. Structured serialization (2)

#quadrilateral-point-3 Referenced in:

- 5. The DOMQuad interface (2) (3) (4) (5) (6) (7) (8)
- 7. Structured serialization (2)

#quadrilateral-point-4 Referenced in:

- 5. The DOMQuad interface (2) (3) (4) (5) (6) (7) (8)
- 7. Structured serialization (2)

#dom-domquad-domquad Referenced in:

- 5. The DOMQuad interface

#dom-domquad-fromrect Referenced in:

- 5. The DOMQuad interface

#create-a-domquad-from-the-domrectinit-dictionary Referenced in:

- 5. The DOMQuad interface

#dom-domquad-fromquad Referenced in:

- 5. The DOMQuad interface

#create-a-domquad-from-the-domquadinit-dictionary Referenced in:

- 5. The DOMQuad interface

#dom-domquad-p1 Referenced in:

- 5. The DOMQuad interface (2)

#dom-domquad-p2 Referenced in:

- 5. The DOMQuad interface

#dom-domquad-p3 Referenced in:

- 5. The DOMQuad interface

#dom-domquad-p4 Referenced in:

- 5. The DOMQuad interface (2)

#dom-domquad-getbounds Referenced in:

- 5. The DOMQuad interface (2)
- Changes since last publication

#matrix Referenced in:

- 2.1. Transforming a point with a matrix

#4x4-abstract-matrix Referenced in:

- 6.2. Parsing a string into an abstract matrix (2) (3)

#post-multiply Referenced in:

- 2.1. Transforming a point with a matrix
- 6.2. Parsing a string into an abstract matrix
- 6.5. Immutable transformation methods (2)
- 6.6. Mutable transformation methods (2) (3) (4) (5) (6) (7) (8) (9) (10)

#dommatrixreadonly Referenced in:

- 6. The DOMMatrix interfaces (2) (3) (4) (5) (6) (7) (8) (9)
- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (14) (15) (16) (17)
- 6.4. DOMMatrix attributes (2)
- 7. Structured serialization (2) (3)
- 8. Privacy and Security Considerations
- Changes since last publication (2) (3) (4) (5) (6) (7) (8)

#svgmatrix Referenced in:

- 1. Introduction
- 6.5. Immutable transformation methods
- 9.2. SVG

#webkitcssmatrix Referenced in:

- 9.3. Non-standard
- Changes since last publication (2) (3)

#dommatrix Referenced in:

- 2. The DOMPoint interfaces
- 6. The DOMMatrix interfaces (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (14) (15) (16) (17) (18) (19) (20) (21) (22) (23) (24) (25) (26) (27) (28) (29) (30) (31)
- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (14) (15) (16) (17)
- 6.4. DOMMatrix attributes (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (14) (15) (16) (17)
- 6.5. Immutable transformation methods
- 6.6. Mutable transformation methods
- 7. Structured serialization (2) (3)
- 8. Privacy and Security Considerations
- 9.2. SVG
- 9.3. Non-standard
- Changes since last publication (2) (3) (4) (5) (6) (7) (8)

#dictdef-dommatrix2dinit Referenced in:

- 6. The DOMMatrix interfaces
- 6.1. DOMMatrix2DInit and DOMMatrixInit dictionaries

#dom-dommatrix2dinit-a Referenced in:

- 6.1. DOMMatrix2DInit and DOMMatrixInit dictionaries (2) (3) (4)

#dom-dommatrix2dinit-b Referenced in:

- 6.1. DOMMatrix2DInit and DOMMatrixInit dictionaries (2) (3) (4)

#dom-dommatrix2dinit-c Referenced in:

- 6.1. DOMMatrix2DInit and DOMMatrixInit dictionaries (2) (3) (4)

#dom-dommatrix2dinit-d Referenced in:

- 6.1. DOMMatrix2DInit and DOMMatrixInit dictionaries (2) (3) (4)

#dom-dommatrix2dinit-e Referenced in:

- 6.1. DOMMatrix2DInit and DOMMatrixInit dictionaries (2) (3) (4)

#dom-dommatrix2dinit-f Referenced in:

- 6.1. DOMMatrix2DInit and DOMMatrixInit dictionaries (2) (3) (4)

#dom-dommatrix2dinit-m11 Referenced in:

- 6.1. DOMMatrix2DInit and DOMMatrixInit dictionaries (2) (3)
- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects (2) (3)

#dom-dommatrix2dinit-m12 Referenced in:

- 6.1. DOMMatrix2DInit and DOMMatrixInit dictionaries (2) (3)
- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects (2) (3)

#dom-dommatrix2dinit-m21 Referenced in:

- 6.1. DOMMatrix2DInit and DOMMatrixInit dictionaries (2) (3)
- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects (2)

#dom-dommatrix2dinit-m22 Referenced in:

- 6.1. DOMMatrix2DInit and DOMMatrixInit dictionaries (2) (3)
- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects (2)

#dom-dommatrix2dinit-m41 Referenced in:

- 6.1. DOMMatrix2DInit and DOMMatrixInit dictionaries (2) (3)
- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects (2)

#dom-dommatrix2dinit-m42 Referenced in:

- 6.1. DOMMatrix2DInit and DOMMatrixInit dictionaries (2) (3)
- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects (2)

#dictdef-dommatrixinit Referenced in:

- 2. The DOMPoint interfaces
- 6. The DOMMatrix interfaces (2) (3) (4) (5)
- 6.1. DOMMatrix2DInit and DOMMatrixInit dictionaries (2)
- Changes since last publication

#dom-dommatrixinit-m13 Referenced in:

- 6.1. DOMMatrix2DInit and DOMMatrixInit dictionaries (2)
- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects

#dom-dommatrixinit-m14 Referenced in:

- 6.1. DOMMatrix2DInit and DOMMatrixInit dictionaries (2)

#dom-dommatrixinit-m23 Referenced in:

- 6.1. DOMMatrix2DInit and DOMMatrixInit dictionaries (2)

#dom-dommatrixinit-m24 Referenced in:

- 6.1. DOMMatrix2DInit and DOMMatrixInit dictionaries (2)

#dom-dommatrixinit-m31 Referenced in:

- 6.1. DOMMatrix2DInit and DOMMatrixInit dictionaries (2)

#dom-dommatrixinit-m32 Referenced in:

- 6.1. DOMMatrix2DInit and DOMMatrixInit dictionaries (2)

#dom-dommatrixinit-m33 Referenced in:

- 6.1. DOMMatrix2DInit and DOMMatrixInit dictionaries (2)

#dom-dommatrixinit-m34 Referenced in:

- 6.1. DOMMatrix2DInit and DOMMatrixInit dictionaries (2)

#dom-dommatrixinit-m43 Referenced in:

- 6.1. DOMMatrix2DInit and DOMMatrixInit dictionaries (2)

#dom-dommatrixinit-m44 Referenced in:

- 6.1. DOMMatrix2DInit and DOMMatrixInit dictionaries (2)
- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects

#dom-dommatrixinit-is2d Referenced in:

- 6.1. DOMMatrix2DInit and DOMMatrixInit dictionaries (2) (3) (4)
- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects

#matrix-m11-element Referenced in:

- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects (2)
- 6.4. DOMMatrix attributes (2) (3)
- 6.5. Immutable transformation methods (2) (3)
- 6.6. Mutable transformation methods
- 7. Structured serialization (2) (3) (4)

#matrix-m12-element Referenced in:

- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects
- 6.4. DOMMatrix attributes (2) (3)
- 6.5. Immutable transformation methods (2)
- 7. Structured serialization (2) (3) (4)

#matrix-m13-element Referenced in:

- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects
- 6.4. DOMMatrix attributes (2) (3)
- 6.5. Immutable transformation methods
- 7. Structured serialization (2) (3) (4)

#matrix-m14-element Referenced in:

- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects
- 6.4. DOMMatrix attributes (2) (3)
- 6.5. Immutable transformation methods
- 7. Structured serialization (2) (3)

#matrix-m21-element Referenced in:

- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects
- 6.4. DOMMatrix attributes (2) (3)
- 6.5. Immutable transformation methods (2)
- 7. Structured serialization (2) (3) (4)

#matrix-m22-element Referenced in:

- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects
- 6.4. DOMMatrix attributes (2) (3)
- 6.5. Immutable transformation methods (2)
- 7. Structured serialization (2) (3) (4)

#matrix-m23-element Referenced in:

- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects
- 6.4. DOMMatrix attributes (2) (3)
- 6.5. Immutable transformation methods
- 7. Structured serialization (2) (3)

#matrix-m24-element Referenced in:

- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects
- 6.4. DOMMatrix attributes (2) (3)
- 6.5. Immutable transformation methods
- 7. Structured serialization (2) (3)

#matrix-m31-element Referenced in:

- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects
- 6.4. DOMMatrix attributes (2) (3)
- 7. Structured serialization (2) (3)

#matrix-m32-element Referenced in:

- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects
- 6.4. DOMMatrix attributes (2) (3)
- 7. Structured serialization (2) (3)

#matrix-m33-element Referenced in:

- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects
- 6.4. DOMMatrix attributes (2) (3)
- 7. Structured serialization (2) (3)

#matrix-m34-element Referenced in:

- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects
- 6.4. DOMMatrix attributes (2) (3)
- 7. Structured serialization (2) (3)

#matrix-m41-element Referenced in:

- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects
- 6.4. DOMMatrix attributes (2) (3)
- 6.5. Immutable transformation methods (2)
- 7. Structured serialization (2) (3) (4)

#matrix-m42-element Referenced in:

- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects
- 6.4. DOMMatrix attributes (2) (3)
- 6.5. Immutable transformation methods (2)
- 7. Structured serialization (2) (3) (4)

#matrix-m43-element Referenced in:

- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects
- 6.4. DOMMatrix attributes (2) (3)
- 6.5. Immutable transformation methods
- 7. Structured serialization (2) (3)

#matrix-m44-element Referenced in:

- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects (2)
- 6.4. DOMMatrix attributes (2) (3)
- 6.5. Immutable transformation methods (2)
- 6.6. Mutable transformation methods
- 7. Structured serialization (2) (3)

#matrix-validate-and-fixup-2d Referenced in:

- 6.1. DOMMatrix2DInit and DOMMatrixInit dictionaries
- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects

#matrix-validate-and-fixup Referenced in:

- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects

#parse-a-string-into-an-abstract-matrix Referenced in:

- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects
- 6.6. Mutable transformation methods

#create-a-2d-matrix Referenced in:

- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects (2) (3) (4) (5) (6) (7)

#create-a-3d-matrix Referenced in:

- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects (2) (3) (4) (5)

#dom-dommatrixreadonly-dommatrixreadonly Referenced in:

- 6. The DOMMatrix interfaces

#dom-dommatrix-dommatrix Referenced in:

- 6. The DOMMatrix interfaces

#dom-dommatrixreadonly-frommatrix Referenced in:

- 6. The DOMMatrix interfaces

#dom-dommatrix-frommatrix Referenced in:

- 6. The DOMMatrix interfaces

#create-a-dommatrixreadonly-from-the-dictionary Referenced in:

- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects

#create-a-dommatrix-from-the-dictionary Referenced in:

- 2. The DOMPoint interfaces
- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects
- 6.6. Mutable transformation methods (2)

#dom-dommatrixreadonly-fromfloat32array Referenced in:

- 6. The DOMMatrix interfaces

#dom-dommatrix-fromfloat32array Referenced in:

- 6. The DOMMatrix interfaces

#dom-dommatrixreadonly-fromfloat64array Referenced in:

- 6. The DOMMatrix interfaces

#dom-dommatrix-fromfloat64array Referenced in:

- 6. The DOMMatrix interfaces

#dom-dommatrixreadonly-m11 Referenced in:

- 6. The DOMMatrix interfaces (2)
- 6.4. DOMMatrix attributes (2) (3)
- 6.5. Immutable transformation methods (2)
- 6.6. Mutable transformation methods

#dom-dommatrixreadonly-a Referenced in:

- 6. The DOMMatrix interfaces (2)
- 6.4. DOMMatrix attributes (2) (3)

#dom-dommatrixreadonly-m12 Referenced in:

- 6. The DOMMatrix interfaces (2)
- 6.4. DOMMatrix attributes (2)

#dom-dommatrixreadonly-b Referenced in:

- 6. The DOMMatrix interfaces (2)
- 6.4. DOMMatrix attributes (2)

#dom-dommatrixreadonly-m13 Referenced in:

- 6. The DOMMatrix interfaces (2)
- 6.4. DOMMatrix attributes

#dom-dommatrixreadonly-m14 Referenced in:

- 6. The DOMMatrix interfaces (2)
- 6.4. DOMMatrix attributes

#dom-dommatrixreadonly-m21 Referenced in:

- 6. The DOMMatrix interfaces (2)
- 6.4. DOMMatrix attributes (2)

#dom-dommatrixreadonly-c Referenced in:

- 6. The DOMMatrix interfaces (2)
- 6.4. DOMMatrix attributes (2)

#dom-dommatrixreadonly-m22 Referenced in:

- 6. The DOMMatrix interfaces (2)
- 6.4. DOMMatrix attributes (2)
- 6.6. Mutable transformation methods

#dom-dommatrixreadonly-d Referenced in:

- 6. The DOMMatrix interfaces (2)
- 6.4. DOMMatrix attributes (2)

#dom-dommatrixreadonly-m23 Referenced in:

- 6. The DOMMatrix interfaces (2)
- 6.4. DOMMatrix attributes

#dom-dommatrixreadonly-m24 Referenced in:

- 6. The DOMMatrix interfaces (2)
- 6.4. DOMMatrix attributes

#dom-dommatrixreadonly-m31 Referenced in:

- 6. The DOMMatrix interfaces (2)
- 6.4. DOMMatrix attributes

#dom-dommatrixreadonly-m32 Referenced in:

- 6. The DOMMatrix interfaces (2)
- 6.4. DOMMatrix attributes

#dom-dommatrixreadonly-m33 Referenced in:

- 6. The DOMMatrix interfaces (2)
- 6.4. DOMMatrix attributes
- 6.6. Mutable transformation methods

#dom-dommatrixreadonly-m34 Referenced in:

- 6. The DOMMatrix interfaces (2)
- 6.4. DOMMatrix attributes

#dom-dommatrixreadonly-m41 Referenced in:

- 6. The DOMMatrix interfaces (2)
- 6.4. DOMMatrix attributes (2)

#dom-dommatrixreadonly-e Referenced in:

- 6. The DOMMatrix interfaces (2)
- 6.4. DOMMatrix attributes (2)

#dom-dommatrixreadonly-m42 Referenced in:

- 6. The DOMMatrix interfaces (2)
- 6.4. DOMMatrix attributes (2)

#dom-dommatrixreadonly-f Referenced in:

- 6. The DOMMatrix interfaces (2)
- 6.4. DOMMatrix attributes (2) (3)

#dom-dommatrixreadonly-m43 Referenced in:

- 6. The DOMMatrix interfaces (2)
- 6.4. DOMMatrix attributes

#dom-dommatrixreadonly-m44 Referenced in:

- 6. The DOMMatrix interfaces (2)
- 6.4. DOMMatrix attributes (2)
- 6.5. Immutable transformation methods (2)

#dom-dommatrixreadonly-is2d Referenced in:

- 6. The DOMMatrix interfaces
- Changes since last publication (2)

#dom-dommatrixreadonly-isidentity Referenced in:

- 6. The DOMMatrix interfaces
- Changes since last publication

#matrix-is-2d Referenced in:

- 2.1. Transforming a point with a matrix
- 6. The DOMMatrix interfaces
- 6.3. Creating DOMMatrixReadOnly and DOMMatrix objects (2)
- 6.4. DOMMatrix attributes (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13)
- 6.5. Immutable transformation methods
- 6.6. Mutable transformation methods (2) (3) (4) (5) (6) (7) (8) (9) (10) (11)
- 7. Structured serialization (2) (3)

#dom-dommatrixreadonly-translate Referenced in:

- 6. The DOMMatrix interfaces

#dom-dommatrixreadonly-scale Referenced in:

- 6. The DOMMatrix interfaces
- 6.5. Immutable transformation methods
- Changes since last publication

#dom-dommatrixreadonly-scalenonuniform Referenced in:

- 6. The DOMMatrix interfaces

#dom-dommatrixreadonly-scale3d Referenced in:

- 6. The DOMMatrix interfaces

#dom-dommatrixreadonly-rotate Referenced in:

- 6. The DOMMatrix interfaces
- Changes since last publication

#dom-dommatrixreadonly-rotatefromvector Referenced in:

- 6. The DOMMatrix interfaces

#dom-dommatrixreadonly-rotateaxisangle Referenced in:

- 6. The DOMMatrix interfaces

#dom-dommatrixreadonly-skewx Referenced in:

- 6. The DOMMatrix interfaces

#dom-dommatrixreadonly-skewy Referenced in:

- 6. The DOMMatrix interfaces

#dom-dommatrixreadonly-multiply Referenced in:

- 6. The DOMMatrix interfaces

#dom-dommatrixreadonly-flipx Referenced in:

- 6. The DOMMatrix interfaces

#dom-dommatrixreadonly-flipy Referenced in:

- 6. The DOMMatrix interfaces

#dom-dommatrixreadonly-inverse Referenced in:

- 6. The DOMMatrix interfaces
- Changes since last publication

#dom-dommatrixreadonly-transformpoint Referenced in:

- 6. The DOMMatrix interfaces

#dom-dommatrixreadonly-tofloat32array Referenced in:

- 6. The DOMMatrix interfaces

#dom-dommatrixreadonly-tofloat64array Referenced in:

- 6. The DOMMatrix interfaces

#dommatrixreadonly-stringification-behavior Referenced in:

- 6. The DOMMatrix interfaces

#dom-dommatrix-multiplyself Referenced in:

- 6. The DOMMatrix interfaces
- 6.5. Immutable transformation methods

#dom-dommatrix-premultiplyself Referenced in:

- 6. The DOMMatrix interfaces

#dom-dommatrix-translateself Referenced in:

- 6. The DOMMatrix interfaces
- 6.5. Immutable transformation methods
- 6.6. Mutable transformation methods (2) (3) (4)
- Changes since last publication

#dom-dommatrix-scaleself Referenced in:

- 6. The DOMMatrix interfaces
- 6.5. Immutable transformation methods (2)
- Changes since last publication

#dom-dommatrix-scale3dself Referenced in:

- 6. The DOMMatrix interfaces
- 6.5. Immutable transformation methods

#dom-dommatrix-rotateself Referenced in:

- 6. The DOMMatrix interfaces
- 6.5. Immutable transformation methods
- Changes since last publication

#dom-dommatrix-rotatefromvectorself Referenced in:

- 6. The DOMMatrix interfaces
- 6.5. Immutable transformation methods

#dom-dommatrix-rotateaxisangleself Referenced in:

- 6. The DOMMatrix interfaces
- 6.5. Immutable transformation methods

#dom-dommatrix-skewxself Referenced in:

- 6. The DOMMatrix interfaces
- 6.5. Immutable transformation methods

#dom-dommatrix-skewyself Referenced in:

- 6. The DOMMatrix interfaces
- 6.5. Immutable transformation methods

#dom-dommatrix-invertself Referenced in:

- 6. The DOMMatrix interfaces
- 6.5. Immutable transformation methods
- Changes since last publication (2)

#dom-dommatrix-setmatrixvalue Referenced in:

- 6. The DOMMatrix interfaces
- 6.4. DOMMatrix attributes
- Changes since last publication (2)