Skip to content

Commit 04dee70

Browse files
author
Simon Pieters
committed
[cssom-view] Make elementsFromPoint more consistent with elementFromPoint.
1 parent 4bf3afb commit 04dee70

2 files changed

Lines changed: 14 additions & 12 deletions

File tree

cssom-view/Overview.html

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
<h1>CSSOM View Module</h1>
2727

28-
<h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 24 June 2013</h2>
28+
<h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 25 June 2013</h2>
2929

3030
<dl>
3131

@@ -92,7 +92,7 @@ <h2 class="no-num no-toc" id="sotd">Status of This Document</h2>
9292
can be found in the <a href="http://www.w3.org/TR/">W3C technical reports
9393
index at http://www.w3.org/TR/.</a></em>
9494

95-
<p>This is the 24 June 2013 Editor's Draft of CSSOM View. Please send
95+
<p>This is the 25 June 2013 Editor's Draft of CSSOM View. Please send
9696
comments to
9797
<a href="mailto:www-style@w3.org?subject=%5Bcssom-view%5D%20">www-style@w3.org</a>
9898
(<a href="http://lists.w3.org/Archives/Public/www-style/">archived</a>)
@@ -729,14 +729,15 @@ <h2 id="extensions-to-the-document-interface"><span class="secno">6 </span>Exten
729729
<a href="#viewport">viewport</a> associated with the document, the method must return null.</p>
730730

731731
<p class="note">The <code title="dom-Document-elementFromPoint"><a href="#dom-document-elementfrompoint">elementFromPoint()</a></code> method does not necessarily return the top-most painted element. For
732-
instnace, an element can be excluded from being a target for hit testing by using the 'pointer-events' CSS property.
732+
instance, an element can be excluded from being a target for hit testing by using the 'pointer-events' CSS property.
733733

734734
<p class="atrisk">The <dfn id="dom-document-elementsfrompoint" title="dom-Document-elementsFromPoint"><code>elementsFromPoint(<var>x</var>, <var>y</var>)</code></dfn> method must return a sequence of
735735
elements at coordinates <var>x</var>,<var>y</var> in the <a href="#viewport">viewport</a>. The sequence to be returned is sorted by paint order, with the first element as
736-
the topmost in the order. If either argument is negative, <var>x</var> is greater than the <a href="#viewport">viewport</a> width excluding the size of a rendered scroll
737-
bar (if any), or <var>y</var> is greater than the <a href="#viewport">viewport</a> height excluding the size of a rendered scroll bar (if any), the method must return an
738-
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 sequence
739-
otherwise. If there is no <a href="#viewport">viewport</a> associated with the document, the method must return an empty sequence.
736+
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
737+
not be included in the list. If either argument is negative, <var>x</var> is greater than the <a href="#viewport">viewport</a> width excluding the size of a rendered
738+
scroll bar (if any), or <var>y</var> is greater than the <a href="#viewport">viewport</a> height excluding the size of a rendered scroll bar (if any), the method must
739+
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
740+
sequence otherwise. If there is no <a href="#viewport">viewport</a> associated with the document, the method must return an empty sequence.
740741

741742
<p>The <dfn id="dom-document-caretpositionfrompoint" title="dom-Document-caretPositionFromPoint"><code>caretPositionFromPoint(<var>x</var>, <var>y</var>)</code></dfn> method must return the
742743
result of running these steps:</p>

cssom-view/Overview.src.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -691,14 +691,15 @@ <h2>Extensions to the <code title>Document</code> Interface</h2>
691691
<span>viewport</span> associated with the document, the method must return null.</p>
692692

693693
<p class=note>The <code title=dom-Document-elementFromPoint>elementFromPoint()</code> method does not necessarily return the top-most painted element. For
694-
instnace, an element can be excluded from being a target for hit testing by using the 'pointer-events' CSS property.
694+
instance, an element can be excluded from being a target for hit testing by using the 'pointer-events' CSS property.
695695

696696
<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
697697
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
698-
the topmost in the order. If either argument is negative, <var>x</var> is greater than the <span>viewport</span> width excluding the size of a rendered scroll
699-
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 return an
700-
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 sequence
701-
otherwise. If there is no <span>viewport</span> associated with the document, the method must return an empty sequence.
698+
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
699+
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
700+
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
701+
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
702+
sequence otherwise. If there is no <span>viewport</span> associated with the document, the method must return an empty sequence.
702703

703704
<p>The <dfn title=dom-Document-caretPositionFromPoint><code>caretPositionFromPoint(<var>x</var>, <var>y</var>)</code></dfn> method must return the
704705
result of running these steps:</p>

0 commit comments

Comments
 (0)