| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of html; | 5 part of html; |
| 6 $ANNOTATIONS | 6 $ANNOTATIONS |
| 7 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { | 7 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { |
| 8 | 8 |
| 9 factory WheelEvent(String type, Window view, int wheelDeltaX, int wheelDeltaY, | 9 factory WheelEvent(String type, Window view, int wheelDeltaX, int wheelDeltaY, |
| 10 int detail, int screenX, int screenY, int clientX, int clientY, | 10 int detail, int screenX, int screenY, int clientX, int clientY, |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 event._initMouseScrollEvent(type, canBubble, cancelable, view, detail, | 53 event._initMouseScrollEvent(type, canBubble, cancelable, view, detail, |
| 54 screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, | 54 screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, |
| 55 metaKey, button, relatedTarget, axis); | 55 metaKey, button, relatedTarget, axis); |
| 56 } else { | 56 } else { |
| 57 $endif | 57 $endif |
| 58 // Fallthrough for Dartium. | 58 // Fallthrough for Dartium. |
| 59 event.$dom_initMouseEvent(type, canBubble, cancelable, view, detail, | 59 event.$dom_initMouseEvent(type, canBubble, cancelable, view, detail, |
| 60 screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, | 60 screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, |
| 61 metaKey, button, relatedTarget); | 61 metaKey, button, relatedTarget); |
| 62 event.$dom_initWebKitWheelEvent(wheelDeltaX, | 62 event.$dom_initWebKitWheelEvent(wheelDeltaX, |
| 63 (wheelDeltaY / 120).toInt(), // Chrome does an auto-convert to pixels. | 63 wheelDeltaY ~/ 120, // Chrome does an auto-convert to pixels. |
| 64 view, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, | 64 view, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, |
| 65 metaKey); | 65 metaKey); |
| 66 $if DART2JS | 66 $if DART2JS |
| 67 } | 67 } |
| 68 $endif | 68 $endif |
| 69 | 69 |
| 70 return event; | 70 return event; |
| 71 } | 71 } |
| 72 | 72 |
| 73 $!MEMBERS | 73 $!MEMBERS |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 $else | 192 $else |
| 193 @DomName('WheelEvent.deltaX') | 193 @DomName('WheelEvent.deltaX') |
| 194 num get deltaX => $dom_wheelDeltaX; | 194 num get deltaX => $dom_wheelDeltaX; |
| 195 @DomName('WheelEvent.deltaY') | 195 @DomName('WheelEvent.deltaY') |
| 196 num get deltaY => $dom_wheelDeltaY; | 196 num get deltaY => $dom_wheelDeltaY; |
| 197 @DomName('WheelEvent.deltaMode') | 197 @DomName('WheelEvent.deltaMode') |
| 198 int get deltaMode => 0; | 198 int get deltaMode => 0; |
| 199 | 199 |
| 200 $endif | 200 $endif |
| 201 } | 201 } |
| OLD | NEW |