You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -104,8 +105,8 @@ The <dfn dfn-type=constructor dfn-for=DOMPointReadOnly><code>DOMPointReadOnly(<v
104
105
<li>Return <var>point</var>.</li>
105
106
</ol>
106
107
107
-
The <dfn dfn-for=DOMPointReadOnly id=dom-dompointreadonly-frompoint><code>fromPoint(<var>other</var>)</code></dfn> static method on {{DOMPointReadOnly}} and
108
-
the <dfn dfn-for=DOMPoint id=dom-dompoint-frompoint><code>fromPoint(<var>other</var>)</code></dfn> static method on {{DOMPoint}} must run the following steps:
108
+
The <dfn method dfn-for=DOMPointReadOnly id=dom-dompointreadonly-frompoint><code>fromPoint(<var>other</var>)</code></dfn> static method on {{DOMPointReadOnly}} and
109
+
the <dfn method dfn-for=DOMPoint id=dom-dompoint-frompoint><code>fromPoint(<var>other</var>)</code></dfn> static method on {{DOMPoint}} must run the following steps:
109
110
110
111
<ol class=algorithm>
111
112
<li>Let <var>point</var> be a new {{DOMPointReadOnly}} or {{DOMPoint}} as appropriate.
@@ -289,7 +290,7 @@ The <dfn dfn-type=constructor dfn-for=DOMQuad><code>DOMQuad(<var>p1</var>, <var>
289
290
<li>Let <var>point 2</var> be a new <a interface>DOMPoint</a> object with its attributes set to the values of the namesake dictionary members in <var>p2</var>.
290
291
<li>Let <var>point 3</var> be a new <a interface>DOMPoint</a> object with its attributes set to the values of the namesake dictionary members in <var>p3</var>.
291
292
<li>Let <var>point 4</var> be a new <a interface>DOMPoint</a> object with its attributes set to the values of the namesake dictionary members in <var>p4</var>.
292
-
<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>, and let the <a>associated bounding rectangle</a> be <var>bounds</var>.
293
+
<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>.
293
294
</ol>
294
295
295
296
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]].
@@ -302,7 +303,7 @@ The <dfn method lt=fromRect() dfn-for=DOMQuad><code>fromRect(<var>other</var>)</
302
303
<li>Let <var>point 2</var> be a new <a interface>DOMPoint</a> object with <a attribute for=DOMPoint>x</a> set to <var>x</var> + <var>width</var>, <a attribute for=DOMPoint>y</a> set to <var>y</var>, <a attribute for=DOMPoint>z</a> set to zero and <a attribute for=DOMPoint>w</a> set to one.
303
304
<li>Let <var>point 3</var> be a new <a interface>DOMPoint</a> object with <a attribute for=DOMPoint>x</a> set to <var>x</var> + <var>width</var>, <a attribute for=DOMPoint>y</a> set to <var>y</var> + <var>height</var>, <a attribute for=DOMPoint>z</a> set to zero and <a attribute for=DOMPoint>w</a> set to one.
304
305
<li>Let <var>point 4</var> be a new <a interface>DOMPoint</a> object with <a attribute for=DOMPoint>x</a> set to <var>x</var>, <a attribute for=DOMPoint>y</a> set to <var>y</var> + <var>height</var>, <a attribute for=DOMPoint>z</a> set to zero and <a attribute for=DOMPoint>w</a> set to one.
305
-
<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>, and let the <a>associated bounding rectangle</a> be <var>bounds</var>.
306
+
<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>.
306
307
</ol>
307
308
308
309
The <dfn method lt=fromQuad() dfn-for=DOMQuad><code>fromQuad(<var>other</var>)</code></dfn> static method on {{DOMQuad}} must run the following steps:
@@ -325,20 +326,18 @@ The <dfn method lt=fromQuad() dfn-for=DOMQuad><code>fromQuad(<var>other</var>)</
325
326
The <dfn>p3</dfn> attribute must return a <a interface>DOMPoint</a> that represents <a attribute>p3</a> of the quadrilateral it was invoked on. The author can modify the returned <a interface>DOMPoint</a> object, which directly affects the quadrilateral.
326
327
327
328
The <dfn>p4</dfn> attribute must return a <a interface>DOMPoint</a> that represents <a attribute>p4</a> of the quadrilateral it was invoked on. The author can modify the returned <a interface>DOMPoint</a> object, which directly affects the quadrilateral.
328
-
329
-
The <dfn>bounds</dfn> attribute must return the <a>associated bounding rectangle</a> of the quadrilateral it was invoked on.
330
329
</div>
331
330
332
-
<a interface>DOMQuad</a> objects have an <dfn for=quadlirateral>associated bounding rectangle</dfn>set to a <a interface>DOMRectReadOnly</a> object when created. <a interface>DOMQuad</a> objects must have read and write access to the internal member variables of the <a>associated bounding rectangle</a>. The <a>associated bounding rectangle</a> is live; whenever the objects for <a attribute>p1</a>, <a attribute>p2</a>, <a attribute>p3</a> or <a attribute>p4</a> change, the <a>associated bounding rectangle</a>must update its internal member variable values as appropriate to describe the new smallest bounding box of the four points.
331
+
The <dfn method for=DOMQuad>getBounds()</dfn>method, when invoked, must run the following algorithm:
333
332
334
-
The <a>associated bounding rectangle</a> is computed as follows:
335
333
<ol class='algorithm'>
336
-
<li>Let <var>bounds</var> be a <a interface>DOMRectReadOnly</a> object.</li>
334
+
<li>Let <var>bounds</var> be a <a interface>DOMRect</a> object.</li>
337
335
<li>Let <var>left</var> be the minimum of <a attribute>p1</a>.x, <a attribute>p2</a>.x, <a attribute>p3</a>.x and <a attribute>p4</a>.x.</li>
338
336
<li>Let <var>top</var> be the minimum of <a attribute>p1</a>.y, <a attribute>p2</a>.y, <a attribute>p3</a>.y and <a attribute>p4</a>.y.</li>
339
337
<li>Let <var>right</var> be the maximum of <a attribute>p1</a>.x, <a attribute>p2</a>.x, <a attribute>p3</a>.x and <a attribute>p4</a>.x.</li>
340
338
<li>Let <var>bottom</var> be the maximum of <a attribute>p1</a>.y, <a attribute>p2</a>.y, <a attribute>p3</a>.y and <a attribute>p4</a>.y.</li>
341
339
<li>Let <a for=rectangle>x coordinate</a> of <var>bounds</var> be <var>left</var>, <a for=rectangle>y coordinate</a> of <var>bounds</var> be <var>top</var>, <a for=rectangle>width dimension</a> of <var>bounds</var> be <var>right</var> - <var>left</var> and <a for=rectangle>height dimension</a> of <var>bounds</var> be <var>bottom</var> - <var>top</var>.</li>
340
+
<li>Return <var>bounds</var>.
342
341
</ol>
343
342
344
343
<div class='example'>
@@ -363,7 +362,7 @@ var quad2 = DOMQuad.fromRect(rect);</code></pre>
<p class="capture">An irregular quadrilateral represented by a <a interface>DOMQuad</a>. The four red colored circles represent the <a interface>DOMPoint</a> attributes <a attribute>p1</a> to <a attribute>p4</a>. The dashed rectangle represents the <a>associated bounding rectangle</a><a attribute>bounds</a> of the <a interface>DOMQuad</a>.</p>
365
+
<p class="capture">An irregular quadrilateral represented by a <a interface>DOMQuad</a>. The four red colored circles represent the <a interface>DOMPoint</a> attributes <a attribute>p1</a> to <a attribute>p4</a>. The dashed rectangle represents the bounding rectangle returned by the {{DOMQuad/getBounds()}} method of the <a interface>DOMQuad</a>.</p>
367
366
</div>
368
367
</div>
369
368
@@ -673,8 +672,8 @@ the <dfn method lt=fromMatrix() dfn-for=DOMMatrix id=dom-dommatrix-frommatrix><c
673
672
</li>
674
673
</ol>
675
674
676
-
The <dfn method lt=fromString() dfn-for=DOMMatrixReadOnly id=dom-dommatrixreadonly-fromstring><code>fromString(<var>transformList</var>)</code></dfn> static method on {{DOMMatrixReadOnly}} and
677
-
the <dfn method lt=fromString() dfn-for=DOMMatrix id=dom-dommatrix-fromstring><code>fromString(<var>transformList</var>)</code></dfn> static method on {{DOMMatrix}} must follow these steps:
675
+
The <dfn method dfn-for=DOMMatrixReadOnly id=dom-dommatrixreadonly-fromstring><code>fromString(<var>transformList</var>)</code></dfn> static method on {{DOMMatrixReadOnly}} and
676
+
the <dfn method dfn-for=DOMMatrix id=dom-dommatrix-fromstring><code>fromString(<var>transformList</var>)</code></dfn> static method on {{DOMMatrix}} must follow these steps:
678
677
679
678
<ol>
680
679
<li>Parse <var>transformList</var> by following the syntax description in “<a href=http://www.w3.org/TR/css-transforms-1/#svg-syntax>Syntax of the SVG ‘transform’ attribute</a>” [[!CSS3-TRANSFORMS]] to a <<transform-list>>. If parsing is not successful or any <<transform-function>> has <<length>> values without <a spec='css-values'>absolute length</a> units<!--For WD: <a spec='css-values-3'>absolute length units</a>-->, throw a {{SyntaxError}} exception.</li>
@@ -691,15 +690,15 @@ the <dfn method lt=fromString() dfn-for=DOMMatrix id=dom-dommatrix-fromstring><c
691
690
<li>
692
691
<dl class=switch>
693
692
<dt>If <var>2dTransform</var> is set to <code>true</code></dt>
694
-
<dd>Return the result of invoking <a>create a 2d matrix</a> of type {{DOMMatrixReadOnly}} or {{DOMMatrix}} as appropriate, with a sequence of numbers, the values being the elements <var>m11</var>, <var>m12</var>, <var>21</var>, <var>m22</var>, <var>m41</var> and <var>m42</var> of <var>matrix</var> of <var>matrix</var>.</dd>
693
+
<dd>Return the result of invoking <a>create a 2d matrix</a> of type {{DOMMatrixReadOnly}} or {{DOMMatrix}} as appropriate, with a sequence of numbers, the values being the elements <var>m11</var>, <var>m12</var>, <var>m21</var>, <var>m22</var>, <var>m41</var> and <var>m42</var> of <var>matrix</var> of <var>matrix</var>.</dd>
695
694
<dt>If <var>2dTransform</var> is set to <code>false</code></dt>
696
695
<dd>Return the result of invoking <a>create a 3d matrix</a> of type {{DOMMatrixReadOnly}} or {{DOMMatrix}} as appropriate, with a sequence of numbers, the values being the 16 elements of <var>matrix</var>.</dd>
697
696
</dl>
698
697
</li>
699
698
</ol>
700
699
701
-
The <dfn method lt=fromFloat32Array() dfn-for=DOMMatrixReadOnly id=dom-dommatrixreadonly-fromfloat32array><code>fromFloat32Array(<var>array32</var>)</code></dfn> static method on {{DOMMatrixReadOnly}} and
702
-
the <dfn method lt=fromFloat32Array() dfn-for=DOMMatrix id=dom-dommatrix-fromfloat32array><code>fromFloat32Array(<var>array32</var>)</code></dfn> static method on {{DOMMatrix}} must follow these steps:
700
+
The <dfn method dfn-for=DOMMatrixReadOnly id=dom-dommatrixreadonly-fromfloat32array><code>fromFloat32Array(<var>array32</var>)</code></dfn> static method on {{DOMMatrixReadOnly}} and
701
+
the <dfn method dfn-for=DOMMatrix id=dom-dommatrix-fromfloat32array><code>fromFloat32Array(<var>array32</var>)</code></dfn> static method on {{DOMMatrix}} must follow these steps:
703
702
704
703
<dl class=switch>
705
704
<dt>If <var>array32</var> has 6 elements</dt>
@@ -710,8 +709,8 @@ the <dfn method lt=fromFloat32Array() dfn-for=DOMMatrix id=dom-dommatrix-fromflo
710
709
<dd>Throw a <code>TypeError</code> exception.</dd>
711
710
</dl>
712
711
713
-
The <dfn method lt=fromFloat64Array() dfn-for=DOMMatrixReadOnly id=dom-dommatrixreadonly-fromfloat64array><code>fromFloat64Array(<var>array64</var>)</code></dfn> static method on {{DOMMatrixReadOnly}} and
714
-
the <dfn method lt=fromFloat64Array() dfn-for=DOMMatrix id=dom-dommatrix-fromfloat64array><code>fromFloat64Array(<var>array64</var>)</code></dfn> static method on {{DOMMatrix}} must follow these steps:
712
+
The <dfn method dfn-for=DOMMatrixReadOnly id=dom-dommatrixreadonly-fromfloat64array><code>fromFloat64Array(<var>array64</var>)</code></dfn> static method on {{DOMMatrixReadOnly}} and
713
+
the <dfn method dfn-for=DOMMatrix id=dom-dommatrix-fromfloat64array><code>fromFloat64Array(<var>array64</var>)</code></dfn> static method on {{DOMMatrix}} must follow these steps:
715
714
716
715
<dl class=switch>
717
716
<dt>If <var>array64</var> has 6 elements</dt>
@@ -1123,6 +1122,7 @@ The following changes were made since the <a href="http://www.w3.org/TR/2014/WD-
1123
1122
1124
1123
<ul>
1125
1124
<li>Exposed <a interface>DOMPointReadOnly</a>, <a interface>DOMPoint</a>, <a interface>DOMRectReadOnly</a>, <a interface>DOMRect</a>, <a interface>DOMQuad</a>, <a interface>DOMMatrixReadOnly</a> and <a interface>DOMMatrix</a> to <code>Window</code> and <code>Worker</code>. Defined cloning of the interfaces.</li>
1125
+
<li>The live <code>bounds</code> attribute on {{DOMQuad}} was replaced with a non-live {{DOMQuad/getBounds()}} method. The "associated bounding rectangle" concept was also removed.
1126
1126
</ul>
1127
1127
1128
1128
The following changes were made since the <a href="http://www.w3.org/TR/2014/WD-geometry-1-20140626/">26 June 2014 Last Call Public Working Draft</a>.
0 commit comments