Skip to content

Commit a86754f

Browse files
author
Simon Pieters
committed
[cssom-view] Fiddle with DOMRect/DOMRectReadOnly some more. http://lists.w3.org/Archives/Public/www-style/2013Oct/0073.html
1 parent 690a48d commit a86754f

2 files changed

Lines changed: 68 additions & 86 deletions

File tree

cssom-view/Overview.html

Lines changed: 34 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1612,9 +1612,8 @@ <h3 id="the-domrectlist-interface"><span class="secno">11.1 </span>The <code tit
16121612

16131613
<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>
16141614

1615-
<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>.
1616-
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
1617-
except the attributes of <code><a href="#domrectreadonly">DOMRectReadOnly</a></code> are readonly.
1615+
<p>Objects implementing the <code><a href="#domrectreadonly">DOMRectReadOnly</a></code> interface represent a <dfn id="concept-geometry-rectangle" title="concept-geometry-rectangle">rectangle</dfn>. The type of box is
1616+
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.
16181617

16191618
<p><a href="#concept-geometry-rectangle" title="concept-geometry-rectangle">Rectangles</a> have the following properties:
16201619

@@ -1636,32 +1635,23 @@ <h3 id="the-domrect-and-domrectreadonly-interfaces"><span class="secno">11.2 </s
16361635
<pre class="idl">[<a href="#dom-domrect" title="dom-DOMRect">Constructor</a>,
16371636
<a href="#dom-domrect" title="dom-DOMRect">Constructor</a>(unrestricted double x, unrestricted double y, unrestricted double width, <!--
16381637
-->unrestricted double height)]
1639-
interface <dfn id="domrect">DOMRect</dfn> {
1640-
attribute unrestricted double <a href="#dom-domrect-x" title="dom-DOMRect-x">x</a>;
1641-
attribute unrestricted double <a href="#dom-domrect-y" title="dom-DOMRect-y">y</a>;
1642-
attribute unrestricted double <a href="#dom-domrect-width" title="dom-DOMRect-width">width</a>;
1643-
attribute unrestricted double <a href="#dom-domrect-height" title="dom-DOMRect-height">height</a>;
1638+
interface <dfn id="domrect">DOMRect</dfn> : <a href="#domrectreadonly">DOMRectReadOnly</a> {
1639+
inherit attribute unrestricted double <a href="#dom-domrect-x" title="dom-DOMRect-x">x</a>;
1640+
inherit attribute unrestricted double <a href="#dom-domrect-y" title="dom-DOMRect-y">y</a>;
1641+
inherit attribute unrestricted double <a href="#dom-domrect-width" title="dom-DOMRect-width">width</a>;
1642+
inherit attribute unrestricted double <a href="#dom-domrect-height" title="dom-DOMRect-height">height</a>;
16441643
};
16451644

16461645
interface <dfn id="domrectreadonly">DOMRectReadOnly</dfn> {
16471646
readonly attribute unrestricted double <a href="#dom-domrectreadonly-x" title="dom-DOMRectReadOnly-x">x</a>;
16481647
readonly attribute unrestricted double <a href="#dom-domrectreadonly-y" title="dom-DOMRectReadOnly-y">y</a>;
16491648
readonly attribute unrestricted double <a href="#dom-domrectreadonly-width" title="dom-DOMRectReadOnly-width">width</a>;
16501649
readonly attribute unrestricted double <a href="#dom-domrectreadonly-height" title="dom-DOMRectReadOnly-height">height</a>;
1651-
};
1652-
1653-
[NoInterfaceObject]
1654-
interface <dfn id="abstractrect">AbstractRect</dfn> {
1655-
readonly attribute unrestricted double <a href="#dom-abstractrect-top" title="dom-AbstractRect-top">top</a>;
1656-
readonly attribute unrestricted double <a href="#dom-abstractrect-right" title="dom-AbstractRect-right">right</a>;
1657-
readonly attribute unrestricted double <a href="#dom-abstractrect-bottom" title="dom-AbstractRect-bottom">bottom</a>;
1658-
readonly attribute unrestricted double <a href="#dom-abstractrect-left" title="dom-AbstractRect-left">left</a>;
1659-
};
1660-
1661-
<a href="#domrect">DOMRect</a> implements <a href="#abstractrect">AbstractRect</a>;
1662-
<a href="#domrectreadonly">DOMRectReadOnly</a> implements <a href="#abstractrect">AbstractRect</a>;
1663-
1664-
typedef (<a href="#domrect">DOMRect</a> or <a href="#domrectreadonly">DOMRectReadOnly</a>) <dfn id="domrectany">DOMRectAny</dfn>;</pre>
1650+
readonly attribute unrestricted double <a href="#dom-domrectreadonly-top" title="dom-DOMRectReadOnly-top">top</a>;
1651+
readonly attribute unrestricted double <a href="#dom-domrectreadonly-right" title="dom-DOMRectReadOnly-right">right</a>;
1652+
readonly attribute unrestricted double <a href="#dom-domrectreadonly-bottom" title="dom-DOMRectReadOnly-bottom">bottom</a>;
1653+
readonly attribute unrestricted double <a href="#dom-domrectreadonly-left" title="dom-DOMRectReadOnly-left">left</a>;
1654+
};</pre>
16651655

16661656
<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
16671657
invoked, must run the following steps:
@@ -1673,33 +1663,34 @@ <h3 id="the-domrect-and-domrectreadonly-interfaces"><span class="secno">11.2 </s
16731663
<var>width</var> and <a href="#concept-geometry-rectangle-height" title="concept-geometry-rectangle-height">height</a> set to <var>height</var>.
16741664
</ol>
16751665

1676-
<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
1677-
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>
1678-
1679-
<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
1680-
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>
1666+
<p>The <dfn id="dom-domrectreadonly-x" title="dom-DOMRectReadOnly-x"><code>x</code></dfn> attribute, on getting, must return the <a href="#concept-geometry-rectangle-x-coordinate" title="concept-geometry-rectangle-x-coordinate">x
1667+
coordinate</a>. The <dfn id="dom-domrect-x" title="dom-DOMRect-x"><code>x</code></dfn> attribute, on setting, must set the <a href="#concept-geometry-rectangle-x-coordinate" title="concept-geometry-rectangle-x-coordinate">x
1668+
coordinate</a> to the new value.</p>
16811669

1682-
<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>.
1683-
On setting, the <a href="#concept-geometry-rectangle-width" title="concept-geometry-rectangle-width">width</a> must be set to the new value.
1670+
<p>The <dfn id="dom-domrectreadonly-y" title="dom-DOMRectReadOnly-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
1671+
coordinate</a>. The <dfn id="dom-domrect-y" title="dom-DOMRect-y"><code>y</code></dfn> attribute, on setting, must set the <a href="#concept-geometry-rectangle-y-coordinate" title="concept-geometry-rectangle-y-coordinate">y
1672+
coordinate</a> to the new value.</p>
16841673

1685-
<p>The <dfn id="dom-domrect-height" title="dom-DOMRect-height"><code>height</code></dfn> attribute, on getting, must return the
1686-
<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
1687-
value.
1674+
<p>The <dfn id="dom-domrectreadonly-width" title="dom-DOMRectReadOnly-width"><code>width</code></dfn> attribute, on getting, must return the
1675+
<a href="#concept-geometry-rectangle-width" title="concept-geometry-rectangle-width">width</a>. The <dfn id="dom-domrect-width" title="dom-DOMRect-width"><code>width</code></dfn> attribute, on setting, must set the
1676+
<a href="#concept-geometry-rectangle-width" title="concept-geometry-rectangle-width">width</a> to the new value.
16881677

1689-
<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>,
1690-
<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
1691-
<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.
1678+
<p>The <dfn id="dom-domrectreadonly-height" title="dom-DOMRectReadOnly-height"><code>height</code></dfn> attribute, on getting, must return the
1679+
<a href="#concept-geometry-rectangle-height" title="concept-geometry-rectangle-height">height</a>. The <dfn id="dom-domrect-height" title="dom-DOMRect-height"><code>height</code></dfn> attribute, on setting, must set the
1680+
<a href="#concept-geometry-rectangle-height" title="concept-geometry-rectangle-height">height</a> to the new value.
16921681

1693-
<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
1682+
<p>The <dfn id="dom-domrectreadonly-top" title="dom-DOMRectReadOnly-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
16941683
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>).
16951684

1696-
<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
1697-
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>).
1685+
<p>The <dfn id="dom-domrectreadonly-right" title="dom-DOMRectReadOnly-right"><code>right</code></dfn> attribute, on getting, must return
1686+
max(<a href="#concept-geometry-rectangle-x-coordinate" title="concept-geometry-rectangle-x-coordinate">x coordinate</a>, <a href="#concept-geometry-rectangle-x-coordinate" title="concept-geometry-rectangle-x-coordinate">x coordinate</a> -
1687+
<a href="#concept-geometry-rectangle-width" title="concept-geometry-rectangle-width">width</a>).
16981688

1699-
<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
1700-
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>).
1689+
<p>The <dfn id="dom-domrectreadonly-bottom" title="dom-DOMRectReadOnly-bottom"><code>bottom</code></dfn> attribute, on getting, must return
1690+
max(<a href="#concept-geometry-rectangle-y-coordinate" title="concept-geometry-rectangle-y-coordinate">y coordinate</a>, <a href="#concept-geometry-rectangle-y-coordinate" title="concept-geometry-rectangle-y-coordinate">y coordinate</a> -
1691+
<a href="#concept-geometry-rectangle-height" title="concept-geometry-rectangle-height">height</a>).
17011692

1702-
<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
1693+
<p>The <dfn id="dom-domrectreadonly-left" title="dom-DOMRectReadOnly-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
17031694
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>).
17041695

17051696

@@ -1759,7 +1750,7 @@ <h3 class="atrisk" id="the-domquad-interface"><span class="secno">11.4 </span>Th
17591750

17601751
<pre class="idl">[<a href="#dom-domquad" title="dom-DOMQuad">Constructor</a>(<a href="#dompointinit">DOMPointInit</a> p1, <a href="#dompointinit">DOMPointInit</a> p2, <!--
17611752
--><a href="#dompointinit">DOMPointInit</a> p3, <a href="#dompointinit">DOMPointInit</a> p4),
1762-
<a href="#dom-domquad" title="dom-DOMQuad">Constructor</a>(<a href="#domrectany">DOMRectAny</a> rect)]
1753+
<a href="#dom-domquad" title="dom-DOMQuad">Constructor</a>(<a href="#domrectreadonly">DOMRectReadOnly</a> rect)]
17631754
interface <dfn id="domquad">DOMQuad</dfn> {
17641755
[SameObject] readonly attribute <a href="#dompoint">DOMPoint</a> <a href="#dom-domquad-p1" title="dom-DOMQuad-p1">p1</a>;
17651756
[SameObject] readonly attribute <a href="#dompoint">DOMPoint</a> <a href="#dom-domquad-p2" title="dom-DOMQuad-p2">p2</a>;
@@ -1844,7 +1835,7 @@ <h3 class="atrisk" id="the-geometryutils-interface"><span class="secno">11.5 </s
18441835
sequence&lt;<a href="#domquad">DOMQuad</a>&gt; <a href="#dom-geometryutils-getboxquads" title="dom-GeometryUtils-getBoxQuads">getBoxQuads</a>(optional <a href="#boxquadoptions">BoxQuadOptions</a> options);
18451836
<a href="#domquad">DOMQuad</a> <a href="#dom-geometryutils-convertquadfromnode" title="dom-GeometryUtils-convertQuadFromNode">convertQuadFromNode</a>(<a href="#domquad">DOMQuad</a> quad, <!--
18461837
--><a href="#geometrynode">GeometryNode</a> from, optional <a href="#convertcoordinateoptions">ConvertCoordinateOptions</a> options);
1847-
<a href="#domquad">DOMQuad</a> <a href="#dom-geometryutils-convertrectfromnode" title="dom-GeometryUtils-convertRectFromNode">convertRectFromNode</a>(<a href="#domrectany">DOMRectAny</a> rect, <!--
1838+
<a href="#domquad">DOMQuad</a> <a href="#dom-geometryutils-convertrectfromnode" title="dom-GeometryUtils-convertRectFromNode">convertRectFromNode</a>(<a href="#domrectreadonly">DOMRectReadOnly</a> rect, <!--
18481839
--><a href="#geometrynode">GeometryNode</a> from, optional <a href="#convertcoordinateoptions">ConvertCoordinateOptions</a> options);
18491840
<a href="#dompoint">DOMPoint</a> <a href="#dom-geometryutils-convertpointfromnode" title="dom-GeometryUtils-convertPointFromNode">convertPointFromNode</a>(<a href="#dompointinit">DOMPointInit</a> point, <!--
18501841
--><a href="#geometrynode">GeometryNode</a> from, optional <a href="#convertcoordinateoptions">ConvertCoordinateOptions</a> options);

0 commit comments

Comments
 (0)