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

Unified Diff: tools/dom/src/dartium_KeyEvent.dart

Issue 26334002: "Reverting 28321" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/dom/src/dart2js_KeyEvent.dart ('k') | tools/dom/templates/html/dart2js/html_dart2js.darttemplate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/src/dartium_KeyEvent.dart
diff --git a/tools/dom/src/dartium_KeyEvent.dart b/tools/dom/src/dartium_KeyEvent.dart
index 1adf7d888599b4ba97d92a07a06d893edd3531bb..6be8d67ffbd36850fdff0fca274c0d821f43d26d 100644
--- a/tools/dom/src/dartium_KeyEvent.dart
+++ b/tools/dom/src/dartium_KeyEvent.dart
@@ -12,7 +12,6 @@
*/
part of html;
-@Experimental()
class KeyEvent extends _WrappedEvent implements KeyboardEvent {
/** The parent KeyboardEvent that this KeyEvent is wrapping and "fixing". */
KeyboardEvent _parent;
@@ -47,35 +46,14 @@ class KeyEvent extends _WrappedEvent implements KeyboardEvent {
/** Accessor to the underlying altKey value is the parent event. */
bool get _realAltKey => _parent.altKey;
- /** Shadows on top of the parent's currentTarget. */
- EventTarget _currentTarget;
-
/** Construct a KeyEvent with [parent] as the event we're emulating. */
- KeyEvent.wrap(KeyboardEvent parent): super(parent) {
+ KeyEvent(KeyboardEvent parent): super(parent) {
_parent = parent;
_shadowAltKey = _realAltKey;
_shadowCharCode = _realCharCode;
_shadowKeyCode = _realKeyCode;
- _currentTarget = _parent.currentTarget == null? window :
- _parent.currentTarget;
}
- /** Programmatically create a new KeyEvent (and KeyboardEvent). */
- KeyEvent(String type,
- {Window view, bool canBubble: true, bool cancelable: true, int keyCode: 0,
- int charCode: 0, int keyLocation: 1, bool ctrlKey: false,
- bool altKey: false, bool shiftKey: false, bool metaKey: false,
- bool altGraphKey: false, EventTarget currentTarget}) {
- _parent = new KeyboardEvent(type, view: view, canBubble: canBubble,
- cancelable: cancelable, keyLocation: keyLocation, ctrlKey: ctrlKey,
- altKey: altKey, shiftKey: shiftKey, metaKey: metaKey, altGraphKey:
- altGraphKey);
- _shadowAltKey = altKey;
- _shadowCharCode = charCode;
- _shadowKeyCode = keyCode;
- _currentTarget = currentTarget == null ? window : currentTarget;
- }
-
/** Accessor to provide a stream of KeyEvents on the desired target. */
static EventStreamProvider<KeyEvent> keyDownEvent =
new _KeyboardEventHandler('keydown');
@@ -86,9 +64,6 @@ class KeyEvent extends _WrappedEvent implements KeyboardEvent {
static EventStreamProvider<KeyEvent> keyPressEvent =
new _KeyboardEventHandler('keypress');
- /** The currently registered target for this event. */
- EventTarget get currentTarget => _currentTarget;
-
/** True if the altGraphKey is pressed during this event. */
bool get altGraphKey => _parent.altGraphKey;
/** Accessor to the clipboardData available for this event. */
« no previous file with comments | « tools/dom/src/dart2js_KeyEvent.dart ('k') | tools/dom/templates/html/dart2js/html_dart2js.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698