[cssom-view] Add constructor for DOMRect. Specify DOMPoint, DOMPointLiteral, DOMQuad. Add IDL for GeometryUtils (with placeholders for the definitions). http://lists.w3.org/Archives/Public/www-style/2013Sep/0503.html

Tue, 24 Sep 2013 23:33:30 +0200

author
Simon Pieters <simonp@opera.com>
date
Tue, 24 Sep 2013 23:33:30 +0200
changeset 9261
b521f6431614
parent 9260
d7b9173f1732
child 9262
fd72fe94058b

[cssom-view] Add constructor for DOMRect. Specify DOMPoint, DOMPointLiteral, DOMQuad. Add IDL for GeometryUtils (with placeholders for the definitions). http://lists.w3.org/Archives/Public/www-style/2013Sep/0503.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	Tue Sep 24 11:55:05 2013 -0700
     1.2 +++ b/cssom-view/Overview.html	Tue Sep 24 23:33:30 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 20 September 2013</h2>
     1.8 + <h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 24 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 20 September 2013 Editor's Draft of CSSOM View. Please send
    1.17 +<p>This is the 24 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 @@ -137,10 +137,13 @@
    1.22   <li><a href="#extensions-to-the-htmlelement-interface"><span class="secno">8 </span>Extensions to the <code title="">HTMLElement</code> Interface</a></li>
    1.23   <li><a href="#extensions-to-the-range-interface"><span class="secno">9 </span>Extensions to the <code title="">Range</code> Interface</a></li>
    1.24   <li><a href="#extensions-to-the-mouseevent-interface"><span class="secno">10 </span>Extensions to the <code title="">MouseEvent</code> Interface</a></li>
    1.25 - <li><a href="#rectangles"><span class="secno">11 </span>Rectangles</a>
    1.26 + <li><a href="#geometry"><span class="secno">11 </span>Geometry</a>
    1.27    <ul class="toc">
    1.28     <li><a href="#the-domrectlist-interface"><span class="secno">11.1 </span>The <code title="">DOMRectList</code> Interface</a></li>
    1.29 -   <li><a href="#the-domrect-interface"><span class="secno">11.2 </span>The <code title="">DOMRect</code> Interface</a></ul></li>
    1.30 +   <li><a href="#the-domrect-interface"><span class="secno">11.2 </span>The <code title="">DOMRect</code> Interface</a></li>
    1.31 +   <li><a href="#the-dompoint-interface"><span class="secno">11.3 </span>The <code title="">DOMPoint</code> Interface</a></li>
    1.32 +   <li><a href="#the-domquad-interface"><span class="secno">11.4 </span>The <code title="">DOMQuad</code> Interface</a></li>
    1.33 +   <li><a href="#the-geometryutils-interface"><span class="secno">11.5 </span>The <code title="">GeometryUtils</code> Interface</a></ul></li>
    1.34   <li><a href="#events"><span class="secno">12 </span>Events</a>
    1.35    <ul class="toc">
    1.36     <li><a href="#resizing-viewports"><span class="secno">12.1 </span>Resizing viewports</a></li>
    1.37 @@ -1008,7 +1011,7 @@
    1.38   element as defined by the SVG specification, applying the <a href="#transforms">transforms</a> that apply to the element and its ancestors.</li>
    1.39   <li>
    1.40    <p>Return a <code><a href="#domrectlist">DOMRectList</a></code> object containing a list of
    1.41 -  <code><a href="#domrect">DOMRect</a></code> objects in content order describing the border
    1.42 +  <code><a href="#domrect">DOMRect</a></code> objects in content order describing the bounding border
    1.43    boxes (including those with a height or width of zero) with the
    1.44    following constraints:</p>
    1.45    <ul>
    1.46 @@ -1586,7 +1589,7 @@
    1.47  </ol>
    1.48  
    1.49  
    1.50 -<h2 id="rectangles"><span class="secno">11 </span>Rectangles</h2>
    1.51 +<h2 id="geometry"><span class="secno">11 </span>Geometry</h2>
    1.52  
    1.53  
    1.54  <h3 id="the-domrectlist-interface"><span class="secno">11.1 </span>The <code title="">DOMRectList</code> Interface</h3>
    1.55 @@ -1612,7 +1615,8 @@
    1.56  <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.57  <code><a href="#domrect">DOMRect</a></code> object.</p>
    1.58  
    1.59 -<pre class="idl">interface <dfn id="domrect">DOMRect</dfn> {
    1.60 +<pre class="idl">[<a href="#dom-domrect" title="dom-DOMRect">Constructor</a>(double left, double top, double width, double height)]
    1.61 +interface <dfn id="domrect">DOMRect</dfn> : <a href="#domquad">DOMQuad</a> {
    1.62    readonly attribute double <a href="#dom-domrect-top" title="dom-DOMRect-top">top</a>;
    1.63    readonly attribute double <a href="#dom-domrect-right" title="dom-DOMRect-right">right</a>;
    1.64    readonly attribute double <a href="#dom-domrect-bottom" title="dom-DOMRect-bottom">bottom</a>;
    1.65 @@ -1621,6 +1625,17 @@
    1.66    readonly attribute double <a href="#dom-domrect-height" title="dom-DOMRect-height">height</a>;
    1.67  };</pre>
    1.68  
    1.69 +<p>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 invoked, must
    1.70 +run the following steps:
    1.71 +
    1.72 +<ol>
    1.73 + <li><p>Let <var>right</var> be <var>left</var> plus <var>width</var>.
    1.74 + <li><p>Let <var>bottom</var> be <var>top</var> plus <var>height</var>.
    1.75 + <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.76 + 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.77 + <var>left</var>.
    1.78 +</ol>
    1.79 +
    1.80  <p>The <dfn id="dom-domrect-top" title="dom-DOMRect-top"><code>top</code></dfn> attribute must return the y-coordinate, relative to the <a href="#viewport">viewport</a> origin, of the top of
    1.81  the rectangle box.</p>
    1.82  
    1.83 @@ -1633,13 +1648,190 @@
    1.84  <p>The <dfn id="dom-domrect-left" title="dom-DOMRect-left"><code>left</code></dfn> attribute must return the x-coordinate, relative to the <a href="#viewport">viewport</a> origin, of the left
    1.85  of the rectangle box.</p>
    1.86  
    1.87 -<p>The <dfn id="dom-domrect-width" title="dom-DOMRect-width"><code>width</code></dfn> attribute must return the width of the rectangle box.</p>
    1.88 -<p class="note">This is identical to <code title="dom-DOMRect-right"><a href="#dom-domrect-right">right</a></code> minus <code title="dom-DOMRect-left"><a href="#dom-domrect-left">left</a></code>.</p>
    1.89 +<p>The <dfn id="dom-domrect-width" title="dom-DOMRect-width"><code>width</code></dfn> attribute must return the value of <code title="dom-DOMRect-right"><a href="#dom-domrect-right">right</a></code> minus
    1.90 +<code title="dom-DOMRect-left"><a href="#dom-domrect-left">left</a></code>.</p>
    1.91  
    1.92 -<p>The <dfn id="dom-domrect-height" title="dom-DOMRect-height"><code>height</code></dfn> attribute must return the height of the rectangle box.</p>
    1.93 -<p class="note">This is identical to <code title="dom-DOMRect-bottom"><a href="#dom-domrect-bottom">bottom</a></code> minus <code title="dom-DOMRect-top"><a href="#dom-domrect-top">top</a></code>.</p>
    1.94 +<p>The <dfn id="dom-domrect-height" title="dom-DOMRect-height"><code>height</code></dfn> attribute must return the value of <code title="dom-DOMRect-bottom"><a href="#dom-domrect-bottom">bottom</a></code> minus
    1.95 +<code title="dom-DOMRect-top"><a href="#dom-domrect-top">top</a></code>.</p>
    1.96  
    1.97 -  
    1.98 +
    1.99 +<h3 id="the-dompoint-interface"><span class="secno">11.3 </span>The <code title="">DOMPoint</code> Interface</h3>
   1.100 +
   1.101 +<pre class="idl">[<a href="#dom-dompoint" title="dom-DOMPoint">Constructor</a>(optional <a href="#dompointliteral">DOMPointLiteral</a> point),
   1.102 + <a href="#dom-dompoint" title="dom-DOMPoint">Constructor</a>(unrestricted double x, unrestricted double y, optional unrestricted double z = 0, <!--
   1.103 + -->optional unrestricted double w = 1)]
   1.104 +interface <dfn id="dompoint">DOMPoint</dfn> {
   1.105 +           attribute unrestricted double <a href="#dom-dompoint-x" title="dom-DOMPoint-x">x</a>;
   1.106 +           attribute unrestricted double <a href="#dom-dompoint-y" title="dom-DOMPoint-y">y</a>;
   1.107 +           attribute unrestricted double <a href="#dom-dompoint-z" title="dom-DOMPoint-z">z</a>;
   1.108 +           attribute unrestricted double <a href="#dom-dompoint-w" title="dom-DOMPoint-w">w</a>;
   1.109 +};
   1.110 +
   1.111 +dictionary <dfn id="dompointliteral">DOMPointLiteral</dfn> {
   1.112 +  unrestricted double x = 0;
   1.113 +  unrestricted double y = 0;
   1.114 +  unrestricted double z = 0;
   1.115 +  unrestricted double w = 1;
   1.116 +};</pre>
   1.117 +
   1.118 +<p>The <dfn id="dom-dompoint" title="dom-DOMPoint"><code>DOMPoint()</code></dfn> constructor, when invoked, must run the following steps:
   1.119 +
   1.120 +<ol>
   1.121 + <li><p>If invoked with one argument, follow these substeps:
   1.122 +  <ol>
   1.123 +   <li><p>Let <var>point</var> be the argument.
   1.124 +   <li><p>Let <var>x</var> be the <code title="">x</code> dictionary member of <var>point</var>.
   1.125 +   <li><p>Let <var>y</var> be the <code title="">y</code> dictionary member of <var>point</var>.
   1.126 +   <li><p>Let <var>z</var> be the <code title="">z</code> dictionary member of <var>point</var>.
   1.127 +   <li><p>Let <var>w</var> be the <code title="">w</code> dictionary member of <var>point</var>.
   1.128 +  </ol>
   1.129 + <li><p>Otherwise, let <var>x</var>, <var>y</var>, <var>z</var> and <var>w</var> be the given arguments, respectively.
   1.130 + <li><p>Return a new <code><a href="#dompoint">DOMPoint</a></code> object with the <code title="dom-DOMPoint-x"><a href="#dom-dompoint-x">x</a></code>, <code title="dom-DOMPoint-y"><a href="#dom-dompoint-y">y</a></code>,
   1.131 + <code title="dom-DOMPoint-z"><a href="#dom-dompoint-z">z</a></code> and <code title="dom-DOMPoint-w"><a href="#dom-dompoint-w">w</a></code> attributes set to <var>x</var>, <var>y</var>, <var>z</var> and <var>w</var>,
   1.132 + respectively.
   1.133 +</ol>
   1.134 +
   1.135 +<p>The <dfn id="dom-dompoint-x" title="dom-DOMPoint-x"><code>x</code></dfn> attribute gives the x coordinate of the point. On getting, it must return the current value. On setting,
   1.136 +it must set the current value to the new value.
   1.137 +
   1.138 +<p>The <dfn id="dom-dompoint-y" title="dom-DOMPoint-y"><code>y</code></dfn> attribute gives the y coordinate of the point. On getting, it must return the current value. On setting,
   1.139 +it must set the current value to the new value.
   1.140 +
   1.141 +<p>The <dfn id="dom-dompoint-z" title="dom-DOMPoint-z"><code>z</code></dfn> attribute gives the z coordinate of the point. On getting, it must return the current value. On setting,
   1.142 +it must set the current value to the new value.
   1.143 +
   1.144 +<p>The <dfn id="dom-dompoint-w" title="dom-DOMPoint-w"><code>w</code></dfn> attribute gives the perspective of the point. On getting, it must return the current value. On setting,
   1.145 +it must set the current value to the new value.
   1.146 +
   1.147 +
   1.148 +<h3 id="the-domquad-interface"><span class="secno">11.4 </span>The <code title="">DOMQuad</code> Interface</h3>
   1.149 +
   1.150 +<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.151 +bounding rectangle</dfn> set to a <code><a href="#domrect">DOMRect</a></code> object when created.
   1.152 +
   1.153 +<pre class="idl">[<a href="#dom-domquad" title="dom-DOMQuad">Constructor</a>(DOMPointLiteral p1, DOMPointLiteral p2, DOMPointLiteral p3, DOMPointLiteral p4),
   1.154 + <a href="#dom-domquad" title="dom-DOMQuad">Constructor</a>(DOMRect rect)]
   1.155 +interface <dfn id="domquad">DOMQuad</dfn> {
   1.156 +  [SameObject] readonly attribute <a href="#dompoint">DOMPoint</a> <a href="#dom-domquad-p1" title="dom-DOMQuad-p1">p1</a>;
   1.157 +  [SameObject] readonly attribute <a href="#dompoint">DOMPoint</a> <a href="#dom-domquad-p2" title="dom-DOMQuad-p2">p2</a>;
   1.158 +  [SameObject] readonly attribute <a href="#dompoint">DOMPoint</a> <a href="#dom-domquad-p3" title="dom-DOMQuad-p3">p3</a>;
   1.159 +  [SameObject] readonly attribute <a href="#dompoint">DOMPoint</a> <a href="#dom-domquad-p4" title="dom-DOMQuad-p4">p4</a>;
   1.160 +  [SameObject] readonly attribute <a href="#domrect">DOMRect</a> <a href="#dom-domquad-bounds" title="dom-DOMQuad-bounds">bounds</a>;
   1.161 +};</pre>
   1.162 +
   1.163 +<p>The <dfn id="dom-domquad" title="dom-DOMQuad"><code>DOMQuad()</code></dfn> constructor, when invoked, must run the following steps:
   1.164 +
   1.165 +<ol>
   1.166 + <li><p>If invoked with one argument, follow these substeps:
   1.167 +  <ol>
   1.168 +   <li><p>Let <var>rect</var> be the argument.
   1.169 +   <li><p>Let <var>top</var>, <var>right</var>, <var>bottom</var> and <var>left</var> be <var>rect</var>'s the value of <code title="dom-DOMRect-top"><a href="#dom-domrect-top">top</a></code>,
   1.170 +   <code title="dom-DOMRect-right"><a href="#dom-domrect-right">right</a></code>, <code title="dom-DOMRect-bottom"><a href="#dom-domrect-bottom">bottom</a></code> and <code title="dom-DOMRect-left"><a href="#dom-domrect-left">left</a></code> attributes,
   1.171 +   respectively.
   1.172 +   <li><p>Let <var>point 1</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.173 +   <code title="dom-DOMPoint-y"><a href="#dom-dompoint-y">y</a></code> set to <var>top</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.174 +   one.
   1.175 +   <li><p>Let <var>point 2</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>right</var>,
   1.176 +   <code title="dom-DOMPoint-y"><a href="#dom-dompoint-y">y</a></code> set to <var>top</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.177 +   one.
   1.178 +   <li><p>Let <var>point 3</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>right</var>,
   1.179 +   <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.180 +   one.
   1.181 +   <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.182 +   <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.183 +   one.
   1.184 +   <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>.
   1.185 +  </ol>
   1.186 + <li><p>Otherwise, follow these substeps:
   1.187 +  <ol>
   1.188 +   <li><p>Let <var>p1</var>, <var>p2</var>, <var>p3</var> and <var>p4</var> be the given arguments, in the same order.
   1.189 +   <li><p>Let <var>point 1</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.190 +   <var>p1</var>.
   1.191 +   <li><p>Let <var>point 2</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.192 +   <var>p2</var>.
   1.193 +   <li><p>Let <var>point 3</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.194 +   <var>p3</var>.
   1.195 +   <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.196 +   <var>p4</var>.
   1.197 +   <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.198 +   and <var>point 4</var>.
   1.199 +  </ol>
   1.200 + <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.201 + <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.202 + let the <a href="#associated-bounding-rectangle">associated bounding rectangle</a> be <var>bounds</var>.
   1.203 +</ol>
   1.204 +
   1.205 +<p>The <dfn id="dom-domquad-p1" title="dom-DOMQuad-p1"><code>p1</code></dfn> attribute must return the <code><a href="#dompoint">DOMPoint</a></code> it was set to.
   1.206 +
   1.207 +<p>The <dfn id="dom-domquad-p2" title="dom-DOMQuad-p2"><code>p2</code></dfn> attribute must return the <code><a href="#dompoint">DOMPoint</a></code> it was set to.
   1.208 +
   1.209 +<p>The <dfn id="dom-domquad-p3" title="dom-DOMQuad-p3"><code>p3</code></dfn> attribute must return the <code><a href="#dompoint">DOMPoint</a></code> it was set to.
   1.210 +
   1.211 +<p>The <dfn id="dom-domquad-p4" title="dom-DOMQuad-p4"><code>p4</code></dfn> attribute must return the <code><a href="#dompoint">DOMPoint</a></code> it was set to.
   1.212 +
   1.213 +<p>The <dfn id="dom-domquad-bounds" title="dom-DOMQuad-bounds"><code>bounds</code></dfn> attribute must return the <a href="#associated-bounding-rectangle">associated bounding rectangle</a>.
   1.214 +
   1.215 +
   1.216 +<h3 id="the-geometryutils-interface"><span class="secno">11.5 </span>The <code title="">GeometryUtils</code> Interface</h3>
   1.217 +
   1.218 +<pre class="idl">enum <dfn id="cssboxtype">CSSBoxType</dfn> { "margin", "border", "padding", "content" };
   1.219 +dictionary <dfn id="boxquadoptions">BoxQuadOptions</dfn> {
   1.220 +  <a href="#cssboxtype">CSSBoxType</a> box = "border";
   1.221 +  <a href="#geometrynode">GeometryNode</a> relativeTo;
   1.222 +};
   1.223 +
   1.224 +dictionary <dfn id="convertcoordinateoptions">ConvertCoordinateOptions</dfn> {
   1.225 +  <a href="#cssboxtype">CSSBoxType</a> fromBox = "border";
   1.226 +  <a href="#cssboxtype">CSSBoxType</a> toBox = "border";
   1.227 +};
   1.228 + 
   1.229 +[NoInterfaceObject]
   1.230 +interface <dfn id="geometryutils">GeometryUtils</dfn> {
   1.231 +  sequence&lt;<a href="#domquad">DOMQuad</a>&gt; <a href="#dom-geometryutils-getboxquads" title="dom-GeometryUtils-getBoxQuads">getBoxQuads</a>(<a href="#boxquadoptions">BoxQuadOptions</a> options);
   1.232 +  <a href="#domquad">DOMQuad</a> <a href="#dom-geometryutils-convertquadfromnode" title="dom-GeometryUtils-convertQuadFromNode">convertQuadFromNode</a>(<a href="#domquad">DOMQuad</a> quad, <!--
   1.233 +  --><a href="#geometrynode">GeometryNode</a> from, optional <a href="#convertcoordinateoptions">ConvertCoordinateOptions</a> options);
   1.234 +  <a href="#domquad">DOMQuad</a> <a href="#dom-geometryutils-convertrectfromnode" title="dom-GeometryUtils-convertRectFromNode">convertRectFromNode</a>(<a href="#domrect">DOMRect</a> rect, <!--
   1.235 +  --><a href="#geometrynode">GeometryNode</a> from, optional <a href="#convertcoordinateoptions">ConvertCoordinateOptions</a> options);
   1.236 +  <a href="#dompoint">DOMPoint</a> <a href="#dom-geometryutils-convertpointfromnode" title="dom-GeometryUtils-convertPointFromNode">convertPointFromNode</a>(<a href="#dompointliteral">DOMPointLiteral</a> point, <!--
   1.237 +  --><a href="#geometrynode">GeometryNode</a> from, optional <a href="#convertcoordinateoptions">ConvertCoordinateOptions</a> options);
   1.238 +};
   1.239 + 
   1.240 +<a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#text">Text</a> implements <a href="#geometryutils">GeometryUtils</a>;
   1.241 +<a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#element">Element</a> implements <a href="#geometryutils">GeometryUtils</a>;
   1.242 +<a class="external" data-anolis-spec="cssom" href="http://dev.w3.org/csswg/cssom/#pseudoelement">PseudoElement</a> implements <a href="#geometryutils">GeometryUtils</a>;
   1.243 +<a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#document">Document</a> implements <a href="#geometryutils">GeometryUtils</a>;
   1.244 + 
   1.245 +typedef (<a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#text">Text</a> or <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#element">Element</a> or <a class="external" data-anolis-spec="cssom" href="http://dev.w3.org/csswg/cssom/#pseudoelement">PseudoElement</a> or <!--
   1.246 +--><a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#document">Document</a>) <dfn id="geometrynode">GeometryNode</dfn>;</pre>
   1.247 +
   1.248 +<p>The <dfn id="dom-geometryutils-getboxquads" title="dom-GeometryUtils-getBoxQuads"><code>getBoxQuads(<var>options</var>)</code></dfn> method must run the following steps:
   1.249 +
   1.250 +<ol>
   1.251 + <li><p class="issue">...
   1.252 +</ol>
   1.253 +
   1.254 +<p>The <dfn id="dom-geometryutils-convertquadfromnode" title="dom-GeometryUtils-convertQuadFromNode"><code>convertQuadFromNode(<var>quad</var>, <var>from</var>, <var>options</var>)</code></dfn> method
   1.255 +must run the following steps:
   1.256 +
   1.257 +<ol>
   1.258 + <li><p class="issue">...
   1.259 +</ol>
   1.260 +
   1.261 +<p>The <dfn id="dom-geometryutils-convertrectfromnode" title="dom-GeometryUtils-convertRectFromNode"><code>convertRectFromNode(<var>rect</var>, <var>from</var>, <var>options</var>)</code></dfn> method
   1.262 +must run the following steps:
   1.263 +
   1.264 +<ol>
   1.265 + <li><p class="issue">...
   1.266 +</ol>
   1.267 +
   1.268 +<p>The <dfn id="dom-geometryutils-convertpointfromnode" title="dom-GeometryUtils-convertPointFromNode"><code>convertPointFromNode(<var>point</var>, <var>from</var>, <var>options</var>)</code></dfn>
   1.269 +method must run the following steps:
   1.270 +
   1.271 +<ol>
   1.272 + <li><p class="issue">...
   1.273 +</ol>
   1.274 +
   1.275 +
   1.276  <h2 id="events"><span class="secno">12 </span>Events</h2>
   1.277  
   1.278  <h3 id="resizing-viewports"><span class="secno">12.1 </span>Resizing viewports</h3>
     2.1 --- a/cssom-view/Overview.src.html	Tue Sep 24 11:55:05 2013 -0700
     2.2 +++ b/cssom-view/Overview.src.html	Tue Sep 24 23:33:30 2013 +0200
     2.3 @@ -969,7 +969,7 @@
     2.4   element as defined by the SVG specification, applying the <span>transforms</span> that apply to the element and its ancestors.</li>
     2.5   <li>
     2.6    <p>Return a <code>DOMRectList</code> object containing a list of
     2.7 -  <code>DOMRect</code> objects in content order describing the border
     2.8 +  <code>DOMRect</code> objects in content order describing the bounding border
     2.9    boxes (including those with a height or width of zero) with the
    2.10    following constraints:</p>
    2.11    <ul>
    2.12 @@ -1547,7 +1547,7 @@
    2.13  </ol>
    2.14  
    2.15  
    2.16 -<h2>Rectangles</h2>
    2.17 +<h2>Geometry</h2>
    2.18  
    2.19  
    2.20  <h3>The <code title>DOMRectList</code> Interface</h3>
    2.21 @@ -1573,7 +1573,8 @@
    2.22  <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.23  <code>DOMRect</code> object.</p>
    2.24  
    2.25 -<pre class=idl>interface <dfn>DOMRect</dfn> {
    2.26 +<pre class=idl>[<span title=dom-DOMRect>Constructor</span>(double left, double top, double width, double height)]
    2.27 +interface <dfn>DOMRect</dfn> : <span>DOMQuad</span> {
    2.28    readonly attribute double <span title=dom-DOMRect-top>top</span>;
    2.29    readonly attribute double <span title=dom-DOMRect-right>right</span>;
    2.30    readonly attribute double <span title=dom-DOMRect-bottom>bottom</span>;
    2.31 @@ -1582,6 +1583,17 @@
    2.32    readonly attribute double <span title=dom-DOMRect-height>height</span>;
    2.33  };</pre>
    2.34  
    2.35 +<p>The <dfn title=dom-DOMRect><code>DOMRect(<var>left</var>, <var>top</var>, <var>width</var>, <var>height</var>)</code></dfn> constructor, when invoked, must
    2.36 +run the following steps:
    2.37 +
    2.38 +<ol>
    2.39 + <li><p>Let <var>right</var> be <var>left</var> plus <var>width</var>.
    2.40 + <li><p>Let <var>bottom</var> be <var>top</var> plus <var>height</var>.
    2.41 + <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.42 + 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.43 + <var>left</var>.
    2.44 +</ol>
    2.45 +
    2.46  <p>The <dfn title=dom-DOMRect-top><code>top</code></dfn> attribute must return the y-coordinate, relative to the <span>viewport</span> origin, of the top of
    2.47  the rectangle box.</p>
    2.48  
    2.49 @@ -1594,13 +1606,190 @@
    2.50  <p>The <dfn title=dom-DOMRect-left><code>left</code></dfn> attribute must return the x-coordinate, relative to the <span>viewport</span> origin, of the left
    2.51  of the rectangle box.</p>
    2.52  
    2.53 -<p>The <dfn title=dom-DOMRect-width><code>width</code></dfn> attribute must return the width of the rectangle box.</p>
    2.54 -<p class='note'>This is identical to <code title=dom-DOMRect-right>right</code> minus <code title=dom-DOMRect-left>left</code>.</p>
    2.55 +<p>The <dfn title=dom-DOMRect-width><code>width</code></dfn> attribute must return the value of <code title=dom-DOMRect-right>right</code> minus
    2.56 +<code title=dom-DOMRect-left>left</code>.</p>
    2.57  
    2.58 -<p>The <dfn title=dom-DOMRect-height><code>height</code></dfn> attribute must return the height of the rectangle box.</p>
    2.59 -<p class='note'>This is identical to <code title=dom-DOMRect-bottom>bottom</code> minus <code title=dom-DOMRect-top>top</code>.</p>
    2.60 +<p>The <dfn title=dom-DOMRect-height><code>height</code></dfn> attribute must return the value of <code title=dom-DOMRect-bottom>bottom</code> minus
    2.61 +<code title=dom-DOMRect-top>top</code>.</p>
    2.62  
    2.63 -  
    2.64 +
    2.65 +<h3>The <code title>DOMPoint</code> Interface</h3>
    2.66 +
    2.67 +<pre class=idl>[<span title=dom-DOMPoint>Constructor</span>(optional <span>DOMPointLiteral</span> point),
    2.68 + <span title=dom-DOMPoint>Constructor</span>(unrestricted double x, unrestricted double y, optional unrestricted double z = 0, <!--
    2.69 + -->optional unrestricted double w = 1)]
    2.70 +interface <dfn>DOMPoint</dfn> {
    2.71 +           attribute unrestricted double <span title=dom-DOMPoint-x>x</span>;
    2.72 +           attribute unrestricted double <span title=dom-DOMPoint-y>y</span>;
    2.73 +           attribute unrestricted double <span title=dom-DOMPoint-z>z</span>;
    2.74 +           attribute unrestricted double <span title=dom-DOMPoint-w>w</span>;
    2.75 +};
    2.76 +
    2.77 +dictionary <dfn>DOMPointLiteral</dfn> {
    2.78 +  unrestricted double x = 0;
    2.79 +  unrestricted double y = 0;
    2.80 +  unrestricted double z = 0;
    2.81 +  unrestricted double w = 1;
    2.82 +};</pre>
    2.83 +
    2.84 +<p>The <dfn title=dom-DOMPoint><code>DOMPoint()</code></dfn> constructor, when invoked, must run the following steps:
    2.85 +
    2.86 +<ol>
    2.87 + <li><p>If invoked with one argument, follow these substeps:
    2.88 +  <ol>
    2.89 +   <li><p>Let <var>point</var> be the argument.
    2.90 +   <li><p>Let <var>x</var> be the <code title>x</code> dictionary member of <var>point</var>.
    2.91 +   <li><p>Let <var>y</var> be the <code title>y</code> dictionary member of <var>point</var>.
    2.92 +   <li><p>Let <var>z</var> be the <code title>z</code> dictionary member of <var>point</var>.
    2.93 +   <li><p>Let <var>w</var> be the <code title>w</code> dictionary member of <var>point</var>.
    2.94 +  </ol>
    2.95 + <li><p>Otherwise, let <var>x</var>, <var>y</var>, <var>z</var> and <var>w</var> be the given arguments, respectively.
    2.96 + <li><p>Return a new <code>DOMPoint</code> object with the <code title=dom-DOMPoint-x>x</code>, <code title=dom-DOMPoint-y>y</code>,
    2.97 + <code title=dom-DOMPoint-z>z</code> and <code title=dom-DOMPoint-w>w</code> attributes set to <var>x</var>, <var>y</var>, <var>z</var> and <var>w</var>,
    2.98 + respectively.
    2.99 +</ol>
   2.100 +
   2.101 +<p>The <dfn title=dom-DOMPoint-x><code>x</code></dfn> attribute gives the x coordinate of the point. On getting, it must return the current value. On setting,
   2.102 +it must set the current value to the new value.
   2.103 +
   2.104 +<p>The <dfn title=dom-DOMPoint-y><code>y</code></dfn> attribute gives the y coordinate of the point. On getting, it must return the current value. On setting,
   2.105 +it must set the current value to the new value.
   2.106 +
   2.107 +<p>The <dfn title=dom-DOMPoint-z><code>z</code></dfn> attribute gives the z coordinate of the point. On getting, it must return the current value. On setting,
   2.108 +it must set the current value to the new value.
   2.109 +
   2.110 +<p>The <dfn title=dom-DOMPoint-w><code>w</code></dfn> attribute gives the perspective of the point. On getting, it must return the current value. On setting,
   2.111 +it must set the current value to the new value.
   2.112 +
   2.113 +
   2.114 +<h3>The <code title>DOMQuad</code> Interface</h3>
   2.115 +
   2.116 +<p>Objects implementing the <code>DOMQuad</code> interface represents a quadrilateral shape. <code>DOMQuad</code> objects have an <dfn>associated
   2.117 +bounding rectangle</dfn> set to a <code>DOMRect</code> object when created.
   2.118 +
   2.119 +<pre class=idl>[<span title=dom-DOMQuad>Constructor</span>(DOMPointLiteral p1, DOMPointLiteral p2, DOMPointLiteral p3, DOMPointLiteral p4),
   2.120 + <span title=dom-DOMQuad>Constructor</span>(DOMRect rect)]
   2.121 +interface <dfn>DOMQuad</dfn> {
   2.122 +  [SameObject] readonly attribute <span>DOMPoint</span> <span title=dom-DOMQuad-p1>p1</span>;
   2.123 +  [SameObject] readonly attribute <span>DOMPoint</span> <span title=dom-DOMQuad-p2>p2</span>;
   2.124 +  [SameObject] readonly attribute <span>DOMPoint</span> <span title=dom-DOMQuad-p3>p3</span>;
   2.125 +  [SameObject] readonly attribute <span>DOMPoint</span> <span title=dom-DOMQuad-p4>p4</span>;
   2.126 +  [SameObject] readonly attribute <span>DOMRect</span> <span title=dom-DOMQuad-bounds>bounds</span>;
   2.127 +};</pre>
   2.128 +
   2.129 +<p>The <dfn title=dom-DOMQuad><code>DOMQuad()</code></dfn> constructor, when invoked, must run the following steps:
   2.130 +
   2.131 +<ol>
   2.132 + <li><p>If invoked with one argument, follow these substeps:
   2.133 +  <ol>
   2.134 +   <li><p>Let <var>rect</var> be the argument.
   2.135 +   <li><p>Let <var>top</var>, <var>right</var>, <var>bottom</var> and <var>left</var> be <var>rect</var>'s the value of <code title=dom-DOMRect-top>top</code>,
   2.136 +   <code title=dom-DOMRect-right>right</code>, <code title=dom-DOMRect-bottom>bottom</code> and <code title=dom-DOMRect-left>left</code> attributes,
   2.137 +   respectively.
   2.138 +   <li><p>Let <var>point 1</var> be a new <code>DOMPoint</code> object with <code title=dom-DOMPoint-x>x</code> set to <var>left</var>,
   2.139 +   <code title=dom-DOMPoint-y>y</code> set to <var>top</var>, <code title=dom-DOMPoint-z>z</code> set to zero and <code title=dom-DOMPoint-w>w</code> set to
   2.140 +   one.
   2.141 +   <li><p>Let <var>point 2</var> be a new <code>DOMPoint</code> object with <code title=dom-DOMPoint-x>x</code> set to <var>right</var>,
   2.142 +   <code title=dom-DOMPoint-y>y</code> set to <var>top</var>, <code title=dom-DOMPoint-z>z</code> set to zero and <code title=dom-DOMPoint-w>w</code> set to
   2.143 +   one.
   2.144 +   <li><p>Let <var>point 3</var> be a new <code>DOMPoint</code> object with <code title=dom-DOMPoint-x>x</code> set to <var>right</var>,
   2.145 +   <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.146 +   one.
   2.147 +   <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.148 +   <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.149 +   one.
   2.150 +   <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>.
   2.151 +  </ol>
   2.152 + <li><p>Otherwise, follow these substeps:
   2.153 +  <ol>
   2.154 +   <li><p>Let <var>p1</var>, <var>p2</var>, <var>p3</var> and <var>p4</var> be the given arguments, in the same order.
   2.155 +   <li><p>Let <var>point 1</var> be a new <code>DOMPoint</code> object with its attributes set to the values of the namesake dictionary members in
   2.156 +   <var>p1</var>.
   2.157 +   <li><p>Let <var>point 2</var> be a new <code>DOMPoint</code> object with its attributes set to the values of the namesake dictionary members in
   2.158 +   <var>p2</var>.
   2.159 +   <li><p>Let <var>point 3</var> be a new <code>DOMPoint</code> object with its attributes set to the values of the namesake dictionary members in
   2.160 +   <var>p3</var>.
   2.161 +   <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.162 +   <var>p4</var>.
   2.163 +   <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.164 +   and <var>point 4</var>.
   2.165 +  </ol>
   2.166 + <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.167 + <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.168 + let the <span>associated bounding rectangle</span> be <var>bounds</var>.
   2.169 +</ol>
   2.170 +
   2.171 +<p>The <dfn title=dom-DOMQuad-p1><code>p1</code></dfn> attribute must return the <code>DOMPoint</code> it was set to.
   2.172 +
   2.173 +<p>The <dfn title=dom-DOMQuad-p2><code>p2</code></dfn> attribute must return the <code>DOMPoint</code> it was set to.
   2.174 +
   2.175 +<p>The <dfn title=dom-DOMQuad-p3><code>p3</code></dfn> attribute must return the <code>DOMPoint</code> it was set to.
   2.176 +
   2.177 +<p>The <dfn title=dom-DOMQuad-p4><code>p4</code></dfn> attribute must return the <code>DOMPoint</code> it was set to.
   2.178 +
   2.179 +<p>The <dfn title=dom-DOMQuad-bounds><code>bounds</code></dfn> attribute must return the <span>associated bounding rectangle</span>.
   2.180 +
   2.181 +
   2.182 +<h3>The <code title>GeometryUtils</code> Interface</h3>
   2.183 +
   2.184 +<pre class=idl>enum <dfn>CSSBoxType</dfn> { "margin", "border", "padding", "content" };
   2.185 +dictionary <dfn>BoxQuadOptions</dfn> {
   2.186 +  <span>CSSBoxType</span> box = "border";
   2.187 +  <span>GeometryNode</span> relativeTo;
   2.188 +};
   2.189 +
   2.190 +dictionary <dfn>ConvertCoordinateOptions</dfn> {
   2.191 +  <span>CSSBoxType</span> fromBox = "border";
   2.192 +  <span>CSSBoxType</span> toBox = "border";
   2.193 +};
   2.194 + 
   2.195 +[NoInterfaceObject]
   2.196 +interface <dfn>GeometryUtils</dfn> {
   2.197 +  sequence&lt;<span>DOMQuad</span>> <span title=dom-GeometryUtils-getBoxQuads>getBoxQuads</span>(<span>BoxQuadOptions</span> options);
   2.198 +  <span>DOMQuad</span> <span title=dom-GeometryUtils-convertQuadFromNode>convertQuadFromNode</span>(<span>DOMQuad</span> quad, <!--
   2.199 +  --><span>GeometryNode</span> from, optional <span>ConvertCoordinateOptions</span> options);
   2.200 +  <span>DOMQuad</span> <span title=dom-GeometryUtils-convertRectFromNode>convertRectFromNode</span>(<span>DOMRect</span> rect, <!--
   2.201 +  --><span>GeometryNode</span> from, optional <span>ConvertCoordinateOptions</span> options);
   2.202 +  <span>DOMPoint</span> <span title=dom-GeometryUtils-convertPointFromNode>convertPointFromNode</span>(<span>DOMPointLiteral</span> point, <!--
   2.203 +  --><span>GeometryNode</span> from, optional <span>ConvertCoordinateOptions</span> options);
   2.204 +};
   2.205 + 
   2.206 +<span data-anolis-spec=dom>Text</span> implements <span>GeometryUtils</span>;
   2.207 +<span data-anolis-spec=dom>Element</span> implements <span>GeometryUtils</span>;
   2.208 +<span data-anolis-spec=cssom>PseudoElement</span> implements <span>GeometryUtils</span>;
   2.209 +<span data-anolis-spec=dom>Document</span> implements <span>GeometryUtils</span>;
   2.210 + 
   2.211 +typedef (<span data-anolis-spec=dom>Text</span> or <span data-anolis-spec=dom>Element</span> or <span data-anolis-spec=cssom>PseudoElement</span> or <!--
   2.212 +--><span data-anolis-spec=dom>Document</span>) <dfn>GeometryNode</dfn>;</pre>
   2.213 +
   2.214 +<p>The <dfn title=dom-GeometryUtils-getBoxQuads><code>getBoxQuads(<var>options</var>)</code></dfn> method must run the following steps:
   2.215 +
   2.216 +<ol>
   2.217 + <li><p class=issue>...
   2.218 +</ol>
   2.219 +
   2.220 +<p>The <dfn title=dom-GeometryUtils-convertQuadFromNode><code>convertQuadFromNode(<var>quad</var>, <var>from</var>, <var>options</var>)</code></dfn> method
   2.221 +must run the following steps:
   2.222 +
   2.223 +<ol>
   2.224 + <li><p class=issue>...
   2.225 +</ol>
   2.226 +
   2.227 +<p>The <dfn title=dom-GeometryUtils-convertRectFromNode><code>convertRectFromNode(<var>rect</var>, <var>from</var>, <var>options</var>)</code></dfn> method
   2.228 +must run the following steps:
   2.229 +
   2.230 +<ol>
   2.231 + <li><p class=issue>...
   2.232 +</ol>
   2.233 +
   2.234 +<p>The <dfn title=dom-GeometryUtils-convertPointFromNode><code>convertPointFromNode(<var>point</var>, <var>from</var>, <var>options</var>)</code></dfn>
   2.235 +method must run the following steps:
   2.236 +
   2.237 +<ol>
   2.238 + <li><p class=issue>...
   2.239 +</ol>
   2.240 +
   2.241 +
   2.242  <h2>Events</h2>
   2.243  
   2.244  <h3>Resizing viewports</h3>

mercurial