Mon, 30 Sep 2013 16:57:02 +0200
[cssom-view] Introduce x/y members for DOMRect. Make top/right/bottom/left readonly and represent minY/maxX/maxY/minX, respectively. http://lists.w3.org/Archives/Public/www-style/2013Sep/0780.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 Mon Sep 30 16:08:04 2013 +0200 1.2 +++ b/cssom-view/Overview.html Mon Sep 30 16:57:02 2013 +0200 1.3 @@ -1612,66 +1612,91 @@ 1.4 1.5 <h3 id="the-domrect-and-domrectreadonly-interfaces"><span class="secno">11.2 </span>The <code title="">DOMRect</code> and <code title="">DOMRectReadOnly</code> Interfaces</h3> 1.6 1.7 -<p>Objects implementing the <code><a href="#domrect">DOMRect</a></code> or <code><a href="#domrectreadonly">DOMRectReadOnly</a></code> interface represent a rectangular box. The type of box is specified by the 1.8 -method or attribute that returns a <code><a href="#domrect">DOMRect</a></code> or <code><a href="#domrectreadonly">DOMRectReadOnly</a></code> object. The interfaces are identical except the attributes of 1.9 -<code><a href="#domrectreadonly">DOMRectReadOnly</a></code> are readonly. 1.10 +<p>Objects implementing the <code><a href="#domrect">DOMRect</a></code> or <code><a href="#domrectreadonly">DOMRectReadOnly</a></code> interface represent a <dfn id="concept-geometry-rectangle" title="concept-geometry-rectangle">rectangle</dfn>. 1.11 +The type of box is specified by the method or attribute that returns a <code><a href="#domrect">DOMRect</a></code> or <code><a href="#domrectreadonly">DOMRectReadOnly</a></code> object. The interfaces are identical 1.12 +except the attributes of <code><a href="#domrectreadonly">DOMRectReadOnly</a></code> are readonly. 1.13 1.14 -<pre class="idl">[<a href="#dom-domrect" title="dom-DOMRect">Constructor</a>(unrestricted double left, unrestricted double top, unrestricted double width, <!-- 1.15 +<p><a href="#concept-geometry-rectangle" title="concept-geometry-rectangle">Rectangles</a> have the following properties: 1.16 + 1.17 +<dl> 1.18 + <dt><dfn id="concept-geometry-rectangle-origin" title="concept-geometry-rectangle-origin">origin</dfn> 1.19 + <dd><p>When the rectangle has a non-negative <a href="#concept-geometry-rectangle-width" title="concept-geometry-rectangle-width">width</a>, the rectangle's horizontal origin is the left edge; 1.20 + otherwise, it is the right edge. Similarly, when the rectangle has a non-negative <a href="#concept-geometry-rectangle-height" title="concept-geometry-rectangle-height">height</a>, the rectangle's 1.21 + vertical origin is the top edge; otherwise, it is the bottom edge. 1.22 + <dt><dfn id="concept-geometry-rectangle-x-coordinate" title="concept-geometry-rectangle-x-coordinate">x coordinate</dfn> 1.23 + <dd><p>The horizontal distance between the <a href="#viewport">viewport</a>'s left edge and the rectangle's <a href="#concept-geometry-rectangle-origin" title="concept-geometry-rectangle-origin">origin</a>. 1.24 + <dt><dfn id="concept-geometry-rectangle-y-coordinate" title="concept-geometry-rectangle-y-coordinate">y coordinate</dfn> 1.25 + <dd><p>The vertical distance between the <a href="#viewport">viewport</a>'s top edge and the rectangle's <a href="#concept-geometry-rectangle-origin" title="concept-geometry-rectangle-origin">origin</a>. 1.26 + <dt><dfn id="concept-geometry-rectangle-width" title="concept-geometry-rectangle-width">width</dfn> 1.27 + <dd><p>The width of the rectangle. Can be negative. 1.28 + <dt><dfn id="concept-geometry-rectangle-height" title="concept-geometry-rectangle-height">height</dfn> 1.29 + <dd><p>The height of the rectangle. Can be negative. 1.30 +</dl> 1.31 + 1.32 +<pre class="idl">[<a href="#dom-domrect" title="dom-DOMRect">Constructor</a>(unrestricted double x, unrestricted double y, unrestricted double width, <!-- 1.33 -->unrestricted double height)] 1.34 interface <dfn id="domrect">DOMRect</dfn> { 1.35 - attribute unrestricted double <a href="#dom-domrect-top" title="dom-DOMRect-top">top</a>; 1.36 - attribute unrestricted double <a href="#dom-domrect-right" title="dom-DOMRect-right">right</a>; 1.37 - attribute unrestricted double <a href="#dom-domrect-bottom" title="dom-DOMRect-bottom">bottom</a>; 1.38 - attribute unrestricted double <a href="#dom-domrect-left" title="dom-DOMRect-left">left</a>; 1.39 + attribute unrestricted double <a href="#dom-domrect-x" title="dom-DOMRect-x">x</a>; 1.40 + attribute unrestricted double <a href="#dom-domrect-y" title="dom-DOMRect-y">y</a>; 1.41 attribute unrestricted double <a href="#dom-domrect-width" title="dom-DOMRect-width">width</a>; 1.42 attribute unrestricted double <a href="#dom-domrect-height" title="dom-DOMRect-height">height</a>; 1.43 + readonly attribute unrestricted double <a href="#dom-domrect-top" title="dom-DOMRect-top">top</a>; 1.44 + readonly attribute unrestricted double <a href="#dom-domrect-right" title="dom-DOMRect-right">right</a>; 1.45 + readonly attribute unrestricted double <a href="#dom-domrect-bottom" title="dom-DOMRect-bottom">bottom</a>; 1.46 + readonly attribute unrestricted double <a href="#dom-domrect-left" title="dom-DOMRect-left">left</a>; 1.47 }; 1.48 1.49 interface <dfn id="domrectreadonly">DOMRectReadOnly</dfn> { 1.50 + readonly attribute unrestricted double <a href="#dom-domrectreadonly-x" title="dom-DOMRectReadOnly-x">x</a>; 1.51 + readonly attribute unrestricted double <a href="#dom-domrectreadonly-y" title="dom-DOMRectReadOnly-y">y</a>; 1.52 + readonly attribute unrestricted double <a href="#dom-domrectreadonly-width" title="dom-DOMRectReadOnly-width">width</a>; 1.53 + readonly attribute unrestricted double <a href="#dom-domrectreadonly-height" title="dom-DOMRectReadOnly-height">height</a>; 1.54 readonly attribute unrestricted double <a href="#dom-domrectreadonly-top" title="dom-DOMRectReadOnly-top">top</a>; 1.55 readonly attribute unrestricted double <a href="#dom-domrectreadonly-right" title="dom-DOMRectReadOnly-right">right</a>; 1.56 readonly attribute unrestricted double <a href="#dom-domrectreadonly-bottom" title="dom-DOMRectReadOnly-bottom">bottom</a>; 1.57 readonly attribute unrestricted double <a href="#dom-domrectreadonly-left" title="dom-DOMRectReadOnly-left">left</a>; 1.58 - readonly attribute unrestricted double <a href="#dom-domrectreadonly-width" title="dom-DOMRectReadOnly-width">width</a>; 1.59 - readonly attribute unrestricted double <a href="#dom-domrectreadonly-height" title="dom-DOMRectReadOnly-height">height</a>; 1.60 }; 1.61 1.62 typedef (<a href="#domrect">DOMRect</a> or <a href="#domrectreadonly">DOMRectReadOnly</a>) <dfn id="domrectany">DOMRectAny</dfn>;</pre> 1.63 1.64 -<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.65 +<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.66 invoked, must run the following steps: 1.67 1.68 <ol> 1.69 - <li><p>Let <var>right</var> be <var>left</var> plus <var>width</var>. 1.70 - <li><p>Let <var>bottom</var> be <var>top</var> plus <var>height</var>. 1.71 - <li><p>Return a new <code><a href="#domrect">DOMRect</a></code> object with <a href="#dom-domrect-top" title="dom-DOMRect-top">top</a> set to <var>top</var>, <a href="#dom-domrect-right" title="dom-DOMRect-right">right</a> 1.72 - set to <var>right</var>, <a href="#dom-domrect-bottom" title="dom-DOMRect-bottom">bottom</a> set to <var>bottom</var> and <a href="#dom-domrect-left" title="dom-DOMRect-left">left</a> set to 1.73 - <var>left</var>. 1.74 + <li><p>Return a new <code><a href="#domrect">DOMRect</a></code> object with <a href="#concept-geometry-rectangle-x-coordinate" title="concept-geometry-rectangle-x-coordinate">x coordinate</a> set to <var>x</var>, 1.75 + <a href="#concept-geometry-rectangle-x-coordinate" title="concept-geometry-rectangle-x-coordinate">y coordinate</a> set to <var>y</var>, <a href="#concept-geometry-rectangle-width" title="concept-geometry-rectangle-width">width</a> set to 1.76 + <var>width</var> and <a href="#concept-geometry-rectangle-height" title="concept-geometry-rectangle-height">height</a> set to <var>height</var>. 1.77 </ol> 1.78 1.79 -<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.80 -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.81 +<p>The <dfn id="dom-domrect-x" title="dom-DOMRect-x"><code>x</code></dfn> attribute, on getting, it must return the <a href="#concept-geometry-rectangle-x-coordinate" title="concept-geometry-rectangle-x-coordinate">x 1.82 +coordinate</a>. On setting, the <a href="#concept-geometry-rectangle-x-coordinate" title="concept-geometry-rectangle-x-coordinate">x coordinate</a> must be set to the new value.</p> 1.83 1.84 -<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.85 -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.86 +<p>The <dfn id="dom-domrect-y" title="dom-DOMRect-y"><code>y</code></dfn> attribute, on getting, it must return the <a href="#concept-geometry-rectangle-y-coordinate" title="concept-geometry-rectangle-y-coordinate">y 1.87 +coordinate</a>. On setting, the <a href="#concept-geometry-rectangle-y-coordinate" title="concept-geometry-rectangle-y-coordinate">y coordinate</a> must be set to the new value.</p> 1.88 1.89 -<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.90 -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.91 +<p>The <dfn id="dom-domrect-width" title="dom-DOMRect-width"><code>width</code></dfn> attribute, on getting, must return the <a href="#concept-geometry-rectangle-width" title="concept-geometry-rectangle-width">width</a>. 1.92 +On setting, the <a href="#concept-geometry-rectangle-width" title="concept-geometry-rectangle-width">width</a> must be set to the new value. 1.93 1.94 -<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.95 -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.96 +<p>The <dfn id="dom-domrect-height" title="dom-DOMRect-height"><code>height</code></dfn> attribute, on getting, must return the 1.97 +<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.98 +value. 1.99 1.100 -<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.101 -<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.102 -<code title="dom-DOMRect-left"><a href="#dom-domrect-left">left</a></code>.</p> 1.103 +<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.104 +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.105 1.106 -<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.107 -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.108 -of <code title="dom-DOMRect-top"><a href="#dom-domrect-top">top</a></code>.</p> 1.109 +<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.110 +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.111 1.112 -<p>The <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.113 -<dfn id="dom-domrectreadonly-bottom" title="dom-DOMRectReadOnly-bottom"><code>bottom</code></dfn>, <dfn id="dom-domrectreadonly-left" title="dom-DOMRectReadOnly-left"><code>left</code></dfn>, 1.114 -<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.115 +<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.116 +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.117 + 1.118 +<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.119 +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.120 + 1.121 +<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.122 +<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.123 +<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.124 +<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.125 <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.126 1.127
2.1 --- a/cssom-view/Overview.src.html Mon Sep 30 16:08:04 2013 +0200 2.2 +++ b/cssom-view/Overview.src.html Mon Sep 30 16:57:02 2013 +0200 2.3 @@ -1570,66 +1570,91 @@ 2.4 2.5 <h3>The <code title>DOMRect</code> and <code title>DOMRectReadOnly</code> Interfaces</h3> 2.6 2.7 -<p>Objects implementing the <code>DOMRect</code> or <code>DOMRectReadOnly</code> interface represent a rectangular box. The type of box is specified by the 2.8 -method or attribute that returns a <code>DOMRect</code> or <code>DOMRectReadOnly</code> object. The interfaces are identical except the attributes of 2.9 -<code>DOMRectReadOnly</code> are readonly. 2.10 +<p>Objects implementing the <code>DOMRect</code> or <code>DOMRectReadOnly</code> interface represent a <dfn title=concept-geometry-rectangle>rectangle</dfn>. 2.11 +The type of box is specified by the method or attribute that returns a <code>DOMRect</code> or <code>DOMRectReadOnly</code> object. The interfaces are identical 2.12 +except the attributes of <code>DOMRectReadOnly</code> are readonly. 2.13 2.14 -<pre class=idl>[<span title=dom-DOMRect>Constructor</span>(unrestricted double left, unrestricted double top, unrestricted double width, <!-- 2.15 +<p><span title=concept-geometry-rectangle>Rectangles</span> have the following properties: 2.16 + 2.17 +<dl> 2.18 + <dt><dfn title=concept-geometry-rectangle-origin>origin</dfn> 2.19 + <dd><p>When the rectangle has a non-negative <span title=concept-geometry-rectangle-width>width</span>, the rectangle's horizontal origin is the left edge; 2.20 + otherwise, it is the right edge. Similarly, when the rectangle has a non-negative <span title=concept-geometry-rectangle-height>height</span>, the rectangle's 2.21 + vertical origin is the top edge; otherwise, it is the bottom edge. 2.22 + <dt><dfn title=concept-geometry-rectangle-x-coordinate>x coordinate</dfn> 2.23 + <dd><p>The horizontal distance between the <span>viewport</span>'s left edge and the rectangle's <span title=concept-geometry-rectangle-origin>origin</span>. 2.24 + <dt><dfn title=concept-geometry-rectangle-y-coordinate>y coordinate</dfn> 2.25 + <dd><p>The vertical distance between the <span>viewport</span>'s top edge and the rectangle's <span title=concept-geometry-rectangle-origin>origin</span>. 2.26 + <dt><dfn title=concept-geometry-rectangle-width>width</dfn> 2.27 + <dd><p>The width of the rectangle. Can be negative. 2.28 + <dt><dfn title=concept-geometry-rectangle-height>height</dfn> 2.29 + <dd><p>The height of the rectangle. Can be negative. 2.30 +</dl> 2.31 + 2.32 +<pre class=idl>[<span title=dom-DOMRect>Constructor</span>(unrestricted double x, unrestricted double y, unrestricted double width, <!-- 2.33 -->unrestricted double height)] 2.34 interface <dfn>DOMRect</dfn> { 2.35 - attribute unrestricted double <span title=dom-DOMRect-top>top</span>; 2.36 - attribute unrestricted double <span title=dom-DOMRect-right>right</span>; 2.37 - attribute unrestricted double <span title=dom-DOMRect-bottom>bottom</span>; 2.38 - attribute unrestricted double <span title=dom-DOMRect-left>left</span>; 2.39 + attribute unrestricted double <span title=dom-DOMRect-x>x</span>; 2.40 + attribute unrestricted double <span title=dom-DOMRect-y>y</span>; 2.41 attribute unrestricted double <span title=dom-DOMRect-width>width</span>; 2.42 attribute unrestricted double <span title=dom-DOMRect-height>height</span>; 2.43 + readonly attribute unrestricted double <span title=dom-DOMRect-top>top</span>; 2.44 + readonly attribute unrestricted double <span title=dom-DOMRect-right>right</span>; 2.45 + readonly attribute unrestricted double <span title=dom-DOMRect-bottom>bottom</span>; 2.46 + readonly attribute unrestricted double <span title=dom-DOMRect-left>left</span>; 2.47 }; 2.48 2.49 interface <dfn>DOMRectReadOnly</dfn> { 2.50 + readonly attribute unrestricted double <span title=dom-DOMRectReadOnly-x>x</span>; 2.51 + readonly attribute unrestricted double <span title=dom-DOMRectReadOnly-y>y</span>; 2.52 + readonly attribute unrestricted double <span title=dom-DOMRectReadOnly-width>width</span>; 2.53 + readonly attribute unrestricted double <span title=dom-DOMRectReadOnly-height>height</span>; 2.54 readonly attribute unrestricted double <span title=dom-DOMRectReadOnly-top>top</span>; 2.55 readonly attribute unrestricted double <span title=dom-DOMRectReadOnly-right>right</span>; 2.56 readonly attribute unrestricted double <span title=dom-DOMRectReadOnly-bottom>bottom</span>; 2.57 readonly attribute unrestricted double <span title=dom-DOMRectReadOnly-left>left</span>; 2.58 - readonly attribute unrestricted double <span title=dom-DOMRectReadOnly-width>width</span>; 2.59 - readonly attribute unrestricted double <span title=dom-DOMRectReadOnly-height>height</span>; 2.60 }; 2.61 2.62 typedef (<span>DOMRect</span> or <span>DOMRectReadOnly</span>) <dfn>DOMRectAny</dfn>;</pre> 2.63 2.64 -<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.65 +<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.66 invoked, must run the following steps: 2.67 2.68 <ol> 2.69 - <li><p>Let <var>right</var> be <var>left</var> plus <var>width</var>. 2.70 - <li><p>Let <var>bottom</var> be <var>top</var> plus <var>height</var>. 2.71 - <li><p>Return a new <code>DOMRect</code> object with <span title=dom-DOMRect-top>top</span> set to <var>top</var>, <span title=dom-DOMRect-right>right</span> 2.72 - set to <var>right</var>, <span title=dom-DOMRect-bottom>bottom</span> set to <var>bottom</var> and <span title=dom-DOMRect-left>left</span> set to 2.73 - <var>left</var>. 2.74 + <li><p>Return a new <code>DOMRect</code> object with <span title=concept-geometry-rectangle-x-coordinate>x coordinate</span> set to <var>x</var>, 2.75 + <span title=concept-geometry-rectangle-x-coordinate>y coordinate</span> set to <var>y</var>, <span title=concept-geometry-rectangle-width>width</span> set to 2.76 + <var>width</var> and <span title=concept-geometry-rectangle-height>height</span> set to <var>height</var>. 2.77 </ol> 2.78 2.79 -<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.80 -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.81 +<p>The <dfn title=dom-DOMRect-x><code>x</code></dfn> attribute, on getting, it must return the <span title=concept-geometry-rectangle-x-coordinate>x 2.82 +coordinate</span>. On setting, the <span title=concept-geometry-rectangle-x-coordinate>x coordinate</span> must be set to the new value.</p> 2.83 2.84 -<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.85 -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.86 +<p>The <dfn title=dom-DOMRect-y><code>y</code></dfn> attribute, on getting, it must return the <span title=concept-geometry-rectangle-y-coordinate>y 2.87 +coordinate</span>. On setting, the <span title=concept-geometry-rectangle-y-coordinate>y coordinate</span> must be set to the new value.</p> 2.88 2.89 -<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.90 -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.91 +<p>The <dfn title=dom-DOMRect-width><code>width</code></dfn> attribute, on getting, must return the <span title=concept-geometry-rectangle-width>width</span>. 2.92 +On setting, the <span title=concept-geometry-rectangle-width>width</span> must be set to the new value. 2.93 2.94 -<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.95 -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.96 +<p>The <dfn title=dom-DOMRect-height><code>height</code></dfn> attribute, on getting, must return the 2.97 +<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.98 +value. 2.99 2.100 -<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.101 -<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.102 -<code title=dom-DOMRect-left>left</code>.</p> 2.103 +<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.104 +coordinate</span>, <span title=concept-geometry-rectangle-y-coordinate>y coordinate</span> - <span title=concept-geometry-rectangle-height>height</span>). 2.105 2.106 -<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.107 -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.108 -of <code title=dom-DOMRect-top>top</code>.</p> 2.109 +<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.110 +coordinate</span>, <span title=concept-geometry-rectangle-x-coordinate>x coordinate</span> + <span title=concept-geometry-rectangle-width>width</span>). 2.111 2.112 -<p>The <dfn title=dom-DOMRectReadOnly-top><code>top</code></dfn>, <dfn title=dom-DOMRectReadOnly-right><code>right</code></dfn>, 2.113 -<dfn title=dom-DOMRectReadOnly-bottom><code>bottom</code></dfn>, <dfn title=dom-DOMRectReadOnly-left><code>left</code></dfn>, 2.114 -<dfn title=dom-DOMRectReadOnly-width><code>width</code></dfn> and <dfn title=dom-DOMRectReadOnly-height><code>height</code></dfn> attributes of the 2.115 +<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.116 +coordinate</span>, <span title=concept-geometry-rectangle-y-coordinate>y coordinate</span> + <span title=concept-geometry-rectangle-height>height</span>). 2.117 + 2.118 +<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.119 +coordinate</span>, <span title=concept-geometry-rectangle-x-coordinate>x coordinate</span> - <span title=concept-geometry-rectangle-width>width</span>). 2.120 + 2.121 +<p>The <dfn title=dom-DOMRectReadOnly-x><code>x</code></dfn>, <dfn title=dom-DOMRectReadOnly-y><code>y</code></dfn>, 2.122 +<dfn title=dom-DOMRectReadOnly-width><code>width</code></dfn>, <dfn title=dom-DOMRectReadOnly-height><code>height</code></dfn>, 2.123 +<dfn title=dom-DOMRectReadOnly-top><code>top</code></dfn>, <dfn title=dom-DOMRectReadOnly-right><code>right</code></dfn>, 2.124 +<dfn title=dom-DOMRectReadOnly-bottom><code>bottom</code></dfn> and <dfn title=dom-DOMRectReadOnly-left><code>left</code></dfn> attributes of the 2.125 <code>DOMRectReadOnly</code> interface, on getting, must behave the same as the attribute of the same name on the <code>DOMRect</code> interface. 2.126 2.127