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

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

Issue 12335036: Fixing WheelEvent.deltaMode polyfill after IDL update. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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/scripts/systemhtml.py ('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,
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 return detail * 40; 127 return detail * 40;
128 } 128 }
129 return detail; 129 return detail;
130 } 130 }
131 return 0; 131 return 0;
132 } 132 }
133 throw new UnsupportedError( 133 throw new UnsupportedError(
134 'deltaX is not supported'); 134 'deltaX is not supported');
135 } 135 }
136 136
137 @DomName('WheelEvent.deltaMode')
138 int get deltaMode {
139 if (JS('bool', '!!(#.deltaMode)', this)) {
140 return JS('int', '#.deltaMode', this);
141 }
142 // If not available then we're poly-filling and doing pixel scroll.
143 return 0;
144 }
145
137 num get _deltaY => JS('num', '#.deltaY', this); 146 num get _deltaY => JS('num', '#.deltaY', this);
138 num get _deltaX => JS('num', '#.deltaX', this); 147 num get _deltaX => JS('num', '#.deltaX', this);
139 num get _wheelDelta => JS('num', '#.wheelDelta', this); 148 num get _wheelDelta => JS('num', '#.wheelDelta', this);
140 num get _wheelDeltaX => JS('num', '#.wheelDeltaX', this); 149 num get _wheelDeltaX => JS('num', '#.wheelDeltaX', this);
141 num get _detail => JS('num', '#.detail', this); 150 num get _detail => JS('num', '#.detail', this);
142 151
143 bool get _hasInitMouseScrollEvent => 152 bool get _hasInitMouseScrollEvent =>
144 JS('bool', '!!(#.initMouseScrollEvent)', this); 153 JS('bool', '!!(#.initMouseScrollEvent)', this);
145 154
146 @JSName('initMouseScrollEvent') 155 @JSName('initMouseScrollEvent')
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 int deltaX, 190 int deltaX,
182 int deltaY, 191 int deltaY,
183 int deltaZ, 192 int deltaZ,
184 int deltaMode) native; 193 int deltaMode) native;
185 194
186 $else 195 $else
187 @DomName('WheelEvent.deltaX') 196 @DomName('WheelEvent.deltaX')
188 num get deltaX => $dom_wheelDeltaX; 197 num get deltaX => $dom_wheelDeltaX;
189 @DomName('WheelEvent.deltaY') 198 @DomName('WheelEvent.deltaY')
190 num get deltaY => $dom_wheelDeltaY; 199 num get deltaY => $dom_wheelDeltaY;
191
192 $endif 200 $endif
193 } 201 }
OLDNEW
« no previous file with comments | « tools/dom/scripts/systemhtml.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698