From af702ff24ed6ad8b5c89c21821d561e55316e509 Mon Sep 17 00:00:00 2001 From: Dirk Schulze Date: Mon, 16 Sep 2019 20:27:02 +0200 Subject: [PATCH] [geometry-1] Use new WebIDL constructor definition --- geometry/Overview.bs | 45 +++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/geometry/Overview.bs b/geometry/Overview.bs index 15a4e07..d295045 100644 --- a/geometry/Overview.bs +++ b/geometry/Overview.bs @@ -70,11 +70,12 @@ The DOMPoint interfaces {#DOMPoint} A 2D or a 3D point can be represented by the following WebIDL interfaces:
-[Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
-             optional unrestricted double z = 0, optional unrestricted double w = 1),
- Exposed=(Window,Worker),
+[Exposed=(Window,Worker),
  Serializable]
 interface DOMPointReadOnly {
+    constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
+            optional unrestricted double z = 0, optional unrestricted double w = 1);
+
     [NewObject] static DOMPointReadOnly fromPoint(optional DOMPointInit other = {});
 
     readonly attribute unrestricted double x;
@@ -87,12 +88,13 @@ interface DOMPointReadOnly {
     [Default] object toJSON();
 };
 
-[Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
-             optional unrestricted double z = 0, optional unrestricted double w = 1),
- Exposed=(Window,Worker),
+[Exposed=(Window,Worker),
  Serializable,
  LegacyWindowAlias=SVGPoint]
 interface DOMPoint : DOMPointReadOnly {
+    constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
+            optional unrestricted double z = 0, optional unrestricted double w = 1);
+
     [NewObject] static DOMPoint fromPoint(optional DOMPointInit other = {});
 
     inherit attribute unrestricted double x;
@@ -260,11 +262,12 @@ Objects implementing the {{DOMRectReadOnly}} interface represent a rectangl
 
 
 
-[Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
-             optional unrestricted double width = 0, optional unrestricted double height = 0),
- Exposed=(Window,Worker),
+[Exposed=(Window,Worker),
  Serializable]
 interface DOMRectReadOnly {
+    constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
+            optional unrestricted double width = 0, optional unrestricted double height = 0);
+
     [NewObject] static DOMRectReadOnly fromRect(optional DOMRectInit other = {});
 
     readonly attribute unrestricted double x;
@@ -279,12 +282,13 @@ interface DOMRectReadOnly {
     [Default] object toJSON();
 };
 
-[Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
-             optional unrestricted double width = 0, optional unrestricted double height = 0),
- Exposed=(Window,Worker),
+[Exposed=(Window,Worker),
  Serializable,
  LegacyWindowAlias=SVGRect]
 interface DOMRect : DOMRectReadOnly {
+    constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
+            optional unrestricted double width = 0, optional unrestricted double height = 0);
+
     [NewObject] static DOMRect fromRect(optional DOMRectInit other = {});
 
     inherit attribute unrestricted double x;
@@ -407,11 +411,12 @@ The DOMQuad interface {#DOMQuad}
 Objects implementing the {{DOMQuad}} interface represents a quadrilateral.
 
 
-[Constructor(optional DOMPointInit p1 = {}, optional DOMPointInit p2 = {},
-             optional DOMPointInit p3 = {}, optional DOMPointInit p4 = {}),
- Exposed=(Window,Worker),
+[Exposed=(Window,Worker),
  Serializable]
 interface DOMQuad {
+    constructor(optional DOMPointInit p1 = {}, optional DOMPointInit p2 = {},
+            optional DOMPointInit p3 = {}, optional DOMPointInit p4 = {});
+
     [NewObject] static DOMQuad fromRect(optional DOMRectInit other = {});
     [NewObject] static DOMQuad fromQuad(optional DOMQuadInit other = {});
 
@@ -621,10 +626,11 @@ In the following sections, terms have the following meaning:
 
 
 
-[Constructor(optional (DOMString or sequence<unrestricted double>) init),
- Exposed=(Window,Worker),
+[Exposed=(Window,Worker),
  Serializable]
 interface DOMMatrixReadOnly {
+    constructor(optional (DOMString or sequence<unrestricted double>) init);
+
     [NewObject] static DOMMatrixReadOnly fromMatrix(optional DOMMatrixInit other = {});
     [NewObject] static DOMMatrixReadOnly fromFloat32Array(Float32Array array32);
     [NewObject] static DOMMatrixReadOnly fromFloat64Array(Float64Array array64);
@@ -697,11 +703,12 @@ interface DOMMatrixReadOnly {
     [Default] object toJSON();
 };
 
-[Constructor(optional (DOMString or sequence<unrestricted double>) init),
- Exposed=(Window,Worker),
+[Exposed=(Window,Worker),
  Serializable,
  LegacyWindowAlias=(SVGMatrix,WebKitCSSMatrix)]
 interface DOMMatrix : DOMMatrixReadOnly {
+    constructor(optional (DOMString or sequence<unrestricted double>) init);
+
     [NewObject] static DOMMatrix fromMatrix(optional DOMMatrixInit other = {});
     [NewObject] static DOMMatrix fromFloat32Array(Float32Array array32);
     [NewObject] static DOMMatrix fromFloat64Array(Float64Array array64);