[geometry] DOMMatrix feedback

I would like to propose the addition of isIdentity() method to DOMMatrix interface. I often find
myself checking whether a transformation matrix is an identity matrix in order to avoid
unnecessary computations.

Also, could DOMMatrix constructor accept a dictionary in a similar fashion to DOMPoint? This would
make it easier to create DOMMatrix from e.g. SVGMatrix or WebKitCSSMatrix instances. Currently
the spec says that if only one argument is specified then it must be either DOMMatrixReadOnly,
String or Array. I would add DOM2DMatrixInit and DOM3DMatrixInit to that list:

  dictionary DOM2DMatrixInit {
    unrestricted double a = 1;
    unrestricted double b = 0;
    unrestricted double c = 0;
    unrestricted double d = 1;
    unrestricted double e = 0;
    unrestricted double f = 0;
  };

  dictionary DOM3DMatrixInit {
    unrestricted double m11 = 1;
    unrestricted double m12 = 0;
    unrestricted double m13 = 0;
    ...
  };

Received on Tuesday, 31 December 2013 18:03:46 UTC