You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[cssom-view] Make new DOMQuad(rect) use x/y/width/height instead of top/right/bottom/left (so when width/height are negative, p1 is the bottom right corner).
<li><p>If invoked with one argument, follow these substeps:
1774
1774
<ol>
1775
1775
<li><p>Let <var>rect</var> be the argument.
1776
-
<li><p>Let <var>top</var>, <var>right</var>, <var>bottom</var> and <var>left</var> be <var>rect</var>'s the value of <codetitle="dom-DOMRect-top"><ahref="#dom-domrect-top">top</a></code>,
1777
-
<codetitle="dom-DOMRect-right"><ahref="#dom-domrect-right">right</a></code>, <codetitle="dom-DOMRect-bottom"><ahref="#dom-domrect-bottom">bottom</a></code> and <codetitle="dom-DOMRect-left"><ahref="#dom-domrect-left">left</a></code> attributes,
1776
+
<li><p>Let <var>x</var>, <var>y</var>, <var>width</var> and <var>height</var> be <var>rect</var>'s the value of <codetitle="dom-DOMRect-x"><ahref="#dom-domrect-x">x</a></code>,
1777
+
<codetitle="dom-DOMRect-y"><ahref="#dom-domrect-y">y</a></code>, <codetitle="dom-DOMRect-width"><ahref="#dom-domrect-width">width</a></code> and <codetitle="dom-DOMRect-height"><ahref="#dom-domrect-height">height</a></code> attributes,
1778
1778
respectively.
1779
-
<li><p>Let <var>point 1</var> be a new <code><ahref="#dompoint">DOMPoint</a></code> object with <codetitle="dom-DOMPoint-x"><ahref="#dom-dompoint-x">x</a></code> set to <var>left</var>,
1780
-
<codetitle="dom-DOMPoint-y"><ahref="#dom-dompoint-y">y</a></code> set to <var>top</var>, <codetitle="dom-DOMPoint-z"><ahref="#dom-dompoint-z">z</a></code> set to zero and <codetitle="dom-DOMPoint-w"><ahref="#dom-dompoint-w">w</a></code> set to
1779
+
<li><p>Let <var>point 1</var> be a new <code><ahref="#dompoint">DOMPoint</a></code> object with <codetitle="dom-DOMPoint-x"><ahref="#dom-dompoint-x">x</a></code> set to <var>x</var>,
1780
+
<codetitle="dom-DOMPoint-y"><ahref="#dom-dompoint-y">y</a></code> set to <var>y</var>, <codetitle="dom-DOMPoint-z"><ahref="#dom-dompoint-z">z</a></code> set to zero and <codetitle="dom-DOMPoint-w"><ahref="#dom-dompoint-w">w</a></code> set to
1781
1781
one.
1782
-
<li><p>Let <var>point 2</var> be a new <code><ahref="#dompoint">DOMPoint</a></code> object with <codetitle="dom-DOMPoint-x"><ahref="#dom-dompoint-x">x</a></code> set to <var>right</var>,
1783
-
<codetitle="dom-DOMPoint-y"><ahref="#dom-dompoint-y">y</a></code> set to <var>top</var>, <codetitle="dom-DOMPoint-z"><ahref="#dom-dompoint-z">z</a></code> set to zero and <codetitle="dom-DOMPoint-w"><ahref="#dom-dompoint-w">w</a></code> set to
1784
-
one.
1785
-
<li><p>Let <var>point 3</var> be a new <code><ahref="#dompoint">DOMPoint</a></code> object with <codetitle="dom-DOMPoint-x"><ahref="#dom-dompoint-x">x</a></code> set to <var>right</var>,
1786
-
<codetitle="dom-DOMPoint-y"><ahref="#dom-dompoint-y">y</a></code> set to <var>bottom</var>, <codetitle="dom-DOMPoint-z"><ahref="#dom-dompoint-z">z</a></code> set to zero and <codetitle="dom-DOMPoint-w"><ahref="#dom-dompoint-w">w</a></code> set to
1787
-
one.
1788
-
<li><p>Let <var>point 4</var> be a new <code><ahref="#dompoint">DOMPoint</a></code> object with <codetitle="dom-DOMPoint-x"><ahref="#dom-dompoint-x">x</a></code> set to <var>left</var>,
1789
-
<codetitle="dom-DOMPoint-y"><ahref="#dom-dompoint-y">y</a></code> set to <var>bottom</var>, <codetitle="dom-DOMPoint-z"><ahref="#dom-dompoint-z">z</a></code> set to zero and <codetitle="dom-DOMPoint-w"><ahref="#dom-dompoint-w">w</a></code> set to
1782
+
<li><p>Let <var>point 2</var> be a new <code><ahref="#dompoint">DOMPoint</a></code> object with <codetitle="dom-DOMPoint-x"><ahref="#dom-dompoint-x">x</a></code> set to <var>x</var> + <var>width</var>,
1783
+
<codetitle="dom-DOMPoint-y"><ahref="#dom-dompoint-y">y</a></code> set to <var>y</var>, <codetitle="dom-DOMPoint-z"><ahref="#dom-dompoint-z">z</a></code> set to zero and <codetitle="dom-DOMPoint-w"><ahref="#dom-dompoint-w">w</a></code> set to
1790
1784
one.
1785
+
<li><p>Let <var>point 3</var> be a new <code><ahref="#dompoint">DOMPoint</a></code> object with <codetitle="dom-DOMPoint-x"><ahref="#dom-dompoint-x">x</a></code> set to <var>x</var> + <var>width</var>,
1786
+
<codetitle="dom-DOMPoint-y"><ahref="#dom-dompoint-y">y</a></code> set to <var>y</var> + <var>height</var>, <codetitle="dom-DOMPoint-z"><ahref="#dom-dompoint-z">z</a></code> set to zero and
1787
+
<codetitle="dom-DOMPoint-w"><ahref="#dom-dompoint-w">w</a></code> set to one.
1788
+
<li><p>Let <var>point 4</var> be a new <code><ahref="#dompoint">DOMPoint</a></code> object with <codetitle="dom-DOMPoint-x"><ahref="#dom-dompoint-x">x</a></code> set to <var>x</var>,
1789
+
<codetitle="dom-DOMPoint-y"><ahref="#dom-dompoint-y">y</a></code> set to <var>y</var> + <var>height</var>, <codetitle="dom-DOMPoint-z"><ahref="#dom-dompoint-z">z</a></code> set to zero and
1790
+
<codetitle="dom-DOMPoint-w"><ahref="#dom-dompoint-w">w</a></code> set to one.
1791
1791
<li><p>Let <var>bounds</var> be a new <code><ahref="#domrectreadonly">DOMRectReadOnly</a></code> object with its attributes set to the values of the namesake attributes in
<li><p>Let <var>point 4</var> be a new <code><ahref="#dompoint">DOMPoint</a></code> object with its attributes set to the values of the namesake dictionary members in
1804
1804
<var>p4</var>.
1805
-
<li><p>Let <var>bounds</var> be a new <code><ahref="#domrectreadonly">DOMRectReadOnly</a></code> object describing the bounding box of <var>point 1</var>, <var>point 2</var>,<var>point
1806
-
3</var> and <var>point 4</var>.
1805
+
<li><p>Let <var>bounds</var> be a new <code><ahref="#domrectreadonly">DOMRectReadOnly</a></code> object describing the smallest bounding box of <var>point 1</var>, <var>point 2</var>,
1806
+
<var>point 3</var> and <var>point 4</var>.
1807
1807
</ol>
1808
1808
<li><p>Return a new <code><ahref="#domquad">DOMQuad</a></code> with <codetitle="dom-DOMQuad-p1"><ahref="#dom-domquad-p1">p1</a></code> set to <var>point 1</var>, <codetitle="dom-DOMQuad-p2"><ahref="#dom-domquad-p2">p2</a></code> set to
1809
1809
<var>point 2</var>, <codetitle="dom-DOMQuad-p3"><ahref="#dom-domquad-p3">p3</a></code> set to <var>point 3</var> and <codetitle="dom-DOMQuad-p4"><ahref="#dom-domquad-p4">p4</a></code> set to <var>point 4</var>, and
<p>The <ahref="#associated-bounding-rectangle">associated bounding rectangle</a> is live; whenever the objects in <codetitle="dom-DOMQuad-p1"><ahref="#dom-domquad-p1">p1</a></code>, <codetitle="dom-DOMQuad-p2"><ahref="#dom-domquad-p2">p2</a></code>,
1824
1824
<codetitle="dom-DOMQuad-p3"><ahref="#dom-domquad-p3">p3</a></code> or <codetitle="dom-DOMQuad-p4"><ahref="#dom-domquad-p4">p4</a></code> are changed, the <ahref="#associated-bounding-rectangle">associated bounding rectangle</a> must update its
1825
-
attributes as appropriate to describe the new bounding box of the four points.
1825
+
attributes as appropriate to describe the new smallest bounding box of the four points.
<li><p>If invoked with one argument, follow these substeps:
1732
1732
<ol>
1733
1733
<li><p>Let <var>rect</var> be the argument.
1734
-
<li><p>Let <var>top</var>, <var>right</var>, <var>bottom</var> and <var>left</var> be <var>rect</var>'s the value of <codetitle=dom-DOMRect-top>top</code>,
1735
-
<codetitle=dom-DOMRect-right>right</code>, <codetitle=dom-DOMRect-bottom>bottom</code> and <codetitle=dom-DOMRect-left>left</code> attributes,
1734
+
<li><p>Let <var>x</var>, <var>y</var>, <var>width</var> and <var>height</var> be <var>rect</var>'s the value of <codetitle=dom-DOMRect-x>x</code>,
1735
+
<codetitle=dom-DOMRect-y>y</code>, <codetitle=dom-DOMRect-width>width</code> and <codetitle=dom-DOMRect-height>height</code> attributes,
1736
1736
respectively.
1737
-
<li><p>Let <var>point 1</var> be a new <code>DOMPoint</code> object with <codetitle=dom-DOMPoint-x>x</code> set to <var>left</var>,
1738
-
<codetitle=dom-DOMPoint-y>y</code> set to <var>top</var>, <codetitle=dom-DOMPoint-z>z</code> set to zero and <codetitle=dom-DOMPoint-w>w</code> set to
1737
+
<li><p>Let <var>point 1</var> be a new <code>DOMPoint</code> object with <codetitle=dom-DOMPoint-x>x</code> set to <var>x</var>,
1738
+
<codetitle=dom-DOMPoint-y>y</code> set to <var>y</var>, <codetitle=dom-DOMPoint-z>z</code> set to zero and <codetitle=dom-DOMPoint-w>w</code> set to
1739
1739
one.
1740
-
<li><p>Let <var>point 2</var> be a new <code>DOMPoint</code> object with <codetitle=dom-DOMPoint-x>x</code> set to <var>right</var>,
1741
-
<codetitle=dom-DOMPoint-y>y</code> set to <var>top</var>, <codetitle=dom-DOMPoint-z>z</code> set to zero and <codetitle=dom-DOMPoint-w>w</code> set to
1742
-
one.
1743
-
<li><p>Let <var>point 3</var> be a new <code>DOMPoint</code> object with <codetitle=dom-DOMPoint-x>x</code> set to <var>right</var>,
1744
-
<codetitle=dom-DOMPoint-y>y</code> set to <var>bottom</var>, <codetitle=dom-DOMPoint-z>z</code> set to zero and <codetitle=dom-DOMPoint-w>w</code> set to
1745
-
one.
1746
-
<li><p>Let <var>point 4</var> be a new <code>DOMPoint</code> object with <codetitle=dom-DOMPoint-x>x</code> set to <var>left</var>,
1747
-
<codetitle=dom-DOMPoint-y>y</code> set to <var>bottom</var>, <codetitle=dom-DOMPoint-z>z</code> set to zero and <codetitle=dom-DOMPoint-w>w</code> set to
1740
+
<li><p>Let <var>point 2</var> be a new <code>DOMPoint</code> object with <codetitle=dom-DOMPoint-x>x</code> set to <var>x</var> + <var>width</var>,
1741
+
<codetitle=dom-DOMPoint-y>y</code> set to <var>y</var>, <codetitle=dom-DOMPoint-z>z</code> set to zero and <codetitle=dom-DOMPoint-w>w</code> set to
1748
1742
one.
1743
+
<li><p>Let <var>point 3</var> be a new <code>DOMPoint</code> object with <codetitle=dom-DOMPoint-x>x</code> set to <var>x</var> + <var>width</var>,
1744
+
<codetitle=dom-DOMPoint-y>y</code> set to <var>y</var> + <var>height</var>, <codetitle=dom-DOMPoint-z>z</code> set to zero and
1745
+
<codetitle=dom-DOMPoint-w>w</code> set to one.
1746
+
<li><p>Let <var>point 4</var> be a new <code>DOMPoint</code> object with <codetitle=dom-DOMPoint-x>x</code> set to <var>x</var>,
1747
+
<codetitle=dom-DOMPoint-y>y</code> set to <var>y</var> + <var>height</var>, <codetitle=dom-DOMPoint-z>z</code> set to zero and
1748
+
<codetitle=dom-DOMPoint-w>w</code> set to one.
1749
1749
<li><p>Let <var>bounds</var> be a new <code>DOMRectReadOnly</code> object with its attributes set to the values of the namesake attributes in
<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
1762
1762
<var>p4</var>.
1763
-
<li><p>Let <var>bounds</var> be a new <code>DOMRectReadOnly</code> object describing the bounding box of <var>point 1</var>, <var>point 2</var>,<var>point
1764
-
3</var> and <var>point 4</var>.
1763
+
<li><p>Let <var>bounds</var> be a new <code>DOMRectReadOnly</code> object describing the smallest bounding box of <var>point 1</var>, <var>point 2</var>,
1764
+
<var>point 3</var> and <var>point 4</var>.
1765
1765
</ol>
1766
1766
<li><p>Return a new <code>DOMQuad</code> with <codetitle=dom-DOMQuad-p1>p1</code> set to <var>point 1</var>, <codetitle=dom-DOMQuad-p2>p2</code> set to
1767
1767
<var>point 2</var>, <codetitle=dom-DOMQuad-p3>p3</code> set to <var>point 3</var> and <codetitle=dom-DOMQuad-p4>p4</code> set to <var>point 4</var>, and
<p>The <span>associated bounding rectangle</span> is live; whenever the objects in <codetitle=dom-DOMQuad-p1>p1</code>, <codetitle=dom-DOMQuad-p2>p2</code>,
1782
1782
<codetitle=dom-DOMQuad-p3>p3</code> or <codetitle=dom-DOMQuad-p4>p4</code> are changed, the <span>associated bounding rectangle</span> must update its
1783
-
attributes as appropriate to describe the new bounding box of the four points.
1783
+
attributes as appropriate to describe the new smallest bounding box of the four points.
0 commit comments