W3C home > Mailing lists > Public > public-webevents@w3.org > April to June 2011

WebEvents-ISSUE-15 (identifier-algorithm): "identifier" attribute should be an opaque token [Touch Events spec]

From: Web Events Working Group Issue Tracker <sysbot+tracker@w3.org>
Date: Tue, 26 Apr 2011 17:00:22 +0000
To: public-webevents@w3.org
Message-Id: <E1QElcc-0004cS-0o@barney.w3.org>

WebEvents-ISSUE-15 (identifier-algorithm): "identifier" attribute should be an opaque token [Touch Events spec]

http://www.w3.org/2010/webevents/track/issues/15

Raised by: Matt Brubeck
On product: Touch Events spec

The current Editor's Draft specifies an algorithm for setting the "identifier" attribute of each Touch object:
http://dvcs.w3.org/hg/webevents/raw-file/tip/touchevents.html#widl-Touch-identifier

> The algorithm for determining the identifier value is as follows:
> 1. if there are no other active touch event sessions, the value of
> identifier must be 0
> 2. if there is at least one active touch event session, the value of
> identifier must be the lowest integer not currently used by any active
> Touch object in any active touch event session

I propose that we should remove this algorithm from the specification, and require only that the identifier is distinct from identifiers in any other active touch sessions.

The algorithm above unnecessarily constrains implementations.  For example, the Android OS tracks touch points and assigns identifiers to them.  Its algorithm for assigning identifiers is undocumented, and could change in future versions.  To comply with the current spec, user agents on Android would need to implement their own mapping of touches to identifiers, rather than use the one built into the OS.

(Current versions of Android actually seem to use an algorithm that is compatible with the Touch Events draft, but as mentioned above, this is undocumented and should not be relied upon.)

Also note that Safari does *not* use the algorithm in the spec, so it fails the "Touch identifiers are correct" test here:
http://dvcs.w3.org/hg/webevents/raw-file/a217ab1b3f14/test/touchevents/single-touch.html
Received on Tuesday, 26 April 2011 17:00:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 26 April 2011 17:00:24 GMT