Skip to content

Commit 148597c

Browse files
zcorpansvgeesus
authored andcommitted
Editorial: Define an entry points for the DOMQuad.fromRect() and fromQuad() algorithms
1 parent 9b9dfb2 commit 148597c

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

geometry/Overview.bs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,12 @@ The <dfn dfn-type=constructor dfn-for=DOMQuad><code>DOMQuad(<var>p1</var>, <var>
326326

327327
Note: It is possible to pass <a interface>DOMPoint</a>/<a interface>DOMPointReadOnly</a> arguments as well. The passed arguments will be transformed to the correct object type internally following the WebIDL rules [[!WEBIDL]].
328328

329-
The <dfn method lt=fromRect() dfn-for=DOMQuad><code>fromRect(<var>other</var>)</code></dfn> static method on {{DOMQuad}} must run the following steps:
329+
The <dfn method lt=fromRect() dfn-for=DOMQuad><code>fromRect(<var>other</var>)</code></dfn> static
330+
method on {{DOMQuad}} must <a>create a <code>DOMQuad</code> from the <code>DOMRectInit</code>
331+
dictionary</a> <var>other</var>.
332+
333+
To <dfn lt="create a DOMQuad from the DOMRectInit dictionary">create a <code>DOMQuad</code> from a
334+
<code>DOMRectInit</code> dictionary</dfn> <var>other</var>, follow these steps:
330335

331336
<ol class='algorithm'>
332337
<li>Let <var>x</var>, <var>y</var>, <var>width</var> and <var>height</var> be the value of <var>other</var>'s <a attribute for=DOMRectReadOnly>x</a>, <a attribute for=DOMRectReadOnly>y</a>, <a attribute for=DOMRectReadOnly>width</a> and <a attribute for=DOMRectReadOnly>height</a> attributes, respectively.
@@ -337,7 +342,12 @@ The <dfn method lt=fromRect() dfn-for=DOMQuad><code>fromRect(<var>other</var>)</
337342
<li><p>Return a new <a interface>DOMQuad</a> with <a attribute for=DOMQuad>p1</a> set to <var>point 1</var>, <a attribute for=DOMQuad>p2</a> set to <var>point 2</var>, <a attribute for=DOMQuad>p3</a> set to <var>point 3</var> and <a attribute for=DOMQuad>p4</a> set to <var>point 4</var>.
338343
</ol>
339344

340-
The <dfn method lt=fromQuad() dfn-for=DOMQuad><code>fromQuad(<var>other</var>)</code></dfn> static method on {{DOMQuad}} must run the following steps:
345+
The <dfn method lt=fromQuad() dfn-for=DOMQuad><code>fromQuad(<var>other</var>)</code></dfn> static
346+
method on {{DOMQuad}} must <a>create a <code>DOMQuad</code> from the <code>DOMQuadInit</code>
347+
dictionary</a> <var>other</var>.
348+
349+
To <dfn lt="create a DOMQuad from the DOMQuadInit dictionary">create a <code>DOMQuad</code> from a
350+
<code>DOMQuadInit</code> dictionary</dfn> <var>other</var>, follow these steps:
341351

342352
1. Let <var>point 1</var> be the result of invoking <a>create a <code>DOMPoint</code> from the dictionary</a> {{DOMQuadInit/p1}} dictionary member of <var>other</var>, if it exists.
343353
1. Let <var>point 2</var> be the result of invoking <a>create a <code>DOMPoint</code> from the dictionary</a> {{DOMQuadInit/p2}} dictionary member of <var>other</var>, if it exists.

0 commit comments

Comments
 (0)