Bug 35239 - pageX/Y co-ordinates of TouchEvent should be 0,0
Summary: pageX/Y co-ordinates of TouchEvent should be 0,0
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Ben Murdoch
URL:
Keywords:
Depends on:
Blocks: 32485
  Show dependency treegraph
 
Reported: 2010-02-22 06:40 PST by Ben Murdoch
Modified: 2010-02-23 05:12 PST (History)
5 users (show)

See Also:


Attachments
Proposed patch and updated tests. (11.40 KB, patch)
2010-02-22 06:53 PST, Ben Murdoch
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Murdoch 2010-02-22 06:40:16 PST
Currently, the pageX/pageY properties of the TouchEvent object are set to the co-ordinates of a touch point identifying itself as a touch press, only if it is at the head of the platform list of touch points. They are not updated again until a new touch start is the first touch in the PlatformTouchEvent's set of touch points. This makes the TouchEvent.pageX/Y values fairly meaningless. To match observed behavior on the iPhone, they should be set to 0,0.

The co-ordinates within the set of touches attached to the TouchEvent (e.g. TouchEvent.touches[0].pageX/Y) are being updated correctly.

Patch and layout test update to follow.
Comment 1 Ben Murdoch 2010-02-22 06:53:01 PST
Created attachment 49214 [details]
Proposed patch and updated tests.
Comment 2 Eric Seidel (no email) 2010-02-22 14:34:54 PST
Comment on attachment 49214 [details]
Proposed patch and updated tests.

OK. Is there a spec which covers any of this?
Comment 3 Ben Murdoch 2010-02-23 02:19:57 PST
(In reply to comment #2)
> (From update of attachment 49214 [details])
> OK. Is there a spec which covers any of this?

There's nothing official that I'm aware of. I've been using the Apple developer documentation at http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariJSRef/TouchEvent/TouchEvent.html and observations of how touch events work on the iPhone.
Comment 4 WebKit Commit Bot 2010-02-23 05:12:20 PST
Comment on attachment 49214 [details]
Proposed patch and updated tests.

Clearing flags on attachment: 49214

Committed r55146: <http://trac.webkit.org/changeset/55146>
Comment 5 WebKit Commit Bot 2010-02-23 05:12:25 PST
All reviewed patches have been landed.  Closing bug.