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

Side by Side Diff: sdk/lib/html/src/KeyboardEventController.dart

Issue 11419245: Fix dartanalyzer issue with const (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: generated files Created 8 years 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 | « sdk/lib/html/dartium/html_dartium.dart ('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 html; 5 part of html;
6 6
7 /** 7 /**
8 * Works with KeyboardEvent and KeyEvent to determine how to expose information 8 * Works with KeyboardEvent and KeyEvent to determine how to expose information
9 * about Key(board)Events. This class functions like an EventListenerList, and 9 * about Key(board)Events. This class functions like an EventListenerList, and
10 * provides a consistent interface for the Dart 10 * provides a consistent interface for the Dart
(...skipping 17 matching lines...) Expand all
28 /** The set of functions that wish to be notified when a KeyEvent happens. */ 28 /** The set of functions that wish to be notified when a KeyEvent happens. */
29 List<Function> _callbacks; 29 List<Function> _callbacks;
30 30
31 /** The type of KeyEvent we are tracking (keyup, keydown, keypress). */ 31 /** The type of KeyEvent we are tracking (keyup, keydown, keypress). */
32 String _type; 32 String _type;
33 33
34 /** The element we are watching for events to happen on. */ 34 /** The element we are watching for events to happen on. */
35 EventTarget _target; 35 EventTarget _target;
36 36
37 // The distance to shift from upper case alphabet Roman letters to lower case. 37 // The distance to shift from upper case alphabet Roman letters to lower case.
38 const int _ROMAN_ALPHABET_OFFSET = "a".charCodes[0] - "A".charCodes[0]; 38 int _ROMAN_ALPHABET_OFFSET = "a".charCodes[0] - "A".charCodes[0];
blois 2012/11/30 01:24:47 final
39 39
40 // Instance members referring to the internal event handlers because closures 40 // Instance members referring to the internal event handlers because closures
41 // are not hashable. 41 // are not hashable.
42 var _keyUp, _keyDown, _keyPress; 42 var _keyUp, _keyDown, _keyPress;
43 43
44 /** 44 /**
45 * An enumeration of key identifiers currently part of the W3C draft for DOM3 45 * An enumeration of key identifiers currently part of the W3C draft for DOM3
46 * and their mappings to keyCodes. 46 * and their mappings to keyCodes.
47 * http://www.w3.org/TR/DOM-Level-3-Events/keyset.html#KeySet-Set 47 * http://www.w3.org/TR/DOM-Level-3-Events/keyset.html#KeySet-Set
48 */ 48 */
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 _keyDownList = _keyDownList.filter((element) => element != toRemove); 396 _keyDownList = _keyDownList.filter((element) => element != toRemove);
397 } else if (_keyDownList.length > 0) { 397 } else if (_keyDownList.length > 0) {
398 // This happens when we've reached some international keyboard case we 398 // This happens when we've reached some international keyboard case we
399 // haven't accounted for or we haven't correctly eliminated all browser 399 // haven't accounted for or we haven't correctly eliminated all browser
400 // inconsistencies. Filing bugs on when this is reached is welcome! 400 // inconsistencies. Filing bugs on when this is reached is welcome!
401 _keyDownList.removeLast(); 401 _keyDownList.removeLast();
402 } 402 }
403 _dispatch(e); 403 _dispatch(e);
404 } 404 }
405 } 405 }
OLDNEW
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698