Skip to content

Commit

Permalink
Merge pull request #373 from w3c/use-new-constructor-definition
Browse files Browse the repository at this point in the history
[geometry-1] Use new WebIDL constructor operation. #367
  • Loading branch information
dirkschulze committed Sep 18, 2019
2 parents 8df83c2 + af702ff commit c18bbf4
Showing 1 changed file with 26 additions and 19 deletions.
45 changes: 26 additions & 19 deletions geometry/Overview.bs
Expand Up @@ -70,11 +70,12 @@ The DOMPoint interfaces {#DOMPoint}
A 2D or a 3D <dfn>point</dfn> can be represented by the following WebIDL interfaces:

<pre class=idl>
[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;
Expand All @@ -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;
Expand Down Expand Up @@ -260,11 +262,12 @@ Objects implementing the {{DOMRectReadOnly}} interface represent a <dfn>rectangl
</dl>

<pre class=idl>
[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;
Expand All @@ -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;
Expand Down Expand Up @@ -407,11 +411,12 @@ The DOMQuad interface {#DOMQuad}
Objects implementing the {{DOMQuad}} interface represents a <dfn export>quadrilateral</dfn>.

<pre class=idl>
[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 = {});

Expand Down Expand Up @@ -621,10 +626,11 @@ In the following sections, terms have the following meaning:
</dl>

<pre class=idl>
[Constructor(optional (DOMString or sequence&lt;unrestricted double>) init),
Exposed=(Window,Worker),
[Exposed=(Window,Worker),
Serializable]
interface DOMMatrixReadOnly {
constructor(optional (DOMString or sequence&lt;unrestricted double>) init);

[NewObject] static DOMMatrixReadOnly fromMatrix(optional DOMMatrixInit other = {});
[NewObject] static DOMMatrixReadOnly fromFloat32Array(Float32Array array32);
[NewObject] static DOMMatrixReadOnly fromFloat64Array(Float64Array array64);
Expand Down Expand Up @@ -697,11 +703,12 @@ interface DOMMatrixReadOnly {
[Default] object toJSON();
};

[Constructor(optional (DOMString or sequence&lt;unrestricted double>) init),
Exposed=(Window,Worker),
[Exposed=(Window,Worker),
Serializable,
LegacyWindowAlias=(SVGMatrix,WebKitCSSMatrix)]
interface DOMMatrix : DOMMatrixReadOnly {
constructor(optional (DOMString or sequence&lt;unrestricted double>) init);

[NewObject] static DOMMatrix fromMatrix(optional DOMMatrixInit other = {});
[NewObject] static DOMMatrix fromFloat32Array(Float32Array array32);
[NewObject] static DOMMatrix fromFloat64Array(Float64Array array64);
Expand Down

0 comments on commit c18bbf4

Please sign in to comment.