[html5] r8546 - [giow] (0) Also update the Touch object for hit regions Affected topics: Canvas, [...]

whatwg at whatwg.org whatwg at whatwg.org
Fri Mar 14 16:56:21 PDT 2014


Author: ianh
Date: 2014-03-14 16:56:20 -0700 (Fri, 14 Mar 2014)
New Revision: 8546

Modified:
   complete.html
   index
   source
Log:
[giow] (0) Also update the Touch object for hit regions
Affected topics: Canvas, DOM APIs

Modified: complete.html
===================================================================
--- complete.html	2014-03-14 23:10:36 UTC (rev 8545)
+++ complete.html	2014-03-14 23:56:20 UTC (rev 8546)
@@ -3808,6 +3808,12 @@
      <li><dfn id=event-keyup title=event-keyup><code>keyup</code></dfn> event</li>
      <li><dfn id=event-keypress title=event-keypress><code>keypress</code></dfn> event</li>
 
+    </ul><p>The following features are defined in the Touch Events specification: <a href=#refsTOUCH>[TOUCH]</a></p>
+
+    <ul class=brief><li><dfn id=touch><code>Touch</code></dfn> interface</li>
+
+     <li><dfn id=touch-point>Touch point</dfn> concept</li>
+
     </ul><p>This specification sometimes uses the term <dfn title="">name</dfn> to refer to the event's
     <code title=dom-event-type>type</code>; as in, "an event named <code title="">click</code>"
     or "if the event name is <code title="">keypress</code>". The terms "name" and "type" for
@@ -59048,8 +59054,8 @@
   say to <i>act as normal</i>, that means that the event must be fired as it would have had these
   requirements not been applied.</p>
 
-  <ol><li><p>If the pointing device is not indicating a pixel on the <code><a href=#the-canvas-element>canvas</a></code>, act as normal
-   and abort these steps.</li>
+  <ol><li><p>If the pointing device is not indicating a pixel on the <code><a href=#the-canvas-element>canvas</a></code>, then act as
+   normal and abort these steps.</li>
 
    <li><p>If the <code><a href=#the-canvas-element>canvas</a></code> element has no <a href=#hit-region-list>hit region list</a>, then act as normal
    and abort these steps.</li>
@@ -59077,7 +59083,58 @@
    <li><p>Continue dispatching the event, but with the updated event object and target as given in
    the above steps.</li>
 
-  </ol><hr><p>When a user's pointing device cursor is positioned over a <code><a href=#the-canvas-element>canvas</a></code> element, user
+  </ol><hr></div>
+
+  <p>The <code><a href=#touch>Touch</a></code> interface is extended to support hit regions also: <a href=#refsTOUCH>[TOUCH]</a></p>
+
+  <pre class=idl>partial interface <a href=#touch id=Touch-partial>Touch</a> {
+  readonly attribute DOMString? <a href=#dom-touch-region title=dom-Touch-region>region</a>;
+};</pre>
+
+  <dl class=domintro><dt><var title="">touch</var> . <code title=dom-Touch-region><a href=#dom-touch-region>region</a></code></dt>
+
+   <dd>
+
+    <p>If the <a href=#touch-point>touch point</a> was over a <a href=#hit-region>hit region</a> when it was first placed
+    on the surface, then this returns the <a href="#hit-region's-id">hit region's ID</a>, if it has one.</p>
+
+    <p>Otherwise, returns null.</p>
+
+   </dd>
+
+  </dl><div class=impl>
+
+  <p>The <dfn id=dom-touch-region title=dom-Touch-region><code>region</code></dfn> attribute on a <code><a href=#touch>Touch</a></code>
+  object representing a <a href=#touch-point>touch point</a> <var title="">T</var> must return the value
+  obtained by running the following algorithm when <var title="">T</var> was first placed on the
+  surface: <a href=#refsTOUCH>[TOUCH]</a></p>
+
+  <ol><li><p>If the <a href=#touch-point>touch point</a> is not on a pixel on the <code><a href=#the-canvas-element>canvas</a></code>, then return
+   null and abort these steps.</li>
+
+   <li><p>If the <code><a href=#the-canvas-element>canvas</a></code> element has no <a href=#hit-region-list>hit region list</a>, then return null
+   and abort these steps.</li>
+
+   <li><p>Let <var title="">pixel</var> be the pixel that the <a href=#touch-point>touch point</a> is
+   on.</li>
+
+   <li><p>Let <var title="">region</var> be the <a href=#hit-region>hit region</a> that is <a href=#the-region-for-a-pixel title="the
+   region for a pixel">the region for the pixel</a> <var title="">pixel</var> on this
+   <code><a href=#the-canvas-element>canvas</a></code> element's bitmap, if any.</li>
+
+   <li><p>If there is no <var title="">region</var>, then return null and abort these
+   steps.</li>
+
+   <li><p>Let <var title="">id</var> be the <var title="">region</var>'s <a href="#hit-region's-id" title="hit region's
+   ID">ID</a>, if any, or else null.</li>
+
+   <li><p>Return <var title="">id</var>.</li>
+
+  </ol></div>
+
+  <div class=impl>
+
+  <hr><p>When a user's pointing device cursor is positioned over a <code><a href=#the-canvas-element>canvas</a></code> element, user
   agents should render the pointing device cursor according to the cursor specification described by
   <a href=#the-cursor-for-a-hit-region title="the cursor for a hit region">the cursor for the hit region</a> that is <a href=#the-region-for-a-pixel title="the region for a pixel">the region for the pixel</a> that the pointing device designates
   on the <code><a href=#the-canvas-element>canvas</a></code> element's bitmap.</p>
@@ -103487,6 +103544,7 @@
    <li><code><a href=#texttrackcuelist>TextTrackCueList</a></code>
    <li><code><a href=#texttracklist>TextTrackList</a></code>
    <li><code><a href=#timeranges>TimeRanges</a></code>
+   <li><code>Touch</code>, <a href=#Touch-partial>partial</a>
    <li><code><a href=#trackevent>TrackEvent</a></code>
    <li><code><a href=#validitystate>ValidityState</a></code>
    <li><code><a href=#videotrack>VideoTrack</a></code>
@@ -104095,6 +104153,9 @@
    <dt id=refsTOR>[TOR]</dt>
    <dd>(Non-normative) <cite><a href=https://www.torproject.org/>Tor</a></cite>.</dd>
 
+   <dt id=refsTOUCH>[TOUCH]</dt>
+   <dd><cite><a href=https://dvcs.w3.org/hg/webevents/raw-file/v1/touchevents.html>Touch Events</a></cite>, D. Schepers, S. Moon, M. Brubeck, A. Barstow. W3C.</dd>
+
    <dt id=refsTZDATABASE>[TZDATABASE]</dt>
    <dd>(Non-normative) <cite><a href=http://www.iana.org/time-zones>Time Zone Database</a></cite>. IANA.</dd>
 

Modified: index
===================================================================
--- index	2014-03-14 23:10:36 UTC (rev 8545)
+++ index	2014-03-14 23:56:20 UTC (rev 8546)
@@ -3808,6 +3808,12 @@
      <li><dfn id=event-keyup title=event-keyup><code>keyup</code></dfn> event</li>
      <li><dfn id=event-keypress title=event-keypress><code>keypress</code></dfn> event</li>
 
+    </ul><p>The following features are defined in the Touch Events specification: <a href=#refsTOUCH>[TOUCH]</a></p>
+
+    <ul class=brief><li><dfn id=touch><code>Touch</code></dfn> interface</li>
+
+     <li><dfn id=touch-point>Touch point</dfn> concept</li>
+
     </ul><p>This specification sometimes uses the term <dfn title="">name</dfn> to refer to the event's
     <code title=dom-event-type>type</code>; as in, "an event named <code title="">click</code>"
     or "if the event name is <code title="">keypress</code>". The terms "name" and "type" for
@@ -59048,8 +59054,8 @@
   say to <i>act as normal</i>, that means that the event must be fired as it would have had these
   requirements not been applied.</p>
 
-  <ol><li><p>If the pointing device is not indicating a pixel on the <code><a href=#the-canvas-element>canvas</a></code>, act as normal
-   and abort these steps.</li>
+  <ol><li><p>If the pointing device is not indicating a pixel on the <code><a href=#the-canvas-element>canvas</a></code>, then act as
+   normal and abort these steps.</li>
 
    <li><p>If the <code><a href=#the-canvas-element>canvas</a></code> element has no <a href=#hit-region-list>hit region list</a>, then act as normal
    and abort these steps.</li>
@@ -59077,7 +59083,58 @@
    <li><p>Continue dispatching the event, but with the updated event object and target as given in
    the above steps.</li>
 
-  </ol><hr><p>When a user's pointing device cursor is positioned over a <code><a href=#the-canvas-element>canvas</a></code> element, user
+  </ol><hr></div>
+
+  <p>The <code><a href=#touch>Touch</a></code> interface is extended to support hit regions also: <a href=#refsTOUCH>[TOUCH]</a></p>
+
+  <pre class=idl>partial interface <a href=#touch id=Touch-partial>Touch</a> {
+  readonly attribute DOMString? <a href=#dom-touch-region title=dom-Touch-region>region</a>;
+};</pre>
+
+  <dl class=domintro><dt><var title="">touch</var> . <code title=dom-Touch-region><a href=#dom-touch-region>region</a></code></dt>
+
+   <dd>
+
+    <p>If the <a href=#touch-point>touch point</a> was over a <a href=#hit-region>hit region</a> when it was first placed
+    on the surface, then this returns the <a href="#hit-region's-id">hit region's ID</a>, if it has one.</p>
+
+    <p>Otherwise, returns null.</p>
+
+   </dd>
+
+  </dl><div class=impl>
+
+  <p>The <dfn id=dom-touch-region title=dom-Touch-region><code>region</code></dfn> attribute on a <code><a href=#touch>Touch</a></code>
+  object representing a <a href=#touch-point>touch point</a> <var title="">T</var> must return the value
+  obtained by running the following algorithm when <var title="">T</var> was first placed on the
+  surface: <a href=#refsTOUCH>[TOUCH]</a></p>
+
+  <ol><li><p>If the <a href=#touch-point>touch point</a> is not on a pixel on the <code><a href=#the-canvas-element>canvas</a></code>, then return
+   null and abort these steps.</li>
+
+   <li><p>If the <code><a href=#the-canvas-element>canvas</a></code> element has no <a href=#hit-region-list>hit region list</a>, then return null
+   and abort these steps.</li>
+
+   <li><p>Let <var title="">pixel</var> be the pixel that the <a href=#touch-point>touch point</a> is
+   on.</li>
+
+   <li><p>Let <var title="">region</var> be the <a href=#hit-region>hit region</a> that is <a href=#the-region-for-a-pixel title="the
+   region for a pixel">the region for the pixel</a> <var title="">pixel</var> on this
+   <code><a href=#the-canvas-element>canvas</a></code> element's bitmap, if any.</li>
+
+   <li><p>If there is no <var title="">region</var>, then return null and abort these
+   steps.</li>
+
+   <li><p>Let <var title="">id</var> be the <var title="">region</var>'s <a href="#hit-region's-id" title="hit region's
+   ID">ID</a>, if any, or else null.</li>
+
+   <li><p>Return <var title="">id</var>.</li>
+
+  </ol></div>
+
+  <div class=impl>
+
+  <hr><p>When a user's pointing device cursor is positioned over a <code><a href=#the-canvas-element>canvas</a></code> element, user
   agents should render the pointing device cursor according to the cursor specification described by
   <a href=#the-cursor-for-a-hit-region title="the cursor for a hit region">the cursor for the hit region</a> that is <a href=#the-region-for-a-pixel title="the region for a pixel">the region for the pixel</a> that the pointing device designates
   on the <code><a href=#the-canvas-element>canvas</a></code> element's bitmap.</p>
@@ -103487,6 +103544,7 @@
    <li><code><a href=#texttrackcuelist>TextTrackCueList</a></code>
    <li><code><a href=#texttracklist>TextTrackList</a></code>
    <li><code><a href=#timeranges>TimeRanges</a></code>
+   <li><code>Touch</code>, <a href=#Touch-partial>partial</a>
    <li><code><a href=#trackevent>TrackEvent</a></code>
    <li><code><a href=#validitystate>ValidityState</a></code>
    <li><code><a href=#videotrack>VideoTrack</a></code>
@@ -104095,6 +104153,9 @@
    <dt id=refsTOR>[TOR]</dt>
    <dd>(Non-normative) <cite><a href=https://www.torproject.org/>Tor</a></cite>.</dd>
 
+   <dt id=refsTOUCH>[TOUCH]</dt>
+   <dd><cite><a href=https://dvcs.w3.org/hg/webevents/raw-file/v1/touchevents.html>Touch Events</a></cite>, D. Schepers, S. Moon, M. Brubeck, A. Barstow. W3C.</dd>
+
    <dt id=refsTZDATABASE>[TZDATABASE]</dt>
    <dd>(Non-normative) <cite><a href=http://www.iana.org/time-zones>Time Zone Database</a></cite>. IANA.</dd>
 

Modified: source
===================================================================
--- source	2014-03-14 23:10:36 UTC (rev 8545)
+++ source	2014-03-14 23:56:20 UTC (rev 8546)
@@ -2539,6 +2539,17 @@
 
     </ul>
 
+    <p>The following features are defined in the Touch Events specification: <a
+    href="#refsTOUCH">[TOUCH]</a></p>
+
+    <ul class="brief">
+
+     <li><dfn><code>Touch</code></dfn> interface</li>
+
+     <li><dfn>Touch point</dfn> concept</li>
+
+    </ul>
+
     <p>This specification sometimes uses the term <dfn data-x="">name</dfn> to refer to the event's
     <code data-x="dom-event-type">type</code>; as in, "an event named <code data-x="">click</code>"
     or "if the event name is <code data-x="">keypress</code>". The terms "name" and "type" for
@@ -65756,8 +65767,8 @@
 
   <ol>
 
-   <li><p>If the pointing device is not indicating a pixel on the <code>canvas</code>, act as normal
-   and abort these steps.</p></li>
+   <li><p>If the pointing device is not indicating a pixel on the <code>canvas</code>, then act as
+   normal and abort these steps.</p></li>
 
    <li><p>If the <code>canvas</code> element has no <span>hit region list</span>, then act as normal
    and abort these steps.</p></li>
@@ -65791,6 +65802,68 @@
 
   <hr>
 
+  </div>
+
+  <p>The <code>Touch</code> interface is extended to support hit regions also: <a
+  href="#refsTOUCH">[TOUCH]</a></p>
+
+  <pre class="idl">partial interface <span id="Touch-partial">Touch</span> {
+  readonly attribute DOMString? <span data-x="dom-Touch-region">region</span>;
+};</pre>
+
+  <dl class="domintro">
+
+   <dt><var data-x="">touch</var> . <code data-x="dom-Touch-region">region</code></dt>
+
+   <dd>
+
+    <p>If the <span>touch point</span> was over a <span>hit region</span> when it was first placed
+    on the surface, then this returns the <span>hit region's ID</span>, if it has one.</p>
+
+    <p>Otherwise, returns null.</p>
+
+   </dd>
+
+  </dl>
+
+  <div class="impl">
+
+  <p>The <dfn data-x="dom-Touch-region"><code>region</code></dfn> attribute on a <code>Touch</code>
+  object representing a <span>touch point</span> <var data-x="">T</var> must return the value
+  obtained by running the following algorithm when <var data-x="">T</var> was first placed on the
+  surface: <a href="#refsTOUCH">[TOUCH]</a></p>
+
+  <ol>
+
+   <li><p>If the <span>touch point</span> is not on a pixel on the <code>canvas</code>, then return
+   null and abort these steps.</p></li>
+
+   <li><p>If the <code>canvas</code> element has no <span>hit region list</span>, then return null
+   and abort these steps.</p></li>
+
+   <li><p>Let <var data-x="">pixel</var> be the pixel that the <span>touch point</span> is
+   on.</p></li>
+
+   <li><p>Let <var data-x="">region</var> be the <span>hit region</span> that is <span data-x="the
+   region for a pixel">the region for the pixel</span> <var data-x="">pixel</var> on this
+   <code>canvas</code> element's bitmap, if any.</p></li>
+
+   <li><p>If there is no <var data-x="">region</var>, then return null and abort these
+   steps.</p></li>
+
+   <li><p>Let <var data-x="">id</var> be the <var data-x="">region</var>'s <span data-x="hit region's
+   ID">ID</span>, if any, or else null.</p></li>
+
+   <li><p>Return <var data-x="">id</var>.</p></li>
+
+  </ol>
+
+  </div>
+
+  <div class="impl">
+
+  <hr>
+
   <p>When a user's pointing device cursor is positioned over a <code>canvas</code> element, user
   agents should render the pointing device cursor according to the cursor specification described by
   <span data-x="the cursor for a hit region">the cursor for the hit region</span> that is <span




More information about the Commit-Watchers mailing list