Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Issue 10969073: Fixing up WheelEvent to follow W3C standards and work on all platforms. (Closed)

Created:
8 years, 3 months ago by blois
Modified:
8 years, 2 months ago
Reviewers:
vsm, dgrove
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Fixing up WheelEvent to follow W3C standards and work on all platforms. There were a couple of problems here: - The name of the event is different between platforms, logic to handle this has been added. - The event object was not getting wrapped on Firefox. - The wheel event parameters were different across all platforms. The event name ('mouseWheel' vs 'DOMMouseScroll' vs 'wheel') has been fixed on ElementEvents, but not BodyElementEvents or DocumentElementEvents. I've opened bug #5414 to track fixing those up. BUG=5186 Committed: https://code.google.com/p/dart/source/detail?r=12921

Patch Set 1 #

Total comments: 6

Patch Set 2 : Incorporating review feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+271 lines, -49 lines) Patch
M lib/compiler/implementation/lib/native_helper.dart View 1 chunk +1 line, -0 lines 0 comments Download
M lib/html/dart2js/html_dart2js.dart View 5 chunks +103 lines, -16 lines 0 comments Download
M lib/html/dartium/html_dartium.dart View 2 chunks +18 lines, -17 lines 0 comments Download
M lib/html/scripts/htmlrenamer.py View 1 chunk +3 lines, -0 lines 0 comments Download
M lib/html/scripts/systemhtml.py View 4 chunks +20 lines, -9 lines 0 comments Download
M lib/html/scripts/systemnative.py View 1 chunk +3 lines, -0 lines 0 comments Download
M lib/html/src/Device.dart View 1 chunk +5 lines, -0 lines 0 comments Download
A lib/html/templates/html/dart2js/impl_ElementEvents.darttemplate View 1 chunk +20 lines, -0 lines 0 comments Download
A lib/html/templates/html/impl/impl_WheelEvent.darttemplate View 1 1 chunk +85 lines, -0 lines 0 comments Download
A + lib/html/templates/html/interface/interface_WheelEvent.darttemplate View 1 chunk +9 lines, -3 lines 0 comments Download
M samples/ui_lib/touch/Scroller.dart View 1 chunk +4 lines, -4 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
blois
8 years, 2 months ago (2012-09-25 17:30:09 UTC) #1
vsm
lgtm! https://chromiumcodereview.appspot.com/10969073/diff/1/lib/html/templates/html/impl/impl_WheelEvent.darttemplate File lib/html/templates/html/impl/impl_WheelEvent.darttemplate (right): https://chromiumcodereview.appspot.com/10969073/diff/1/lib/html/templates/html/impl/impl_WheelEvent.darttemplate#newcode14 lib/html/templates/html/impl/impl_WheelEvent.darttemplate:14: return this._wheelDelta; Can you add a comment as ...
8 years, 2 months ago (2012-09-25 19:53:04 UTC) #2
blois
8 years, 2 months ago (2012-09-26 01:04:45 UTC) #3
https://codereview.chromium.org/10969073/diff/1/lib/html/templates/html/impl/...
File lib/html/templates/html/impl/impl_WheelEvent.darttemplate (right):

https://codereview.chromium.org/10969073/diff/1/lib/html/templates/html/impl/...
lib/html/templates/html/impl/impl_WheelEvent.darttemplate:14: return
this._wheelDelta;
On 2012/09/25 19:53:04, vsm wrote:
> Can you add a comment as to which browsers this case handles?

Done.

https://codereview.chromium.org/10969073/diff/1/lib/html/templates/html/impl/...
lib/html/templates/html/impl/impl_WheelEvent.darttemplate:23: // so multiply it
by 40 to get pixels to move, matching IE & WebKit.
On 2012/09/25 19:53:04, vsm wrote:
> Do you need to change deltaMode for FF accordingly?  Will it always return 0
> (pixels) if you get here?

deltaMode should only be set if deltaX or deltaY are set (W3C standard wheel
event), which is why we can't use it to trigger the odd detail < 100 check.

https://codereview.chromium.org/10969073/diff/1/lib/html/templates/html/impl/...
lib/html/templates/html/impl/impl_WheelEvent.darttemplate:40: return
this._wheelDeltaX;
On 2012/09/25 19:53:04, vsm wrote:
> Ditto about comment.

Done.

Powered by Google App Engine
This is Rietveld 408576698