Thu, 26 Sep 2013 15:31:49 +0200
[cssom-view] Use two interfaces for mutable and immutable DOMRects instead of a flag. http://lists.w3.org/Archives/Public/www-style/2013Sep/0725.html
cssom-view/Overview.html | file | annotate | diff | comparison | revisions | |
cssom-view/Overview.src.html | file | annotate | diff | comparison | revisions |
1.1 --- a/cssom-view/Overview.html Thu Sep 26 17:06:10 2013 +0900 1.2 +++ b/cssom-view/Overview.html Thu Sep 26 15:31:49 2013 +0200 1.3 @@ -16,7 +16,7 @@ 1.4 1.5 <h1>CSSOM View Module</h1> 1.6 1.7 - <h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 25 September 2013</h2> 1.8 + <h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 26 September 2013</h2> 1.9 1.10 <dl> 1.11 1.12 @@ -83,7 +83,7 @@ 1.13 can be found in the <a href="http://www.w3.org/TR/">W3C technical reports 1.14 index at http://www.w3.org/TR/.</a></em> 1.15 1.16 -<p>This is the 25 September 2013 Editor's Draft of CSSOM View. Please send 1.17 +<p>This is the 26 September 2013 Editor's Draft of CSSOM View. Please send 1.18 comments to 1.19 <a href="mailto:www-style@w3.org?subject=%5Bcssom-view%5D%20">www-style@w3.org</a> 1.20 (<a href="http://lists.w3.org/Archives/Public/www-style/">archived</a>) 1.21 @@ -140,7 +140,7 @@ 1.22 <li><a href="#geometry"><span class="secno">11 </span>Geometry</a> 1.23 <ul class="toc"> 1.24 <li><a href="#the-domrectlist-interface"><span class="secno">11.1 </span>The <code title="">DOMRectList</code> Interface</a></li> 1.25 - <li><a href="#the-domrect-interface"><span class="secno">11.2 </span>The <code title="">DOMRect</code> Interface</a></li> 1.26 + <li><a href="#the-domrect-and-domrectimmutable-interfaces"><span class="secno">11.2 </span>The <code title="">DOMRect</code> and <code title="">DOMRectImmutable</code> Interfaces</a></li> 1.27 <li><a class="atrisk" href="#the-dompoint-interface"><span class="secno">11.3 </span>The <code title="">DOMPoint</code> Interface</a></li> 1.28 <li><a class="atrisk" href="#the-domquad-interface"><span class="secno">11.4 </span>The <code title="">DOMQuad</code> Interface</a></li> 1.29 <li><a class="atrisk" href="#the-geometryutils-interface"><span class="secno">11.5 </span>The <code title="">GeometryUtils</code> Interface</a></ul></li> 1.30 @@ -1610,10 +1610,11 @@ 1.31 greater than the number of <code><a href="#domrect">DOMRect</a></code> objects associated with the object. Otherwise, the <code><a href="#domrect">DOMRect</a></code> object at 1.32 <var>index</var> must be returned.</p> 1.33 1.34 -<h3 id="the-domrect-interface"><span class="secno">11.2 </span>The <code title="">DOMRect</code> Interface</h3> 1.35 +<h3 id="the-domrect-and-domrectimmutable-interfaces"><span class="secno">11.2 </span>The <code title="">DOMRect</code> and <code title="">DOMRectImmutable</code> Interfaces</h3> 1.36 1.37 -<p>Objects implementing the <code><a href="#domrect">DOMRect</a></code> interface represent a rectangular box. The type of box is specified by the method that returns a 1.38 -<code><a href="#domrect">DOMRect</a></code> object. A <code><a href="#domrect">DOMRect</a></code> object has a <i>readonly</i> flag, which is unset unless otherwise stated.</p> 1.39 +<p>Objects implementing the <code><a href="#domrect">DOMRect</a></code> or <code><a href="#domrectimmutable">DOMRectImmutable</a></code> interface represent a rectangular box. The type of box is specified by the 1.40 +method or attribute that returns a <code><a href="#domrect">DOMRect</a></code> or <code><a href="#domrectimmutable">DOMRectImmutable</a></code> object. The interfaces are identical except the attributes of 1.41 +<code><a href="#domrectimmutable">DOMRectImmutable</a></code> are readonly. 1.42 1.43 <pre class="idl">[<a href="#dom-domrect" title="dom-DOMRect">Constructor</a>(unrestricted double left, unrestricted double top, unrestricted double width, <!-- 1.44 -->unrestricted double height)] 1.45 @@ -1624,7 +1625,18 @@ 1.46 attribute unrestricted double <a href="#dom-domrect-left" title="dom-DOMRect-left">left</a>; 1.47 attribute unrestricted double <a href="#dom-domrect-width" title="dom-DOMRect-width">width</a>; 1.48 attribute unrestricted double <a href="#dom-domrect-height" title="dom-DOMRect-height">height</a>; 1.49 -};</pre> 1.50 +}; 1.51 + 1.52 +interface <dfn id="domrectimmutable">DOMRectImmutable</dfn> { 1.53 + readonly attribute unrestricted double <a href="#dom-domrectimmutable-top" title="dom-DOMRectImmutable-top">top</a>; 1.54 + readonly attribute unrestricted double <a href="#dom-domrectimmutable-right" title="dom-DOMRectImmutable-right">right</a>; 1.55 + readonly attribute unrestricted double <a href="#dom-domrectimmutable-bottom" title="dom-DOMRectImmutable-bottom">bottom</a>; 1.56 + readonly attribute unrestricted double <a href="#dom-domrectimmutable-left" title="dom-DOMRectImmutable-left">left</a>; 1.57 + readonly attribute unrestricted double <a href="#dom-domrectimmutable-width" title="dom-DOMRectImmutable-width">width</a>; 1.58 + readonly attribute unrestricted double <a href="#dom-domrectimmutable-height" title="dom-DOMRectImmutable-height">height</a>; 1.59 +}; 1.60 + 1.61 +typedef (<a href="#domrect">DOMRect</a> or <a href="#domrectimmutable">DOMRectImmutable</a>) <dfn id="domrectany">DOMRectAny</dfn>;</pre> 1.62 1.63 <p class="atrisk">The <dfn id="dom-domrect" title="dom-DOMRect"><code>DOMRect(<var>left</var>, <var>top</var>, <var>width</var>, <var>height</var>)</code></dfn> constructor, when 1.64 invoked, must run the following steps: 1.65 @@ -1638,30 +1650,29 @@ 1.66 </ol> 1.67 1.68 <p>The <dfn id="dom-domrect-top" title="dom-DOMRect-top"><code>top</code></dfn> attribute gives the y-coordinate, relative to the <a href="#viewport">viewport</a> origin, of the top of 1.69 -the rectangle box. On getting, it must return the current value. On setting, if the <i>readonly</i> flag is set, a 1.70 -<code class="external" data-anolis-spec="dom"><a href="http://dom.spec.whatwg.org/#nomodificationallowederror">NoModificationAllowedError</a></code> exception must be thrown. Otherwise, the current value must be set to the new value.</p> 1.71 +the rectangle box. On getting, it must return the current value. On setting, the current value must be set to the new value.</p> 1.72 1.73 <p>The <dfn id="dom-domrect-right" title="dom-DOMRect-right"><code>right</code></dfn> attribute gives the x-coordinate, relative to the <a href="#viewport">viewport</a> origin, of the 1.74 -right of the rectangle box. On getting, it must return the current value. On setting, if the <i>readonly</i> flag is set, a 1.75 -<code class="external" data-anolis-spec="dom"><a href="http://dom.spec.whatwg.org/#nomodificationallowederror">NoModificationAllowedError</a></code> exception must be thrown. Otherwise, the current value must be set to the new value.</p> 1.76 +right of the rectangle box. On getting, it must return the current value. On setting, the current value must be set to the new value.</p> 1.77 1.78 <p>The <dfn id="dom-domrect-bottom" title="dom-DOMRect-bottom"><code>bottom</code></dfn> attribute gives the y-coordinate, relative to the <a href="#viewport">viewport</a> origin, of the 1.79 -bottom of the rectangle box. On getting, it must return the current value. On setting, if the <i>readonly</i> flag is set, a 1.80 -<code class="external" data-anolis-spec="dom"><a href="http://dom.spec.whatwg.org/#nomodificationallowederror">NoModificationAllowedError</a></code> exception must be thrown. Otherwise, the current value must be set to the new value.</p> 1.81 +bottom of the rectangle box. On getting, it must return the current value. On setting, the current value must be set to the new value.</p> 1.82 1.83 <p>The <dfn id="dom-domrect-left" title="dom-DOMRect-left"><code>left</code></dfn> attribute gives the x-coordinate, relative to the <a href="#viewport">viewport</a> origin, of the left 1.84 -of the rectangle box. On getting, it must return the current value. On setting, if the <i>readonly</i> flag is set, a 1.85 -<code class="external" data-anolis-spec="dom"><a href="http://dom.spec.whatwg.org/#nomodificationallowederror">NoModificationAllowedError</a></code> exception must be thrown. Otherwise, the current value must be set to the new value.</p> 1.86 +of the rectangle box. On getting, it must return the current value. On setting, the current value must be set to the new value.</p> 1.87 1.88 <p>The <dfn id="dom-domrect-width" title="dom-DOMRect-width"><code>width</code></dfn> attribute, on getting, must return the value of <code title="dom-DOMRect-right"><a href="#dom-domrect-right">right</a></code> minus 1.89 -<code title="dom-DOMRect-left"><a href="#dom-domrect-left">left</a></code>. On setting, if the <i>readonly</i> flag is set, a <code class="external" data-anolis-spec="dom"><a href="http://dom.spec.whatwg.org/#nomodificationallowederror">NoModificationAllowedError</a></code> 1.90 -exception must be thrown. Otherwise, the <code title="dom-DOMRect-right"><a href="#dom-domrect-right">right</a></code> attribute must be set to the new value plus the value of 1.91 +<code title="dom-DOMRect-left"><a href="#dom-domrect-left">left</a></code>. On setting, the <code title="dom-DOMRect-right"><a href="#dom-domrect-right">right</a></code> attribute must be set to the new value plus the value of 1.92 <code title="dom-DOMRect-left"><a href="#dom-domrect-left">left</a></code>.</p> 1.93 1.94 <p>The <dfn id="dom-domrect-height" title="dom-DOMRect-height"><code>height</code></dfn> attribute, on getting, must return the value of <code title="dom-DOMRect-bottom"><a href="#dom-domrect-bottom">bottom</a></code> 1.95 -minus <code title="dom-DOMRect-top"><a href="#dom-domrect-top">top</a></code>. On setting, if the <i>readonly</i> flag is set, a <code class="external" data-anolis-spec="dom"><a href="http://dom.spec.whatwg.org/#nomodificationallowederror">NoModificationAllowedError</a></code> 1.96 -exception must be thrown. Otherwise, the <code title="dom-DOMRect-bottom"><a href="#dom-domrect-bottom">bottom</a></code> attribute must be set to the new value plus the value of 1.97 -<code title="dom-DOMRect-top"><a href="#dom-domrect-top">top</a></code>.</p> 1.98 +minus <code title="dom-DOMRect-top"><a href="#dom-domrect-top">top</a></code>. On setting, the <code title="dom-DOMRect-bottom"><a href="#dom-domrect-bottom">bottom</a></code> attribute must be set to the new value plus the value 1.99 +of <code title="dom-DOMRect-top"><a href="#dom-domrect-top">top</a></code>.</p> 1.100 + 1.101 +<p>The <dfn id="dom-domrectimmutable-top" title="dom-DOMRectImmutable-top"><code>top</code></dfn>, <dfn id="dom-domrectimmutable-right" title="dom-DOMRectImmutable-right"><code>right</code></dfn>, 1.102 +<dfn id="dom-domrectimmutable-bottom" title="dom-DOMRectImmutable-bottom"><code>bottom</code></dfn>, <dfn id="dom-domrectimmutable-left" title="dom-DOMRectImmutable-left"><code>left</code></dfn>, 1.103 +<dfn id="dom-domrectimmutable-width" title="dom-DOMRectImmutable-width"><code>width</code></dfn> and <dfn id="dom-domrectimmutable-height" title="dom-DOMRectImmutable-height"><code>height</code></dfn> attributes of the 1.104 +<code><a href="#domrectimmutable">DOMRectImmutable</a></code> interface, on getting, must behave the same as the attribute of the same name on the <code><a href="#domrect">DOMRect</a></code> interface. 1.105 1.106 1.107 <h3 class="atrisk" id="the-dompoint-interface"><span class="secno">11.3 </span>The <code title="">DOMPoint</code> Interface</h3> 1.108 @@ -1716,16 +1727,17 @@ 1.109 <h3 class="atrisk" id="the-domquad-interface"><span class="secno">11.4 </span>The <code title="">DOMQuad</code> Interface</h3> 1.110 1.111 <p>Objects implementing the <code><a href="#domquad">DOMQuad</a></code> interface represents a quadrilateral shape. <code><a href="#domquad">DOMQuad</a></code> objects have an <dfn id="associated-bounding-rectangle">associated 1.112 -bounding rectangle</dfn> set to a <code><a href="#domrect">DOMRect</a></code> object when created. 1.113 +bounding rectangle</dfn> set to a <code><a href="#domrectimmutable">DOMRectImmutable</a></code> object when created. 1.114 1.115 -<pre class="idl">[<a href="#dom-domquad" title="dom-DOMQuad">Constructor</a>(DOMPointLiteral p1, DOMPointLiteral p2, DOMPointLiteral p3, DOMPointLiteral p4), 1.116 - <a href="#dom-domquad" title="dom-DOMQuad">Constructor</a>(DOMRect rect)] 1.117 +<pre class="idl">[<a href="#dom-domquad" title="dom-DOMQuad">Constructor</a>(<a href="#dompointliteral">DOMPointLiteral</a> p1, <a href="#dompointliteral">DOMPointLiteral</a> p2, <!-- 1.118 +--><a href="#dompointliteral">DOMPointLiteral</a> p3, <a href="#dompointliteral">DOMPointLiteral</a> p4), 1.119 + <a href="#dom-domquad" title="dom-DOMQuad">Constructor</a>(<a href="#domrectany">DOMRectAny</a> rect)] 1.120 interface <dfn id="domquad">DOMQuad</dfn> { 1.121 [SameObject] readonly attribute <a href="#dompoint">DOMPoint</a> <a href="#dom-domquad-p1" title="dom-DOMQuad-p1">p1</a>; 1.122 [SameObject] readonly attribute <a href="#dompoint">DOMPoint</a> <a href="#dom-domquad-p2" title="dom-DOMQuad-p2">p2</a>; 1.123 [SameObject] readonly attribute <a href="#dompoint">DOMPoint</a> <a href="#dom-domquad-p3" title="dom-DOMQuad-p3">p3</a>; 1.124 [SameObject] readonly attribute <a href="#dompoint">DOMPoint</a> <a href="#dom-domquad-p4" title="dom-DOMQuad-p4">p4</a>; 1.125 - [SameObject] readonly attribute <a href="#domrect">DOMRect</a> <a href="#dom-domquad-bounds" title="dom-DOMQuad-bounds">bounds</a>; 1.126 + [SameObject] readonly attribute <a href="#domrectimmutable">DOMRectImmutable</a> <a href="#dom-domquad-bounds" title="dom-DOMQuad-bounds">bounds</a>; 1.127 };</pre> 1.128 1.129 <p>The <dfn id="dom-domquad" title="dom-DOMQuad"><code>DOMQuad()</code></dfn> constructor, when invoked, must run the following steps: 1.130 @@ -1749,8 +1761,8 @@ 1.131 <li><p>Let <var>point 4</var> be a new <code><a href="#dompoint">DOMPoint</a></code> object with <code title="dom-DOMPoint-x"><a href="#dom-dompoint-x">x</a></code> set to <var>left</var>, 1.132 <code title="dom-DOMPoint-y"><a href="#dom-dompoint-y">y</a></code> set to <var>bottom</var>, <code title="dom-DOMPoint-z"><a href="#dom-dompoint-z">z</a></code> set to zero and <code title="dom-DOMPoint-w"><a href="#dom-dompoint-w">w</a></code> set to 1.133 one. 1.134 - <li><p>Let <var>bounds</var> be a new <code><a href="#domrect">DOMRect</a></code> object with its attributes set to the values of the namesake attributes in <var>rect</var>, and 1.135 - with the <i>readonly</i> flag set. 1.136 + <li><p>Let <var>bounds</var> be a new <code><a href="#domrectimmutable">DOMRectImmutable</a></code> object with its attributes set to the values of the namesake attributes in 1.137 + <var>rect</var>. 1.138 </ol> 1.139 <li><p>Otherwise, follow these substeps: 1.140 <ol> 1.141 @@ -1763,8 +1775,8 @@ 1.142 <var>p3</var>. 1.143 <li><p>Let <var>point 4</var> be a new <code><a href="#dompoint">DOMPoint</a></code> object with its attributes set to the values of the namesake dictionary members in 1.144 <var>p4</var>. 1.145 - <li><p>Let <var>bounds</var> be a new <code><a href="#domrect">DOMRect</a></code> object describing the bounding box of <var>point 1</var>, <var>point 2</var>, <var>point 3</var> 1.146 - and <var>point 4</var>, and with the <i>readonly</i> flag set. 1.147 + <li><p>Let <var>bounds</var> be a new <code><a href="#domrectimmutable">DOMRectImmutable</a></code> object describing the bounding box of <var>point 1</var>, <var>point 2</var>, <var>point 1.148 + 3</var> and <var>point 4</var>. 1.149 </ol> 1.150 <li><p>Return a new <code><a href="#domquad">DOMQuad</a></code> with <code title="dom-DOMQuad-p1"><a href="#dom-domquad-p1">p1</a></code> set to <var>point 1</var>, <code title="dom-DOMQuad-p2"><a href="#dom-domquad-p2">p2</a></code> set to 1.151 <var>point 2</var>, <code title="dom-DOMQuad-p3"><a href="#dom-domquad-p3">p3</a></code> set to <var>point 3</var> and <code title="dom-DOMQuad-p4"><a href="#dom-domquad-p4">p4</a></code> set to <var>point 4</var>, and 1.152 @@ -1800,7 +1812,7 @@ 1.153 sequence<<a href="#domquad">DOMQuad</a>> <a href="#dom-geometryutils-getboxquads" title="dom-GeometryUtils-getBoxQuads">getBoxQuads</a>(<a href="#boxquadoptions">BoxQuadOptions</a> options); 1.154 <a href="#domquad">DOMQuad</a> <a href="#dom-geometryutils-convertquadfromnode" title="dom-GeometryUtils-convertQuadFromNode">convertQuadFromNode</a>(<a href="#domquad">DOMQuad</a> quad, <!-- 1.155 --><a href="#geometrynode">GeometryNode</a> from, optional <a href="#convertcoordinateoptions">ConvertCoordinateOptions</a> options); 1.156 - <a href="#domquad">DOMQuad</a> <a href="#dom-geometryutils-convertrectfromnode" title="dom-GeometryUtils-convertRectFromNode">convertRectFromNode</a>(<a href="#domrect">DOMRect</a> rect, <!-- 1.157 + <a href="#domquad">DOMQuad</a> <a href="#dom-geometryutils-convertrectfromnode" title="dom-GeometryUtils-convertRectFromNode">convertRectFromNode</a>(<a href="#domrectany">DOMRectAny</a> rect, <!-- 1.158 --><a href="#geometrynode">GeometryNode</a> from, optional <a href="#convertcoordinateoptions">ConvertCoordinateOptions</a> options); 1.159 <a href="#dompoint">DOMPoint</a> <a href="#dom-geometryutils-convertpointfromnode" title="dom-GeometryUtils-convertPointFromNode">convertPointFromNode</a>(<a href="#dompointliteral">DOMPointLiteral</a> point, <!-- 1.160 --><a href="#geometrynode">GeometryNode</a> from, optional <a href="#convertcoordinateoptions">ConvertCoordinateOptions</a> options);
2.1 --- a/cssom-view/Overview.src.html Thu Sep 26 17:06:10 2013 +0900 2.2 +++ b/cssom-view/Overview.src.html Thu Sep 26 15:31:49 2013 +0200 2.3 @@ -1568,10 +1568,11 @@ 2.4 greater than the number of <code>DOMRect</code> objects associated with the object. Otherwise, the <code>DOMRect</code> object at 2.5 <var>index</var> must be returned.</p> 2.6 2.7 -<h3>The <code title>DOMRect</code> Interface</h3> 2.8 +<h3>The <code title>DOMRect</code> and <code title>DOMRectImmutable</code> Interfaces</h3> 2.9 2.10 -<p>Objects implementing the <code>DOMRect</code> interface represent a rectangular box. The type of box is specified by the method that returns a 2.11 -<code>DOMRect</code> object. A <code>DOMRect</code> object has a <i>readonly</i> flag, which is unset unless otherwise stated.</p> 2.12 +<p>Objects implementing the <code>DOMRect</code> or <code>DOMRectImmutable</code> interface represent a rectangular box. The type of box is specified by the 2.13 +method or attribute that returns a <code>DOMRect</code> or <code>DOMRectImmutable</code> object. The interfaces are identical except the attributes of 2.14 +<code>DOMRectImmutable</code> are readonly. 2.15 2.16 <pre class=idl>[<span title=dom-DOMRect>Constructor</span>(unrestricted double left, unrestricted double top, unrestricted double width, <!-- 2.17 -->unrestricted double height)] 2.18 @@ -1582,7 +1583,18 @@ 2.19 attribute unrestricted double <span title=dom-DOMRect-left>left</span>; 2.20 attribute unrestricted double <span title=dom-DOMRect-width>width</span>; 2.21 attribute unrestricted double <span title=dom-DOMRect-height>height</span>; 2.22 -};</pre> 2.23 +}; 2.24 + 2.25 +interface <dfn>DOMRectImmutable</dfn> { 2.26 + readonly attribute unrestricted double <span title=dom-DOMRectImmutable-top>top</span>; 2.27 + readonly attribute unrestricted double <span title=dom-DOMRectImmutable-right>right</span>; 2.28 + readonly attribute unrestricted double <span title=dom-DOMRectImmutable-bottom>bottom</span>; 2.29 + readonly attribute unrestricted double <span title=dom-DOMRectImmutable-left>left</span>; 2.30 + readonly attribute unrestricted double <span title=dom-DOMRectImmutable-width>width</span>; 2.31 + readonly attribute unrestricted double <span title=dom-DOMRectImmutable-height>height</span>; 2.32 +}; 2.33 + 2.34 +typedef (<span>DOMRect</span> or <span>DOMRectImmutable</span>) <dfn>DOMRectAny</dfn>;</pre> 2.35 2.36 <p class=atrisk>The <dfn title=dom-DOMRect><code>DOMRect(<var>left</var>, <var>top</var>, <var>width</var>, <var>height</var>)</code></dfn> constructor, when 2.37 invoked, must run the following steps: 2.38 @@ -1596,30 +1608,29 @@ 2.39 </ol> 2.40 2.41 <p>The <dfn title=dom-DOMRect-top><code>top</code></dfn> attribute gives the y-coordinate, relative to the <span>viewport</span> origin, of the top of 2.42 -the rectangle box. On getting, it must return the current value. On setting, if the <i>readonly</i> flag is set, a 2.43 -<code data-anolis-spec=dom>NoModificationAllowedError</code> exception must be thrown. Otherwise, the current value must be set to the new value.</p> 2.44 +the rectangle box. On getting, it must return the current value. On setting, the current value must be set to the new value.</p> 2.45 2.46 <p>The <dfn title=dom-DOMRect-right><code>right</code></dfn> attribute gives the x-coordinate, relative to the <span>viewport</span> origin, of the 2.47 -right of the rectangle box. On getting, it must return the current value. On setting, if the <i>readonly</i> flag is set, a 2.48 -<code data-anolis-spec=dom>NoModificationAllowedError</code> exception must be thrown. Otherwise, the current value must be set to the new value.</p> 2.49 +right of the rectangle box. On getting, it must return the current value. On setting, the current value must be set to the new value.</p> 2.50 2.51 <p>The <dfn title=dom-DOMRect-bottom><code>bottom</code></dfn> attribute gives the y-coordinate, relative to the <span>viewport</span> origin, of the 2.52 -bottom of the rectangle box. On getting, it must return the current value. On setting, if the <i>readonly</i> flag is set, a 2.53 -<code data-anolis-spec=dom>NoModificationAllowedError</code> exception must be thrown. Otherwise, the current value must be set to the new value.</p> 2.54 +bottom of the rectangle box. On getting, it must return the current value. On setting, the current value must be set to the new value.</p> 2.55 2.56 <p>The <dfn title=dom-DOMRect-left><code>left</code></dfn> attribute gives the x-coordinate, relative to the <span>viewport</span> origin, of the left 2.57 -of the rectangle box. On getting, it must return the current value. On setting, if the <i>readonly</i> flag is set, a 2.58 -<code data-anolis-spec=dom>NoModificationAllowedError</code> exception must be thrown. Otherwise, the current value must be set to the new value.</p> 2.59 +of the rectangle box. On getting, it must return the current value. On setting, the current value must be set to the new value.</p> 2.60 2.61 <p>The <dfn title=dom-DOMRect-width><code>width</code></dfn> attribute, on getting, must return the value of <code title=dom-DOMRect-right>right</code> minus 2.62 -<code title=dom-DOMRect-left>left</code>. On setting, if the <i>readonly</i> flag is set, a <code data-anolis-spec=dom>NoModificationAllowedError</code> 2.63 -exception must be thrown. Otherwise, the <code title=dom-DOMRect-right>right</code> attribute must be set to the new value plus the value of 2.64 +<code title=dom-DOMRect-left>left</code>. On setting, the <code title=dom-DOMRect-right>right</code> attribute must be set to the new value plus the value of 2.65 <code title=dom-DOMRect-left>left</code>.</p> 2.66 2.67 <p>The <dfn title=dom-DOMRect-height><code>height</code></dfn> attribute, on getting, must return the value of <code title=dom-DOMRect-bottom>bottom</code> 2.68 -minus <code title=dom-DOMRect-top>top</code>. On setting, if the <i>readonly</i> flag is set, a <code data-anolis-spec=dom>NoModificationAllowedError</code> 2.69 -exception must be thrown. Otherwise, the <code title=dom-DOMRect-bottom>bottom</code> attribute must be set to the new value plus the value of 2.70 -<code title=dom-DOMRect-top>top</code>.</p> 2.71 +minus <code title=dom-DOMRect-top>top</code>. On setting, the <code title=dom-DOMRect-bottom>bottom</code> attribute must be set to the new value plus the value 2.72 +of <code title=dom-DOMRect-top>top</code>.</p> 2.73 + 2.74 +<p>The <dfn title=dom-DOMRectImmutable-top><code>top</code></dfn>, <dfn title=dom-DOMRectImmutable-right><code>right</code></dfn>, 2.75 +<dfn title=dom-DOMRectImmutable-bottom><code>bottom</code></dfn>, <dfn title=dom-DOMRectImmutable-left><code>left</code></dfn>, 2.76 +<dfn title=dom-DOMRectImmutable-width><code>width</code></dfn> and <dfn title=dom-DOMRectImmutable-height><code>height</code></dfn> attributes of the 2.77 +<code>DOMRectImmutable</code> interface, on getting, must behave the same as the attribute of the same name on the <code>DOMRect</code> interface. 2.78 2.79 2.80 <h3 class=atrisk>The <code title>DOMPoint</code> Interface</h3> 2.81 @@ -1674,16 +1685,17 @@ 2.82 <h3 class=atrisk>The <code title>DOMQuad</code> Interface</h3> 2.83 2.84 <p>Objects implementing the <code>DOMQuad</code> interface represents a quadrilateral shape. <code>DOMQuad</code> objects have an <dfn>associated 2.85 -bounding rectangle</dfn> set to a <code>DOMRect</code> object when created. 2.86 +bounding rectangle</dfn> set to a <code>DOMRectImmutable</code> object when created. 2.87 2.88 -<pre class=idl>[<span title=dom-DOMQuad>Constructor</span>(DOMPointLiteral p1, DOMPointLiteral p2, DOMPointLiteral p3, DOMPointLiteral p4), 2.89 - <span title=dom-DOMQuad>Constructor</span>(DOMRect rect)] 2.90 +<pre class=idl>[<span title=dom-DOMQuad>Constructor</span>(<span>DOMPointLiteral</span> p1, <span>DOMPointLiteral</span> p2, <!-- 2.91 +--><span>DOMPointLiteral</span> p3, <span>DOMPointLiteral</span> p4), 2.92 + <span title=dom-DOMQuad>Constructor</span>(<span>DOMRectAny</span> rect)] 2.93 interface <dfn>DOMQuad</dfn> { 2.94 [SameObject] readonly attribute <span>DOMPoint</span> <span title=dom-DOMQuad-p1>p1</span>; 2.95 [SameObject] readonly attribute <span>DOMPoint</span> <span title=dom-DOMQuad-p2>p2</span>; 2.96 [SameObject] readonly attribute <span>DOMPoint</span> <span title=dom-DOMQuad-p3>p3</span>; 2.97 [SameObject] readonly attribute <span>DOMPoint</span> <span title=dom-DOMQuad-p4>p4</span>; 2.98 - [SameObject] readonly attribute <span>DOMRect</span> <span title=dom-DOMQuad-bounds>bounds</span>; 2.99 + [SameObject] readonly attribute <span>DOMRectImmutable</span> <span title=dom-DOMQuad-bounds>bounds</span>; 2.100 };</pre> 2.101 2.102 <p>The <dfn title=dom-DOMQuad><code>DOMQuad()</code></dfn> constructor, when invoked, must run the following steps: 2.103 @@ -1707,8 +1719,8 @@ 2.104 <li><p>Let <var>point 4</var> be a new <code>DOMPoint</code> object with <code title=dom-DOMPoint-x>x</code> set to <var>left</var>, 2.105 <code title=dom-DOMPoint-y>y</code> set to <var>bottom</var>, <code title=dom-DOMPoint-z>z</code> set to zero and <code title=dom-DOMPoint-w>w</code> set to 2.106 one. 2.107 - <li><p>Let <var>bounds</var> be a new <code>DOMRect</code> object with its attributes set to the values of the namesake attributes in <var>rect</var>, and 2.108 - with the <i>readonly</i> flag set. 2.109 + <li><p>Let <var>bounds</var> be a new <code>DOMRectImmutable</code> object with its attributes set to the values of the namesake attributes in 2.110 + <var>rect</var>. 2.111 </ol> 2.112 <li><p>Otherwise, follow these substeps: 2.113 <ol> 2.114 @@ -1721,8 +1733,8 @@ 2.115 <var>p3</var>. 2.116 <li><p>Let <var>point 4</var> be a new <code>DOMPoint</code> object with its attributes set to the values of the namesake dictionary members in 2.117 <var>p4</var>. 2.118 - <li><p>Let <var>bounds</var> be a new <code>DOMRect</code> object describing the bounding box of <var>point 1</var>, <var>point 2</var>, <var>point 3</var> 2.119 - and <var>point 4</var>, and with the <i>readonly</i> flag set. 2.120 + <li><p>Let <var>bounds</var> be a new <code>DOMRectImmutable</code> object describing the bounding box of <var>point 1</var>, <var>point 2</var>, <var>point 2.121 + 3</var> and <var>point 4</var>. 2.122 </ol> 2.123 <li><p>Return a new <code>DOMQuad</code> with <code title=dom-DOMQuad-p1>p1</code> set to <var>point 1</var>, <code title=dom-DOMQuad-p2>p2</code> set to 2.124 <var>point 2</var>, <code title=dom-DOMQuad-p3>p3</code> set to <var>point 3</var> and <code title=dom-DOMQuad-p4>p4</code> set to <var>point 4</var>, and 2.125 @@ -1758,7 +1770,7 @@ 2.126 sequence<<span>DOMQuad</span>> <span title=dom-GeometryUtils-getBoxQuads>getBoxQuads</span>(<span>BoxQuadOptions</span> options); 2.127 <span>DOMQuad</span> <span title=dom-GeometryUtils-convertQuadFromNode>convertQuadFromNode</span>(<span>DOMQuad</span> quad, <!-- 2.128 --><span>GeometryNode</span> from, optional <span>ConvertCoordinateOptions</span> options); 2.129 - <span>DOMQuad</span> <span title=dom-GeometryUtils-convertRectFromNode>convertRectFromNode</span>(<span>DOMRect</span> rect, <!-- 2.130 + <span>DOMQuad</span> <span title=dom-GeometryUtils-convertRectFromNode>convertRectFromNode</span>(<span>DOMRectAny</span> rect, <!-- 2.131 --><span>GeometryNode</span> from, optional <span>ConvertCoordinateOptions</span> options); 2.132 <span>DOMPoint</span> <span title=dom-GeometryUtils-convertPointFromNode>convertPointFromNode</span>(<span>DOMPointLiteral</span> point, <!-- 2.133 --><span>GeometryNode</span> from, optional <span>ConvertCoordinateOptions</span> options);