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

Unified Diff: sdk/lib/html/dartium/html_dartium.dart

Side-by-side diff isn't available for this file because of its large size.
Issue 26247006: Fix KeyEvent (factory) constructor in Dartium. (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:
Download patch
« no previous file with comments | « no previous file | tools/dom/src/dartium_KeyEvent.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dartium/html_dartium.dart
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index 73f50e22c232442e2b8f42fb898e6b27e526d071..1f309076cae1d6fe1db28f3dedfb9943e0d5533a 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -34750,19 +34750,21 @@ class KeyEvent extends _WrappedEvent implements KeyboardEvent {
}
/** Programmatically create a new KeyEvent (and KeyboardEvent). */
- KeyEvent(String type,
+ factory 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,
+ var 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;
+ var keyEvent = KeyEvent.wrap(parent);
+ keyEvent._shadowAltKey = altKey;
+ keyEvent._shadowCharCode = charCode;
+ keyEvent._shadowKeyCode = keyCode;
+ keyEvent._currentTarget = currentTarget == null ? window : currentTarget;
+ return keyEvent;
}
/** Accessor to provide a stream of KeyEvents on the desired target. */
« no previous file with comments | « no previous file | tools/dom/src/dartium_KeyEvent.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698