[geometry] More clarifications and better styling

Tue, 15 Jul 2014 08:10:18 +0200

author
Dirk Schulze <dschulze@adobe.com>
date
Tue, 15 Jul 2014 08:10:18 +0200
changeset 1603
f76751342365
parent 1602
406b2782b016
child 1604
ee7107d99b93

[geometry] More clarifications and better styling

geometry/Overview.html file | annotate | diff | comparison | revisions
geometry/Overview.src.html file | annotate | diff | comparison | revisions
     1.1 --- a/geometry/Overview.html	Tue Jul 15 07:39:59 2014 +0200
     1.2 +++ b/geometry/Overview.html	Tue Jul 15 08:10:18 2014 +0200
     1.3 @@ -226,15 +226,15 @@
     1.4  <dl data-dfn-for=rectangle>
     1.5    <dt><dfn data-dfn-type=dfn data-noexport="" id=origin>origin<a class=self-link href=#origin></a></dfn></dt>
     1.6    <dd>
     1.7 -    When the rectangle has a non-negative <a data-link-type=dfn href=http://dev.w3.org/csswg/css-writing-modes-3/#width title=width>width</a>, the rectangle`s horizontal origin is the left edge; otherwise, it is the right edge. Similarly, when the rectangle has a non-negative <a data-link-type=dfn href=http://dev.w3.org/csswg/css-writing-modes-3/#height title=height>height</a>, the rectangle`s vertical origin is the top edge; otherwise, it is the bottom edge.
     1.8 +    When the rectangle has a non-negative <a data-link-type=dfn href=http://dev.w3.org/csswg/css-writing-modes-3/#width title=width>width</a>, the rectangle’s horizontal origin is the left edge; otherwise, it is the right edge. Similarly, when the rectangle has a non-negative <a data-link-type=dfn href=http://dev.w3.org/csswg/css-writing-modes-3/#height title=height>height</a>, the rectangle’s vertical origin is the top edge; otherwise, it is the bottom edge.
     1.9    </dd>
    1.10    <dt><dfn data-dfn-type=dfn data-noexport="" id=x-coordinate>x coordinate<a class=self-link href=#x-coordinate></a></dfn></dt>
    1.11    <dd>
    1.12 -    The horizontal distance between the viewport`s left edge and the rectangle`s <a data-link-type=dfn href=#origin title=origin>origin</a>.
    1.13 +    The horizontal distance between the viewport’s left edge and the rectangle’s <a data-link-type=dfn href=#origin title=origin>origin</a>.
    1.14    </dd>
    1.15    <dt><dfn data-dfn-type=dfn data-noexport="" id=y-coordinate>y coordinate<a class=self-link href=#y-coordinate></a></dfn></dt>
    1.16    <dd>
    1.17 -    The vertical distance between the viewport`s top edge and the rectangle`s <a data-link-type=dfn href=#origin title=origin>origin</a>.
    1.18 +    The vertical distance between the viewport’s top edge and the rectangle’s <a data-link-type=dfn href=#origin title=origin>origin</a>.
    1.19    </dd>
    1.20    <dt><dfn data-dfn-type=dfn data-noexport="" id=width-dimension>width dimension<a class=self-link href=#width-dimension></a></dfn></dt>
    1.21    <dd>
    1.22 @@ -277,7 +277,7 @@
    1.23  };
    1.24  </pre>
    1.25  
    1.26 -<p>The following algorithms assume that <a class=idl-code data-link-type=interface href=#dom-domrectreadonly title=domrectreadonly>DOMRectReadOnly</a> objects have internal member variables <a data-link-type=dfn href=#x-coordinate title="x coordinate">x coordinate</a>, <a data-link-type=dfn href=#y-coordinate title="y coordinate">y coordinate</a>, <a data-link-type=dfn href=#width-dimension title="width dimension">width dimension</a> and <a data-link-type=dfn href=#height-dimension title="height dimension">height dimension</a>. <a class=idl-code data-link-type=interface href=#dom-domrectreadonly title=domrectreadonly>DOMRectReadOnly</a> as well as the inheriting interface <a class=idl-code data-link-type=interface href=#dom-domrect title=domrect>DOMRect</a> must be able to access and set the value of these variables.</p>
    1.27 +<p>The following algorithms assume that <a class=idl-code data-link-type=interface href=#dom-domrectreadonly title=domrectreadonly>DOMRectReadOnly</a> objects have the internal member variables <a data-link-type=dfn href=#x-coordinate title="x coordinate">x coordinate</a>, <a data-link-type=dfn href=#y-coordinate title="y coordinate">y coordinate</a>, <a data-link-type=dfn href=#width-dimension title="width dimension">width dimension</a> and <a data-link-type=dfn href=#height-dimension title="height dimension">height dimension</a>. <a class=idl-code data-link-type=interface href=#dom-domrectreadonly title=domrectreadonly>DOMRectReadOnly</a> as well as the inheriting interface <a class=idl-code data-link-type=interface href=#dom-domrect title=domrect>DOMRect</a> must be able to access and set the value of these variables.</p>
    1.28  
    1.29  <p>An interface returning an <a class=idl-code data-link-type=interface href=#dom-domrectreadonly title=domrectreadonly>DOMRectReadOnly</a> object by an attribute or function may be able to modify internal member variable values. Such an interface must specify this ability explicitly in prose.</p>
    1.30  
    1.31 @@ -290,9 +290,9 @@
    1.32    <li>Return the new <a class=idl-code data-link-type=interface href=#dom-domrectreadonly title=domrectreadonly>DOMRectReadOnly</a> object.
    1.33  </ol>
    1.34  
    1.35 -<p>The <dfn class=idl-code data-dfn-for=DOMRect data-dfn-type=constructor data-export="" id=dom-domrect-domrect title=DOMRect()><code>DOMRect(<var>x</var>, <var>y</var>, <var>width</var>, <var>height</var>)</code><a class=self-link href=#dom-domrect-domrect></a></dfn> constructor, when invoked
    1.36 +<p>The <dfn class=idl-code data-dfn-for=DOMRect data-dfn-type=constructor data-export="" id=dom-domrect-domrect title=DOMRect()><code>DOMRect(<var>x</var>, <var>y</var>, <var>width</var>, <var>height</var>)</code><a class=self-link href=#dom-domrect-domrect></a></dfn> constructor, when invoked, must run the following steps:
    1.37  <dl class=switch>
    1.38 -  <dt>Without arguments:</dt>
    1.39 +  <dt>If invoked without arguments:</dt>
    1.40    <dd>
    1.41      <ol class=algorithm>
    1.42        <li>Let <var>x</var>, <var>y</var>, <var>width</var> and <var>height</var> be zero.
    1.43 @@ -361,29 +361,32 @@
    1.44  
    1.45  <p>The <dfn class=idl-code data-dfn-for=DOMQuad data-dfn-type=constructor data-export="" id=dom-domquad-domquad><code>DOMQuad()</code><a class=self-link href=#dom-domquad-domquad></a></dfn> constructor, when invoked, must run the following steps:
    1.46  
    1.47 -<ol class=algorithm>
    1.48 - <li><p>If invoked with one argument, follow these substeps:
    1.49 -  <ol>
    1.50 -   <li>Let <var>rect</var> be the argument.
    1.51 -   <li>Let <var>x</var>, <var>y</var>, <var>width</var> and <var>height</var> be the value of <var>rect</var>`s <a class=idl-code data-link-for=DOMRectReadOnly data-link-type=attribute href=#dom-domrectreadonly-domrect-x title=x>x</a>, <a class=idl-code data-link-for=DOMRectReadOnly data-link-type=attribute href=#dom-domrectreadonly-domrect-y title=y>y</a>, <a class=idl-code data-link-for=DOMRectReadOnly data-link-type=attribute href=#dom-domrectreadonly-domrect-width title=width>width</a> and <a class=idl-code data-link-for=DOMRectReadOnly data-link-type=attribute href=#dom-domrectreadonly-domrect-height title=height>height</a> attributes, respectively.
    1.52 -   <li>Let <var>point 1</var> be a new <a class=idl-code data-link-type=interface href=#dom-dompoint title=dompoint>DOMPoint</a> object with <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-x title=x>x</a> set to <var>x</var>, <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-y title=y>y</a> set to <var>y</var>, <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-z title=z>z</a> set to zero and <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-w title=w>w</a> set to one.
    1.53 -   <li>Let <var>point 2</var> be a new <a class=idl-code data-link-type=interface href=#dom-dompoint title=dompoint>DOMPoint</a> object with <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-x title=x>x</a> set to <var>x</var> + <var>width</var>, <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-y title=y>y</a> set to <var>y</var>, <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-z title=z>z</a> set to zero and <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-w title=w>w</a> set to one.
    1.54 -   <li>Let <var>point 3</var> be a new <a class=idl-code data-link-type=interface href=#dom-dompoint title=dompoint>DOMPoint</a> object with <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-x title=x>x</a> set to <var>x</var> + <var>width</var>, <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-y title=y>y</a> set to <var>y</var> + <var>height</var>, <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-z title=z>z</a> set to zero and <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-w title=w>w</a> set to one.
    1.55 -   <li>Let <var>point 4</var> be a new <a class=idl-code data-link-type=interface href=#dom-dompoint title=dompoint>DOMPoint</a> object with <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-x title=x>x</a> set to <var>x</var>, <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-y title=y>y</a> set to <var>y</var> + <var>height</var>, <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-z title=z>z</a> set to zero and <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-w title=w>w</a> set to one.
    1.56 -  </ol>
    1.57 - <li><p>Otherwise, follow these substeps:
    1.58 -  <ol>
    1.59 -   <li>Let <var>p1</var>, <var>p2</var>, <var>p3</var> and <var>p4</var> be the given arguments, in the same order.
    1.60 -   <li>Let <var>point 1</var> be a new <a class=idl-code data-link-type=interface href=#dom-dompoint title=dompoint>DOMPoint</a> object with its attributes set to the values of the namesake dictionary members in <var>p1</var>.
    1.61 -   <li>Let <var>point 2</var> be a new <a class=idl-code data-link-type=interface href=#dom-dompoint title=dompoint>DOMPoint</a> object with its attributes set to the values of the namesake dictionary members in <var>p2</var>.
    1.62 -   <li>Let <var>point 3</var> be a new <a class=idl-code data-link-type=interface href=#dom-dompoint title=dompoint>DOMPoint</a> object with its attributes set to the values of the namesake dictionary members in <var>p3</var>.
    1.63 -   <li>Let <var>point 4</var> be a new <a class=idl-code data-link-type=interface href=#dom-dompoint title=dompoint>DOMPoint</a> object with its attributes set to the values of the namesake dictionary members in <var>p4</var>.
    1.64 -  </ol>
    1.65 -   <p class=note>Note that it is possible to pass <a class=idl-code data-link-type=interface href=#dom-dompoint title=dompoint>DOMPoint</a>/<a class=idl-code data-link-type=interface href=#dom-dompointreadonly title=dompointreadonly>DOMPointReadOnly</a> arguments as well. The passed arguments will be transformed to the correct object type internally following the WebIDL rules <a data-biblio-type=normative data-link-type=biblio href=#biblio-webidl title=biblio-webidl>[WEBIDL]</a>.
    1.66 - <li><p>Return a new <a class=idl-code data-link-type=interface href=#dom-domquad title=domquad>DOMQuad</a> with <a class=idl-code data-link-for=DOMQuad data-link-type=attribute href=#dom-domquad-p1 title=p1>p1</a> set to <var>point 1</var>, <a class=idl-code data-link-for=DOMQuad data-link-type=attribute href=#dom-domquad-p2 title=p2>p2</a> set to
    1.67 - <var>point 2</var>, <a class=idl-code data-link-for=DOMQuad data-link-type=attribute href=#dom-domquad-p3 title=p3>p3</a> set to <var>point 3</var> and <a class=idl-code data-link-for=DOMQuad data-link-type=attribute href=#dom-domquad-p4 title=p4>p4</a> set to <var>point 4</var>, and
    1.68 - let the <a data-link-type=dfn href=#associated-bounding-rectangle title="associated bounding rectangle">associated bounding rectangle</a> be <var>bounds</var>.
    1.69 -</ol>
    1.70 +<dl class=switch>
    1.71 +  <dt>If invoked with one argument:</dt>
    1.72 +  <dd>
    1.73 +    <ol class=algorithm>
    1.74 +      <li>Let <var>rect</var> be the argument.
    1.75 +      <li>Let <var>x</var>, <var>y</var>, <var>width</var> and <var>height</var> be the value of <var>rect</var>’s <a class=idl-code data-link-for=DOMRectReadOnly data-link-type=attribute href=#dom-domrectreadonly-domrect-x title=x>x</a>, <a class=idl-code data-link-for=DOMRectReadOnly data-link-type=attribute href=#dom-domrectreadonly-domrect-y title=y>y</a>, <a class=idl-code data-link-for=DOMRectReadOnly data-link-type=attribute href=#dom-domrectreadonly-domrect-width title=width>width</a> and <a class=idl-code data-link-for=DOMRectReadOnly data-link-type=attribute href=#dom-domrectreadonly-domrect-height title=height>height</a> attributes, respectively.
    1.76 +      <li>Let <var>point 1</var> be a new <a class=idl-code data-link-type=interface href=#dom-dompoint title=dompoint>DOMPoint</a> object with <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-x title=x>x</a> set to <var>x</var>, <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-y title=y>y</a> set to <var>y</var>, <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-z title=z>z</a> set to zero and <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-w title=w>w</a> set to one.
    1.77 +      <li>Let <var>point 2</var> be a new <a class=idl-code data-link-type=interface href=#dom-dompoint title=dompoint>DOMPoint</a> object with <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-x title=x>x</a> set to <var>x</var> + <var>width</var>, <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-y title=y>y</a> set to <var>y</var>, <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-z title=z>z</a> set to zero and <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-w title=w>w</a> set to one.
    1.78 +      <li>Let <var>point 3</var> be a new <a class=idl-code data-link-type=interface href=#dom-dompoint title=dompoint>DOMPoint</a> object with <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-x title=x>x</a> set to <var>x</var> + <var>width</var>, <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-y title=y>y</a> set to <var>y</var> + <var>height</var>, <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-z title=z>z</a> set to zero and <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-w title=w>w</a> set to one.
    1.79 +      <li>Let <var>point 4</var> be a new <a class=idl-code data-link-type=interface href=#dom-dompoint title=dompoint>DOMPoint</a> object with <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-x title=x>x</a> set to <var>x</var>, <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-y title=y>y</a> set to <var>y</var> + <var>height</var>, <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-z title=z>z</a> set to zero and <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-w title=w>w</a> set to one.
    1.80 +      <li><p>Return a new <a class=idl-code data-link-type=interface href=#dom-domquad title=domquad>DOMQuad</a> with <a class=idl-code data-link-for=DOMQuad data-link-type=attribute href=#dom-domquad-p1 title=p1>p1</a> set to <var>point 1</var>, <a class=idl-code data-link-for=DOMQuad data-link-type=attribute href=#dom-domquad-p2 title=p2>p2</a> set to <var>point 2</var>, <a class=idl-code data-link-for=DOMQuad data-link-type=attribute href=#dom-domquad-p3 title=p3>p3</a> set to <var>point 3</var> and <a class=idl-code data-link-for=DOMQuad data-link-type=attribute href=#dom-domquad-p4 title=p4>p4</a> set to <var>point 4</var>, and let the <a data-link-type=dfn href=#associated-bounding-rectangle title="associated bounding rectangle">associated bounding rectangle</a> be <var>bounds</var>.
    1.81 +    </ol>
    1.82 +  </dd>
    1.83 +  <dt>Otherwise:</dt>
    1.84 +  <dd>
    1.85 +    <ol class=algorithm>
    1.86 +      <li>Let <var>p1</var>, <var>p2</var>, <var>p3</var> and <var>p4</var> be the given arguments, in the same order.
    1.87 +      <li>Let <var>point 1</var> be a new <a class=idl-code data-link-type=interface href=#dom-dompoint title=dompoint>DOMPoint</a> object with its attributes set to the values of the namesake dictionary members in <var>p1</var>.
    1.88 +      <li>Let <var>point 2</var> be a new <a class=idl-code data-link-type=interface href=#dom-dompoint title=dompoint>DOMPoint</a> object with its attributes set to the values of the namesake dictionary members in <var>p2</var>.
    1.89 +      <li>Let <var>point 3</var> be a new <a class=idl-code data-link-type=interface href=#dom-dompoint title=dompoint>DOMPoint</a> object with its attributes set to the values of the namesake dictionary members in <var>p3</var>.
    1.90 +      <li>Let <var>point 4</var> be a new <a class=idl-code data-link-type=interface href=#dom-dompoint title=dompoint>DOMPoint</a> object with its attributes set to the values of the namesake dictionary members in <var>p4</var>.
    1.91 +      <li><p>Return a new <a class=idl-code data-link-type=interface href=#dom-domquad title=domquad>DOMQuad</a> with <a class=idl-code data-link-for=DOMQuad data-link-type=attribute href=#dom-domquad-p1 title=p1>p1</a> set to <var>point 1</var>, <a class=idl-code data-link-for=DOMQuad data-link-type=attribute href=#dom-domquad-p2 title=p2>p2</a> set to <var>point 2</var>, <a class=idl-code data-link-for=DOMQuad data-link-type=attribute href=#dom-domquad-p3 title=p3>p3</a> set to <var>point 3</var> and <a class=idl-code data-link-for=DOMQuad data-link-type=attribute href=#dom-domquad-p4 title=p4>p4</a> set to <var>point 4</var>, and let the <a data-link-type=dfn href=#associated-bounding-rectangle title="associated bounding rectangle">associated bounding rectangle</a> be <var>bounds</var>.
    1.92 +    </ol>
    1.93 +    <p class=note>Note: It is possible to pass <a class=idl-code data-link-type=interface href=#dom-dompoint title=dompoint>DOMPoint</a>/<a class=idl-code data-link-type=interface href=#dom-dompointreadonly title=dompointreadonly>DOMPointReadOnly</a> arguments as well. The passed arguments will be transformed to the correct object type internally following the WebIDL rules <a data-biblio-type=normative data-link-type=biblio href=#biblio-webidl title=biblio-webidl>[WEBIDL]</a>.
    1.94 +  </dd>
    1.95 +</dl>
    1.96  
    1.97  <div data-dfn-for=DOMQuad data-dfn-type=attribute>
    1.98   The <dfn class=idl-code data-dfn-for=DOMQuad data-dfn-type=attribute data-export="" id=dom-domquad-p1>p1<a class=self-link href=#dom-domquad-p1></a></dfn> attribute must return a <a class=idl-code data-link-type=interface href=#dom-dompoint title=dompoint>DOMPoint</a> that represents <a class=idl-code data-link-type=attribute href=#dom-domquad-p1 title=p1>p1</a> of the quadrilateral it was invoked. The author can modify the returned <a class=idl-code data-link-type=interface href=#dom-dompoint title=dompoint>DOMPoint</a> object, which has direct affect on the quadrilateral.
    1.99 @@ -394,7 +397,7 @@
   1.100  
   1.101  <p>The <dfn class=idl-code data-dfn-for=DOMQuad data-dfn-type=attribute data-export="" id=dom-domquad-p4>p4<a class=self-link href=#dom-domquad-p4></a></dfn> attribute must return a <a class=idl-code data-link-type=interface href=#dom-dompoint title=dompoint>DOMPoint</a> that represents <a class=idl-code data-link-type=attribute href=#dom-domquad-p4 title=p4>p4</a> of the quadrilateral it was invoked. The author can modify the returned <a class=idl-code data-link-type=interface href=#dom-dompoint title=dompoint>DOMPoint</a> object, which has direct affect on the quadrilateral.</p>
   1.102  
   1.103 -<p>The <dfn class=idl-code data-dfn-for=DOMQuad data-dfn-type=attribute data-export="" id=dom-domquad-bounds>bounds<a class=self-link href=#dom-domquad-bounds></a></dfn> attribute must return the <a data-link-type=dfn href=#associated-bounding-rectangle title="associated bounding rectangle">associated bounding rectangle</a>.</p>
   1.104 +<p>The <dfn class=idl-code data-dfn-for=DOMQuad data-dfn-type=attribute data-export="" id=dom-domquad-bounds>bounds<a class=self-link href=#dom-domquad-bounds></a></dfn> attribute must return the <a data-link-type=dfn href=#associated-bounding-rectangle title="associated bounding rectangle">associated bounding rectangle</a> of the quadrilateral it was invoked.</p>
   1.105  </div>
   1.106  
   1.107  <p><a class=idl-code data-link-type=interface href=#dom-domquad title=domquad>DOMQuad</a> objects have an <dfn data-dfn-for=quadlirateral data-dfn-type=dfn data-noexport="" id=associated-bounding-rectangle>associated bounding rectangle<a class=self-link href=#associated-bounding-rectangle></a></dfn> set to a <a class=idl-code data-link-type=interface href=#dom-domrectreadonly title=domrectreadonly>DOMRectReadOnly</a> object when created. <a class=idl-code data-link-type=interface href=#dom-domquad title=domquad>DOMQuad</a> objects must have read and write access to the internal member variables of the <a data-link-type=dfn href=#associated-bounding-rectangle title="associated bounding rectangle">associated bounding rectangle</a>. The <a data-link-type=dfn href=#associated-bounding-rectangle title="associated bounding rectangle">associated bounding rectangle</a> is live; whenever the objects for <a class=idl-code data-link-type=attribute href=#dom-domquad-p1 title=p1>p1</a>, <a class=idl-code data-link-type=attribute href=#dom-domquad-p2 title=p2>p2</a>, <a class=idl-code data-link-type=attribute href=#dom-domquad-p3 title=p3>p3</a> or <a class=idl-code data-link-type=attribute href=#dom-domquad-p4 title=p4>p4</a> change, the <a data-link-type=dfn href=#associated-bounding-rectangle title="associated bounding rectangle">associated bounding rectangle</a> must update its internal member variable values as appropriate to describe the new smallest bounding box of the four points.</p>
     2.1 --- a/geometry/Overview.src.html	Tue Jul 15 07:39:59 2014 +0200
     2.2 +++ b/geometry/Overview.src.html	Tue Jul 15 08:10:18 2014 +0200
     2.3 @@ -130,15 +130,15 @@
     2.4  <dl dfn-for=rectangle>
     2.5    <dt><dfn>origin</dfn></dt>
     2.6    <dd>
     2.7 -    When the rectangle has a non-negative <a>width</a>, the rectangle`s horizontal origin is the left edge; otherwise, it is the right edge. Similarly, when the rectangle has a non-negative <a>height</a>, the rectangle`s vertical origin is the top edge; otherwise, it is the bottom edge.
     2.8 +    When the rectangle has a non-negative <a>width</a>, the rectangle's horizontal origin is the left edge; otherwise, it is the right edge. Similarly, when the rectangle has a non-negative <a>height</a>, the rectangle's vertical origin is the top edge; otherwise, it is the bottom edge.
     2.9    </dd>
    2.10    <dt><dfn>x coordinate</dfn></dt>
    2.11    <dd>
    2.12 -    The horizontal distance between the viewport`s left edge and the rectangle`s <a>origin</a>.
    2.13 +    The horizontal distance between the viewport's left edge and the rectangle's <a>origin</a>.
    2.14    </dd>
    2.15    <dt><dfn>y coordinate</dfn></dt>
    2.16    <dd>
    2.17 -    The vertical distance between the viewport`s top edge and the rectangle`s <a>origin</a>.
    2.18 +    The vertical distance between the viewport's top edge and the rectangle's <a>origin</a>.
    2.19    </dd>
    2.20    <dt><dfn>width dimension</dfn></dt>
    2.21    <dd>
    2.22 @@ -182,7 +182,7 @@
    2.23  };
    2.24  </pre>
    2.25  
    2.26 -The following algorithms assume that <a interface>DOMRectReadOnly</a> objects have internal member variables <a>x coordinate</a>, <a>y coordinate</a>, <a>width dimension</a> and <a>height dimension</a>. <a interface>DOMRectReadOnly</a> as well as the inheriting interface <a interface>DOMRect</a> must be able to access and set the value of these variables.
    2.27 +The following algorithms assume that <a interface>DOMRectReadOnly</a> objects have the internal member variables <a>x coordinate</a>, <a>y coordinate</a>, <a>width dimension</a> and <a>height dimension</a>. <a interface>DOMRectReadOnly</a> as well as the inheriting interface <a interface>DOMRect</a> must be able to access and set the value of these variables.
    2.28  
    2.29  An interface returning an <a interface>DOMRectReadOnly</a> object by an attribute or function may be able to modify internal member variable values. Such an interface must specify this ability explicitly in prose.
    2.30  
    2.31 @@ -195,9 +195,9 @@
    2.32    <li>Return the new <a interface>DOMRectReadOnly</a> object.
    2.33  </ol>
    2.34  
    2.35 -The <dfn dfn-type=constructor dfn-for=DOMRect><code>DOMRect(<var>x</var>, <var>y</var>, <var>width</var>, <var>height</var>)</code></dfn> constructor, when invoked
    2.36 +The <dfn dfn-type=constructor dfn-for=DOMRect><code>DOMRect(<var>x</var>, <var>y</var>, <var>width</var>, <var>height</var>)</code></dfn> constructor, when invoked, must run the following steps:
    2.37  <dl class="switch">
    2.38 -  <dt>Without arguments:</dt>
    2.39 +  <dt>If invoked without arguments:</dt>
    2.40    <dd>
    2.41      <ol class="algorithm">
    2.42        <li>Let <var>x</var>, <var>y</var>, <var>width</var> and <var>height</var> be zero.
    2.43 @@ -268,29 +268,32 @@
    2.44  
    2.45  <p>The <dfn dfn-type=constructor dfn-for=DOMQuad><code>DOMQuad()</code></dfn> constructor, when invoked, must run the following steps:
    2.46  
    2.47 -<ol class='algorithm'>
    2.48 - <li><p>If invoked with one argument, follow these substeps:
    2.49 -  <ol>
    2.50 -   <li>Let <var>rect</var> be the argument.
    2.51 -   <li>Let <var>x</var>, <var>y</var>, <var>width</var> and <var>height</var> be the value of <var>rect</var>`s <a attribute for=DOMRectReadOnly>x</a>, <a attribute for=DOMRectReadOnly>y</a>, <a attribute for=DOMRectReadOnly>width</a> and <a attribute for=DOMRectReadOnly>height</a> attributes, respectively.
    2.52 -   <li>Let <var>point 1</var> be a new <a interface>DOMPoint</a> object with <a attribute for=DOMPoint>x</a> set to <var>x</var>, <a attribute for=DOMPoint>y</a> set to <var>y</var>, <a attribute for=DOMPoint>z</a> set to zero and <a attribute for=DOMPoint>w</a> set to one.
    2.53 -   <li>Let <var>point 2</var> be a new <a interface>DOMPoint</a> object with <a attribute for=DOMPoint>x</a> set to <var>x</var> + <var>width</var>, <a attribute for=DOMPoint>y</a> set to <var>y</var>, <a attribute for=DOMPoint>z</a> set to zero and <a attribute for=DOMPoint>w</a> set to one.
    2.54 -   <li>Let <var>point 3</var> be a new <a interface>DOMPoint</a> object with <a attribute for=DOMPoint>x</a> set to <var>x</var> + <var>width</var>, <a attribute for=DOMPoint>y</a> set to <var>y</var> + <var>height</var>, <a attribute for=DOMPoint>z</a> set to zero and <a attribute for=DOMPoint>w</a> set to one.
    2.55 -   <li>Let <var>point 4</var> be a new <a interface>DOMPoint</a> object with <a attribute for=DOMPoint>x</a> set to <var>x</var>, <a attribute for=DOMPoint>y</a> set to <var>y</var> + <var>height</var>, <a attribute for=DOMPoint>z</a> set to zero and <a attribute for=DOMPoint>w</a> set to one.
    2.56 -  </ol>
    2.57 - <li><p>Otherwise, follow these substeps:
    2.58 -  <ol>
    2.59 -   <li>Let <var>p1</var>, <var>p2</var>, <var>p3</var> and <var>p4</var> be the given arguments, in the same order.
    2.60 -   <li>Let <var>point 1</var> be a new <a interface>DOMPoint</a> object with its attributes set to the values of the namesake dictionary members in <var>p1</var>.
    2.61 -   <li>Let <var>point 2</var> be a new <a interface>DOMPoint</a> object with its attributes set to the values of the namesake dictionary members in <var>p2</var>.
    2.62 -   <li>Let <var>point 3</var> be a new <a interface>DOMPoint</a> object with its attributes set to the values of the namesake dictionary members in <var>p3</var>.
    2.63 -   <li>Let <var>point 4</var> be a new <a interface>DOMPoint</a> object with its attributes set to the values of the namesake dictionary members in <var>p4</var>.
    2.64 -  </ol>
    2.65 -   <p class='note'>Note that it is possible to pass <a interface>DOMPoint</a>/<a interface>DOMPointReadOnly</a> arguments as well. The passed arguments will be transformed to the correct object type internally following the WebIDL rules [[!WEBIDL]].
    2.66 - <li><p>Return a new <a interface>DOMQuad</a> with <a attribute for=DOMQuad>p1</a> set to <var>point 1</var>, <a attribute for=DOMQuad>p2</a> set to
    2.67 - <var>point 2</var>, <a attribute for=DOMQuad>p3</a> set to <var>point 3</var> and <a attribute for=DOMQuad>p4</a> set to <var>point 4</var>, and
    2.68 - let the <a>associated bounding rectangle</a> be <var>bounds</var>.
    2.69 -</ol>
    2.70 +<dl class='switch'>
    2.71 +  <dt>If invoked with one argument:</dt>
    2.72 +  <dd>
    2.73 +    <ol class='algorithm'>
    2.74 +      <li>Let <var>rect</var> be the argument.
    2.75 +      <li>Let <var>x</var>, <var>y</var>, <var>width</var> and <var>height</var> be the value of <var>rect</var>'s <a attribute for=DOMRectReadOnly>x</a>, <a attribute for=DOMRectReadOnly>y</a>, <a attribute for=DOMRectReadOnly>width</a> and <a attribute for=DOMRectReadOnly>height</a> attributes, respectively.
    2.76 +      <li>Let <var>point 1</var> be a new <a interface>DOMPoint</a> object with <a attribute for=DOMPoint>x</a> set to <var>x</var>, <a attribute for=DOMPoint>y</a> set to <var>y</var>, <a attribute for=DOMPoint>z</a> set to zero and <a attribute for=DOMPoint>w</a> set to one.
    2.77 +      <li>Let <var>point 2</var> be a new <a interface>DOMPoint</a> object with <a attribute for=DOMPoint>x</a> set to <var>x</var> + <var>width</var>, <a attribute for=DOMPoint>y</a> set to <var>y</var>, <a attribute for=DOMPoint>z</a> set to zero and <a attribute for=DOMPoint>w</a> set to one.
    2.78 +      <li>Let <var>point 3</var> be a new <a interface>DOMPoint</a> object with <a attribute for=DOMPoint>x</a> set to <var>x</var> + <var>width</var>, <a attribute for=DOMPoint>y</a> set to <var>y</var> + <var>height</var>, <a attribute for=DOMPoint>z</a> set to zero and <a attribute for=DOMPoint>w</a> set to one.
    2.79 +      <li>Let <var>point 4</var> be a new <a interface>DOMPoint</a> object with <a attribute for=DOMPoint>x</a> set to <var>x</var>, <a attribute for=DOMPoint>y</a> set to <var>y</var> + <var>height</var>, <a attribute for=DOMPoint>z</a> set to zero and <a attribute for=DOMPoint>w</a> set to one.
    2.80 +      <li><p>Return a new <a interface>DOMQuad</a> with <a attribute for=DOMQuad>p1</a> set to <var>point 1</var>, <a attribute for=DOMQuad>p2</a> set to <var>point 2</var>, <a attribute for=DOMQuad>p3</a> set to <var>point 3</var> and <a attribute for=DOMQuad>p4</a> set to <var>point 4</var>, and let the <a>associated bounding rectangle</a> be <var>bounds</var>.
    2.81 +    </ol>
    2.82 +  </dd>
    2.83 +  <dt>Otherwise:</dt>
    2.84 +  <dd>
    2.85 +    <ol class='algorithm'>
    2.86 +      <li>Let <var>p1</var>, <var>p2</var>, <var>p3</var> and <var>p4</var> be the given arguments, in the same order.
    2.87 +      <li>Let <var>point 1</var> be a new <a interface>DOMPoint</a> object with its attributes set to the values of the namesake dictionary members in <var>p1</var>.
    2.88 +      <li>Let <var>point 2</var> be a new <a interface>DOMPoint</a> object with its attributes set to the values of the namesake dictionary members in <var>p2</var>.
    2.89 +      <li>Let <var>point 3</var> be a new <a interface>DOMPoint</a> object with its attributes set to the values of the namesake dictionary members in <var>p3</var>.
    2.90 +      <li>Let <var>point 4</var> be a new <a interface>DOMPoint</a> object with its attributes set to the values of the namesake dictionary members in <var>p4</var>.
    2.91 +      <li><p>Return a new <a interface>DOMQuad</a> with <a attribute for=DOMQuad>p1</a> set to <var>point 1</var>, <a attribute for=DOMQuad>p2</a> set to <var>point 2</var>, <a attribute for=DOMQuad>p3</a> set to <var>point 3</var> and <a attribute for=DOMQuad>p4</a> set to <var>point 4</var>, and let the <a>associated bounding rectangle</a> be <var>bounds</var>.
    2.92 +    </ol>
    2.93 +    <p class='note'>Note: It is possible to pass <a interface>DOMPoint</a>/<a interface>DOMPointReadOnly</a> arguments as well. The passed arguments will be transformed to the correct object type internally following the WebIDL rules [[!WEBIDL]].
    2.94 +  </dd>
    2.95 +</dl>
    2.96  
    2.97  <div dfn-type=attribute dfn-for=DOMQuad>
    2.98   The <dfn>p1</dfn> attribute must return a <a interface>DOMPoint</a> that represents <a attribute>p1</a> of the quadrilateral it was invoked. The author can modify the returned <a interface>DOMPoint</a> object, which has direct affect on the quadrilateral.
    2.99 @@ -301,7 +304,7 @@
   2.100  
   2.101   The <dfn>p4</dfn> attribute must return a <a interface>DOMPoint</a> that represents <a attribute>p4</a> of the quadrilateral it was invoked. The author can modify the returned <a interface>DOMPoint</a> object, which has direct affect on the quadrilateral.
   2.102  
   2.103 - The <dfn>bounds</dfn> attribute must return the <a>associated bounding rectangle</a>.
   2.104 + The <dfn>bounds</dfn> attribute must return the <a>associated bounding rectangle</a> of the quadrilateral it was invoked.
   2.105  </div>
   2.106  
   2.107  <a interface>DOMQuad</a> objects have an <dfn for=quadlirateral>associated bounding rectangle</dfn> set to a <a interface>DOMRectReadOnly</a> object when created. <a interface>DOMQuad</a> objects must have read and write access to the internal member variables of the <a>associated bounding rectangle</a>. The <a>associated bounding rectangle</a> is live; whenever the objects for <a attribute>p1</a>, <a attribute>p2</a>, <a attribute>p3</a> or <a attribute>p4</a> change, the <a>associated bounding rectangle</a> must update its internal member variable values as appropriate to describe the new smallest bounding box of the four points.

mercurial