touchevents.html
author Matt Brubeck <mbrubeck@mozilla.com>
Tue, 12 Apr 2011 10:37:14 -0700
changeset 35 8624a3d5cbd7
parent 34 96b646535d4e
child 36 0834dbef202f
permissions -rw-r--r--
ISSUE-9: Interaction of touch events and mouse events

Specify that touchstart must be dispatched before any mouse events, as this
allows for useful interoperability techniques. For discussion, see:
http://lists.w3.org/Archives/Public/public-webevents/2011AprJun/0009.html
4
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
     1
<!DOCTYPE html>
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
     2
<html>
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
     3
  <head>
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
     4
    <title>Touch Events Specification</title>
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
     5
    <meta http-equiv='Content-Type' content='text/html;charset=utf-8'/>
20
3a04fe9b8ef2 Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 19
diff changeset
     6
    <!--
4
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
     7
      === NOTA BENE ===
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
     8
      For the three scripts below, if your spec resides on dev.w3 you can check them
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
     9
      out in the same tree and use relative links so that they'll work offline,
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    10
     -->
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    11
    <script src='http://dev.w3.org/2009/dap/ReSpec.js/js/respec.js' class='remove'></script>
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    12
    <script class='remove'>
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    13
      var respecConfig = {
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    14
          // specification status (e.g. WD, LCWD, NOTE, etc.). If in doubt use ED.
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    15
          specStatus:           "ED",
20
3a04fe9b8ef2 Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 19
diff changeset
    16
4
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    17
          // the specification's short name, as in http://www.w3.org/TR/short-name/
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    18
          shortName:            "touch-events",
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    19
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    20
          // if your specification has a subtitle that goes below the main
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    21
          // formal title, define it here
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    22
          // subtitle   :  "an excellent document",
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    23
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    24
          // if you wish the publication date to be other than today, set this
32
f1cd4dbbd6f8 Wrap these lines to 80 characters.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 31
diff changeset
    25
          publishDate:  "2011-04-12",
4
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    26
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    27
          // if the specification's copyright date is a range of years, specify
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    28
          // the start date here:
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    29
          // copyrightStart: "2005"
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    30
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    31
          // if there is a previously published draft, uncomment this and set its YYYY-MM-DD date
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    32
          // and its maturity status
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    33
          // previousPublishDate:  "1977-03-15",
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    34
          // previousMaturity:  "WD",
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    35
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    36
          // if there a publicly available Editor's Draft, this is the link
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
    37
          edDraftURI:           "http://dvcs.w3.org/hg/webevents/raw-file/tip/touchevents.html",
4
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    38
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    39
          // if this is a LCWD, uncomment and set the end of its review period
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    40
          // lcEnd: "2009-08-05",
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    41
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    42
          // if you want to have extra CSS, append them to this list
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    43
          // it is recommended that the respec.css stylesheet be kept
8
3349d49e5f46 added force attribute; added issues around InkML, units, preventDefault(), timestamp
shepazu <schepers@w3.org>
parents: 7
diff changeset
    44
          extraCSS:             ["http://www.w3.org/StyleSheets/TR/W3C-TR.css", "http://dev.w3.org/2009/dap/ReSpec.js/css/respec.css"],
4
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    45
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    46
          // editors, add as many as you like
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    47
          // only "name" is required
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    48
          editors:  [
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    49
              { name: "Doug Schepers", url: "http://schepers.cc/",
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    50
                company: "W3C", companyURL: "http://w3.org/" },
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
    51
              { name: "Sangwhan Moon",
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
    52
                company: "Opera Software ASA", companyURL: "http://www.opera.com/" },
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
    53
              { name: "Matt Brubeck",
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
    54
                company: "Mozilla", companyURL: "http://www.mozilla.org/" },
4
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    55
          ],
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    56
20
3a04fe9b8ef2 Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 19
diff changeset
    57
          // authors, add as many as you like.
4
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    58
          // This is optional, uncomment if you have authors as well as editors.
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    59
          // only "name" is required. Same format as editors.
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    60
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    61
          //authors:  [
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    62
          //    { name: "Your Name", url: "http://example.org/",
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    63
          //      company: "Your Company", companyURL: "http://example.com/" },
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    64
          //],
20
3a04fe9b8ef2 Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 19
diff changeset
    65
4
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    66
          // name of the WG
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    67
          wg:           "Web Events Working Group",
20
3a04fe9b8ef2 Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 19
diff changeset
    68
4
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    69
          // URI of the public WG page
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    70
          wgURI:        "http://www.w3.org/2010/webevents/",
20
3a04fe9b8ef2 Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 19
diff changeset
    71
4
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    72
          // name (with the @w3c.org) of the public mailing to which comments are due
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    73
          wgPublicList: "public-webevents",
20
3a04fe9b8ef2 Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 19
diff changeset
    74
4
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    75
          // URI of the patent status for this WG, for Rec-track documents
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    76
          // !!!! IMPORTANT !!!!
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    77
          // This is important for Rec-track documents, do not copy a patent URI from a random
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    78
          // document unless you know what you're doing. If in doubt ask your friendly neighbourhood
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    79
          // Team Contact.
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    80
          wgPatentURI:  "http://www.w3.org/2004/01/pp-impl/45559/status",
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    81
      };
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    82
    </script>
20
3a04fe9b8ef2 Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 19
diff changeset
    83
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
    84
    <style>
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
    85
      .event {
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
    86
        font-family: monospace;
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
    87
        color: #459900;
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
    88
      }
23
4958878564b1 ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 22
diff changeset
    89
4958878564b1 ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 22
diff changeset
    90
      pre.idl {
4958878564b1 ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 22
diff changeset
    91
        white-space: pre-wrap;
4958878564b1 ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 22
diff changeset
    92
      }
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
    93
    </style>
4
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    94
  </head>
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    95
  <body>
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    96
    <section id='abstract'>
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
    97
      The Touch Interface specification defines a set of low-level events that represent one or more points of contact with a touch-sensitive surface, and changes of those points with respect to the surface and any DOM elements displayed upon it (e.g. for touch screens) or associated with it (e.g. for drawing tablets without displays).  It also addresses pen-tablet devices, such as drawing tablets, with consideration toward stylus capabilities.
4
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
    98
    </section>
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
    99
28
4cbcb68446b5 First draft of a Conformance section based on the DAP WG's Contacts API:
Art Barstow <art.barstow@nokia.com>
parents: 27
diff changeset
   100
    <section id='conformance'>
4cbcb68446b5 First draft of a Conformance section based on the DAP WG's Contacts API:
Art Barstow <art.barstow@nokia.com>
parents: 27
diff changeset
   101
4cbcb68446b5 First draft of a Conformance section based on the DAP WG's Contacts API:
Art Barstow <art.barstow@nokia.com>
parents: 27
diff changeset
   102
      <p>This specification defines conformance criteria that apply to a single product: the <dfn id="dfn-user-agent">user agent</dfn> that implements the interfaces that it contains. </p>
4cbcb68446b5 First draft of a Conformance section based on the DAP WG's Contacts API:
Art Barstow <art.barstow@nokia.com>
parents: 27
diff changeset
   103
4cbcb68446b5 First draft of a Conformance section based on the DAP WG's Contacts API:
Art Barstow <art.barstow@nokia.com>
parents: 27
diff changeset
   104
      <p>Implementations that use ECMAScript to implement the APIs defined in this specification must implement them in a manner consistent with the ECMAScript Bindings defined in the Web IDL specification [[!WEBIDL]] as this specification uses that specification and terminology.  </p>
4cbcb68446b5 First draft of a Conformance section based on the DAP WG's Contacts API:
Art Barstow <art.barstow@nokia.com>
parents: 27
diff changeset
   105
4cbcb68446b5 First draft of a Conformance section based on the DAP WG's Contacts API:
Art Barstow <art.barstow@nokia.com>
parents: 27
diff changeset
   106
      <p> A conforming implementation is required to implement all fields defined in this specification. </p>
4cbcb68446b5 First draft of a Conformance section based on the DAP WG's Contacts API:
Art Barstow <art.barstow@nokia.com>
parents: 27
diff changeset
   107
4cbcb68446b5 First draft of a Conformance section based on the DAP WG's Contacts API:
Art Barstow <art.barstow@nokia.com>
parents: 27
diff changeset
   108
    </section>
20
3a04fe9b8ef2 Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 19
diff changeset
   109
4
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
   110
    <section>
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
   111
      <h2><a>TouchPoint</a> Interface</h2>
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   112
      <p>This interface defines an individual point of contact for a touch event.</p>
20
3a04fe9b8ef2 Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 19
diff changeset
   113
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   114
      <dl title='interface TouchPoint' class='idl'>
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
   115
        <dt>readonly attribute long identifier</dt>
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   116
        <dd>
12
183be84c0a6c defined 'touch point'
shepazu <schepers@w3.org>
parents: 11
diff changeset
   117
          An identification number for each <a>touch point</a>, unique to that <a>touch point</a> per session.
20
3a04fe9b8ef2 Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 19
diff changeset
   118
10
bad00fb0d663 added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents: 9
diff changeset
   119
          <p>The algorithm for determining the <a>identifier</a> value is as follows:</p>
bad00fb0d663 added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents: 9
diff changeset
   120
          <ol>
bad00fb0d663 added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents: 9
diff changeset
   121
            <li>if there are no other <a>active touch event session</a>s, the value of <a>identifier</a> must be <code>0</code></li>
bad00fb0d663 added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents: 9
diff changeset
   122
            <li>if there is at least one <a>active touch event session</a>, the value of <a>identifier</a> must be the lowest integer not currently used by any active <a>TouchPoint</a> object in any <a>active touch event session</a></li>
19
f6cda6b9d1ae ISSUE-7: Event targets should be Elements.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 18
diff changeset
   123
          </ol>
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   124
        </dd>
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   125
        <dt>readonly attribute EventTarget target</dt>
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   126
        <dd>
19
f6cda6b9d1ae ISSUE-7: Event targets should be Elements.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 18
diff changeset
   127
          the original proximal event target for this <a>touch point</a>.  The target must be an <a>Element</a>.
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   128
        </dd>
10
bad00fb0d663 added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents: 9
diff changeset
   129
        <dt>readonly attribute DOMTimeStamp timestamp</dt>
bad00fb0d663 added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents: 9
diff changeset
   130
        <dd>
bad00fb0d663 added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents: 9
diff changeset
   131
          The <a>timestamp</a> attribute represents the time when the <a>TouchPoint</a> was initiated and is represented as a DOMTimeStamp [[!DOM-LEVEL-3-CORE]].
bad00fb0d663 added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents: 9
diff changeset
   132
          <p class="issue" id="issue-timestamp-format"><strong>Issue:</strong> should we align to timestamp as defined in the <a href="http://dev.w3.org/geo/api/#timestamp">Geolocation API spec</a> (as above), or with the datetime as defined in the <a href="http://dev.w3.org/html5/spec/edits.html#attr-mod-datetime">HTML5 spec</a> (attribute DOMString dateTime, where datetime is a <a href="http://dev.w3.org/html5/spec/common-microsyntaxes.html#valid-global-date-and-time-string">valid global date and time string</a>), or to something else (see <a href="http://lists.w3.org/Archives/Public/www-dom/2010OctDec/0069.html">this thread on Event.timeStamp</a>)?</p>
20
3a04fe9b8ef2 Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 19
diff changeset
   133
10
bad00fb0d663 added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents: 9
diff changeset
   134
          <p class="issue" id="issue-timestamp"><strong>Issue:</strong> Should each touchpoint have its own timestamp?  Or should we leave timestamps up to script authors?  My feeling is that having implicit timestamps may be useful in defining an author-defined gesture-like mapping between low-level and high-level events (e.g. a swipe vs. drag speed threshold expressed as the difference in timestamps)</p>
20
3a04fe9b8ef2 Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 19
diff changeset
   135
        </dd>
4
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
   136
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
   137
        <dt>readonly attribute long screenX</dt>
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   138
        <dd>
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   139
          x-coordinate of point relative to the screen
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   140
        </dd>
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
   141
        <dt>readonly attribute long screenY</dt>
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   142
        <dd>
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   143
          y-coordinate of point relative to the screen
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   144
        </dd>
4
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
   145
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
   146
        <dt>readonly attribute long clientX</dt>
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   147
        <dd>
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   148
          x-coordinate of point relative to the viewport, excluding any scroll offset
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   149
        </dd>
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
   150
        <dt>readonly attribute long clientY</dt>
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   151
        <dd>
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   152
          y-coordinate of point relative to the viewport, excluding any scroll offset
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   153
        </dd>
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   154
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
   155
        <dt>readonly attribute long pageX</dt>
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   156
        <dd>
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   157
          x-coordinate of point relative to the viewport, including any scroll offset
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   158
        </dd>
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
   159
        <dt>readonly attribute long pageY</dt>
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   160
        <dd>
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   161
          y-coordinate of point relative to the viewport, including any scroll offset
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   162
        </dd>
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   163
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
   164
        <dt>readonly attribute long radiusX</dt>
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   165
        <dd>
31
80a964ec062b Remove "This attribute may not be available..." disclaimers.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 30
diff changeset
   166
          the radius of the ellipse which most closely circumscribes the touching area (e.g. finger, stylus) along the x-axis, in pixels of the same scale as <a>screenX</a>; <code>1</code> if no value is known.
10
bad00fb0d663 added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents: 9
diff changeset
   167
          <p class="issue" id="issue-units"><strong>Issue:</strong> What are units of radiusX/radiusY?  CSS Pixels?</p>
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   168
        </dd>
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
   169
        <dt>readonly attribute long radiusY</dt>
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   170
        <dd>
31
80a964ec062b Remove "This attribute may not be available..." disclaimers.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 30
diff changeset
   171
          the radius of the ellipse which most closely circumscribes the touching area (e.g. finger, stylus) along the y-axis, in pixels of the same scale as <a>screenY</a>; <code>1</code> if no value is known.
6
83ce29dff849 changed cx/cy to rx/ry, defined units for both; added key modifier attributes; changed identifier to float
shepazu <schepers@w3.org>
parents: 5
diff changeset
   172
        </dd>
83ce29dff849 changed cx/cy to rx/ry, defined units for both; added key modifier attributes; changed identifier to float
shepazu <schepers@w3.org>
parents: 5
diff changeset
   173
18
1ea45991d3e9 ISSUE-1: Add rotationAngle attribute for elliptical touch areas.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 17
diff changeset
   174
        <dt>readonly attribute float rotationAngle</dt>
1ea45991d3e9 ISSUE-1: Add rotationAngle attribute for elliptical touch areas.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 17
diff changeset
   175
        <dd>
32
f1cd4dbbd6f8 Wrap these lines to 80 characters.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 31
diff changeset
   176
          <p>
f1cd4dbbd6f8 Wrap these lines to 80 characters.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 31
diff changeset
   177
            the angle (in degrees) that the ellipse described by <a>radiusX</a>
f1cd4dbbd6f8 Wrap these lines to 80 characters.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 31
diff changeset
   178
            and <a>radiusY</a> is rotated clockwise about its center;
33
be8b19639be5 ACTION-31: Remove restriction on rotationAngle and add explanation.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 32
diff changeset
   179
            <code>0</code> if no value is known.  The value must be greater
be8b19639be5 ACTION-31: Remove restriction on rotationAngle and add explanation.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 32
diff changeset
   180
            than or equal to <code>0</code> and less than <code>90</code>.
32
f1cd4dbbd6f8 Wrap these lines to 80 characters.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 31
diff changeset
   181
          </p>
f1cd4dbbd6f8 Wrap these lines to 80 characters.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 31
diff changeset
   182
          <p>
f1cd4dbbd6f8 Wrap these lines to 80 characters.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 31
diff changeset
   183
            If the ellipse described by <a>radiusX</a> and <a>radiusY</a> is
33
be8b19639be5 ACTION-31: Remove restriction on rotationAngle and add explanation.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 32
diff changeset
   184
            circular, then <a>rotationAngle</a> has no effect.  The user agent
be8b19639be5 ACTION-31: Remove restriction on rotationAngle and add explanation.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 32
diff changeset
   185
            may use <code>0</code> as the value in this case, or it may use any
be8b19639be5 ACTION-31: Remove restriction on rotationAngle and add explanation.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 32
diff changeset
   186
            other value in the allowed range.  (For example, the user agent may
be8b19639be5 ACTION-31: Remove restriction on rotationAngle and add explanation.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 32
diff changeset
   187
            use the value from the previous touch event, to avoid sudden
be8b19639be5 ACTION-31: Remove restriction on rotationAngle and add explanation.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 32
diff changeset
   188
            changes in value.)
32
f1cd4dbbd6f8 Wrap these lines to 80 characters.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 31
diff changeset
   189
          </p>
18
1ea45991d3e9 ISSUE-1: Add rotationAngle attribute for elliptical touch areas.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 17
diff changeset
   190
        </dd>
1ea45991d3e9 ISSUE-1: Add rotationAngle attribute for elliptical touch areas.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 17
diff changeset
   191
8
3349d49e5f46 added force attribute; added issues around InkML, units, preventDefault(), timestamp
shepazu <schepers@w3.org>
parents: 7
diff changeset
   192
        <dt>readonly attribute float force</dt>
3349d49e5f46 added force attribute; added issues around InkML, units, preventDefault(), timestamp
shepazu <schepers@w3.org>
parents: 7
diff changeset
   193
        <dd>
31
80a964ec062b Remove "This attribute may not be available..." disclaimers.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 30
diff changeset
   194
          a relative value of pressure applied, in the range <code>0</code> to <code>1</code>, where <code>0</code> is no pressure, and <code>1</code> is the highest level of pressure the touch device is capable of sensing; <code>0</code> if no value is known.  In environments where <a>force</a> is known, the absolute pressure represented by the <a>force</a> attribute, and the sensitivity in levels of pressure, may vary.
10
bad00fb0d663 added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents: 9
diff changeset
   195
bad00fb0d663 added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents: 9
diff changeset
   196
          <p class="issue" id="issue-inkml"><strong>Issue:</strong> Consider aligning with other "channels" and values from <a href="http://www.w3.org/TR/InkML/#channelContents">Ink Markup Language (InkML)</a>, in addition to <a>force</a>, e.g. adding <a>angle</a>, <a>clientZ</a>, <a>rotation</a>, etc.</p>
8
3349d49e5f46 added force attribute; added issues around InkML, units, preventDefault(), timestamp
shepazu <schepers@w3.org>
parents: 7
diff changeset
   197
        </dd>
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   198
      </dl>
20
3a04fe9b8ef2 Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 19
diff changeset
   199
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   200
    </section>
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   201
20
3a04fe9b8ef2 Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 19
diff changeset
   202
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   203
    <section>
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
   204
      <h2><a>TouchList</a> Interface</h2>
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   205
      <p>This interface defines a list of individual points of contact for a touch event.</p>
20
3a04fe9b8ef2 Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 19
diff changeset
   206
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   207
      <dl title='interface TouchList' class='idl'>
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   208
        <dt>readonly attribute unsigned long length</dt>
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   209
        <dd>
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   210
          returns the number of touchpoints in the list
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   211
        </dd>
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
   212
        <dt>caller getter <a>TouchPoint</a> item (in unsigned long <a>index</a>)</dt>
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   213
        <dd>
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
   214
          returns the touchpoint with index <a>index</a> from the list, sorted in order from latest to earliest
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   215
        </dd>
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
   216
        <dt>caller getter object identifiedPoint (in long <a>identifier</a>)</dt>
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   217
        <dd>
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
   218
          returns the first touchpoint with long <a>identifier</a> from the list
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   219
        </dd>
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   220
      </dl>
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   221
    </section>
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   222
20
3a04fe9b8ef2 Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 19
diff changeset
   223
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   224
    <section>
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
   225
      <h2><a>TouchEvent</a> Interface</h2>
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
   226
      <p>This interface defines the <a>touchstart</a>, <a>touchend</a>, <a>touchmove</a>, <a>touchenter</a>, <a>touchleave</a>, and <a>touchcancel</a> event types.</p>
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   227
6
83ce29dff849 changed cx/cy to rx/ry, defined units for both; added key modifier attributes; changed identifier to float
shepazu <schepers@w3.org>
parents: 5
diff changeset
   228
      <dl title='interface TouchEvent : UIEvent' class='idl'>
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
   229
        <dt>readonly attribute <a>TouchList</a> touches</dt>
4
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
   230
        <dd>
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
   231
          a list of <a>TouchPoint</a>s for every point of contact currently touching the surface
4
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
   232
        </dd>
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
   233
        <dt>readonly attribute <a>TouchList</a> targetTouches</dt>
4
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
   234
        <dd>
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
   235
          a list of <a>TouchPoint</a>s for every point of contact currently touching the surface, which started on the same target
4
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
   236
        </dd>
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
   237
        <dt>readonly attribute <a>TouchList</a> changedTouches</dt>
4
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
   238
        <dd>
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
   239
          a list of <a>TouchPoint</a>s for every point of contact which contributed to the event
4
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
   240
        </dd>
23
4958878564b1 ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 22
diff changeset
   241
30
795c0f6c44e7 ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents: 29
diff changeset
   242
        <dt>readonly attribute boolean altKey</dt>
795c0f6c44e7 ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents: 29
diff changeset
   243
        <dd>
795c0f6c44e7 ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents: 29
diff changeset
   244
          <code>true</code> if the alt (Alternate) key modifier is activated; otherwise <code>false</code>
795c0f6c44e7 ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents: 29
diff changeset
   245
        </dd>
795c0f6c44e7 ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents: 29
diff changeset
   246
        <dt>readonly attribute boolean metaKey</dt>
795c0f6c44e7 ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents: 29
diff changeset
   247
        <dd>
795c0f6c44e7 ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents: 29
diff changeset
   248
          <code>true</code> if the meta (Meta) key modifier is activated; otherwise <code>false</code>.  On some platforms this attribute may map to a differently-named key modifier.
795c0f6c44e7 ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents: 29
diff changeset
   249
        </dd>
795c0f6c44e7 ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents: 29
diff changeset
   250
        <dt>readonly attribute boolean ctrlKey</dt>
795c0f6c44e7 ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents: 29
diff changeset
   251
        <dd>
795c0f6c44e7 ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents: 29
diff changeset
   252
          <code>true</code> if the ctrl (Control) key modifier is activated; otherwise <code>false</code>
795c0f6c44e7 ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents: 29
diff changeset
   253
        </dd>
795c0f6c44e7 ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents: 29
diff changeset
   254
        <dt>readonly attribute boolean shiftKey</dt>
795c0f6c44e7 ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents: 29
diff changeset
   255
        <dd>
795c0f6c44e7 ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents: 29
diff changeset
   256
          <code>true</code> if the shift (Shift) key modifier is activated; otherwise <code>false</code>
795c0f6c44e7 ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents: 29
diff changeset
   257
        </dd>
795c0f6c44e7 ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents: 29
diff changeset
   258
23
4958878564b1 ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 22
diff changeset
   259
        <!-- Methods -->
4958878564b1 ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 22
diff changeset
   260
        <dt>void initTouchEvent()</dt>
4958878564b1 ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 22
diff changeset
   261
        <dd>
4958878564b1 ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 22
diff changeset
   262
          initializes a TouchEvent created through the <a>DocumentEvent</a> interface.
4958878564b1 ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 22
diff changeset
   263
          <dl class='parameters'>
4958878564b1 ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 22
diff changeset
   264
            <dt>DOMString type</dt> <dd></dd>
4958878564b1 ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 22
diff changeset
   265
            <dt>boolean canBubble</dt> <dd></dd>
4958878564b1 ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 22
diff changeset
   266
            <dt>boolean cancelable</dt> <dd></dd>
4958878564b1 ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 22
diff changeset
   267
            <dt>DOMWindow view</dt> <dd></dd>
4958878564b1 ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 22
diff changeset
   268
            <dt>long detail</dt> <dd></dd>
4958878564b1 ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 22
diff changeset
   269
            <dt>boolean ctrlKey</dt> <dd></dd>
4958878564b1 ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 22
diff changeset
   270
            <dt>boolean altKey</dt> <dd></dd>
4958878564b1 ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 22
diff changeset
   271
            <dt>boolean shiftKey</dt> <dd></dd>
4958878564b1 ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 22
diff changeset
   272
            <dt>boolean metaKey</dt> <dd></dd>
4958878564b1 ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 22
diff changeset
   273
            <dt>TouchList touches</dt> <dd></dd>
4958878564b1 ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 22
diff changeset
   274
            <dt>TouchList targetTouches</dt> <dd></dd>
4958878564b1 ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 22
diff changeset
   275
            <dt>TouchList changedTouches</dt> <dd></dd>
4958878564b1 ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 22
diff changeset
   276
          </dl>
4958878564b1 ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 22
diff changeset
   277
        </dd>
4
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
   278
      </dl>
8
3349d49e5f46 added force attribute; added issues around InkML, units, preventDefault(), timestamp
shepazu <schepers@w3.org>
parents: 7
diff changeset
   279
3349d49e5f46 added force attribute; added issues around InkML, units, preventDefault(), timestamp
shepazu <schepers@w3.org>
parents: 7
diff changeset
   280
      <p class="issue" id="issue-preventDefault"><strong>Issue:</strong> define behavior of preventDefault() method.</p>
3349d49e5f46 added force attribute; added issues around InkML, units, preventDefault(), timestamp
shepazu <schepers@w3.org>
parents: 7
diff changeset
   281
20
3a04fe9b8ef2 Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 19
diff changeset
   282
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   283
      <section>
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
   284
        <h3 id="event-touchstart">The <dfn class="event">touchstart</dfn> event</h3>
12
183be84c0a6c defined 'touch point'
shepazu <schepers@w3.org>
parents: 11
diff changeset
   285
        <p>A user agent must dispatch this event type to indicate when the user places a <a>touch point</a> on the touch surface.</p>
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   286
      </section>
20
3a04fe9b8ef2 Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 19
diff changeset
   287
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   288
      <section>
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
   289
        <h3 id="event-touchend">The <dfn class="event">touchend</dfn> event</h3>
12
183be84c0a6c defined 'touch point'
shepazu <schepers@w3.org>
parents: 11
diff changeset
   290
        <p>A user agent must dispatch this event type to indicate when the user removes a <a>touch point</a> from the touch surface.</p>
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   291
      </section>
20
3a04fe9b8ef2 Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 19
diff changeset
   292
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   293
      <section>
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
   294
        <h3 id="event-touchmove">The <dfn class="event">touchmove</dfn> event</h3>
12
183be84c0a6c defined 'touch point'
shepazu <schepers@w3.org>
parents: 11
diff changeset
   295
        <p>A user agent must dispatch this event type to indicate when the user moves a <a>touch point</a> along the touch surface, even outside the interactive area of the <a>target</a> element.</p>
34
96b646535d4e ISSUE-13: touchmove should fire when non-positional attributes change
Matt Brubeck <mbrubeck@mozilla.com>
parents: 33
diff changeset
   296
        <p>If the values of <a>radiusX</a>, <a>radiusY</a>, <a>rotationAngle</a>, or <a>force</a> are known, then the user agent also must dispatch this event type to indicate when any of these attributes of a <a>touch point</a> have changed.</p>
96b646535d4e ISSUE-13: touchmove should fire when non-positional attributes change
Matt Brubeck <mbrubeck@mozilla.com>
parents: 33
diff changeset
   297
        <p>Note that the rate at which the user agent sends <a>touchmove</a> events is implementation-defined, and may depend on hardware capabilities and other implementation details.</p>
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   298
      </section>
20
3a04fe9b8ef2 Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 19
diff changeset
   299
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   300
      <section>
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
   301
        <h3 id="event-touchenter">The <dfn class="event">touchenter</dfn> event</h3>
22
2df3601083b4 Resolve issue-touchenter-reenter.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 21
diff changeset
   302
        <p>A user agent must dispatch this event type to indicate when a <a>touch point</a> moves onto the interactive area defined by a DOM element.  Events of this type must not bubble.</p>
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   303
      </section>
20
3a04fe9b8ef2 Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 19
diff changeset
   304
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   305
      <section>
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
   306
        <h3 id="event-touchleave">The <dfn class="event">touchleave</dfn> event</h3>
12
183be84c0a6c defined 'touch point'
shepazu <schepers@w3.org>
parents: 11
diff changeset
   307
        <p>A user agent must dispatch this event type to indicate when a <a>touch point</a> moves off the interactive area defined by a DOM element.  Events of this type must not bubble.</p>
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   308
      </section>
20
3a04fe9b8ef2 Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 19
diff changeset
   309
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   310
      <section>
9
8171bbe11ccc changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents: 8
diff changeset
   311
        <h3 id="event-touchstart">The <dfn class="event">touchcancel</dfn> event</h3>
12
183be84c0a6c defined 'touch point'
shepazu <schepers@w3.org>
parents: 11
diff changeset
   312
        <p>A user agent must dispatch this event type to indicate when a <a>TouchPoint</a> has been disrupted in an implementation-specific manner, such as by moving outside the bounds of the UA window.  A user agent may also dispatch this event type when the user places more <a>touch point</a>s on the touch surface than the device or implementation is configured to store, in which case the earliest <a>TouchPoint</a> object in the <a>TouchList</a> should be removed.</p>
5
e4446bce8960 First draft, using WebKit model
shepazu <schepers@w3.org>
parents: 4
diff changeset
   313
      </section>
4
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
   314
    </section>
20
3a04fe9b8ef2 Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 19
diff changeset
   315
35
8624a3d5cbd7 ISSUE-9: Interaction of touch events and mouse events
Matt Brubeck <mbrubeck@mozilla.com>
parents: 34
diff changeset
   316
    <section id="mouse-events">
8624a3d5cbd7 ISSUE-9: Interaction of touch events and mouse events
Matt Brubeck <mbrubeck@mozilla.com>
parents: 34
diff changeset
   317
      <h2>Interaction with Mouse Events</h2>
8624a3d5cbd7 ISSUE-9: Interaction of touch events and mouse events
Matt Brubeck <mbrubeck@mozilla.com>
parents: 34
diff changeset
   318
      <p>The user agent may dispatch both touch events and mouse events
8624a3d5cbd7 ISSUE-9: Interaction of touch events and mouse events
Matt Brubeck <mbrubeck@mozilla.com>
parents: 34
diff changeset
   319
      [[!DOM-LEVEL-2-EVENTS]] in response to the same user input.  If the user
8624a3d5cbd7 ISSUE-9: Interaction of touch events and mouse events
Matt Brubeck <mbrubeck@mozilla.com>
parents: 34
diff changeset
   320
      agent dispatches both touch events and mouse events in response to a
8624a3d5cbd7 ISSUE-9: Interaction of touch events and mouse events
Matt Brubeck <mbrubeck@mozilla.com>
parents: 34
diff changeset
   321
      single user action, then the <a>touchstart</a> event type must be
8624a3d5cbd7 ISSUE-9: Interaction of touch events and mouse events
Matt Brubeck <mbrubeck@mozilla.com>
parents: 34
diff changeset
   322
      dispatched before any mouse event types for that action.  The ordering of
8624a3d5cbd7 ISSUE-9: Interaction of touch events and mouse events
Matt Brubeck <mbrubeck@mozilla.com>
parents: 34
diff changeset
   323
      any further touch events and mouse events is left to the implementation,
8624a3d5cbd7 ISSUE-9: Interaction of touch events and mouse events
Matt Brubeck <mbrubeck@mozilla.com>
parents: 34
diff changeset
   324
      except as specified elsewhere.</p>
8624a3d5cbd7 ISSUE-9: Interaction of touch events and mouse events
Matt Brubeck <mbrubeck@mozilla.com>
parents: 34
diff changeset
   325
    </section>
8624a3d5cbd7 ISSUE-9: Interaction of touch events and mouse events
Matt Brubeck <mbrubeck@mozilla.com>
parents: 34
diff changeset
   326
10
bad00fb0d663 added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents: 9
diff changeset
   327
    <section>
bad00fb0d663 added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents: 9
diff changeset
   328
      <h2>Glossary</h2>
20
3a04fe9b8ef2 Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 19
diff changeset
   329
10
bad00fb0d663 added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents: 9
diff changeset
   330
      <dl>
bad00fb0d663 added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents: 9
diff changeset
   331
        <dt><dfn>active touch event session</dfn></dt>
bad00fb0d663 added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents: 9
diff changeset
   332
        <dd>A conceptual state in which there is at least one instance of a <a>TouchEvent</a> event with at least one non-empty <a>TouchList</a>.
bad00fb0d663 added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents: 9
diff changeset
   333
          <!-- <pre class='example'>
bad00fb0d663 added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents: 9
diff changeset
   334
          </pre> -->
bad00fb0d663 added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents: 9
diff changeset
   335
        </dd>
20
3a04fe9b8ef2 Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 19
diff changeset
   336
12
183be84c0a6c defined 'touch point'
shepazu <schepers@w3.org>
parents: 11
diff changeset
   337
        <dt><dfn>touch point</dfn></dt>
183be84c0a6c defined 'touch point'
shepazu <schepers@w3.org>
parents: 11
diff changeset
   338
        <dd>The coordinate point at which a pointer (e.g finger or stylus) intersects the target surface of an interface.  This may apply to a finger touching a touch-screen, or an digital pen writing on a piece of paper.</dd>
20
3a04fe9b8ef2 Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 19
diff changeset
   339
10
bad00fb0d663 added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents: 9
diff changeset
   340
      </dl>
20
3a04fe9b8ef2 Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 19
diff changeset
   341
10
bad00fb0d663 added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents: 9
diff changeset
   342
    </section>
20
3a04fe9b8ef2 Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 19
diff changeset
   343
4
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
   344
    <section class='appendix'>
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
   345
      <h2>Acknowledgements</h2>
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
   346
      <p>
14
2adb12352c02 Remove old dummy file.
shepazu <schepers@w3.org>
parents: 12
diff changeset
   347
        Many thanks to the WebKit engineers for developing the model used as a basis for this spec, Neil Roberts (SitePen) for his summary of WebKit touch events, Peter-Paul Koch (PPK) for his writeups and suggestions, Robin Berjon for developing the <a href="http://dev.w3.org/2009/dap/ReSpec.js/documentation.html">ReSpec.js spec authoring tool</a>, and the WebEvents WG for their many contributions</a>.
4
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
   348
      </p>
20
3a04fe9b8ef2 Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents: 19
diff changeset
   349
14
2adb12352c02 Remove old dummy file.
shepazu <schepers@w3.org>
parents: 12
diff changeset
   350
      <p>Many others have made additional comments as the spec developed, which have led to steady improvements.  Among them are Matthew Schinckel, . If I inadvertently omitted your name, please let me know.</p>
4
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
   351
    </section>
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
   352
  </body>
dda9bf4072d0 testing hg with Murky
shepazu <schepers@w3.org>
parents:
diff changeset
   353
</html>