| 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..3b39bdb70e40e73c8fbd742ea5b760f90aa991df 100644
|
| --- a/tools/dom/src/dartium_KeyEvent.dart
|
| +++ b/tools/dom/src/dartium_KeyEvent.dart
|
| @@ -61,19 +61,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. */
|
|
|