W3C home > Mailing lists > Public > public-pointer-events@w3.org > January to March 2013

RE: Bug 20221 - Define mechanism for creating PointerEvent instances

From: Jacob Rossi <Jacob.Rossi@microsoft.com>
Date: Fri, 4 Jan 2013 23:59:07 +0000
To: Jacob Rossi <Jacob.Rossi@microsoft.com>, Rick Byers <rbyers@google.com>, "olli@pettay.fi" <olli@pettay.fi>
CC: "public-pointer-events@w3.org" <public-pointer-events@w3.org>
Message-ID: <dc0b0f9d24f144cfac02afd1bcd015cb@BN1PR03MB021.namprd03.prod.outlook.com>
I have made the change as we described and included an example in the appendix for constructing a pointer event:

http://dvcs.w3.org/hg/pointerevents/raw-file/tip/pointerEvents.html#pointerevent-constructor

Note that the ReSpec BilbioDB does not yet have an entry for DOM L4 Events. I'll send mail to Robin to ask for it and then update the link accordingly.

-Jacob

From: Jacob Rossi [mailto:Jacob.Rossi@microsoft.com]
Sent: Tuesday, December 18, 2012 11:47 AM
To: Rick Byers; olli@pettay.fi
Cc: public-pointer-events@w3.org
Subject: RE: Bug 20221 - Define mechanism for creating PointerEvent instances

Yes, here's the WebIDL text that confirms this is an issue:

"The order of the dictionary members<http://dev.w3.org/2006/webapi/WebIDL/#dfn-dictionary-member> on a given dictionary is such that inherited dictionary members are ordered before non-inherited members, and the dictionary members on the one dictionary definition (including any partial dictionary definitions) are ordered lexicographically by the Unicode codepoints that comprise their identifiers."

Therefore, I'll go ahead as we discussed and define PointerEventInit to inherit from MouseEventInit as drafted in DOM 4 Events. If spec status becomes an issue, then we'll cross that bridge when we get there.

-Jacob

From: Rick Byers [mailto:rbyers@google.com]
Sent: Tuesday, December 18, 2012 9:17 AM
To: olli@pettay.fi<mailto:olli@pettay.fi>
Cc: Jacob Rossi; public-pointer-events@w3.org<mailto:public-pointer-events@w3.org>
Subject: Re: Bug 20221 - Define mechanism for creating PointerEvent instances

Just for the record, we talked about this on the call today and we think there is a functional difference that could prevent implementations from implementing this using inheritance: http://dev.w3.org/2006/webapi/WebIDL/#idl-dictionaries.

Jacob is going to investigate further, and if confirmed then we'll take a dependency on DOM4 events.   Draft minutes here for anyone that wants to see the discussion: http://www.w3.org/2012/12/18-pointerevents-minutes.html.

Rick

On Tue, Dec 18, 2012 at 10:30 AM, Olli Pettay <Olli.Pettay@helsinki.fi<mailto:Olli.Pettay@helsinki.fi>> wrote:
On 12/18/2012 08:23 AM, Jacob Rossi wrote:
Hey Rick,

Took a look at this issue [1].  Following the convention set up in the DOM4 Events proposal is the right way to go. But I don't want it to depend
on that spec as hasn't been formally adopted yet by the W3C (and would gate this spec if we normatively depend on it).  So instead, how does this
additional IDL look?
Looks ok. The dictionary is ofc a bit ugly, but implementations are free to implement it using inheritance.


[Constructor(DOMString type, optional PointerEventInit eventInitDict)] interface PointerEvent:MouseEvent { ... }

dictionary PointerEventInit { boolean bubbles; boolean cancelable; views::AbstractView view long detail; long screenX; long screenY; long clientX;
long clientY; boolean ctrlKey; boolean shiftKey; boolean altKey; boolean metaKey; unsigned short button; unsigned short buttons; EventTarget
relatedTarget; long pointerId; long width; long  height; float pressure; long tiltX; long tiltY; DOMString pointerType; unsigned long long
hwTimestamp; boolean isPrimary; }

-Jacob

[1] https://www.w3.org/Bugs/Public/show_bug.cgi?id=20221
Received on Saturday, 5 January 2013 00:02:45 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:17:04 GMT