Tue, 01 Oct 2013 21:02:41 +0200
[cssom-view] Move common members of DOMRect and DOMRectReadOnly to a new interface. Also make the argument to getBoxQuads optional.
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 Tue Oct 01 14:05:37 2013 +0200 1.2 +++ b/cssom-view/Overview.html Tue Oct 01 21:02:41 2013 +0200 1.3 @@ -1035,10 +1035,10 @@ 1.4 <code title="dom-Element-getClientRects"><a href="#dom-element-getclientrects">getClientRects()</a></code> on the 1.5 same element this method was invoked on.</li> 1.6 <li><p>If the <var>list</var> is empty return a <code><a href="#domrect">DOMRect</a></code> 1.7 - object whose <code title="dom-DOMRect-top"><a href="#dom-domrect-top">top</a></code>, 1.8 - <code title="dom-DOMRect-right"><a href="#dom-domrect-right">right</a></code>, 1.9 - <code title="dom-DOMRect-bottom"><a href="#dom-domrect-bottom">bottom</a></code> and 1.10 - <code title="dom-DOMRect-left"><a href="#dom-domrect-left">left</a></code> members are zero.</li> 1.11 + object whose <code title="dom-DOMRect-x"><a href="#dom-domrect-x">x</a></code>, 1.12 + <code title="dom-DOMRect-y"><a href="#dom-domrect-y">y</a></code>, 1.13 + <code title="dom-DOMRect-width"><a href="#dom-domrect-width">width</a></code> and 1.14 + <code title="dom-DOMRect-height"><a href="#dom-domrect-height">height</a></code> members are zero.</li> 1.15 <li><p>Otherwise, return a <code><a href="#domrect">DOMRect</a></code> object describing the 1.16 smallest rectangle that includes the first rectangle in <var>list</var> 1.17 and all of the remaining rectangles of which the height or width is not 1.18 @@ -1492,10 +1492,10 @@ 1.19 same range this method was invoked on.</li> 1.20 <li><p>If <var>list</var> is empty return a 1.21 <code><a href="#domrect">DOMRect</a></code> object whose 1.22 - <code title="dom-DOMRect-top"><a href="#dom-domrect-top">top</a></code>, 1.23 - <code title="dom-DOMRect-right"><a href="#dom-domrect-right">right</a></code>, 1.24 - <code title="dom-DOMRect-bottom"><a href="#dom-domrect-bottom">bottom</a></code> and 1.25 - <code title="dom-DOMRect-left"><a href="#dom-domrect-left">left</a></code> members are zero.</li> 1.26 + <code title="dom-DOMRect-x"><a href="#dom-domrect-x">x</a></code>, 1.27 + <code title="dom-DOMRect-y"><a href="#dom-domrect-y">y</a></code>, 1.28 + <code title="dom-DOMRect-width"><a href="#dom-domrect-width">width</a></code> and 1.29 + <code title="dom-DOMRect-height"><a href="#dom-domrect-height">height</a></code> members are zero.</li> 1.30 <li><p>Otherwise, return a <code><a href="#domrect">DOMRect</a></code> object describing the 1.31 smallest rectangle that includes the first rectangle in <var>list</var> 1.32 and all of the remaining rectangles of which the height or width is not 1.33 @@ -1641,10 +1641,6 @@ 1.34 attribute unrestricted double <a href="#dom-domrect-y" title="dom-DOMRect-y">y</a>; 1.35 attribute unrestricted double <a href="#dom-domrect-width" title="dom-DOMRect-width">width</a>; 1.36 attribute unrestricted double <a href="#dom-domrect-height" title="dom-DOMRect-height">height</a>; 1.37 - readonly attribute unrestricted double <a href="#dom-domrect-top" title="dom-DOMRect-top">top</a>; 1.38 - readonly attribute unrestricted double <a href="#dom-domrect-right" title="dom-DOMRect-right">right</a>; 1.39 - readonly attribute unrestricted double <a href="#dom-domrect-bottom" title="dom-DOMRect-bottom">bottom</a>; 1.40 - readonly attribute unrestricted double <a href="#dom-domrect-left" title="dom-DOMRect-left">left</a>; 1.41 }; 1.42 1.43 interface <dfn id="domrectreadonly">DOMRectReadOnly</dfn> { 1.44 @@ -1652,12 +1648,19 @@ 1.45 readonly attribute unrestricted double <a href="#dom-domrectreadonly-y" title="dom-DOMRectReadOnly-y">y</a>; 1.46 readonly attribute unrestricted double <a href="#dom-domrectreadonly-width" title="dom-DOMRectReadOnly-width">width</a>; 1.47 readonly attribute unrestricted double <a href="#dom-domrectreadonly-height" title="dom-DOMRectReadOnly-height">height</a>; 1.48 - readonly attribute unrestricted double <a href="#dom-domrectreadonly-top" title="dom-DOMRectReadOnly-top">top</a>; 1.49 - readonly attribute unrestricted double <a href="#dom-domrectreadonly-right" title="dom-DOMRectReadOnly-right">right</a>; 1.50 - readonly attribute unrestricted double <a href="#dom-domrectreadonly-bottom" title="dom-DOMRectReadOnly-bottom">bottom</a>; 1.51 - readonly attribute unrestricted double <a href="#dom-domrectreadonly-left" title="dom-DOMRectReadOnly-left">left</a>; 1.52 }; 1.53 1.54 +[NoInterfaceObject] 1.55 +interface <dfn id="abstractrect">AbstractRect</dfn> { 1.56 + readonly attribute unrestricted double <a href="#dom-abstractrect-top" title="dom-AbstractRect-top">top</a>; 1.57 + readonly attribute unrestricted double <a href="#dom-abstractrect-right" title="dom-AbstractRect-right">right</a>; 1.58 + readonly attribute unrestricted double <a href="#dom-abstractrect-bottom" title="dom-AbstractRect-bottom">bottom</a>; 1.59 + readonly attribute unrestricted double <a href="#dom-abstractrect-left" title="dom-AbstractRect-left">left</a>; 1.60 +}; 1.61 + 1.62 +<a href="#domrect">DOMRect</a> implements <a href="#abstractrect">AbstractRect</a>; 1.63 +<a href="#domrectreadonly">DOMRectReadOnly</a> implements <a href="#abstractrect">AbstractRect</a>; 1.64 + 1.65 typedef (<a href="#domrect">DOMRect</a> or <a href="#domrectreadonly">DOMRectReadOnly</a>) <dfn id="domrectany">DOMRectAny</dfn>;</pre> 1.66 1.67 <p class="atrisk">The <dfn id="dom-domrect" title="dom-DOMRect"><code>DOMRect(<var>x</var>, <var>y</var>, <var>width</var>, <var>height</var>)</code></dfn> constructor, when 1.68 @@ -1683,24 +1686,22 @@ 1.69 <a href="#concept-geometry-rectangle-height" title="concept-geometry-rectangle-height">height</a>. On setting, the <a href="#concept-geometry-rectangle-height" title="concept-geometry-rectangle-height">height</a> must be set to the new 1.70 value. 1.71 1.72 -<p>The <dfn id="dom-domrect-top" title="dom-DOMRect-top"><code>top</code></dfn> attribute, on getting, must return min(<a href="#concept-geometry-rectangle-y-coordinate" title="concept-geometry-rectangle-y-coordinate">y 1.73 +<p>The <dfn id="dom-domrectreadonly-x" title="dom-DOMRectReadOnly-x"><code>x</code></dfn>, <dfn id="dom-domrectreadonly-y" title="dom-DOMRectReadOnly-y"><code>y</code></dfn>, 1.74 +<dfn id="dom-domrectreadonly-width" title="dom-DOMRectReadOnly-width"><code>width</code></dfn> and <dfn id="dom-domrectreadonly-height" title="dom-DOMRectReadOnly-height"><code>height</code></dfn> attributes of the 1.75 +<code><a href="#domrectreadonly">DOMRectReadOnly</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.76 + 1.77 +<p>The <dfn id="dom-abstractrect-top" title="dom-AbstractRect-top"><code>top</code></dfn> attribute, on getting, must return min(<a href="#concept-geometry-rectangle-y-coordinate" title="concept-geometry-rectangle-y-coordinate">y 1.78 coordinate</a>, <a href="#concept-geometry-rectangle-y-coordinate" title="concept-geometry-rectangle-y-coordinate">y coordinate</a> + <a href="#concept-geometry-rectangle-height" title="concept-geometry-rectangle-height">height</a>). 1.79 1.80 -<p>The <dfn id="dom-domrect-right" title="dom-DOMRect-right"><code>right</code></dfn> attribute, on getting, must return max(<a href="#concept-geometry-rectangle-x-coordinate" title="concept-geometry-rectangle-x-coordinate">x 1.81 +<p>The <dfn id="dom-abstractrect-right" title="dom-AbstractRect-right"><code>right</code></dfn> attribute, on getting, must return max(<a href="#concept-geometry-rectangle-x-coordinate" title="concept-geometry-rectangle-x-coordinate">x 1.82 coordinate</a>, <a href="#concept-geometry-rectangle-x-coordinate" title="concept-geometry-rectangle-x-coordinate">x coordinate</a> - <a href="#concept-geometry-rectangle-width" title="concept-geometry-rectangle-width">width</a>). 1.83 1.84 -<p>The <dfn id="dom-domrect-bottom" title="dom-DOMRect-bottom"><code>bottom</code></dfn> attribute, on getting, must return max(<a href="#concept-geometry-rectangle-y-coordinate" title="concept-geometry-rectangle-y-coordinate">y 1.85 +<p>The <dfn id="dom-abstractrect-bottom" title="dom-AbstractRect-bottom"><code>bottom</code></dfn> attribute, on getting, must return max(<a href="#concept-geometry-rectangle-y-coordinate" title="concept-geometry-rectangle-y-coordinate">y 1.86 coordinate</a>, <a href="#concept-geometry-rectangle-y-coordinate" title="concept-geometry-rectangle-y-coordinate">y coordinate</a> - <a href="#concept-geometry-rectangle-height" title="concept-geometry-rectangle-height">height</a>). 1.87 1.88 -<p>The <dfn id="dom-domrect-left" title="dom-DOMRect-left"><code>left</code></dfn> attribute, on getting, must return min(<a href="#concept-geometry-rectangle-x-coordinate" title="concept-geometry-rectangle-x-coordinate">x 1.89 +<p>The <dfn id="dom-abstractrect-left" title="dom-AbstractRect-left"><code>left</code></dfn> attribute, on getting, must return min(<a href="#concept-geometry-rectangle-x-coordinate" title="concept-geometry-rectangle-x-coordinate">x 1.90 coordinate</a>, <a href="#concept-geometry-rectangle-x-coordinate" title="concept-geometry-rectangle-x-coordinate">x coordinate</a> + <a href="#concept-geometry-rectangle-width" title="concept-geometry-rectangle-width">width</a>). 1.91 1.92 -<p>The <dfn id="dom-domrectreadonly-x" title="dom-DOMRectReadOnly-x"><code>x</code></dfn>, <dfn id="dom-domrectreadonly-y" title="dom-DOMRectReadOnly-y"><code>y</code></dfn>, 1.93 -<dfn id="dom-domrectreadonly-width" title="dom-DOMRectReadOnly-width"><code>width</code></dfn>, <dfn id="dom-domrectreadonly-height" title="dom-DOMRectReadOnly-height"><code>height</code></dfn>, 1.94 -<dfn id="dom-domrectreadonly-top" title="dom-DOMRectReadOnly-top"><code>top</code></dfn>, <dfn id="dom-domrectreadonly-right" title="dom-DOMRectReadOnly-right"><code>right</code></dfn>, 1.95 -<dfn id="dom-domrectreadonly-bottom" title="dom-DOMRectReadOnly-bottom"><code>bottom</code></dfn> and <dfn id="dom-domrectreadonly-left" title="dom-DOMRectReadOnly-left"><code>left</code></dfn> attributes of the 1.96 -<code><a href="#domrectreadonly">DOMRectReadOnly</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.97 - 1.98 1.99 <h3 class="atrisk" id="the-dompoint-interface"><span class="secno">11.3 </span>The <code title="">DOMPoint</code> Interface</h3> 1.100 1.101 @@ -1840,7 +1841,7 @@ 1.102 1.103 [NoInterfaceObject] 1.104 interface <dfn id="geometryutils">GeometryUtils</dfn> { 1.105 - sequence<<a href="#domquad">DOMQuad</a>> <a href="#dom-geometryutils-getboxquads" title="dom-GeometryUtils-getBoxQuads">getBoxQuads</a>(<a href="#boxquadoptions">BoxQuadOptions</a> options); 1.106 + sequence<<a href="#domquad">DOMQuad</a>> <a href="#dom-geometryutils-getboxquads" title="dom-GeometryUtils-getBoxQuads">getBoxQuads</a>(optional <a href="#boxquadoptions">BoxQuadOptions</a> options); 1.107 <a href="#domquad">DOMQuad</a> <a href="#dom-geometryutils-convertquadfromnode" title="dom-GeometryUtils-convertQuadFromNode">convertQuadFromNode</a>(<a href="#domquad">DOMQuad</a> quad, <!-- 1.108 --><a href="#geometrynode">GeometryNode</a> from, optional <a href="#convertcoordinateoptions">ConvertCoordinateOptions</a> options); 1.109 <a href="#domquad">DOMQuad</a> <a href="#dom-geometryutils-convertrectfromnode" title="dom-GeometryUtils-convertRectFromNode">convertRectFromNode</a>(<a href="#domrectany">DOMRectAny</a> rect, <!--
2.1 --- a/cssom-view/Overview.src.html Tue Oct 01 14:05:37 2013 +0200 2.2 +++ b/cssom-view/Overview.src.html Tue Oct 01 21:02:41 2013 +0200 2.3 @@ -993,10 +993,10 @@ 2.4 <code title=dom-Element-getClientRects>getClientRects()</code> on the 2.5 same element this method was invoked on.</p></li> 2.6 <li><p>If the <var>list</var> is empty return a <code>DOMRect</code> 2.7 - object whose <code title=dom-DOMRect-top>top</code>, 2.8 - <code title=dom-DOMRect-right>right</code>, 2.9 - <code title=dom-DOMRect-bottom>bottom</code> and 2.10 - <code title=dom-DOMRect-left>left</code> members are zero.</p></li> 2.11 + object whose <code title=dom-DOMRect-x>x</code>, 2.12 + <code title=dom-DOMRect-y>y</code>, 2.13 + <code title=dom-DOMRect-width>width</code> and 2.14 + <code title=dom-DOMRect-height>height</code> members are zero.</p></li> 2.15 <li><p>Otherwise, return a <code>DOMRect</code> object describing the 2.16 smallest rectangle that includes the first rectangle in <var>list</var> 2.17 and all of the remaining rectangles of which the height or width is not 2.18 @@ -1450,10 +1450,10 @@ 2.19 same range this method was invoked on.</p></li> 2.20 <li><p>If <var>list</var> is empty return a 2.21 <code>DOMRect</code> object whose 2.22 - <code title=dom-DOMRect-top>top</code>, 2.23 - <code title=dom-DOMRect-right>right</code>, 2.24 - <code title=dom-DOMRect-bottom>bottom</code> and 2.25 - <code title=dom-DOMRect-left>left</code> members are zero.</p></li> 2.26 + <code title=dom-DOMRect-x>x</code>, 2.27 + <code title=dom-DOMRect-y>y</code>, 2.28 + <code title=dom-DOMRect-width>width</code> and 2.29 + <code title=dom-DOMRect-height>height</code> members are zero.</p></li> 2.30 <li><p>Otherwise, return a <code>DOMRect</code> object describing the 2.31 smallest rectangle that includes the first rectangle in <var>list</var> 2.32 and all of the remaining rectangles of which the height or width is not 2.33 @@ -1599,10 +1599,6 @@ 2.34 attribute unrestricted double <span title=dom-DOMRect-y>y</span>; 2.35 attribute unrestricted double <span title=dom-DOMRect-width>width</span>; 2.36 attribute unrestricted double <span title=dom-DOMRect-height>height</span>; 2.37 - readonly attribute unrestricted double <span title=dom-DOMRect-top>top</span>; 2.38 - readonly attribute unrestricted double <span title=dom-DOMRect-right>right</span>; 2.39 - readonly attribute unrestricted double <span title=dom-DOMRect-bottom>bottom</span>; 2.40 - readonly attribute unrestricted double <span title=dom-DOMRect-left>left</span>; 2.41 }; 2.42 2.43 interface <dfn>DOMRectReadOnly</dfn> { 2.44 @@ -1610,12 +1606,19 @@ 2.45 readonly attribute unrestricted double <span title=dom-DOMRectReadOnly-y>y</span>; 2.46 readonly attribute unrestricted double <span title=dom-DOMRectReadOnly-width>width</span>; 2.47 readonly attribute unrestricted double <span title=dom-DOMRectReadOnly-height>height</span>; 2.48 - readonly attribute unrestricted double <span title=dom-DOMRectReadOnly-top>top</span>; 2.49 - readonly attribute unrestricted double <span title=dom-DOMRectReadOnly-right>right</span>; 2.50 - readonly attribute unrestricted double <span title=dom-DOMRectReadOnly-bottom>bottom</span>; 2.51 - readonly attribute unrestricted double <span title=dom-DOMRectReadOnly-left>left</span>; 2.52 }; 2.53 2.54 +[NoInterfaceObject] 2.55 +interface <dfn>AbstractRect</dfn> { 2.56 + readonly attribute unrestricted double <span title=dom-AbstractRect-top>top</span>; 2.57 + readonly attribute unrestricted double <span title=dom-AbstractRect-right>right</span>; 2.58 + readonly attribute unrestricted double <span title=dom-AbstractRect-bottom>bottom</span>; 2.59 + readonly attribute unrestricted double <span title=dom-AbstractRect-left>left</span>; 2.60 +}; 2.61 + 2.62 +<span>DOMRect</span> implements <span>AbstractRect</span>; 2.63 +<span>DOMRectReadOnly</span> implements <span>AbstractRect</span>; 2.64 + 2.65 typedef (<span>DOMRect</span> or <span>DOMRectReadOnly</span>) <dfn>DOMRectAny</dfn>;</pre> 2.66 2.67 <p class=atrisk>The <dfn title=dom-DOMRect><code>DOMRect(<var>x</var>, <var>y</var>, <var>width</var>, <var>height</var>)</code></dfn> constructor, when 2.68 @@ -1641,24 +1644,22 @@ 2.69 <span title=concept-geometry-rectangle-height>height</span>. On setting, the <span title=concept-geometry-rectangle-height>height</span> must be set to the new 2.70 value. 2.71 2.72 -<p>The <dfn title=dom-DOMRect-top><code>top</code></dfn> attribute, on getting, must return min(<span title=concept-geometry-rectangle-y-coordinate>y 2.73 +<p>The <dfn title=dom-DOMRectReadOnly-x><code>x</code></dfn>, <dfn title=dom-DOMRectReadOnly-y><code>y</code></dfn>, 2.74 +<dfn title=dom-DOMRectReadOnly-width><code>width</code></dfn> and <dfn title=dom-DOMRectReadOnly-height><code>height</code></dfn> attributes of the 2.75 +<code>DOMRectReadOnly</code> interface, on getting, must behave the same as the attribute of the same name on the <code>DOMRect</code> interface. 2.76 + 2.77 +<p>The <dfn title=dom-AbstractRect-top><code>top</code></dfn> attribute, on getting, must return min(<span title=concept-geometry-rectangle-y-coordinate>y 2.78 coordinate</span>, <span title=concept-geometry-rectangle-y-coordinate>y coordinate</span> + <span title=concept-geometry-rectangle-height>height</span>). 2.79 2.80 -<p>The <dfn title=dom-DOMRect-right><code>right</code></dfn> attribute, on getting, must return max(<span title=concept-geometry-rectangle-x-coordinate>x 2.81 +<p>The <dfn title=dom-AbstractRect-right><code>right</code></dfn> attribute, on getting, must return max(<span title=concept-geometry-rectangle-x-coordinate>x 2.82 coordinate</span>, <span title=concept-geometry-rectangle-x-coordinate>x coordinate</span> - <span title=concept-geometry-rectangle-width>width</span>). 2.83 2.84 -<p>The <dfn title=dom-DOMRect-bottom><code>bottom</code></dfn> attribute, on getting, must return max(<span title=concept-geometry-rectangle-y-coordinate>y 2.85 +<p>The <dfn title=dom-AbstractRect-bottom><code>bottom</code></dfn> attribute, on getting, must return max(<span title=concept-geometry-rectangle-y-coordinate>y 2.86 coordinate</span>, <span title=concept-geometry-rectangle-y-coordinate>y coordinate</span> - <span title=concept-geometry-rectangle-height>height</span>). 2.87 2.88 -<p>The <dfn title=dom-DOMRect-left><code>left</code></dfn> attribute, on getting, must return min(<span title=concept-geometry-rectangle-x-coordinate>x 2.89 +<p>The <dfn title=dom-AbstractRect-left><code>left</code></dfn> attribute, on getting, must return min(<span title=concept-geometry-rectangle-x-coordinate>x 2.90 coordinate</span>, <span title=concept-geometry-rectangle-x-coordinate>x coordinate</span> + <span title=concept-geometry-rectangle-width>width</span>). 2.91 2.92 -<p>The <dfn title=dom-DOMRectReadOnly-x><code>x</code></dfn>, <dfn title=dom-DOMRectReadOnly-y><code>y</code></dfn>, 2.93 -<dfn title=dom-DOMRectReadOnly-width><code>width</code></dfn>, <dfn title=dom-DOMRectReadOnly-height><code>height</code></dfn>, 2.94 -<dfn title=dom-DOMRectReadOnly-top><code>top</code></dfn>, <dfn title=dom-DOMRectReadOnly-right><code>right</code></dfn>, 2.95 -<dfn title=dom-DOMRectReadOnly-bottom><code>bottom</code></dfn> and <dfn title=dom-DOMRectReadOnly-left><code>left</code></dfn> attributes of the 2.96 -<code>DOMRectReadOnly</code> interface, on getting, must behave the same as the attribute of the same name on the <code>DOMRect</code> interface. 2.97 - 2.98 2.99 <h3 class=atrisk>The <code title>DOMPoint</code> Interface</h3> 2.100 2.101 @@ -1798,7 +1799,7 @@ 2.102 2.103 [NoInterfaceObject] 2.104 interface <dfn>GeometryUtils</dfn> { 2.105 - sequence<<span>DOMQuad</span>> <span title=dom-GeometryUtils-getBoxQuads>getBoxQuads</span>(<span>BoxQuadOptions</span> options); 2.106 + sequence<<span>DOMQuad</span>> <span title=dom-GeometryUtils-getBoxQuads>getBoxQuads</span>(optional <span>BoxQuadOptions</span> options); 2.107 <span>DOMQuad</span> <span title=dom-GeometryUtils-convertQuadFromNode>convertQuadFromNode</span>(<span>DOMQuad</span> quad, <!-- 2.108 --><span>GeometryNode</span> from, optional <span>ConvertCoordinateOptions</span> options); 2.109 <span>DOMQuad</span> <span title=dom-GeometryUtils-convertRectFromNode>convertRectFromNode</span>(<span>DOMRectAny</span> rect, <!--