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

Side by Side Diff: tools/dom/templates/html/impl/impl_WheelEvent.darttemplate

Issue 12541020: Consolidating platform code into dart:html_common (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/dom/templates/html/impl/impl_TouchEvent.darttemplate ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 $LIBRARYNAME; 5 part of $LIBRARYNAME;
6 6
7 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { 7 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
8 8
9 factory WheelEvent(String type, 9 factory WheelEvent(String type,
10 {Window view, int deltaX: 0, int deltaY: 0, 10 {Window view, int deltaX: 0, int deltaY: 0,
11 int detail: 0, int screenX: 0, int screenY: 0, int clientX: 0, 11 int detail: 0, int screenX: 0, int screenY: 0, int clientX: 0,
12 int clientY: 0, int button: 0, bool canBubble: true, 12 int clientY: 0, int button: 0, bool canBubble: true,
13 bool cancelable: true, bool ctrlKey: false, bool altKey: false, 13 bool cancelable: true, bool ctrlKey: false, bool altKey: false,
14 bool shiftKey: false, bool metaKey: false, EventTarget relatedTarget}) { 14 bool shiftKey: false, bool metaKey: false, EventTarget relatedTarget}) {
15 15
16 if (view == null) { 16 if (view == null) {
17 view = window; 17 view = window;
18 } 18 }
19 var eventType = 'WheelEvent'; 19 var eventType = 'WheelEvent';
20 if (_Device.isFirefox) { 20 if (Device.isFirefox) {
21 eventType = 'MouseScrollEvents'; 21 eventType = 'MouseScrollEvents';
22 } 22 }
23 final event = document.$dom_createEvent(eventType); 23 final event = document.$dom_createEvent(eventType);
24 $if DART2JS 24 $if DART2JS
25 if (event._hasInitWheelEvent) { 25 if (event._hasInitWheelEvent) {
26 var modifiers = []; 26 var modifiers = [];
27 if (ctrlKey) { 27 if (ctrlKey) {
28 modifiers.push('Control'); 28 modifiers.push('Control');
29 } 29 }
30 if (altKey) { 30 if (altKey) {
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 int deltaZ, 192 int deltaZ,
193 int deltaMode) native; 193 int deltaMode) native;
194 194
195 $else 195 $else
196 @DomName('WheelEvent.deltaX') 196 @DomName('WheelEvent.deltaX')
197 num get deltaX => $dom_wheelDeltaX; 197 num get deltaX => $dom_wheelDeltaX;
198 @DomName('WheelEvent.deltaY') 198 @DomName('WheelEvent.deltaY')
199 num get deltaY => $dom_wheelDeltaY; 199 num get deltaY => $dom_wheelDeltaY;
200 $endif 200 $endif
201 } 201 }
OLDNEW
« no previous file with comments | « tools/dom/templates/html/impl/impl_TouchEvent.darttemplate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698