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]


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:

> 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:
Received on Tuesday, 26 April 2011 17:00:23 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:03:53 UTC