[cssom-view] Add document.elementsFromPoint(). https://www.w3.org/Bugs/Public/show_bug.cgi?id=19753

Mon, 24 Jun 2013 13:23:28 +0200

author
Simon Pieters <simonp@opera.com>
date
Mon, 24 Jun 2013 13:23:28 +0200
changeset 8537
ef0951c69a81
parent 8536
69d8cc81df93
child 8538
c1e5017eca4c

[cssom-view] Add document.elementsFromPoint(). https://www.w3.org/Bugs/Public/show_bug.cgi?id=19753

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	Sat Jun 22 13:40:04 2013 -0700
     1.2 +++ b/cssom-view/Overview.html	Mon Jun 24 13:23:28 2013 +0200
     1.3 @@ -25,7 +25,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 June 2013</h2>
     1.8 + <h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 24 June 2013</h2>
     1.9  
    1.10   <dl>
    1.11  
    1.12 @@ -92,7 +92,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 June 2013 Editor's Draft of CSSOM View. Please send
    1.17 +<p>This is the 24 June 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 @@ -717,6 +717,7 @@
    1.22  
    1.23  <pre class="idl">partial interface <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#document">Document</a> {
    1.24    <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#element">Element</a>? <a href="#dom-document-elementfrompoint" title="dom-Document-elementFromPoint">elementFromPoint</a>(double x, double y);
    1.25 +  sequence&lt;<a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#element">Element</a>&gt; <a href="#dom-document-elementsfrompoint" title="dom-Document-elementsFromPoint">elementsFromPoint</a>(double x, double y);
    1.26    <a href="#caretposition">CaretPosition</a>? <a href="#dom-document-caretpositionfrompoint" title="dom-Document-caretPositionFromPoint">caretPositionFromPoint</a>(double x, double y);
    1.27  };</pre>
    1.28  
    1.29 @@ -727,6 +728,16 @@
    1.30  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.31  <a href="#viewport">viewport</a> associated with the document, the method must return null.</p>
    1.32  
    1.33 +<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
    1.34 +instnace, an element can be excluded from being a target for hit testing by using the 'pointer-events' CSS property.
    1.35 +
    1.36 +<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
    1.37 +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
    1.38 +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
    1.39 +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
    1.40 +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
    1.41 +otherwise. If there is no <a href="#viewport">viewport</a> associated with the document, the method must return an empty sequence.
    1.42 +
    1.43  <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
    1.44  result of running these steps:</p>
    1.45  <ol>
    1.46 @@ -1549,10 +1560,12 @@
    1.47  
    1.48  <p>The editors would like to thank
    1.49  
    1.50 +Alan Stearns,
    1.51  Alexey Feldgendler,
    1.52  Björn Höhrmann,
    1.53  Dan Bates,
    1.54  David Vest,
    1.55 +Elliott Sprehn,
    1.56  Garrett Smith,
    1.57  Hallvord R. M. Steen,
    1.58  Leif Arne Storset,
     2.1 --- a/cssom-view/Overview.src.html	Sat Jun 22 13:40:04 2013 -0700
     2.2 +++ b/cssom-view/Overview.src.html	Mon Jun 24 13:23:28 2013 +0200
     2.3 @@ -679,6 +679,7 @@
     2.4  
     2.5  <pre class=idl>partial interface <span data-anolis-spec=dom>Document</span> {
     2.6    <span data-anolis-spec=dom>Element</span>? <span title=dom-Document-elementFromPoint>elementFromPoint</span>(double x, double y);
     2.7 +  sequence&lt;<span data-anolis-spec=dom>Element</span>> <span title=dom-Document-elementsFromPoint>elementsFromPoint</span>(double x, double y);
     2.8    <span>CaretPosition</span>? <span title=dom-Document-caretPositionFromPoint>caretPositionFromPoint</span>(double x, double y);
     2.9  };</pre>
    2.10  
    2.11 @@ -689,6 +690,16 @@
    2.12  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
    2.13  <span>viewport</span> associated with the document, the method must return null.</p>
    2.14  
    2.15 +<p class=note>The <code title=dom-Document-elementFromPoint>elementFromPoint()</code> method does not necessarily return the top-most painted element. For
    2.16 +instnace, an element can be excluded from being a target for hit testing by using the 'pointer-events' CSS property.
    2.17 +
    2.18 +<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
    2.19 +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
    2.20 +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
    2.21 +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
    2.22 +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
    2.23 +otherwise. If there is no <span>viewport</span> associated with the document, the method must return an empty sequence.
    2.24 +
    2.25  <p>The <dfn title=dom-Document-caretPositionFromPoint><code>caretPositionFromPoint(<var>x</var>, <var>y</var>)</code></dfn> method must return the
    2.26  result of running these steps:</p>
    2.27  <ol>
    2.28 @@ -1491,10 +1502,12 @@
    2.29  
    2.30  <p>The editors would like to thank
    2.31  
    2.32 +Alan Stearns,
    2.33  Alexey Feldgendler,
    2.34  Bj&ouml;rn H&ouml;hrmann,
    2.35  Dan Bates,
    2.36  David Vest,
    2.37 +Elliott Sprehn,
    2.38  Garrett Smith,
    2.39  Hallvord R. M. Steen,
    2.40  Leif Arne Storset,

mercurial