Intent to implement and ship: DOM Level 3 WheelEvent

Visto 84 veces
Saltar al primer mensaje no leído

Christophe Dumez

no leída,
15 ago 2013, 4:02:3315/8/13
a blink-dev

Contact emails

ch.d...@sisa.samsung.com


Spec

http://www.w3.org/TR/DOM-Level-3-Events/#events-WheelEvent


Summary

I would like to add support for the DOM Level 3 WheelEvent.

Currently, Blink implements a non-standard 'mousewheel' event with a very similar API so the code is already there. It just needs to be exposed in the standard way (more details on the crbug).


Motivation

Having a standardized way of handling mouse wheel events.


Compatibility Risk

Risk is low as IE10 and Firefox both already support the standard Wheel Event.

I am planning to keep support for the non-standard 'mousewheel' event to order to maintain backward compatibility.


Ongoing technical constraints

No.


Will this feature be supported on all five Blink platforms (Windows, Mac, Linux, Chrome OS and Android)?

Yes.


OWP launch tracking bug?

https://code.google.com/p/chromium/issues/detail?id=273395


Row on feature dashboard?

No. This seems like a small adaptation of the existing mousewheel code.


Requesting approval to ship?

Yes.

Erik Arvidsson

no leída,
15 ago 2013, 9:47:1015/8/13
a Christophe Dumez,blink-dev
Seems good to me.

How do they interact? Which one comes first. Does preventDefault
prevent the second event?
--
erik

Christophe Dumez

no leída,
15 ago 2013, 9:59:3315/8/13
a Erik Arvidsson,blink-dev
On Thu, Aug 15, 2013 at 4:47 PM, Erik Arvidsson <a...@chromium.org> wrote:
Seems good to me.

How do they interact? Which one comes first. Does preventDefault
prevent the second event?

I thought I would do the same as for prefixed events (e.g. transitionendEvent / webkitTransitionEndEvent). I need to look in more details how those interact but I thought it would make sense to reuse the infrastructure in place for prefixed events.

I uploaded an initial CL if you want to see how it looks:

However, I haven't tested the interaction between mousewheel and wheel events yet. Your comment tells me that I should definitely add one :)

Kr,
--
Christophe DUMEZ

Alex Komoroske

no leída,
15 ago 2013, 11:24:0415/8/13
a Christophe Dumez,Erik Arvidsson,blink-dev
I'm glad you're doing this!

I think we might as well put this on the feature dashboard, since conceivably some web-developer-facing documentation will need to have its compatibility information updated.

Wez

no leída,
15 ago 2013, 14:48:3015/8/13
a Alex Komoroske,Christophe Dumez,Erik Arvidsson,blink-dev
SGTM - would be great to get WheelEvent up to speed w/ the current spec.

Note that aside from naming differences, the spec specifies the deltas as floats, while Blink currently has them as longs (see crbug.com/152426).

Christophe Dumez

no leída,
16 ago 2013, 7:30:0316/8/13
a Wez,Alex Komoroske,Erik Arvidsson,blink-dev
Hi,

On Thu, Aug 15, 2013 at 9:48 PM, Wez <w...@chromium.org> wrote:
SGTM - would be great to get WheelEvent up to speed w/ the current spec.

Note that aside from naming differences, the spec specifies the deltas as floats, while Blink currently has them as longs (see crbug.com/152426).

Right, I'll make sure to use double type as per the DOM Level 3 specification. Thanks for bringing my attention on this.

Kr,
--
Christophe DUMEZ

Christophe Dumez

no leída,
16 ago 2013, 8:43:2116/8/13
a Alex Komoroske,Erik Arvidsson,blink-dev
Hi,

I have added a row on the feature dashboard as suggested:

Kr,
Christophe Dumez.
--
Christophe DUMEZ

Dimitri Glazkov

no leída,
16 ago 2013, 10:32:1916/8/13
a Christophe Dumez,Alex Komoroske,Erik Arvidsson,blink-dev
LGTM.

Rick Byers

no leída,
16 ago 2013, 10:35:1416/8/13
a Dimitri Glazkov,Christophe Dumez,Alex Komoroske,Erik Arvidsson,blink-dev
Excellent, I've been thinking we should add support for wheel, thanks!  

Other than the obvious benefit of being a standard, the other thing I like over mousewheel is the deltaZ property.  The spec has this note about it:

"The user's environment might be configured to associate vertical scrolling with rotation along the y-axis, horizontal scrolling with rotation along the x-axis, and zooming with rotation along the z-axis."

We've had multiple requests to expose trackpad pinch gestures to web pages (like Google maps).  I think dletaZ is probably the most pragmatic way to do that.  Thoughts?  Do you know if any other browsers implement deltaZ for trackpads?

Note that https://code.google.com/p/chromium/issues/detail?id=273395 is not an "OWP launch-tracking bug" (see http://www.chromium.org/blink#launch-process).  I merged it with an older bug we had for this, you should probably file a new OWP launch bug using the template in the instructions.

Thanks,
   Rick

Tom Wiltzius

no leída,
16 ago 2013, 12:12:2616/8/13
a Rick Byers,Dimitri Glazkov,Christophe Dumez,Alex Komoroske,Erik Arvidsson,blink-dev
On Fri, Aug 16, 2013 at 7:35 AM, Rick Byers <rby...@chromium.org> wrote:
Excellent, I've been thinking we should add support for wheel, thanks!  

Other than the obvious benefit of being a standard, the other thing I like over mousewheel is the deltaZ property.  The spec has this note about it:

"The user's environment might be configured to associate vertical scrolling with rotation along the y-axis, horizontal scrolling with rotation along the x-axis, and zooming with rotation along the z-axis."

By environment, is this supposed to mean the UA can decide that this is how these vertical / horizontal / zoom scrolls should be handled, or the web page can?

Rick Byers

no leída,
16 ago 2013, 13:19:1216/8/13
a Tom Wiltzius,Dimitri Glazkov,Christophe Dumez,Alex Komoroske,Erik Arvidsson,blink-dev
On Fri, Aug 16, 2013 at 12:12 PM, Tom Wiltzius <wilt...@chromium.org> wrote:

On Fri, Aug 16, 2013 at 7:35 AM, Rick Byers <rby...@chromium.org> wrote:
Excellent, I've been thinking we should add support for wheel, thanks!  

Other than the obvious benefit of being a standard, the other thing I like over mousewheel is the deltaZ property.  The spec has this note about it:

"The user's environment might be configured to associate vertical scrolling with rotation along the y-axis, horizontal scrolling with rotation along the x-axis, and zooming with rotation along the z-axis."

By environment, is this supposed to mean the UA can decide that this is how these vertical / horizontal / zoom scrolls should be handled, or the web page can?

The UA.  There's no provision for communicating this to the web page, it just gets deltaX/Y/Z.   

Jochen Eisinger

no leída,
19 ago 2013, 4:21:1019/8/13
a Dimitri Glazkov,Christophe Dumez,Alex Komoroske,Erik Arvidsson,blink-dev
LGTM2

Adam Barth

no leída,
19 ago 2013, 13:17:1219/8/13
a Jochen Eisinger,Dimitri Glazkov,Christophe Dumez,Alex Komoroske,Erik Arvidsson,blink-dev
LGTM3
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos