Backed out changeset d63622bdde81 (bug 1560462) for wpt failures at css/geometry/DOMMatrixInit-validate-fixup.html
authorCoroiu Cristina <ccoroiu@mozilla.com>
Sun, 30 Jun 2019 03:21:14 +0300
changeset 540353 edcb607325025e9622d21865f200089eb36dcd8f
parent 540352 d63622bdde81af2c25218e00b0420e5fe1dd9e39
child 540354 0c28fedb2c6a5face6a488ac940a42af62674e66
push id11522
push userffxbld-merge
push dateMon, 01 Jul 2019 09:00:55 +0000
treeherdermozilla-beta@53ea74d2bd09 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1560462
milestone69.0a1
backs outd63622bdde81af2c25218e00b0420e5fe1dd9e39
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset d63622bdde81 (bug 1560462) for wpt failures at css/geometry/DOMMatrixInit-validate-fixup.html
dom/base/DOMMatrix.cpp
dom/base/DOMMatrix.h
dom/base/WebKitCSSMatrix.cpp
dom/base/WebKitCSSMatrix.h
dom/bindings/Errors.msg
dom/webidl/DOMMatrix.webidl
dom/webidl/WebKitCSSMatrix.webidl
testing/web-platform/meta/css/geometry/DOMMatrix-002.html.ini
testing/web-platform/meta/css/geometry/DOMMatrix-003.html.ini
testing/web-platform/meta/css/geometry/DOMMatrix-css-string.worker.js.ini
testing/web-platform/meta/css/geometry/DOMMatrix-newobject.html.ini
testing/web-platform/meta/css/geometry/DOMMatrix-stringifier.html.ini
testing/web-platform/meta/css/geometry/DOMMatrixInit-validate-fixup.html.ini
testing/web-platform/meta/css/geometry/historical.html.ini
testing/web-platform/meta/css/geometry/interfaces.html.ini
testing/web-platform/meta/css/geometry/interfaces.worker.js.ini
--- a/dom/base/DOMMatrix.cpp
+++ b/dom/base/DOMMatrix.cpp
@@ -14,18 +14,16 @@
 #include "mozilla/dom/ToJSValue.h"
 #include "mozilla/ServoCSSParser.h"
 #include "nsGlobalWindowInner.h"
 #include "nsStyleTransformMatrix.h"
 #include "nsGlobalWindowInner.h"
 
 #include <math.h>
 
-#include "js/Equality.h"  // JS::SameValueZero
-
 namespace mozilla {
 namespace dom {
 
 template <typename T>
 static void SetDataInMatrix(DOMMatrixReadOnly* aMatrix, const T* aData,
                             int aLength, ErrorResult& aRv);
 
 static const double radPerDegree = 2.0 * M_PI / 360.0;
@@ -35,136 +33,16 @@ NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(DO
 NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(DOMMatrixReadOnly, AddRef)
 NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(DOMMatrixReadOnly, Release)
 
 JSObject* DOMMatrixReadOnly::WrapObject(JSContext* aCx,
                                         JS::Handle<JSObject*> aGivenProto) {
   return DOMMatrixReadOnly_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-// https://drafts.fxtf.org/geometry/#matrix-validate-and-fixup-2d
-static bool ValidateAndFixupMatrix2DInit(DOMMatrix2DInit& aMatrixInit,
-                                         ErrorResult& aRv) {
-#define ValidateAliases(field, alias, fieldName, aliasName)             \
-  if ((field).WasPassed() && (alias).WasPassed() &&                     \
-      !JS::SameValueZero((field).Value(), (alias).Value())) {           \
-    aRv.ThrowTypeError<MSG_MATRIX_INIT_CONFLICTING_VALUE>((fieldName),  \
-                                                          (aliasName)); \
-    return false;                                                       \
-  }
-#define SetFromAliasOrDefault(field, alias, defaultValue) \
-  if (!(field).WasPassed()) {                             \
-    if ((alias).WasPassed()) {                            \
-      (field).Construct((alias).Value());                 \
-    } else {                                              \
-      (field).Construct(defaultValue);                    \
-    }                                                     \
-  }
-#define ValidateAndSet(field, alias, fieldName, aliasName, defaultValue) \
-  ValidateAliases((field), (alias), NS_LITERAL_STRING(fieldName),        \
-                  NS_LITERAL_STRING(aliasName));                         \
-  SetFromAliasOrDefault((field), (alias), (defaultValue));
-
-  ValidateAndSet(aMatrixInit.mM11, aMatrixInit.mA, "m11", "a", 1);
-  ValidateAndSet(aMatrixInit.mM12, aMatrixInit.mB, "m12", "b", 0);
-  ValidateAndSet(aMatrixInit.mM21, aMatrixInit.mC, "m21", "c", 0);
-  ValidateAndSet(aMatrixInit.mM22, aMatrixInit.mD, "m22", "d", 1);
-  ValidateAndSet(aMatrixInit.mM41, aMatrixInit.mE, "m41", "e", 0);
-  ValidateAndSet(aMatrixInit.mM42, aMatrixInit.mF, "m42", "f", 0);
-
-  return true;
-
-#undef ValidateAliases
-#undef SetFromAliasOrDefault
-#undef ValidateAndSet
-}
-
-// https://drafts.fxtf.org/geometry/#matrix-validate-and-fixup
-static bool ValidateAndFixupMatrixInit(DOMMatrixInit& aMatrixInit,
-                                       ErrorResult& aRv) {
-#define Check3DField(field, fieldName, defaultValue)  \
-  if ((field) != (defaultValue)) {                    \
-    if (!aMatrixInit.mIs2D.WasPassed()) {             \
-      aMatrixInit.mIs2D.Construct(false);             \
-      return true;                                    \
-    }                                                 \
-    if (aMatrixInit.mIs2D.Value()) {                  \
-      aRv.ThrowTypeError<MSG_MATRIX_INIT_EXCEEDS_2D>( \
-          NS_LITERAL_STRING(fieldName));              \
-      return false;                                   \
-    }                                                 \
-  }
-
-  if (!ValidateAndFixupMatrix2DInit(aMatrixInit, aRv)) {
-    return false;
-  }
-
-  Check3DField(aMatrixInit.mM13, "m13", 0);
-  Check3DField(aMatrixInit.mM14, "m14", 0);
-  Check3DField(aMatrixInit.mM23, "m23", 0);
-  Check3DField(aMatrixInit.mM24, "m24", 0);
-  Check3DField(aMatrixInit.mM31, "m31", 0);
-  Check3DField(aMatrixInit.mM32, "m32", 0);
-  Check3DField(aMatrixInit.mM34, "m34", 0);
-  Check3DField(aMatrixInit.mM43, "m43", 0);
-  Check3DField(aMatrixInit.mM33, "m33", 1);
-  Check3DField(aMatrixInit.mM44, "m44", 1);
-
-  if (!aMatrixInit.mIs2D.WasPassed()) {
-    aMatrixInit.mIs2D.Construct(true);
-  }
-  return true;
-
-#undef Check3DField
-}
-
-void DOMMatrixReadOnly::SetDataFromMatrixInit(DOMMatrixInit& aMatrixInit) {
-  const bool is2D = aMatrixInit.mIs2D.Value();
-  MOZ_ASSERT(is2D == Is2D());
-  if (is2D) {
-    mMatrix2D->_11 = aMatrixInit.mM11.Value();
-    mMatrix2D->_12 = aMatrixInit.mM12.Value();
-    mMatrix2D->_21 = aMatrixInit.mM21.Value();
-    mMatrix2D->_22 = aMatrixInit.mM22.Value();
-    mMatrix2D->_31 = aMatrixInit.mM41.Value();
-    mMatrix2D->_32 = aMatrixInit.mM42.Value();
-  } else {
-    mMatrix3D->_11 = aMatrixInit.mM11.Value();
-    mMatrix3D->_12 = aMatrixInit.mM12.Value();
-    mMatrix3D->_13 = aMatrixInit.mM13;
-    mMatrix3D->_14 = aMatrixInit.mM14;
-    mMatrix3D->_21 = aMatrixInit.mM21.Value();
-    mMatrix3D->_22 = aMatrixInit.mM22.Value();
-    mMatrix3D->_23 = aMatrixInit.mM23;
-    mMatrix3D->_24 = aMatrixInit.mM24;
-    mMatrix3D->_31 = aMatrixInit.mM31;
-    mMatrix3D->_32 = aMatrixInit.mM32;
-    mMatrix3D->_33 = aMatrixInit.mM33;
-    mMatrix3D->_34 = aMatrixInit.mM34;
-    mMatrix3D->_41 = aMatrixInit.mM41.Value();
-    mMatrix3D->_42 = aMatrixInit.mM42.Value();
-    mMatrix3D->_43 = aMatrixInit.mM43;
-    mMatrix3D->_44 = aMatrixInit.mM44;
-  }
-}
-
-already_AddRefed<DOMMatrixReadOnly> DOMMatrixReadOnly::FromMatrix(
-    const GlobalObject& aGlobal, const DOMMatrixInit& aMatrixInit,
-    ErrorResult& aRv) {
-  DOMMatrixInit matrixInit(aMatrixInit);
-  if (!ValidateAndFixupMatrixInit(matrixInit, aRv)) {
-    return nullptr;
-  };
-
-  RefPtr<DOMMatrixReadOnly> rval =
-      new DOMMatrixReadOnly(aGlobal.GetAsSupports(), matrixInit.mIs2D.Value());
-  rval->SetDataFromMatrixInit(matrixInit);
-  return rval.forget();
-}
-
 already_AddRefed<DOMMatrixReadOnly> DOMMatrixReadOnly::Constructor(
     const GlobalObject& aGlobal,
     const Optional<StringOrUnrestrictedDoubleSequence>& aArg,
     ErrorResult& aRv) {
   if (!aArg.WasPassed()) {
     RefPtr<DOMMatrixReadOnly> rval =
         new DOMMatrixReadOnly(aGlobal.GetAsSupports());
     return rval.forget();
@@ -283,19 +161,19 @@ already_AddRefed<DOMMatrix> DOMMatrixRea
 already_AddRefed<DOMMatrix> DOMMatrixReadOnly::SkewY(double aSy) const {
   RefPtr<DOMMatrix> retval = new DOMMatrix(mParent, *this);
   retval->SkewYSelf(aSy);
 
   return retval.forget();
 }
 
 already_AddRefed<DOMMatrix> DOMMatrixReadOnly::Multiply(
-    const DOMMatrixInit& other, ErrorResult& aRv) const {
+    const DOMMatrix& other) const {
   RefPtr<DOMMatrix> retval = new DOMMatrix(mParent, *this);
-  retval->MultiplySelf(other, aRv);
+  retval->MultiplySelf(other);
 
   return retval.forget();
 }
 
 already_AddRefed<DOMMatrix> DOMMatrixReadOnly::FlipX() const {
   RefPtr<DOMMatrix> retval = new DOMMatrix(mParent, *this);
   if (mMatrix3D) {
     gfx::Matrix4x4Double m;
@@ -570,36 +448,16 @@ bool DOMMatrixReadOnly::ReadStructuredCl
     ReadDouble(&(matrix->mMatrix3D->_44));
   }
 
   return true;
 
 #undef ReadDouble
 }
 
-already_AddRefed<DOMMatrix> DOMMatrix::FromMatrix(
-    nsISupports* aParent, const DOMMatrixInit& aMatrixInit, ErrorResult& aRv) {
-  DOMMatrixInit matrixInit(aMatrixInit);
-  if (!ValidateAndFixupMatrixInit(matrixInit, aRv)) {
-    return nullptr;
-  };
-
-  RefPtr<DOMMatrix> matrix = new DOMMatrix(aParent, matrixInit.mIs2D.Value());
-  matrix->SetDataFromMatrixInit(matrixInit);
-  return matrix.forget();
-}
-
-already_AddRefed<DOMMatrix> DOMMatrix::FromMatrix(
-    const GlobalObject& aGlobal, const DOMMatrixInit& aMatrixInit,
-    ErrorResult& aRv) {
-  RefPtr<DOMMatrix> matrix =
-      FromMatrix(aGlobal.GetAsSupports(), aMatrixInit, aRv);
-  return matrix.forget();
-}
-
 already_AddRefed<DOMMatrix> DOMMatrix::Constructor(const GlobalObject& aGlobal,
                                                    ErrorResult& aRv) {
   RefPtr<DOMMatrix> obj = new DOMMatrix(aGlobal.GetAsSupports());
   return obj.forget();
 }
 
 already_AddRefed<DOMMatrix> DOMMatrix::Constructor(
     const GlobalObject& aGlobal, const nsAString& aTransformList,
@@ -713,53 +571,49 @@ already_AddRefed<DOMMatrix> DOMMatrix::R
 void DOMMatrixReadOnly::Ensure3DMatrix() {
   if (!mMatrix3D) {
     mMatrix3D =
         new gfx::Matrix4x4Double(gfx::Matrix4x4Double::From2D(*mMatrix2D));
     mMatrix2D = nullptr;
   }
 }
 
-DOMMatrix* DOMMatrix::MultiplySelf(const DOMMatrixInit& aOtherInit,
-                                   ErrorResult& aRv) {
-  RefPtr<DOMMatrix> other = FromMatrix(mParent, aOtherInit, aRv);
-  if (other->IsIdentity()) {
+DOMMatrix* DOMMatrix::MultiplySelf(const DOMMatrix& aOther) {
+  if (aOther.IsIdentity()) {
     return this;
   }
 
-  if (other->Is2D()) {
+  if (aOther.Is2D()) {
     if (mMatrix3D) {
-      *mMatrix3D = gfx::Matrix4x4Double::From2D(*other->mMatrix2D) * *mMatrix3D;
+      *mMatrix3D = gfx::Matrix4x4Double::From2D(*aOther.mMatrix2D) * *mMatrix3D;
     } else {
-      *mMatrix2D = *other->mMatrix2D * *mMatrix2D;
+      *mMatrix2D = *aOther.mMatrix2D * *mMatrix2D;
     }
   } else {
     Ensure3DMatrix();
-    *mMatrix3D = *other->mMatrix3D * *mMatrix3D;
+    *mMatrix3D = *aOther.mMatrix3D * *mMatrix3D;
   }
 
   return this;
 }
 
-DOMMatrix* DOMMatrix::PreMultiplySelf(const DOMMatrixInit& aOtherInit,
-                                      ErrorResult& aRv) {
-  RefPtr<DOMMatrix> other = FromMatrix(mParent, aOtherInit, aRv);
-  if (other->IsIdentity()) {
+DOMMatrix* DOMMatrix::PreMultiplySelf(const DOMMatrix& aOther) {
+  if (aOther.IsIdentity()) {
     return this;
   }
 
-  if (other->Is2D()) {
+  if (aOther.Is2D()) {
     if (mMatrix3D) {
-      *mMatrix3D = *mMatrix3D * gfx::Matrix4x4Double::From2D(*other->mMatrix2D);
+      *mMatrix3D = *mMatrix3D * gfx::Matrix4x4Double::From2D(*aOther.mMatrix2D);
     } else {
-      *mMatrix2D = *mMatrix2D * *other->mMatrix2D;
+      *mMatrix2D = *mMatrix2D * *aOther.mMatrix2D;
     }
   } else {
     Ensure3DMatrix();
-    *mMatrix3D = *mMatrix3D * *other->mMatrix3D;
+    *mMatrix3D = *mMatrix3D * *aOther.mMatrix3D;
   }
 
   return this;
 }
 
 DOMMatrix* DOMMatrix::TranslateSelf(double aTx, double aTy, double aTz) {
   if (aTx == 0 && aTy == 0 && aTz == 0) {
     return this;
--- a/dom/base/DOMMatrix.h
+++ b/dom/base/DOMMatrix.h
@@ -23,17 +23,16 @@ class nsIGlobalObject;
 namespace mozilla {
 namespace dom {
 
 class GlobalObject;
 class DOMMatrix;
 class DOMPoint;
 class StringOrUnrestrictedDoubleSequence;
 struct DOMPointInit;
-struct DOMMatrixInit;
 
 class DOMMatrixReadOnly : public nsWrapperCache {
  public:
   explicit DOMMatrixReadOnly(nsISupports* aParent)
       : mParent(aParent), mMatrix2D(new gfx::MatrixDouble()) {}
 
   DOMMatrixReadOnly(nsISupports* aParent, const DOMMatrixReadOnly& other)
       : mParent(aParent) {
@@ -51,20 +50,16 @@ class DOMMatrixReadOnly : public nsWrapp
 
   NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(DOMMatrixReadOnly)
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(DOMMatrixReadOnly)
 
   nsISupports* GetParentObject() const { return mParent; }
   virtual JSObject* WrapObject(JSContext* cx,
                                JS::Handle<JSObject*> aGivenProto) override;
 
-  static already_AddRefed<DOMMatrixReadOnly> FromMatrix(
-      const GlobalObject& aGlobal, const DOMMatrixInit& aMatrixInit,
-      ErrorResult& aRv);
-
   static already_AddRefed<DOMMatrixReadOnly> Constructor(
       const GlobalObject& aGlobal,
       const Optional<StringOrUnrestrictedDoubleSequence>& aArg,
       ErrorResult& aRv);
 
   static already_AddRefed<DOMMatrixReadOnly> ReadStructuredClone(
       JSContext* aCx, nsIGlobalObject* aGlobal,
       JSStructuredCloneReader* aReader);
@@ -172,18 +167,17 @@ class DOMMatrixReadOnly : public nsWrapp
       double aOriginX = 0, double aOriginY = 0, double aOriginZ = 0) const;
   already_AddRefed<DOMMatrix> Rotate(double aAngle, double aOriginX = 0,
                                      double aOriginY = 0) const;
   already_AddRefed<DOMMatrix> RotateFromVector(double aX, double aY) const;
   already_AddRefed<DOMMatrix> RotateAxisAngle(double aX, double aY, double aZ,
                                               double aAngle) const;
   already_AddRefed<DOMMatrix> SkewX(double aSx) const;
   already_AddRefed<DOMMatrix> SkewY(double aSy) const;
-  already_AddRefed<DOMMatrix> Multiply(const DOMMatrixInit& aOther,
-                                       ErrorResult& aRv) const;
+  already_AddRefed<DOMMatrix> Multiply(const DOMMatrix& aOther) const;
   already_AddRefed<DOMMatrix> FlipX() const;
   already_AddRefed<DOMMatrix> FlipY() const;
   already_AddRefed<DOMMatrix> Inverse() const;
 
   bool Is2D() const;
   bool IsIdentity() const;
   already_AddRefed<DOMPoint> TransformPoint(const DOMPointInit& aPoint) const;
   void ToFloat32Array(JSContext* aCx, JS::MutableHandle<JSObject*> aResult,
@@ -197,23 +191,16 @@ class DOMMatrixReadOnly : public nsWrapp
 
  protected:
   nsCOMPtr<nsISupports> mParent;
   nsAutoPtr<gfx::MatrixDouble> mMatrix2D;
   nsAutoPtr<gfx::Matrix4x4Double> mMatrix3D;
 
   virtual ~DOMMatrixReadOnly() {}
 
-  /**
-   * Sets data from a fully validated and fixed-up matrix init,
-   * where all of its members are properly defined.
-   * The init dictionary's dimension must match the matrix one.
-   */
-  void SetDataFromMatrixInit(DOMMatrixInit& aMatrixInit);
-
   DOMMatrixReadOnly* SetMatrixValue(const nsAString& aTransformList,
                                     ErrorResult& aRv);
   void Ensure3DMatrix();
 
   DOMMatrixReadOnly(nsISupports* aParent, bool is2D) : mParent(aParent) {
     if (is2D) {
       mMatrix2D = new gfx::MatrixDouble();
     } else {
@@ -235,23 +222,16 @@ class DOMMatrix : public DOMMatrixReadOn
   explicit DOMMatrix(nsISupports* aParent) : DOMMatrixReadOnly(aParent) {}
 
   DOMMatrix(nsISupports* aParent, const DOMMatrixReadOnly& other)
       : DOMMatrixReadOnly(aParent, other) {}
 
   DOMMatrix(nsISupports* aParent, const gfx::Matrix4x4& aMatrix)
       : DOMMatrixReadOnly(aParent, aMatrix) {}
 
-  static already_AddRefed<DOMMatrix> FromMatrix(
-      nsISupports* aParent, const DOMMatrixInit& aMatrixInit, ErrorResult& aRv);
-
-  static already_AddRefed<DOMMatrix> FromMatrix(
-      const GlobalObject& aGlobal, const DOMMatrixInit& aMatrixInit,
-      ErrorResult& aRv);
-
   static already_AddRefed<DOMMatrix> Constructor(const GlobalObject& aGlobal,
                                                  ErrorResult& aRv);
   static already_AddRefed<DOMMatrix> Constructor(
       const GlobalObject& aGlobal, const nsAString& aTransformList,
       ErrorResult& aRv);
   static already_AddRefed<DOMMatrix> Constructor(
       const GlobalObject& aGlobal, const DOMMatrixReadOnly& aOther,
       ErrorResult& aRv);
@@ -267,18 +247,18 @@ class DOMMatrix : public DOMMatrixReadOn
 
   static already_AddRefed<DOMMatrix> ReadStructuredClone(
       JSContext* aCx, nsIGlobalObject* aGlobal,
       JSStructuredCloneReader* aReader);
 
   virtual JSObject* WrapObject(JSContext* aCx,
                                JS::Handle<JSObject*> aGivenProto) override;
 
-  DOMMatrix* MultiplySelf(const DOMMatrixInit& aOther, ErrorResult& aRv);
-  DOMMatrix* PreMultiplySelf(const DOMMatrixInit& aOther, ErrorResult& aRv);
+  DOMMatrix* MultiplySelf(const DOMMatrix& aOther);
+  DOMMatrix* PreMultiplySelf(const DOMMatrix& aOther);
   DOMMatrix* TranslateSelf(double aTx, double aTy, double aTz = 0);
   DOMMatrix* ScaleSelf(double aScale, double aOriginX = 0, double aOriginY = 0);
   DOMMatrix* Scale3dSelf(double aScale, double aOriginX = 0,
                          double aOriginY = 0, double aOriginZ = 0);
   DOMMatrix* ScaleNonUniformSelf(double aScaleX, double aScaleY = 1,
                                  double aScaleZ = 1, double aOriginX = 0,
                                  double aOriginY = 0, double aOriginZ = 0);
   DOMMatrix* RotateSelf(double aAngle, double aOriginX = 0,
--- a/dom/base/WebKitCSSMatrix.cpp
+++ b/dom/base/WebKitCSSMatrix.cpp
@@ -50,19 +50,19 @@ JSObject* WebKitCSSMatrix::WrapObject(JS
 
 WebKitCSSMatrix* WebKitCSSMatrix::SetMatrixValue(
     const nsAString& aTransformList, ErrorResult& aRv) {
   DOMMatrix::SetMatrixValue(aTransformList, aRv);
   return this;
 }
 
 already_AddRefed<WebKitCSSMatrix> WebKitCSSMatrix::Multiply(
-    const DOMMatrixInit& aOtherInit, ErrorResult& aRv) const {
+    const WebKitCSSMatrix& other) const {
   RefPtr<WebKitCSSMatrix> retval = new WebKitCSSMatrix(mParent, *this);
-  retval->MultiplySelf(aOtherInit, aRv);
+  retval->MultiplySelf(other);
 
   return retval.forget();
 }
 
 already_AddRefed<WebKitCSSMatrix> WebKitCSSMatrix::Inverse(
     ErrorResult& aRv) const {
   RefPtr<WebKitCSSMatrix> retval = new WebKitCSSMatrix(mParent, *this);
   retval->InvertSelfThrow(aRv);
--- a/dom/base/WebKitCSSMatrix.h
+++ b/dom/base/WebKitCSSMatrix.h
@@ -32,18 +32,18 @@ class WebKitCSSMatrix final : public DOM
 
   nsISupports* GetParentObject() const { return mParent; }
   virtual JSObject* WrapObject(JSContext* aCx,
                                JS::Handle<JSObject*> aGivenProto) override;
 
   WebKitCSSMatrix* SetMatrixValue(const nsAString& aTransformList,
                                   ErrorResult& aRv);
 
-  already_AddRefed<WebKitCSSMatrix> Multiply(const DOMMatrixInit& aOtherInit,
-                                             ErrorResult& aRv) const;
+  already_AddRefed<WebKitCSSMatrix> Multiply(
+      const WebKitCSSMatrix& aOther) const;
   already_AddRefed<WebKitCSSMatrix> Inverse(ErrorResult& aRv) const;
   already_AddRefed<WebKitCSSMatrix> Translate(double aTx, double aTy,
                                               double aTz) const;
   already_AddRefed<WebKitCSSMatrix> Scale(double aScaleX,
                                           const Optional<double>& aScaleY,
                                           double aScaleZ) const;
   already_AddRefed<WebKitCSSMatrix> Rotate(double aRotX,
                                            const Optional<double>& aRotY,
--- a/dom/bindings/Errors.msg
+++ b/dom/bindings/Errors.msg
@@ -97,18 +97,16 @@ MSG_DEF(MSG_INVALID_EASING_ERROR, 1, JSE
 MSG_DEF(MSG_USELESS_SETTIMEOUT, 1, JSEXN_TYPEERR, "Useless {0} call (missing quotes around argument?)")
 MSG_DEF(MSG_TOKENLIST_NO_SUPPORTED_TOKENS, 2, JSEXN_TYPEERR, "{0} attribute of <{1}> does not define any supported tokens")
 MSG_DEF(MSG_CACHE_STREAM_CLOSED, 0, JSEXN_TYPEERR, "Response body is a cache file stream that has already been closed.")
 MSG_DEF(MSG_TIME_VALUE_OUT_OF_RANGE, 1, JSEXN_TYPEERR, "{0} is outside the supported range for time values.")
 MSG_DEF(MSG_ONLY_IF_CACHED_WITHOUT_SAME_ORIGIN, 1, JSEXN_TYPEERR, "Request mode '{0}' was used, but request cache mode 'only-if-cached' can only be used with request mode 'same-origin'.")
 MSG_DEF(MSG_THRESHOLD_RANGE_ERROR, 0, JSEXN_RANGEERR, "Threshold values must all be in the range [0, 1].")
 MSG_DEF(MSG_WORKER_THREAD_SHUTTING_DOWN, 0, JSEXN_TYPEERR, "The Worker thread is shutting down.")
 MSG_DEF(MSG_CACHE_OPEN_FAILED, 0, JSEXN_TYPEERR, "CacheStorage.open() failed to access the storage system.")
-MSG_DEF(MSG_MATRIX_INIT_CONFLICTING_VALUE, 2, JSEXN_TYPEERR, "Matrix init unexpectedly got different values for '{0}' and '{1}'.")
-MSG_DEF(MSG_MATRIX_INIT_EXCEEDS_2D, 1, JSEXN_TYPEERR, "Matrix init has an unexpected 3D element '{0}' which cannot coexist with 'is2D: true'.")
 MSG_DEF(MSG_MATRIX_INIT_LENGTH_WRONG, 1, JSEXN_TYPEERR, "Matrix init sequence must have a length of 6 or 16 (actual value: {0})")
 MSG_DEF(MSG_INVALID_MEDIA_VIDEO_CONFIGURATION, 0, JSEXN_TYPEERR, "Invalid VideoConfiguration.")
 MSG_DEF(MSG_INVALID_MEDIA_AUDIO_CONFIGURATION, 0, JSEXN_TYPEERR, "Invalid AudioConfiguration.")
 MSG_DEF(MSG_INVALID_CURVE_DURATION_ERROR, 0, JSEXN_RANGEERR, "The curve duration for setValueCurveAtTime must be strictly positive.")
 MSG_DEF(MSG_INVALID_AUDIOPARAM_METHOD_START_TIME_ERROR, 0, JSEXN_RANGEERR, "The start time for an AudioParam method must be non-negative.")
 MSG_DEF(MSG_INVALID_AUDIOPARAM_METHOD_END_TIME_ERROR, 0, JSEXN_RANGEERR, "The end time for an AudioParam method must be non-negative.")
 MSG_DEF(MSG_INVALID_AUDIOPARAM_EXPONENTIAL_VALUE_ERROR, 0, JSEXN_RANGEERR, "The value passed to exponentialRampToValueAtTime must be positive.")
 MSG_DEF(MSG_INVALID_AUDIOPARAM_EXPONENTIAL_CONSTANT_ERROR, 0, JSEXN_RANGEERR, "The exponential constant passed to setTargetAtTime must be non-negative.")
--- a/dom/webidl/DOMMatrix.webidl
+++ b/dom/webidl/DOMMatrix.webidl
@@ -10,18 +10,16 @@
  * liability, trademark and document use rules apply.
  */
 
 [Pref="layout.css.DOMMatrix.enabled",
  Constructor(optional (DOMString or sequence<unrestricted double>) init),
  Exposed=(Window,Worker),
  Serializable]
 interface DOMMatrixReadOnly {
-    [NewObject, Throws] static DOMMatrixReadOnly fromMatrix(optional DOMMatrixInit other);
-
     // 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;
 
@@ -65,17 +63,17 @@ interface DOMMatrixReadOnly {
     DOMMatrix rotateFromVector(unrestricted double x,
                                unrestricted double y);
     DOMMatrix rotateAxisAngle(unrestricted double x,
                               unrestricted double y,
                               unrestricted double z,
                               unrestricted double angle);
     DOMMatrix skewX(optional unrestricted double sx = 0);
     DOMMatrix skewY(optional unrestricted double sy = 0);
-    [NewObject, Throws] DOMMatrix multiply(optional DOMMatrixInit other);
+    DOMMatrix multiply(DOMMatrix other);
     DOMMatrix flipX();
     DOMMatrix flipY();
     DOMMatrix inverse();
 
     // Helper methods
     readonly attribute boolean is2D;
     readonly attribute boolean isIdentity;
     DOMPoint                   transformPoint(optional DOMPointInit point);
@@ -90,18 +88,16 @@ interface DOMMatrixReadOnly {
  Constructor(DOMString transformList),
  Constructor(DOMMatrixReadOnly other),
  Constructor(Float32Array array32),
  Constructor(Float64Array array64),
  Constructor(sequence<unrestricted double> numberSequence),
  Exposed=(Window,Worker),
  Serializable]
 interface DOMMatrix : DOMMatrixReadOnly {
-    [NewObject, Throws] static DOMMatrix fromMatrix(optional DOMMatrixInit other);
-
     // 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;
 
@@ -118,18 +114,18 @@ interface DOMMatrix : DOMMatrixReadOnly 
     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
-    [Throws] DOMMatrix multiplySelf(optional DOMMatrixInit other);
-    [Throws] DOMMatrix preMultiplySelf(optional DOMMatrixInit other);
+    DOMMatrix multiplySelf(DOMMatrix other);
+    DOMMatrix preMultiplySelf(DOMMatrix other);
     DOMMatrix translateSelf(optional unrestricted double tx = 0,
                             optional unrestricted double ty = 0,
                             optional unrestricted double tz = 0);
     DOMMatrix scaleSelf(unrestricted double scale,
                         optional unrestricted double originX = 0,
                         optional unrestricted double originY = 0);
     DOMMatrix scale3dSelf(unrestricted double scale,
                           optional unrestricted double originX = 0,
@@ -151,36 +147,8 @@ interface DOMMatrix : DOMMatrixReadOnly 
                                   unrestricted double z,
                                   unrestricted double angle);
     DOMMatrix skewXSelf(optional unrestricted double sx = 0);
     DOMMatrix skewYSelf(optional unrestricted double sy = 0);
     DOMMatrix invertSelf();
     [Exposed=Window, Throws] 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;
-};
--- a/dom/webidl/WebKitCSSMatrix.webidl
+++ b/dom/webidl/WebKitCSSMatrix.webidl
@@ -13,18 +13,17 @@
  Exposed=Window,
  Func="mozilla::dom::WebKitCSSMatrix::FeatureEnabled"]
 interface WebKitCSSMatrix : DOMMatrix {
     // Mutable transform methods
     [Throws]
     WebKitCSSMatrix setMatrixValue(DOMString transformList);
 
     // Immutable transform methods
-    [Throws]
-    WebKitCSSMatrix multiply(optional DOMMatrixInit other);
+    WebKitCSSMatrix multiply(WebKitCSSMatrix other);
     [Throws]
     WebKitCSSMatrix inverse();
     WebKitCSSMatrix translate(optional unrestricted double tx = 0,
                               optional unrestricted double ty = 0,
                               optional unrestricted double tz = 0);
     WebKitCSSMatrix scale(optional unrestricted double scaleX = 1,
                           optional unrestricted double scaleY,
                           optional unrestricted double scaleZ = 1);
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/css/geometry/DOMMatrix-002.html.ini
@@ -0,0 +1,40 @@
+[DOMMatrix-002.html]
+  [test translate() doesn't mutate]
+    expected: FAIL
+
+  [test scale() doesn't mutate]
+    expected: FAIL
+
+  [test scale3d() doesn't mutate]
+    expected: FAIL
+
+  [test rotate() doesn't mutate]
+    expected: FAIL
+
+  [test rotateFromVector() doesn't mutate]
+    expected: FAIL
+
+  [test rotateAxisAngle() doesn't mutate]
+    expected: FAIL
+
+  [test skewX() doesn't mutate]
+    expected: FAIL
+
+  [test skewY() doesn't mutate]
+    expected: FAIL
+
+  [test multiply() doesn't mutate]
+    expected: FAIL
+
+  [test flipX() doesn't mutate]
+    expected: FAIL
+
+  [test flipY() doesn't mutate]
+    expected: FAIL
+
+  [test inverse() doesn't mutate]
+    expected: FAIL
+
+  [test scaleNonUniform() doesn't mutate]
+    expected: FAIL
+
--- a/testing/web-platform/meta/css/geometry/DOMMatrix-003.html.ini
+++ b/testing/web-platform/meta/css/geometry/DOMMatrix-003.html.ini
@@ -1,21 +1,48 @@
 [DOMMatrix-003.html]
+  [test translate()]
+    expected: FAIL
+
   [test scale() without offsets]
     expected: FAIL
 
   [test scale() with offsets]
     expected: FAIL
 
   [test scale3d()]
     expected: FAIL
 
+  [test rotate() 2d]
+    expected: FAIL
+
   [test rotate()]
     expected: FAIL
 
+  [test rotateFromVector()]
+    expected: FAIL
+
+  [test rotateAxisAngle() ]
+    expected: FAIL
+
+  [test skewX()]
+    expected: FAIL
+
+  [test skewY()]
+    expected: FAIL
+
+  [test multiply with inverse is identity]
+    expected: FAIL
+
+  [test flipX()]
+    expected: FAIL
+
+  [test flipY()]
+    expected: FAIL
+
   [test scaleNonUniform()]
     expected: FAIL
 
   [test scaleNonUniform() with sx]
     expected: FAIL
 
   [test scaleNonUniform() with sx, sy]
     expected: FAIL
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/css/geometry/DOMMatrix-css-string.worker.js.ini
@@ -0,0 +1,6 @@
+[DOMMatrix-css-string.worker.html]
+  [DOMMatrix stringifier in worker (3d identity)]
+    expected: FAIL
+
+  [DOMMatrixReadOnly stringifier in worker (3d identity)]
+    expected: FAIL
--- a/testing/web-platform/meta/css/geometry/DOMMatrix-newobject.html.ini
+++ b/testing/web-platform/meta/css/geometry/DOMMatrix-newobject.html.ini
@@ -9,22 +9,28 @@
     expected: FAIL
 
   [DOMMatrix rotateFromVector]
     expected: FAIL
 
   [DOMMatrix rotateAxisAngle]
     expected: FAIL
 
+  [DOMMatrix multiply]
+    expected: FAIL
+
   [DOMMatrixReadOnly scale]
     expected: FAIL
 
   [DOMMatrixReadOnly scale3d]
     expected: FAIL
 
   [DOMMatrixReadOnly rotate]
     expected: FAIL
 
   [DOMMatrixReadOnly rotateFromVector]
     expected: FAIL
 
   [DOMMatrixReadOnly rotateAxisAngle]
     expected: FAIL
+
+  [DOMMatrixReadOnly multiply]
+    expected: FAIL
--- a/testing/web-platform/meta/css/geometry/DOMMatrix-stringifier.html.ini
+++ b/testing/web-platform/meta/css/geometry/DOMMatrix-stringifier.html.ini
@@ -1,9 +1,12 @@
 [DOMMatrix-stringifier.html]
+  [DOMMatrix stringifier: identity (3d)]
+    expected: FAIL
+
   [DOMMatrix stringifier: NaN (2d)]
     expected: FAIL
 
   [DOMMatrix stringifier: NaN (3d)]
     expected: FAIL
 
   [DOMMatrix stringifier: Infinity (2d)]
     expected: FAIL
@@ -60,16 +63,22 @@
     expected: FAIL
 
   [DOMMatrix stringifier: Number.MIN_VALUE (2d)]
     expected: FAIL
 
   [DOMMatrix stringifier: Number.MIN_VALUE (3d)]
     expected: FAIL
 
+  [DOMMatrix stringifier: throwing getters (3d)]
+    expected: FAIL
+
+  [DOMMatrixReadOnly stringifier: identity (3d)]
+    expected: FAIL
+
   [DOMMatrixReadOnly stringifier: NaN (2d)]
     expected: FAIL
 
   [DOMMatrixReadOnly stringifier: NaN (3d)]
     expected: FAIL
 
   [DOMMatrixReadOnly stringifier: Infinity (2d)]
     expected: FAIL
@@ -126,16 +135,22 @@
     expected: FAIL
 
   [DOMMatrixReadOnly stringifier: Number.MIN_VALUE (2d)]
     expected: FAIL
 
   [DOMMatrixReadOnly stringifier: Number.MIN_VALUE (3d)]
     expected: FAIL
 
+  [DOMMatrixReadOnly stringifier: throwing getters (3d)]
+    expected: FAIL
+
+  [WebKitCSSMatrix stringifier: identity (3d)]
+    expected: FAIL
+
   [WebKitCSSMatrix stringifier: NaN (2d)]
     expected: FAIL
 
   [WebKitCSSMatrix stringifier: NaN (3d)]
     expected: FAIL
 
   [WebKitCSSMatrix stringifier: Infinity (2d)]
     expected: FAIL
@@ -192,8 +207,11 @@
     expected: FAIL
 
   [WebKitCSSMatrix stringifier: Number.MIN_VALUE (2d)]
     expected: FAIL
 
   [WebKitCSSMatrix stringifier: Number.MIN_VALUE (3d)]
     expected: FAIL
 
+  [WebKitCSSMatrix stringifier: throwing getters (3d)]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/css/geometry/DOMMatrixInit-validate-fixup.html.ini
@@ -0,0 +1,274 @@
+[DOMMatrixInit-validate-fixup.html]
+  [{a: 1, m11: 2} (invalid)]
+    expected: FAIL
+
+  [{b: 0, m12: -1} (invalid)]
+    expected: FAIL
+
+  [{c: Infinity, m21: -Infinity} (invalid)]
+    expected: FAIL
+
+  [{d: 0, m22: NaN} (invalid)]
+    expected: FAIL
+
+  [{e: 1, m41: 1.00000001} (invalid)]
+    expected: FAIL
+
+  [{f: 0, m42: 5e-324} (invalid)]
+    expected: FAIL
+
+  [{m13: 1, is2D: true} (invalid)]
+    expected: FAIL
+
+  [{m14: 1, is2D: true} (invalid)]
+    expected: FAIL
+
+  [{m23: 1, is2D: true} (invalid)]
+    expected: FAIL
+
+  [{m24: 1, is2D: true} (invalid)]
+    expected: FAIL
+
+  [{m31: 1, is2D: true} (invalid)]
+    expected: FAIL
+
+  [{m32: 1, is2D: true} (invalid)]
+    expected: FAIL
+
+  [{m33: 0, is2D: true} (invalid)]
+    expected: FAIL
+
+  [{m33: -0, is2D: true} (invalid)]
+    expected: FAIL
+
+  [{m33: -1, is2D: true} (invalid)]
+    expected: FAIL
+
+  [{m34: 1, is2D: true} (invalid)]
+    expected: FAIL
+
+  [{m43: 1, is2D: true} (invalid)]
+    expected: FAIL
+
+  [{m44: 0, is2D: true} (invalid)]
+    expected: FAIL
+
+  [{} (2d)]
+    expected: FAIL
+
+  [{is2D: undefined} (2d)]
+    expected: FAIL
+
+  [{a: 1, m11: 1} (2d)]
+    expected: FAIL
+
+  [{b: 0, m12: undefined} (2d)]
+    expected: FAIL
+
+  [{c: 0, m21: 0} (2d)]
+    expected: FAIL
+
+  [{c: 0, m21: -0} (2d)]
+    expected: FAIL
+
+  [{c: -0, m21: 0} (2d)]
+    expected: FAIL
+
+  [{c: -0, m21: -0} (2d)]
+    expected: FAIL
+
+  [{d: Infinity, m22: Infinity} (2d)]
+    expected: FAIL
+
+  [{e: -Infinity, m41: -Infinity} (2d)]
+    expected: FAIL
+
+  [{f: NaN, m42: NaN} (2d)]
+    expected: FAIL
+
+  [{f: NaN, m42: NaN, is2D: true} (2d)]
+    expected: FAIL
+
+  [{f: 0, m42: null} (2d)]
+    expected: FAIL
+
+  [{f: -0, m42: null} (2d)]
+    expected: FAIL
+
+  [{a: 2} (2d)]
+    expected: FAIL
+
+  [{b: 2} (2d)]
+    expected: FAIL
+
+  [{c: 2} (2d)]
+    expected: FAIL
+
+  [{d: 2} (2d)]
+    expected: FAIL
+
+  [{e: 2} (2d)]
+    expected: FAIL
+
+  [{f: 2} (2d)]
+    expected: FAIL
+
+  [{a: -0, b: -0, c: -0, d: -0, e: -0, f: -0} (2d)]
+    expected: FAIL
+
+  [{a: -0, b: -0, c: -0, d: -0, e: -0, f: -0, is2D: true} (2d)]
+    expected: FAIL
+
+  [{m11: 2} (2d)]
+    expected: FAIL
+
+  [{m12: 2} (2d)]
+    expected: FAIL
+
+  [{m21: 2} (2d)]
+    expected: FAIL
+
+  [{m22: 2} (2d)]
+    expected: FAIL
+
+  [{m41: 2} (2d)]
+    expected: FAIL
+
+  [{m42: 2} (2d)]
+    expected: FAIL
+
+  [{m11: -0, m12: -0, m21: -0, m22: -0, m41: -0, m42: -0} (2d)]
+    expected: FAIL
+
+  [{m11: -0, m12: -0, m21: -0, m22: -0, m41: -0, m42: -0, is2D: true} (2d)]
+    expected: FAIL
+
+  [{m13: 0, is2D: true} (2d)]
+    expected: FAIL
+
+  [{m13: -0, is2D: true} (2d)]
+    expected: FAIL
+
+  [{m14: 0, is2D: true} (2d)]
+    expected: FAIL
+
+  [{m14: -0, is2D: true} (2d)]
+    expected: FAIL
+
+  [{m23: 0, is2D: true} (2d)]
+    expected: FAIL
+
+  [{m23: -0, is2D: true} (2d)]
+    expected: FAIL
+
+  [{m24: 0, is2D: true} (2d)]
+    expected: FAIL
+
+  [{m24: -0, is2D: true} (2d)]
+    expected: FAIL
+
+  [{m31: 0, is2D: true} (2d)]
+    expected: FAIL
+
+  [{m31: -0, is2D: true} (2d)]
+    expected: FAIL
+
+  [{m32: 0, is2D: true} (2d)]
+    expected: FAIL
+
+  [{m32: -0, is2D: true} (2d)]
+    expected: FAIL
+
+  [{m33: 1, is2D: true} (2d)]
+    expected: FAIL
+
+  [{m34: 0, is2D: true} (2d)]
+    expected: FAIL
+
+  [{m34: -0, is2D: true} (2d)]
+    expected: FAIL
+
+  [{m43: 0, is2D: true} (2d)]
+    expected: FAIL
+
+  [{m43: -0, is2D: true} (2d)]
+    expected: FAIL
+
+  [{m44: 1, is2D: true} (2d)]
+    expected: FAIL
+
+  [{is2D: true} (2d)]
+    expected: FAIL
+
+  [{m13: 1, is2D: false} (3d)]
+    expected: FAIL
+
+  [{m14: 1, is2D: false} (3d)]
+    expected: FAIL
+
+  [{m23: 1, is2D: false} (3d)]
+    expected: FAIL
+
+  [{m24: 1, is2D: false} (3d)]
+    expected: FAIL
+
+  [{m31: 1, is2D: false} (3d)]
+    expected: FAIL
+
+  [{m32: 1, is2D: false} (3d)]
+    expected: FAIL
+
+  [{m33: 0, is2D: false} (3d)]
+    expected: FAIL
+
+  [{m33: -0, is2D: false} (3d)]
+    expected: FAIL
+
+  [{m33: -1, is2D: false} (3d)]
+    expected: FAIL
+
+  [{m34: 1, is2D: false} (3d)]
+    expected: FAIL
+
+  [{m43: 1, is2D: false} (3d)]
+    expected: FAIL
+
+  [{m44: 0, is2D: false} (3d)]
+    expected: FAIL
+
+  [{m13: 1} (3d)]
+    expected: FAIL
+
+  [{m14: 1} (3d)]
+    expected: FAIL
+
+  [{m23: 1} (3d)]
+    expected: FAIL
+
+  [{m24: 1} (3d)]
+    expected: FAIL
+
+  [{m31: 1} (3d)]
+    expected: FAIL
+
+  [{m32: 1} (3d)]
+    expected: FAIL
+
+  [{m33: 0} (3d)]
+    expected: FAIL
+
+  [{m34: 1} (3d)]
+    expected: FAIL
+
+  [{m43: 1} (3d)]
+    expected: FAIL
+
+  [{m44: 0} (3d)]
+    expected: FAIL
+
+  [{is2D: false} (3d)]
+    expected: FAIL
+
+  [{is2D: null} (3d)]
+    expected: FAIL
+
--- a/testing/web-platform/meta/css/geometry/historical.html.ini
+++ b/testing/web-platform/meta/css/geometry/historical.html.ini
@@ -23,8 +23,18 @@
   [DOMMatrix rotateFromVectorSelf number of required arguments]
     expected: FAIL
 
   [DOMMatrix rotateAxisAngleSelf number of required arguments]
     expected: FAIL
 
   [DOMPointReadOnly matrixTransform number of required arguments]
     expected: FAIL
+
+  [DOMMatrixReadOnly multiply number of required arguments]
+    expected: FAIL
+
+  [DOMMatrix multiplySelf number of required arguments]
+    expected: FAIL
+
+  [DOMMatrix preMultiplySelf number of required arguments]
+    expected: FAIL
+
--- a/testing/web-platform/meta/css/geometry/interfaces.html.ini
+++ b/testing/web-platform/meta/css/geometry/interfaces.html.ini
@@ -42,16 +42,19 @@
     expected: FAIL
 
   [DOMQuad interface: calling fromRect(DOMRectInit) on new DOMQuad() with too few arguments must throw TypeError]
     expected: FAIL
 
   [DOMQuad interface: calling fromQuad(DOMQuadInit) on new DOMQuad() with too few arguments must throw TypeError]
     expected: FAIL
 
+  [DOMMatrixReadOnly interface: operation fromMatrix(DOMMatrixInit)]
+    expected: FAIL
+
   [DOMMatrixReadOnly interface: operation fromFloat32Array(Float32Array)]
     expected: FAIL
 
   [DOMMatrixReadOnly interface: operation fromFloat64Array(Float64Array)]
     expected: FAIL
 
   [DOMMatrixReadOnly interface: operation scale(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)]
     expected: FAIL
@@ -66,43 +69,73 @@
     expected: FAIL
 
   [DOMMatrixReadOnly interface: operation rotateFromVector(unrestricted double, unrestricted double)]
     expected: FAIL
 
   [DOMMatrixReadOnly interface: operation rotateAxisAngle(unrestricted double, unrestricted double, unrestricted double, unrestricted double)]
     expected: FAIL
 
+  [DOMMatrixReadOnly interface: operation multiply(DOMMatrixInit)]
+    expected: FAIL
+
+  [DOMMatrixReadOnly interface: calling fromMatrix(DOMMatrixInit) on new DOMMatrixReadOnly() with too few arguments must throw TypeError]
+    expected: FAIL
+
   [DOMMatrixReadOnly interface: calling fromFloat32Array(Float32Array) on new DOMMatrixReadOnly() with too few arguments must throw TypeError]
     expected: FAIL
 
   [DOMMatrixReadOnly interface: calling fromFloat64Array(Float64Array) on new DOMMatrixReadOnly() with too few arguments must throw TypeError]
     expected: FAIL
 
+  [DOMMatrixReadOnly must be primary interface of DOMMatrixReadOnly.fromMatrix({is2D: false})]
+    expected: FAIL
+
+  [Stringification of DOMMatrixReadOnly.fromMatrix({is2D: false})]
+    expected: FAIL
+
   [DOMMatrix interface: legacy window alias]
     expected: FAIL
 
+  [DOMMatrix interface: operation fromMatrix(DOMMatrixInit)]
+    expected: FAIL
+
   [DOMMatrix interface: operation fromFloat32Array(Float32Array)]
     expected: FAIL
 
   [DOMMatrix interface: operation fromFloat64Array(Float64Array)]
     expected: FAIL
 
+  [DOMMatrix interface: operation multiplySelf(DOMMatrixInit)]
+    expected: FAIL
+
+  [DOMMatrix interface: operation preMultiplySelf(DOMMatrixInit)]
+    expected: FAIL
+
   [DOMMatrix interface: operation scaleSelf(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)]
     expected: FAIL
 
   [DOMMatrix interface: operation scale3dSelf(unrestricted double, unrestricted double, unrestricted double, unrestricted double)]
     expected: FAIL
 
   [DOMMatrix interface: operation rotateSelf(unrestricted double, unrestricted double, unrestricted double)]
     expected: FAIL
 
   [DOMMatrix interface: operation rotateFromVectorSelf(unrestricted double, unrestricted double)]
     expected: FAIL
 
   [DOMMatrix interface: operation rotateAxisAngleSelf(unrestricted double, unrestricted double, unrestricted double, unrestricted double)]
     expected: FAIL
 
+  [DOMMatrix interface: calling fromMatrix(DOMMatrixInit) on new DOMMatrix() with too few arguments must throw TypeError]
+    expected: FAIL
+
   [DOMMatrix interface: calling fromFloat32Array(Float32Array) on new DOMMatrix() with too few arguments must throw TypeError]
     expected: FAIL
 
   [DOMMatrix interface: calling fromFloat64Array(Float64Array) on new DOMMatrix() with too few arguments must throw TypeError]
     expected: FAIL
+
+  [DOMMatrix must be primary interface of DOMMatrix.fromMatrix({is2D: false})]
+    expected: FAIL
+
+  [Stringification of DOMMatrix.fromMatrix({is2D: false})]
+    expected: FAIL
--- a/testing/web-platform/meta/css/geometry/interfaces.worker.js.ini
+++ b/testing/web-platform/meta/css/geometry/interfaces.worker.js.ini
@@ -36,16 +36,19 @@
     expected: FAIL
 
   [DOMQuad interface: calling fromRect(DOMRectInit) on new DOMQuad() with too few arguments must throw TypeError]
     expected: FAIL
 
   [DOMQuad interface: calling fromQuad(DOMQuadInit) on new DOMQuad() with too few arguments must throw TypeError]
     expected: FAIL
 
+  [DOMMatrixReadOnly interface: operation fromMatrix(DOMMatrixInit)]
+    expected: FAIL
+
   [DOMMatrixReadOnly interface: operation fromFloat32Array(Float32Array)]
     expected: FAIL
 
   [DOMMatrixReadOnly interface: operation fromFloat64Array(Float64Array)]
     expected: FAIL
 
   [DOMMatrixReadOnly interface: operation scale(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)]
     expected: FAIL
@@ -60,40 +63,70 @@
     expected: FAIL
 
   [DOMMatrixReadOnly interface: operation rotateFromVector(unrestricted double, unrestricted double)]
     expected: FAIL
 
   [DOMMatrixReadOnly interface: operation rotateAxisAngle(unrestricted double, unrestricted double, unrestricted double, unrestricted double)]
     expected: FAIL
 
+  [DOMMatrixReadOnly interface: operation multiply(DOMMatrixInit)]
+    expected: FAIL
+
+  [DOMMatrixReadOnly interface: calling fromMatrix(DOMMatrixInit) on new DOMMatrixReadOnly() with too few arguments must throw TypeError]
+    expected: FAIL
+
   [DOMMatrixReadOnly interface: calling fromFloat32Array(Float32Array) on new DOMMatrixReadOnly() with too few arguments must throw TypeError]
     expected: FAIL
 
   [DOMMatrixReadOnly interface: calling fromFloat64Array(Float64Array) on new DOMMatrixReadOnly() with too few arguments must throw TypeError]
     expected: FAIL
 
+  [DOMMatrixReadOnly must be primary interface of DOMMatrixReadOnly.fromMatrix({is2D: false})]
+    expected: FAIL
+
+  [Stringification of DOMMatrixReadOnly.fromMatrix({is2D: false})]
+    expected: FAIL
+
+  [DOMMatrix interface: operation fromMatrix(DOMMatrixInit)]
+    expected: FAIL
+
   [DOMMatrix interface: operation fromFloat32Array(Float32Array)]
     expected: FAIL
 
   [DOMMatrix interface: operation fromFloat64Array(Float64Array)]
     expected: FAIL
 
+  [DOMMatrix interface: operation multiplySelf(DOMMatrixInit)]
+    expected: FAIL
+
+  [DOMMatrix interface: operation preMultiplySelf(DOMMatrixInit)]
+    expected: FAIL
+
   [DOMMatrix interface: operation scaleSelf(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)]
     expected: FAIL
 
   [DOMMatrix interface: operation scale3dSelf(unrestricted double, unrestricted double, unrestricted double, unrestricted double)]
     expected: FAIL
 
   [DOMMatrix interface: operation rotateSelf(unrestricted double, unrestricted double, unrestricted double)]
     expected: FAIL
 
   [DOMMatrix interface: operation rotateFromVectorSelf(unrestricted double, unrestricted double)]
     expected: FAIL
 
   [DOMMatrix interface: operation rotateAxisAngleSelf(unrestricted double, unrestricted double, unrestricted double, unrestricted double)]
     expected: FAIL
 
+  [DOMMatrix interface: calling fromMatrix(DOMMatrixInit) on new DOMMatrix() with too few arguments must throw TypeError]
+    expected: FAIL
+
   [DOMMatrix interface: calling fromFloat32Array(Float32Array) on new DOMMatrix() with too few arguments must throw TypeError]
     expected: FAIL
 
   [DOMMatrix interface: calling fromFloat64Array(Float64Array) on new DOMMatrix() with too few arguments must throw TypeError]
     expected: FAIL
+
+  [DOMMatrix must be primary interface of DOMMatrix.fromMatrix({is2D: false})]
+    expected: FAIL
+
+  [Stringification of DOMMatrix.fromMatrix({is2D: false})]
+    expected: FAIL