Bug 1558101: Implement geometry static constructors r=bzbarsky
authorBoris Zbarsky <bzbarsky@mit.edu>
Wed, 03 Jul 2019 05:51:30 +0000
changeset 481054 c52f9ebca761485c75ba9eda3d1bb7c1ed1c53f8
parent 481053 1da1824d64a64204d2a49c274885f5f0e4a5ecf1
child 481055 509af1e0771d619a0b6d73bffec0583f4f0db9a9
child 481079 3619d80d3bce3fa94c9887cf86774010b4a6544c
push id36231
push usermalexandru@mozilla.com
push dateWed, 03 Jul 2019 09:47:34 +0000
treeherdermozilla-central@c52f9ebca761 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky
bugs1558101
milestone69.0a1
first release with
nightly linux32
c52f9ebca761 / 69.0a1 / 20190703094734 / files
nightly linux64
c52f9ebca761 / 69.0a1 / 20190703094734 / files
nightly mac
c52f9ebca761 / 69.0a1 / 20190703094734 / files
nightly win32
c52f9ebca761 / 69.0a1 / 20190703094734 / files
nightly win64
c52f9ebca761 / 69.0a1 / 20190703094734 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1558101: Implement geometry static constructors r=bzbarsky Includes .fromRect, .fromQuad, and .fromFloat32/64Array. Differential Revision: https://phabricator.services.mozilla.com/D36464
dom/base/DOMMatrix.cpp
dom/base/DOMMatrix.h
dom/base/DOMQuad.cpp
dom/base/DOMQuad.h
dom/base/DOMRect.cpp
dom/base/DOMRect.h
dom/webidl/DOMMatrix.webidl
dom/webidl/DOMQuad.webidl
dom/webidl/DOMRect.webidl
testing/web-platform/meta/css/geometry/DOMQuad-001.html.ini
testing/web-platform/meta/css/geometry/DOMQuad-002.html.ini
testing/web-platform/meta/css/geometry/DOMRect-002.html.ini
testing/web-platform/meta/css/geometry/interfaces.html.ini
testing/web-platform/meta/css/geometry/interfaces.worker.js.ini
testing/web-platform/meta/css/geometry/spec-examples.html.ini
--- a/dom/base/DOMMatrix.cpp
+++ b/dom/base/DOMMatrix.cpp
@@ -155,16 +155,44 @@ already_AddRefed<DOMMatrixReadOnly> DOMM
   };
 
   RefPtr<DOMMatrixReadOnly> rval =
       new DOMMatrixReadOnly(aGlobal.GetAsSupports(), matrixInit.mIs2D.Value());
   rval->SetDataFromMatrixInit(matrixInit);
   return rval.forget();
 }
 
+already_AddRefed<DOMMatrixReadOnly> DOMMatrixReadOnly::FromFloat32Array(
+    const GlobalObject& aGlobal, const Float32Array& aArray32,
+    ErrorResult& aRv) {
+  aArray32.ComputeLengthAndData();
+
+  const int length = aArray32.Length();
+  const bool is2D = length == 6;
+  RefPtr<DOMMatrixReadOnly> obj =
+      new DOMMatrixReadOnly(aGlobal.GetAsSupports(), is2D);
+  SetDataInMatrix(obj, aArray32.Data(), length, aRv);
+
+  return obj.forget();
+}
+
+already_AddRefed<DOMMatrixReadOnly> DOMMatrixReadOnly::FromFloat64Array(
+    const GlobalObject& aGlobal, const Float64Array& aArray64,
+    ErrorResult& aRv) {
+  aArray64.ComputeLengthAndData();
+
+  const int length = aArray64.Length();
+  const bool is2D = length == 6;
+  RefPtr<DOMMatrixReadOnly> obj =
+      new DOMMatrixReadOnly(aGlobal.GetAsSupports(), is2D);
+  SetDataInMatrix(obj, aArray64.Data(), length, aRv);
+
+  return obj.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();
@@ -588,16 +616,42 @@ already_AddRefed<DOMMatrix> DOMMatrix::F
 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::FromFloat32Array(
+    const GlobalObject& aGlobal, const Float32Array& aArray32,
+    ErrorResult& aRv) {
+  aArray32.ComputeLengthAndData();
+
+  const int length = aArray32.Length();
+  const bool is2D = length == 6;
+  RefPtr<DOMMatrix> obj = new DOMMatrix(aGlobal.GetAsSupports(), is2D);
+  SetDataInMatrix(obj, aArray32.Data(), length, aRv);
+
+  return obj.forget();
+}
+
+already_AddRefed<DOMMatrix> DOMMatrix::FromFloat64Array(
+    const GlobalObject& aGlobal, const Float64Array& aArray64,
+    ErrorResult& aRv) {
+  aArray64.ComputeLengthAndData();
+
+  const int length = aArray64.Length();
+  const bool is2D = length == 6;
+  RefPtr<DOMMatrix> obj = new DOMMatrix(aGlobal.GetAsSupports(), is2D);
+  SetDataInMatrix(obj, aArray64.Data(), length, aRv);
+
+  return obj.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,
@@ -651,37 +705,23 @@ static void SetDataInMatrix(DOMMatrixRea
     lengthStr.AppendInt(aLength);
     aRv.ThrowTypeError<MSG_MATRIX_INIT_LENGTH_WRONG>(lengthStr);
   }
 }
 
 already_AddRefed<DOMMatrix> DOMMatrix::Constructor(const GlobalObject& aGlobal,
                                                    const Float32Array& aArray32,
                                                    ErrorResult& aRv) {
-  aArray32.ComputeLengthAndData();
-
-  const int length = aArray32.Length();
-  const bool is2D = length == 6;
-  RefPtr<DOMMatrix> obj = new DOMMatrix(aGlobal.GetAsSupports(), is2D);
-  SetDataInMatrix(obj, aArray32.Data(), length, aRv);
-
-  return obj.forget();
+  return FromFloat32Array(aGlobal, aArray32, aRv);
 }
 
 already_AddRefed<DOMMatrix> DOMMatrix::Constructor(const GlobalObject& aGlobal,
                                                    const Float64Array& aArray64,
                                                    ErrorResult& aRv) {
-  aArray64.ComputeLengthAndData();
-
-  const int length = aArray64.Length();
-  const bool is2D = length == 6;
-  RefPtr<DOMMatrix> obj = new DOMMatrix(aGlobal.GetAsSupports(), is2D);
-  SetDataInMatrix(obj, aArray64.Data(), length, aRv);
-
-  return obj.forget();
+  return FromFloat64Array(aGlobal, aArray64, aRv);
 }
 
 already_AddRefed<DOMMatrix> DOMMatrix::Constructor(
     const GlobalObject& aGlobal, const Sequence<double>& aNumberSequence,
     ErrorResult& aRv) {
   const int length = aNumberSequence.Length();
   const bool is2D = length == 6;
   RefPtr<DOMMatrix> obj = new DOMMatrix(aGlobal.GetAsSupports(), is2D);
--- a/dom/base/DOMMatrix.h
+++ b/dom/base/DOMMatrix.h
@@ -55,16 +55,24 @@ class DOMMatrixReadOnly : public nsWrapp
   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> FromFloat32Array(
+      const GlobalObject& aGlobal, const Float32Array& aArray32,
+      ErrorResult& aRv);
+
+  static already_AddRefed<DOMMatrixReadOnly> FromFloat64Array(
+      const GlobalObject& aGlobal, const Float64Array& aArray64,
+      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);
@@ -244,16 +252,24 @@ class DOMMatrix : public DOMMatrixReadOn
 
   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> FromFloat32Array(
+      const GlobalObject& aGlobal, const Float32Array& aArray32,
+      ErrorResult& aRv);
+
+  static already_AddRefed<DOMMatrix> FromFloat64Array(
+      const GlobalObject& aGlobal, const Float64Array& aArray64,
+      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);
--- a/dom/base/DOMQuad.cpp
+++ b/dom/base/DOMQuad.cpp
@@ -31,16 +31,40 @@ DOMQuad::DOMQuad(nsISupports* aParent) :
 
 DOMQuad::~DOMQuad() {}
 
 JSObject* DOMQuad::WrapObject(JSContext* aCx,
                               JS::Handle<JSObject*> aGivenProto) {
   return DOMQuad_Binding::Wrap(aCx, this, aGivenProto);
 }
 
+already_AddRefed<DOMQuad> DOMQuad::FromRect(const GlobalObject& aGlobal,
+                                            const DOMRectInit& aInit) {
+  nsISupports* parent = aGlobal.GetAsSupports();
+  RefPtr<DOMQuad> obj = new DOMQuad(parent);
+  obj->mPoints[0] = new DOMPoint(parent, aInit.mX, aInit.mY, 0, 1);
+  obj->mPoints[1] =
+      new DOMPoint(parent, aInit.mX + aInit.mWidth, aInit.mY, 0, 1);
+  obj->mPoints[2] = new DOMPoint(parent, aInit.mX + aInit.mWidth,
+                                 aInit.mY + aInit.mHeight, 0, 1);
+  obj->mPoints[3] =
+      new DOMPoint(parent, aInit.mX, aInit.mY + aInit.mHeight, 0, 1);
+  return obj.forget();
+}
+
+already_AddRefed<DOMQuad> DOMQuad::FromQuad(const GlobalObject& aGlobal,
+                                            const DOMQuadInit& aInit) {
+  RefPtr<DOMQuad> obj = new DOMQuad(aGlobal.GetAsSupports());
+  obj->mPoints[0] = DOMPoint::FromPoint(aGlobal, aInit.mP1);
+  obj->mPoints[1] = DOMPoint::FromPoint(aGlobal, aInit.mP2);
+  obj->mPoints[2] = DOMPoint::FromPoint(aGlobal, aInit.mP3);
+  obj->mPoints[3] = DOMPoint::FromPoint(aGlobal, aInit.mP4);
+  return obj.forget();
+}
+
 already_AddRefed<DOMQuad> DOMQuad::Constructor(const GlobalObject& aGlobal,
                                                const DOMPointInit& aP1,
                                                const DOMPointInit& aP2,
                                                const DOMPointInit& aP3,
                                                const DOMPointInit& aP4,
                                                ErrorResult& aRV) {
   RefPtr<DOMQuad> obj = new DOMQuad(aGlobal.GetAsSupports());
   obj->mPoints[0] = DOMPoint::FromPoint(aGlobal, aP1);
--- a/dom/base/DOMQuad.h
+++ b/dom/base/DOMQuad.h
@@ -20,31 +20,38 @@
 class nsIGlobalObject;
 
 namespace mozilla {
 namespace dom {
 
 class DOMRectReadOnly;
 class DOMPoint;
 struct DOMPointInit;
+struct DOMQuadInit;
 
 class DOMQuad final : public nsWrapperCache {
   ~DOMQuad();
 
  public:
   DOMQuad(nsISupports* aParent, CSSPoint aPoints[4]);
   explicit DOMQuad(nsISupports* aParent);
 
   NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(DOMQuad)
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(DOMQuad)
 
   nsISupports* GetParentObject() const { return mParent; }
   virtual JSObject* WrapObject(JSContext* aCx,
                                JS::Handle<JSObject*> aGivenProto) override;
 
+  static already_AddRefed<DOMQuad> FromRect(const GlobalObject& aGlobal,
+                                            const DOMRectInit& aInit);
+
+  static already_AddRefed<DOMQuad> FromQuad(const GlobalObject& aGlobal,
+                                            const DOMQuadInit& aInit);
+
   static already_AddRefed<DOMQuad> Constructor(const GlobalObject& aGlobal,
                                                const DOMPointInit& aP1,
                                                const DOMPointInit& aP2,
                                                const DOMPointInit& aP3,
                                                const DOMPointInit& aP4,
                                                ErrorResult& aRV);
   static already_AddRefed<DOMQuad> Constructor(const GlobalObject& aGlobal,
                                                const DOMRectReadOnly& aRect,
--- a/dom/base/DOMRect.cpp
+++ b/dom/base/DOMRect.cpp
@@ -22,16 +22,23 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(
 NS_INTERFACE_MAP_END
 
 JSObject* DOMRectReadOnly::WrapObject(JSContext* aCx,
                                       JS::Handle<JSObject*> aGivenProto) {
   MOZ_ASSERT(mParent);
   return DOMRectReadOnly_Binding::Wrap(aCx, this, aGivenProto);
 }
 
+already_AddRefed<DOMRectReadOnly> DOMRectReadOnly::FromRect(
+    const GlobalObject& aGlobal, const DOMRectInit& aInit) {
+  RefPtr<DOMRectReadOnly> obj = new DOMRectReadOnly(
+      aGlobal.GetAsSupports(), aInit.mX, aInit.mY, aInit.mWidth, aInit.mHeight);
+  return obj.forget();
+}
+
 already_AddRefed<DOMRectReadOnly> DOMRectReadOnly::Constructor(
     const GlobalObject& aGlobal, double aX, double aY, double aWidth,
     double aHeight, ErrorResult& aRv) {
   RefPtr<DOMRectReadOnly> obj =
       new DOMRectReadOnly(aGlobal.GetAsSupports(), aX, aY, aWidth, aHeight);
   return obj.forget();
 }
 
@@ -82,16 +89,23 @@ bool DOMRectReadOnly::ReadStructuredClon
 // -----------------------------------------------------------------------------
 
 JSObject* DOMRect::WrapObject(JSContext* aCx,
                               JS::Handle<JSObject*> aGivenProto) {
   MOZ_ASSERT(mParent);
   return DOMRect_Binding::Wrap(aCx, this, aGivenProto);
 }
 
+already_AddRefed<DOMRect> DOMRect::FromRect(const GlobalObject& aGlobal,
+                                            const DOMRectInit& aInit) {
+  RefPtr<DOMRect> obj = new DOMRect(aGlobal.GetAsSupports(), aInit.mX, aInit.mY,
+                                    aInit.mWidth, aInit.mHeight);
+  return obj.forget();
+}
+
 already_AddRefed<DOMRect> DOMRect::Constructor(const GlobalObject& aGlobal,
                                                double aX, double aY,
                                                double aWidth, double aHeight,
                                                ErrorResult& aRv) {
   RefPtr<DOMRect> obj =
       new DOMRect(aGlobal.GetAsSupports(), aX, aY, aWidth, aHeight);
   return obj.forget();
 }
--- a/dom/base/DOMRect.h
+++ b/dom/base/DOMRect.h
@@ -18,16 +18,18 @@
 #include <algorithm>
 
 struct nsRect;
 class nsIGlobalObject;
 
 namespace mozilla {
 namespace dom {
 
+struct DOMRectInit;
+
 class DOMRectReadOnly : public nsISupports, public nsWrapperCache {
  protected:
   virtual ~DOMRectReadOnly() {}
 
  public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMRectReadOnly)
 
@@ -38,16 +40,19 @@ class DOMRectReadOnly : public nsISuppor
   nsISupports* GetParentObject() const {
     MOZ_ASSERT(mParent);
     return mParent;
   }
 
   virtual JSObject* WrapObject(JSContext* aCx,
                                JS::Handle<JSObject*> aGivenProto) override;
 
+  static already_AddRefed<DOMRectReadOnly> FromRect(const GlobalObject& aGlobal,
+                                                    const DOMRectInit& aInit);
+
   static already_AddRefed<DOMRectReadOnly> Constructor(
       const GlobalObject& aGlobal, double aX, double aY, double aWidth,
       double aHeight, ErrorResult& aRv);
 
   double X() const { return mX; }
   double Y() const { return mY; }
   double Width() const { return mWidth; }
   double Height() const { return mHeight; }
@@ -88,16 +93,19 @@ class DOMRectReadOnly : public nsISuppor
 class DOMRect final : public DOMRectReadOnly {
  public:
   explicit DOMRect(nsISupports* aParent, double aX = 0, double aY = 0,
                    double aWidth = 0, double aHeight = 0)
       : DOMRectReadOnly(aParent, aX, aY, aWidth, aHeight) {}
 
   NS_INLINE_DECL_REFCOUNTING_INHERITED(DOMRect, DOMRectReadOnly)
 
+  static already_AddRefed<DOMRect> FromRect(const GlobalObject& aGlobal,
+                                            const DOMRectInit& aInit);
+
   static already_AddRefed<DOMRect> Constructor(const GlobalObject& aGlobal,
                                                double aX, double aY,
                                                double aWidth, double aHeight,
                                                ErrorResult& aRv);
 
   virtual JSObject* WrapObject(JSContext* aCx,
                                JS::Handle<JSObject*> aGivenProto) override;
 
--- a/dom/webidl/DOMMatrix.webidl
+++ b/dom/webidl/DOMMatrix.webidl
@@ -11,16 +11,19 @@
  */
 
 [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);
+    [NewObject, Throws] static DOMMatrixReadOnly fromFloat32Array(Float32Array array32);
+    [NewObject, Throws] 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;
@@ -90,16 +93,19 @@ interface DOMMatrixReadOnly {
  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);
+    [NewObject, Throws] static DOMMatrixReadOnly fromFloat32Array(Float32Array array32);
+    [NewObject, Throws] static DOMMatrixReadOnly 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;
--- a/dom/webidl/DOMQuad.webidl
+++ b/dom/webidl/DOMQuad.webidl
@@ -12,23 +12,26 @@
 
 [Pref="layout.css.DOMQuad.enabled",
  Constructor(optional DOMPointInit p1, optional DOMPointInit p2,
              optional DOMPointInit p3, optional DOMPointInit p4),
  Constructor(DOMRectReadOnly rect),
  Exposed=(Window,Worker),
  Serializable]
 interface DOMQuad {
+    [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] DOMRectReadOnly getBounds();
 
     [Default] object toJSON();
 };
 
 dictionary DOMQuadInit {
-    DOMPointInit p1;
-    DOMPointInit p2;
-    DOMPointInit p3;
-    DOMPointInit p4;
+    DOMPointInit p1 = null;
+    DOMPointInit p2 = null;
+    DOMPointInit p3 = null;
+    DOMPointInit p4 = null;
 };
--- a/dom/webidl/DOMRect.webidl
+++ b/dom/webidl/DOMRect.webidl
@@ -10,28 +10,32 @@
  * liability, trademark and document use rules apply.
  */
 
 [Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
              optional unrestricted double width = 0, optional unrestricted double height = 0),
  Exposed=(Window,Worker),
  Serializable]
 interface DOMRect : DOMRectReadOnly {
+    [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;
 };
 
 [ProbablyShortLivingWrapper,
  Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
              optional unrestricted double width = 0, optional unrestricted double height = 0),
  Exposed=(Window,Worker),
  Serializable]
 interface DOMRectReadOnly {
+    [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;
--- a/testing/web-platform/meta/css/geometry/DOMQuad-001.html.ini
+++ b/testing/web-platform/meta/css/geometry/DOMQuad-001.html.ini
@@ -1,34 +1,3 @@
 [DOMQuad-001.html]
-  [testConstructor5: bounds]
-    expected: FAIL
-
-  [testConstructor6: bounds]
-    expected: FAIL
-
-  [testConstructor7: bounds]
-    expected: FAIL
-
   [p1Top4Attributes1: bounds]
     expected: FAIL
-
-  [boundsAttribute0: bounds]
-    expected: FAIL
-
-  [fromRect() method on DOMQuad: points]
-    expected: FAIL
-
-  [fromRect() method on DOMQuad: bounds]
-    expected: FAIL
-
-  [fromRect() method on DOMQuad with negatives: points]
-    expected: FAIL
-
-  [fromRect() method on DOMQuad with negatives: bounds]
-    expected: FAIL
-
-  [fromRect() method on DOMQuad with Infinity: points]
-    expected: FAIL
-
-  [fromRect() method on DOMQuad with Infinity: bounds]
-    expected: FAIL
-
deleted file mode 100644
--- a/testing/web-platform/meta/css/geometry/DOMQuad-002.html.ini
+++ /dev/null
@@ -1,13 +0,0 @@
-[DOMQuad-002.html]
-  [test fromRect]
-    expected: FAIL
-
-  [test fromRect with Infinity]
-    expected: FAIL
-
-  [test fromQuad]
-    expected: FAIL
-
-  [test getBounds]
-    expected: FAIL
-
deleted file mode 100644
--- a/testing/web-platform/meta/css/geometry/DOMRect-002.html.ini
+++ /dev/null
@@ -1,7 +0,0 @@
-[DOMRect-002.html]
-  [DOMRect.fromRect]
-    expected: FAIL
-
-  [DOMRectReadOnly.fromRect]
-    expected: FAIL
-
--- a/testing/web-platform/meta/css/geometry/interfaces.html.ini
+++ b/testing/web-platform/meta/css/geometry/interfaces.html.ini
@@ -12,64 +12,14 @@
     expected: FAIL
 
   [DOMPointReadOnly interface: new DOMPoint() must inherit property "matrixTransform(DOMMatrixInit)" with the proper type]
     expected: FAIL
 
   [DOMPointReadOnly interface: calling matrixTransform(DOMMatrixInit) on new DOMPoint() with too few arguments must throw TypeError]
     expected: FAIL
 
-  [DOMRectReadOnly interface: operation fromRect(DOMRectInit)]
-    expected: FAIL
-
-  [DOMRectReadOnly interface: calling fromRect(DOMRectInit) on new DOMRectReadOnly() with too few arguments must throw TypeError]
-    expected: FAIL
-
   [DOMRect interface: legacy window alias]
     expected: FAIL
 
-  [DOMRect interface: operation fromRect(DOMRectInit)]
-    expected: FAIL
-
-  [DOMRect interface: calling fromRect(DOMRectInit) on new DOMRect() with too few arguments must throw TypeError]
-    expected: FAIL
-
-  [DOMRectReadOnly interface: calling fromRect(DOMRectInit) on new DOMRect() with too few arguments must throw TypeError]
-    expected: FAIL
-
-  [DOMQuad interface: operation fromRect(DOMRectInit)]
-    expected: FAIL
-
-  [DOMQuad interface: operation fromQuad(DOMQuadInit)]
-    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 fromFloat32Array(Float32Array)]
-    expected: FAIL
-
-  [DOMMatrixReadOnly interface: operation fromFloat64Array(Float64Array)]
-    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
-
   [DOMMatrix interface: legacy window alias]
     expected: FAIL
 
-  [DOMMatrix interface: operation fromFloat32Array(Float32Array)]
-    expected: FAIL
-
-  [DOMMatrix interface: operation fromFloat64Array(Float64Array)]
-    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
--- a/testing/web-platform/meta/css/geometry/interfaces.worker.js.ini
+++ b/testing/web-platform/meta/css/geometry/interfaces.worker.js.ini
@@ -8,59 +8,8 @@
   [DOMPointReadOnly interface: calling matrixTransform(DOMMatrixInit) on new DOMPointReadOnly() with too few arguments must throw TypeError]
     expected: FAIL
 
   [DOMPointReadOnly interface: new DOMPoint() must inherit property "matrixTransform(DOMMatrixInit)" with the proper type]
     expected: FAIL
 
   [DOMPointReadOnly interface: calling matrixTransform(DOMMatrixInit) on new DOMPoint() with too few arguments must throw TypeError]
     expected: FAIL
-
-  [DOMRectReadOnly interface: operation fromRect(DOMRectInit)]
-    expected: FAIL
-
-  [DOMRectReadOnly interface: calling fromRect(DOMRectInit) on new DOMRectReadOnly() with too few arguments must throw TypeError]
-    expected: FAIL
-
-  [DOMRect interface: operation fromRect(DOMRectInit)]
-    expected: FAIL
-
-  [DOMRect interface: calling fromRect(DOMRectInit) on new DOMRect() with too few arguments must throw TypeError]
-    expected: FAIL
-
-  [DOMRectReadOnly interface: calling fromRect(DOMRectInit) on new DOMRect() with too few arguments must throw TypeError]
-    expected: FAIL
-
-  [DOMQuad interface: operation fromRect(DOMRectInit)]
-    expected: FAIL
-
-  [DOMQuad interface: operation fromQuad(DOMQuadInit)]
-    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 fromFloat32Array(Float32Array)]
-    expected: FAIL
-
-  [DOMMatrixReadOnly interface: operation fromFloat64Array(Float64Array)]
-    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
-
-  [DOMMatrix interface: operation fromFloat32Array(Float32Array)]
-    expected: FAIL
-
-  [DOMMatrix interface: operation fromFloat64Array(Float64Array)]
-    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
--- a/testing/web-platform/meta/css/geometry/spec-examples.html.ini
+++ b/testing/web-platform/meta/css/geometry/spec-examples.html.ini
@@ -1,10 +1,7 @@
 [spec-examples.html]
   [matrixTransform]
     expected: FAIL
 
-  [DOMQuad]
-    expected: FAIL
-
   [DOMMatrix NaN]
     expected: FAIL