1.1 --- a/cssom-view/Overview.src.html Wed Jun 26 17:20:03 2013 -0700 1.2 +++ b/cssom-view/Overview.src.html Thu Jun 27 11:55:31 2013 +0200 1.3 @@ -676,23 +676,33 @@ 1.4 <span>CaretPosition</span>? <span title=dom-Document-caretPositionFromPoint>caretPositionFromPoint</span>(double x, double y); 1.5 };</pre> 1.6 1.7 -<p>The <dfn title=dom-Document-elementFromPoint><code>elementFromPoint(<var>x</var>, <var>y</var>)</code></dfn> method must return the element at 1.8 -coordinates <var>x</var>,<var>y</var> in the <span>viewport</span>. The element to be returned is determined 1.9 -through hit testing. If either argument is negative, <var>x</var> is greater than the <span>viewport</span> width excluding the size of a rendered scroll 1.10 -bar (if any), or <var>y</var> is greater than the <span>viewport</span> height excluding the size of a rendered scroll bar (if any), the method must 1.11 -return null. If there is no element at the given position the method must return the root element, if any, or null otherwise. If there is no 1.12 -<span>viewport</span> associated with the document, the method must return null.</p> 1.13 +<p>The <dfn title=dom-Document-elementFromPoint><code>elementFromPoint(<var>x</var>, <var>y</var>)</code></dfn> method must follow these steps: 1.14 + 1.15 +<ol> 1.16 + <li><p>If either argument is negative, <var>x</var> is greater than the <span>viewport</span> width excluding the size of a rendered scroll bar (if any), or 1.17 + <var>y</var> is greater than the <span>viewport</span> height excluding the size of a rendered scroll bar (if any), or there is no <span>viewport</span> 1.18 + associated with the document, return null and terminate these steps. 1.19 + <li><p>If there is a <span>layout box</span> in the <span>viewport</span> that would be a target for hit testing at coordinates <var>x</var>,<var>y</var>, 1.20 + return the associated element and terminate these steps. 1.21 + <li><p>If the document has a root element, return the root element and terminate these steps. 1.22 + <li><p>Return null. 1.23 +</ol> 1.24 1.25 <p class=note>The <code title=dom-Document-elementFromPoint>elementFromPoint()</code> method does not necessarily return the top-most painted element. For 1.26 instance, an element can be excluded from being a target for hit testing by using the 'pointer-events' CSS property. 1.27 1.28 -<p class=atrisk>The <dfn title=dom-Document-elementsFromPoint><code>elementsFromPoint(<var>x</var>, <var>y</var>)</code></dfn> method must return a sequence of 1.29 -elements at coordinates <var>x</var>,<var>y</var> in the <span>viewport</span>. The sequence to be returned is sorted by paint order, with the first element as 1.30 -the topmost in the order. Elements that would not be a target for hit testing at coordinates <var>x</var>,<var>y</var> even if nothing was overlapping it must 1.31 -not be included in the list. If either argument is negative, <var>x</var> is greater than the <span>viewport</span> width excluding the size of a rendered 1.32 -scroll bar (if any), or <var>y</var> is greater than the <span>viewport</span> height excluding the size of a rendered scroll bar (if any), the method must 1.33 -return an empty sequence. If there is no element at the given position the method must return a sequence containing the root element, if any, or an empty 1.34 -sequence otherwise. If there is no <span>viewport</span> associated with the document, the method must return an empty sequence. 1.35 +<p class=atrisk>The <dfn title=dom-Document-elementsFromPoint><code>elementsFromPoint(<var>x</var>, <var>y</var>)</code></dfn> method must follow these steps: 1.36 + 1.37 +<ol> 1.38 + <li><p>Let <var>sequence</var> be a new empty sequence. 1.39 + <li><p>If either argument is negative, <var>x</var> is greater than the <span>viewport</span> width excluding the size of a rendered scroll bar (if any), or 1.40 + <var>y</var> is greater than the <span>viewport</span> height excluding the size of a rendered scroll bar (if any), or there is no <span>viewport</span> 1.41 + associated with the document, return <var>sequence</var> and terminate these steps. 1.42 + <li><p>For each <span>layout box</span> in the <span>viewport</span>, in paint order, starting with the topmost box, that would be a target for hit testing at 1.43 + coordinates <var>x</var>,<var>y</var> even if nothing would be overlapping it, append the associated element to <var>sequence</var>. 1.44 + <li><p>If the document has a root element, and the last item in <var>sequence</var> is not the root element, append the root element to <var>sequence</var>. 1.45 + <li><p>Return <var>sequence</var>. 1.46 +</ol> 1.47 1.48 <p>The <dfn title=dom-Document-caretPositionFromPoint><code>caretPositionFromPoint(<var>x</var>, <var>y</var>)</code></dfn> method must return the 1.49 result of running these steps:</p>