Backed out 3 changesets (bug 1186265) for wpt8 failures in /css/geometry/interfaces.html on a CLOSED TREE
authorshindli <shindli@mozilla.com>
Mon, 16 Apr 2018 21:57:47 +0300
changeset 467465 50aeb30fd283f1f245a04e1e2861ebf028008d61
parent 467464 fe275b0fa525753b745dae89c24fa19ad983d206
child 467466 92a5018d1ecfd58024a55a6d30348caf095aa7b7
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1186265
milestone61.0a1
backs outd8986aead3e05be3a7f15252c098e7da173c42aa
2ba85ec7c9daf168c55c6240617720583f31cde4
f3a0b2686f45f6d3300901a78e5a770b79f93005
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 3 changesets (bug 1186265) for wpt8 failures in /css/geometry/interfaces.html on a CLOSED TREE Backed out changeset d8986aead3e0 (bug 1186265) Backed out changeset 2ba85ec7c9da (bug 1186265) Backed out changeset f3a0b2686f45 (bug 1186265)
dom/base/DOMPoint.cpp
dom/base/DOMPoint.h
dom/base/DOMQuad.cpp
dom/bindings/Bindings.conf
dom/webidl/DOMPoint.webidl
testing/web-platform/meta/MANIFEST.json
testing/web-platform/meta/css/geometry/DOMMatrix-003.html.ini
testing/web-platform/meta/css/geometry/DOMPoint-001.html.ini
testing/web-platform/meta/css/geometry/DOMPoint-002.html.ini
testing/web-platform/meta/css/geometry/interfaces.html.ini
testing/web-platform/tests/css/geometry/DOMPoint-001.html
--- a/dom/base/DOMPoint.cpp
+++ b/dom/base/DOMPoint.cpp
@@ -12,42 +12,19 @@
 using namespace mozilla;
 using namespace mozilla::dom;
 
 NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(DOMPointReadOnly, mParent)
 
 NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(DOMPointReadOnly, AddRef)
 NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(DOMPointReadOnly, Release)
 
-already_AddRefed<DOMPointReadOnly>
-DOMPointReadOnly::FromPoint(const GlobalObject& aGlobal, const DOMPointInit& aParams)
-{
-  RefPtr<DOMPointReadOnly> obj =
-    new DOMPointReadOnly(aGlobal.GetAsSupports(), aParams.mX, aParams.mY,
-                         aParams.mZ, aParams.mW);
-  return obj.forget();
-}
-
-already_AddRefed<DOMPointReadOnly>
-DOMPointReadOnly::Constructor(const GlobalObject& aGlobal, double aX, double aY,
-                              double aZ, double aW, ErrorResult& aRV)
-{
-  RefPtr<DOMPointReadOnly> obj =
-    new DOMPointReadOnly(aGlobal.GetAsSupports(), aX, aY, aZ, aW);
-  return obj.forget();
-}
-
-JSObject*
-DOMPointReadOnly::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
-{
-  return DOMPointReadOnlyBinding::Wrap(aCx, this, aGivenProto);
-}
-
 already_AddRefed<DOMPoint>
-DOMPoint::FromPoint(const GlobalObject& aGlobal, const DOMPointInit& aParams)
+DOMPoint::Constructor(const GlobalObject& aGlobal, const DOMPointInit& aParams,
+                      ErrorResult& aRV)
 {
   RefPtr<DOMPoint> obj =
     new DOMPoint(aGlobal.GetAsSupports(), aParams.mX, aParams.mY,
                  aParams.mZ, aParams.mW);
   return obj.forget();
 }
 
 already_AddRefed<DOMPoint>
--- a/dom/base/DOMPoint.h
+++ b/dom/base/DOMPoint.h
@@ -29,54 +29,47 @@ public:
     : mParent(aParent)
     , mX(aX)
     , mY(aY)
     , mZ(aZ)
     , mW(aW)
   {
   }
 
-  static already_AddRefed<DOMPointReadOnly>
-  FromPoint(const GlobalObject& aGlobal, const DOMPointInit& aParams);
-  static already_AddRefed<DOMPointReadOnly>
-  Constructor(const GlobalObject& aGlobal, double aX, double aY,
-              double aZ, double aW, ErrorResult& aRV);
-
   NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(DOMPointReadOnly)
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(DOMPointReadOnly)
 
   double X() const { return mX; }
   double Y() const { return mY; }
   double Z() const { return mZ; }
   double W() const { return mW; }
 
-  nsISupports* GetParentObject() const { return mParent; }
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
-
 protected:
   virtual ~DOMPointReadOnly() {}
 
   nsCOMPtr<nsISupports> mParent;
   double mX, mY, mZ, mW;
 };
 
 class DOMPoint final : public DOMPointReadOnly
 {
 public:
   explicit DOMPoint(nsISupports* aParent, double aX = 0.0, double aY = 0.0,
                     double aZ = 0.0, double aW = 1.0)
     : DOMPointReadOnly(aParent, aX, aY, aZ, aW)
   {}
 
   static already_AddRefed<DOMPoint>
-  FromPoint(const GlobalObject& aGlobal, const DOMPointInit& aParams);
+  Constructor(const GlobalObject& aGlobal, const DOMPointInit& aParams,
+              ErrorResult& aRV);
   static already_AddRefed<DOMPoint>
   Constructor(const GlobalObject& aGlobal, double aX, double aY,
               double aZ, double aW, ErrorResult& aRV);
 
+  nsISupports* GetParentObject() const { return mParent; }
   virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   void SetX(double aX) { mX = aX; }
   void SetY(double aY) { mY = aY; }
   void SetZ(double aZ) { mZ = aZ; }
   void SetW(double aW) { mW = aW; }
 };
 
--- a/dom/base/DOMQuad.cpp
+++ b/dom/base/DOMQuad.cpp
@@ -48,20 +48,20 @@ 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);
-  obj->mPoints[1] = DOMPoint::FromPoint(aGlobal, aP2);
-  obj->mPoints[2] = DOMPoint::FromPoint(aGlobal, aP3);
-  obj->mPoints[3] = DOMPoint::FromPoint(aGlobal, aP4);
+  obj->mPoints[0] = DOMPoint::Constructor(aGlobal, aP1, aRV);
+  obj->mPoints[1] = DOMPoint::Constructor(aGlobal, aP2, aRV);
+  obj->mPoints[2] = DOMPoint::Constructor(aGlobal, aP3, aRV);
+  obj->mPoints[3] = DOMPoint::Constructor(aGlobal, aP4, aRV);
   return obj.forget();
 }
 
 already_AddRefed<DOMQuad>
 DOMQuad::Constructor(const GlobalObject& aGlobal, const DOMRectReadOnly& aRect,
                      ErrorResult& aRV)
 {
   CSSPoint points[4];
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -259,16 +259,17 @@ DOMInterfaces = {
 
 'DOMMatrixReadOnly': {
     'headerFile': 'mozilla/dom/DOMMatrix.h',
     'concrete': False,
 },
 
 'DOMPointReadOnly': {
     'headerFile': 'mozilla/dom/DOMPoint.h',
+    'concrete': False,
 },
 
 'DOMRectList': {
     'headerFile': 'mozilla/dom/DOMRect.h',
 },
 
 'DOMRectReadOnly': {
     'headerFile': 'mozilla/dom/DOMRect.h',
--- a/dom/webidl/DOMPoint.webidl
+++ b/dom/webidl/DOMPoint.webidl
@@ -5,40 +5,33 @@
  *
  * The origin of this IDL file is
  * http://dev.w3.org/fxtf/geometry/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
-[Pref="layout.css.DOMPoint.enabled",
- Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
-             optional unrestricted double z = 0, optional unrestricted double w = 1)]
+[Pref="layout.css.DOMPoint.enabled"]
 interface DOMPointReadOnly {
-    [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; 
-
-    jsonifier;
 };
 
 [Pref="layout.css.DOMPoint.enabled",
- Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
+ Constructor(optional DOMPointInit point),
+ Constructor(unrestricted double x, unrestricted double y,
              optional unrestricted double z = 0, optional unrestricted double w = 1)]
 interface DOMPoint : DOMPointReadOnly {
-    [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;
-};
+};
\ No newline at end of file
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -536880,17 +536880,17 @@
    "aa00e3456bf951230fb85999874795c918964cf4",
    "testharness"
   ],
   "css/geometry/DOMMatrixInit-validate-fixup.html": [
    "bb27ad23e388ea50a26618bc50709d78997f1081",
    "testharness"
   ],
   "css/geometry/DOMPoint-001.html": [
-   "67417ec6c7384455a9160cfc0c7594bbba2b376f",
+   "75a1c984c5a9b414bce5276e01f2b0b017bc49d3",
    "testharness"
   ],
   "css/geometry/DOMPoint-002.html": [
    "68b09f967ee8d221b11e949a32cc27a17082633b",
    "testharness"
   ],
   "css/geometry/DOMQuad-001.html": [
    "5f48cfc224a18cfe37a7cf94cf48665a19681f21",
--- a/testing/web-platform/meta/css/geometry/DOMMatrix-003.html.ini
+++ b/testing/web-platform/meta/css/geometry/DOMMatrix-003.html.ini
@@ -32,8 +32,15 @@
   [test multiply with inverse is identity]
     expected: FAIL
 
   [test flipX()]
     expected: FAIL
 
   [test flipY()]
     expected: FAIL
+
+  [test transformPoint() - 2d matrix]
+    expected: FAIL
+
+  [test transformPoint() - 3d matrix]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/css/geometry/DOMPoint-001.html.ini
@@ -0,0 +1,4 @@
+[DOMPoint-001.html]
+  [testConstructor2undefined]
+    expected: FAIL
+
--- a/testing/web-platform/meta/css/geometry/DOMPoint-002.html.ini
+++ b/testing/web-platform/meta/css/geometry/DOMPoint-002.html.ini
@@ -1,6 +1,94 @@
 [DOMPoint-002.html]
+  [test DOMPoint Constructor one args]
+    expected: FAIL
+
+  [test DOMPoint Constructor with undefined]
+    expected: FAIL
+
+  [test DOMPoint Constructor with empty object]
+    expected: FAIL
+
+  [test DOMPoint fromPoint with empty object]
+    expected: FAIL
+
+  [test DOMPoint fromPoint with x]
+    expected: FAIL
+
+  [test DOMPoint fromPoint with x, y]
+    expected: FAIL
+
+  [test DOMPoint fromPoint with x, y, z]
+    expected: FAIL
+
+  [test DOMPoint fromPoint with x, y, z, w]
+    expected: FAIL
+
+  [test DOMPoint fromPoint with x, y, z, w, v]
+    expected: FAIL
+
+  [test DOMPoint fromPoint with x, z]
+    expected: FAIL
+
+  [test DOMPoint fromPoint with undefined value]
+    expected: FAIL
+
   [test DOMPoint matrixTransform]
     expected: FAIL
 
+  [test DOMPointReadOnly Constructor no args]
+    expected: FAIL
+
+  [test DOMPointReadOnly Constructor one args]
+    expected: FAIL
+
+  [test DOMPointReadOnly Constructor two args]
+    expected: FAIL
+
+  [test DOMPointReadOnly Constructor three args]
+    expected: FAIL
+
+  [test DOMPointReadOnly Constructor four args]
+    expected: FAIL
+
+  [test DOMPointReadOnly Constructor more then four args]
+    expected: FAIL
+
+  [test DOMPointReadOnly Constructor with undefined]
+    expected: FAIL
+
+  [test DOMPointReadOnly Constructor with string]
+    expected: FAIL
+
+  [test DOMPointReadOnly Constructor with object]
+    expected: FAIL
+
+  [test DOMPointReadOnly fromPoint with empty object]
+    expected: FAIL
+
+  [test DOMPointReadOnly fromPoint with x]
+    expected: FAIL
+
+  [test DOMPointReadOnly fromPoint with x, y]
+    expected: FAIL
+
+  [test DOMPointReadOnly fromPoint with x, y, z]
+    expected: FAIL
+
+  [test DOMPointReadOnly fromPoint with x, y, z, w]
+    expected: FAIL
+
+  [test DOMPointReadOnly fromPoint with x, y, z, w, v]
+    expected: FAIL
+
+  [test DOMPointReadOnly fromPoint with x, z]
+    expected: FAIL
+
+  [test DOMPointReadOnly fromPoint with undefined value]
+    expected: FAIL
+
   [test DOMPointReadOnly matrixTransform]
     expected: FAIL
+
+  [test DOMPointReadOnly Attributes undefined]
+    expected: FAIL
+
--- a/testing/web-platform/meta/css/geometry/interfaces.html.ini
+++ b/testing/web-platform/meta/css/geometry/interfaces.html.ini
@@ -1,21 +1,51 @@
 [interfaces.html]
+  [DOMPointReadOnly interface: operation fromPoint(DOMPointInit)]
+    expected: FAIL
+
   [DOMPointReadOnly interface: operation matrixTransform(DOMMatrixInit)]
     expected: FAIL
 
+  [DOMPointReadOnly must be primary interface of new DOMPointReadOnly()]
+    expected: FAIL
+
+  [Stringification of new DOMPointReadOnly()]
+    expected: FAIL
+
+  [DOMPointReadOnly interface: new DOMPointReadOnly() must inherit property "fromPoint" with the proper type (0)]
+    expected: FAIL
+
+  [DOMPointReadOnly interface: calling fromPoint(DOMPointInit) on new DOMPointReadOnly() with too few arguments must throw TypeError]
+    expected: FAIL
+
+  [DOMPointReadOnly interface: new DOMPointReadOnly() must inherit property "x" with the proper type (1)]
+    expected: FAIL
+
+  [DOMPointReadOnly interface: new DOMPointReadOnly() must inherit property "y" with the proper type (2)]
+    expected: FAIL
+
+  [DOMPointReadOnly interface: new DOMPointReadOnly() must inherit property "z" with the proper type (3)]
+    expected: FAIL
+
+  [DOMPointReadOnly interface: new DOMPointReadOnly() must inherit property "w" with the proper type (4)]
+    expected: FAIL
+
   [DOMPointReadOnly interface: new DOMPointReadOnly() must inherit property "matrixTransform" with the proper type (5)]
     expected: FAIL
 
   [DOMPointReadOnly interface: calling matrixTransform(DOMMatrixInit) on new DOMPointReadOnly() with too few arguments must throw TypeError]
     expected: FAIL
 
   [DOMPoint interface: legacy window alias]
     expected: FAIL
 
+  [DOMPoint interface: operation fromPoint(DOMPointInit)]
+    expected: FAIL
+
   [DOMPointReadOnly interface: new DOMPoint() must inherit property "matrixTransform" with the proper type (5)]
     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
@@ -819,19 +849,40 @@
     expected: FAIL
 
   [DOMMatrixReadOnly interface: DOMMatrix.fromMatrix({is2D: false}) must inherit property "toFloat64Array" with the proper type (41)]
     expected: FAIL
 
   [Stringification of [object DOMRect\]]
     expected: FAIL
 
+  [DOMPointReadOnly interface: new DOMPointReadOnly() must inherit property "fromPoint(DOMPointInit)" with the proper type]
+    expected: FAIL
+
+  [DOMPointReadOnly interface: new DOMPointReadOnly() must inherit property "x" with the proper type]
+    expected: FAIL
+
+  [DOMPointReadOnly interface: new DOMPointReadOnly() must inherit property "y" with the proper type]
+    expected: FAIL
+
+  [DOMPointReadOnly interface: new DOMPointReadOnly() must inherit property "z" with the proper type]
+    expected: FAIL
+
+  [DOMPointReadOnly interface: new DOMPointReadOnly() must inherit property "w" with the proper type]
+    expected: FAIL
+
   [DOMPointReadOnly interface: new DOMPointReadOnly() must inherit property "matrixTransform(DOMMatrixInit)" with the proper type]
     expected: FAIL
 
+  [DOMPoint interface: calling fromPoint(DOMPointInit) on new DOMPoint() with too few arguments must throw TypeError]
+    expected: FAIL
+
+  [DOMPointReadOnly interface: calling fromPoint(DOMPointInit) on new DOMPoint() with too few arguments must throw TypeError]
+    expected: FAIL
+
   [DOMPointReadOnly interface: new DOMPoint() must inherit property "matrixTransform(DOMMatrixInit)" with the proper type]
     expected: FAIL
 
   [DOMRectReadOnly interface: new DOMRectReadOnly() must inherit property "fromRect(DOMRectInit)" with the proper type]
     expected: FAIL
 
   [DOMRectReadOnly interface: new DOMRectReadOnly() must inherit property "x" with the proper type]
     expected: FAIL
--- a/testing/web-platform/tests/css/geometry/DOMPoint-001.html
+++ b/testing/web-platform/tests/css/geometry/DOMPoint-001.html
@@ -16,50 +16,71 @@
 <body>
     <p>Test DOMPoint and DOMPointReadOnly interfaces</p>
     <div id="log"></div>
     <script>
         test(function() {
             checkDOMPoint(new DOMPoint(), {x:0, y:0, z:0, w:1});
         },'testConstructor0');
         test(function() {
-            checkDOMPoint(new DOMPoint(1), {x: 1, y: 0, z: 0, w: 1});
+            assert_throws(new TypeError(), function() { new DOMPoint(1);})
         },'testConstructor1');
         test(function() {
             checkDOMPoint(new DOMPoint(1, 2), {x:1, y:2, z:0, w:1});
         },'testConstructor2');
         test(function() {
             checkDOMPoint(new DOMPoint(1, 2, 3), {x:1, y:2, z:3, w:1});
         },'testConstructor3');
         test(function() {
             checkDOMPoint(new DOMPoint(1, 2, 3, 4), {x:1, y:2, z:3, w:4});
         },'testConstructor4');
         test(function() {
             checkDOMPoint(new DOMPoint(1, 2, 3, 4, 5), {x:1, y:2, z:3, w:4});
         },'testConstructor5');
         test(function() {
-            checkDOMPoint(new DOMPoint({}), {x:NaN, y:0, z:0, w:1});
+            checkDOMPoint(new DOMPoint({}), {x:0, y:0, z:0, w:1});
         },'testConstructorDictionary0');
         test(function() {
-            checkDOMPoint(new DOMPoint({x:1}), {x:NaN, y:0, z:0, w:1});
+            checkDOMPoint(new DOMPoint({x:1}), {x:1, y:0, z:0, w:1});
         },'testConstructorDictionary1');
         test(function() {
-            checkDOMPoint(new DOMPoint({x:1, y:2}), {x:NaN, y:0, z:0, w:1});
+            checkDOMPoint(new DOMPoint({x:1, y:2}), {x:1, y:2, z:0, w:1});
         },'testConstructorDictionary2');
         test(function() {
+            checkDOMPoint(new DOMPoint({x:1, y:2, z:3}), {x:1, y:2, z:3, w:1});
+        },'testConstructorDictionary3');
+        test(function() {
+            checkDOMPoint(new DOMPoint({x:1, y:2, z:3, w:4}), {x:1, y:2, z:3, w:4});
+        },'testConstructorDictionary4');
+        test(function() {
+            checkDOMPoint(new DOMPoint({x:1, y:2, z:3, w:4, v:5}), {x:1, y:2, z:3, w:4});
+        },'testConstructorDictionary5');
+        test(function() {
+            checkDOMPoint(new DOMPoint({x:1, z:3}), {x:1, y:0, z:3, w:1});
+        },'testConstructorDictionary2irregular');
+        test(function() {
+            checkDOMPoint(new DOMPoint({x:1, y: undefined, z:3}), {x:1, y:0, z:3, w:1});
+        },'testConstructorDictionary2undefined');
+        test(function() {
+            checkDOMPoint(new DOMPoint({x:1, z:3}), {x:1, y:0, z:3, w:1});
+        },'testConstructorDOMPoint');
+        test(function() {
             checkDOMPoint(new DOMPoint(1, undefined), {x:1, y:0, z:0, w:1});
         },'testConstructor2undefined');
         test(function() {
             checkDOMPoint(new DOMPoint("a", "b"), {x:NaN, y:NaN, z:0, w:1});
         },'testConstructorUndefined1');
         test(function() {
-            checkDOMPoint(new DOMPointReadOnly(), {x:0, y:0, z:0, w:1});
+            checkDOMPoint(new DOMPoint({x:"a", y:"b"}), {x:NaN, y:NaN, z:0, w:1});
+        },'testConstructorUndefined2');
+        test(function() {
+            assert_throws(new TypeError(), function() { new DOMPointReadOnly();})
         },'testConstructorIllegal1');
         test(function() {
-            checkDOMPoint(new DOMPointReadOnly(1, 2, 3, 4), {x:1, y:2, z:3, w:4});
+            assert_throws(new TypeError(), function() { new DOMPointReadOnly(1, 2, 3, 4);})
         },'testConstructorIllegal2');
         test(function() {
             var p = new DOMPoint(0, 0, 0, 1);
             p.x = undefined;
             p.y = undefined;
             p.z = undefined;
             p.w = undefined;
             checkDOMPoint(p, {x:NaN, y:NaN, z:NaN, w:NaN});