This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 24095 - MouseEvent and TouchEvent co-ordinate types should be kept in-sync
Summary: MouseEvent and TouchEvent co-ordinate types should be kept in-sync
Status: NEW
Alias: None
Product: CSS
Classification: Unclassified
Component: CSSOM View (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Simon Pieters
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-13 17:48 UTC by Rick Byers
Modified: 2014-04-09 21:48 UTC (History)
0 users

See Also:


Attachments

Description Rick Byers 2013-12-13 17:48:44 UTC
http://dev.w3.org/csswg/cssom-view/#extensions-to-the-mouseevent-interface changes the type of the co-ordinates on MouseEvent from int to double.  To be consistent, the co-ordinates of TouchEvent (http://www.w3.org/TR/touch-events/#attributes) should probably change at the same time.   Can we just specify corresponding changes to the Touch object here too?
Comment 1 Simon Pieters 2014-04-09 08:12:48 UTC
Currently http://dvcs.w3.org/hg/webevents/raw-file/v1/touchevents.html has:
[[
partial interface Document {
    Touch     createTouch (WindowProxy view, EventTarget target, long identifier, long pageX, long pageY, long screenX, long screenY);
    TouchList createTouchList (Touch... touches);
};

interface Touch {
    readonly    attribute long        identifier;
    readonly    attribute EventTarget target;
    readonly    attribute long        screenX;
    readonly    attribute long        screenY;
    readonly    attribute long        clientX;
    readonly    attribute long        clientY;
    readonly    attribute long        pageX;
    readonly    attribute long        pageY;
};
]]

The proposal is to change it to:

[[
partial interface Document {
    Touch     createTouch (WindowProxy view, EventTarget target, long identifier, double pageX, double pageY, double screenX, double screenY);
    TouchList createTouchList (Touch... touches);
};

interface Touch {
    readonly    attribute long        identifier;
    readonly    attribute EventTarget target;
    readonly    attribute double        screenX;
    readonly    attribute double        screenY;
    readonly    attribute double        clientX;
    readonly    attribute double        clientY;
    readonly    attribute double        pageX;
    readonly    attribute double        pageY;
};
]]

?

What about pageX/pageY/x/y/offsetX/offsetY? What about using a constructor for Touch with a TouchInit dict instead of (or in addition to) a factory function?
Comment 2 Simon Pieters 2014-04-09 08:15:44 UTC
I can't find Web Events/Touch Events in W3C bugzilla, but please raise this issue on public-webevents@w3.org - it would be good if CSSOM View didn't have to monkey patch it.
Comment 3 Rick Byers 2014-04-09 16:47:29 UTC
I'm trying to figure out where best to address this.  I was a member of webevents, but that WG has been closed having completed it's charter.  At the moment there is no vehicle for TouchEvents spec changes (due to lack of interest from vendors).  This may be a job for the TouchEvents community group (public-touchevents).
Comment 4 Simon Pieters 2014-04-09 21:48:27 UTC
Ah, OK. I'm happy to put something in CSSOM View in the meantime if you need this soon.