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

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

Issue 1754523006: Beginning fix for KeyEvent,KeyboardEvent and UIEvent changes in roll 45 (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Merged Created 4 years, 9 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/scripts/htmlrenamer.py ('k') | tools/dom/src/dartium_KeyEvent.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/src/dart2js_KeyEvent.dart
diff --git a/tools/dom/src/dart2js_KeyEvent.dart b/tools/dom/src/dart2js_KeyEvent.dart
index 5dd0c0636f853bc83503693b1112c9691559b9c9..59f28d015d2001e5794b1803e650fdbdd07f886b 100644
--- a/tools/dom/src/dart2js_KeyEvent.dart
+++ b/tools/dom/src/dart2js_KeyEvent.dart
@@ -33,22 +33,22 @@ class KeyEvent extends _WrappedEvent implements KeyboardEvent {
/** The "fixed" value of whether the alt key is being pressed. */
bool _shadowAltKey;
- /** Caculated value of what the estimated charCode is for this event. */
+ /** Calculated value of what the estimated charCode is for this event. */
int _shadowCharCode;
- /** Caculated value of what the estimated keyCode is for this event. */
+ /** Calculated value of what the estimated keyCode is for this event. */
int _shadowKeyCode;
- /** Caculated value of what the estimated keyCode is for this event. */
+ /** Calculated value of what the estimated keyCode is for this event. */
int get keyCode => _shadowKeyCode;
- /** Caculated value of what the estimated charCode is for this event. */
+ /** Calculated value of what the estimated charCode is for this event. */
int get charCode => this.type == 'keypress' ? _shadowCharCode : 0;
- /** Caculated value of whether the alt key is pressed is for this event. */
+ /** Calculated value of whether the alt key is pressed is for this event. */
bool get altKey => _shadowAltKey;
- /** Caculated value of what the estimated keyCode is for this event. */
+ /** Calculated value of what the estimated keyCode is for this event. */
int get which => keyCode;
/** Accessor to the underlying keyCode value is the parent event. */
@@ -187,9 +187,11 @@ class KeyEvent extends _WrappedEvent implements KeyboardEvent {
/** Accessor to the clipboardData available for this event. */
DataTransfer get clipboardData => _parent.clipboardData;
+ String get code => parent.code;
/** True if the ctrl key is pressed during this event. */
bool get ctrlKey => _parent.ctrlKey;
int get detail => _parent.detail;
+ String get key => parent.key;
/**
* Accessor to the part of the keyboard that the key was pressed from (one of
* KeyLocation.STANDARD, KeyLocation.RIGHT, KeyLocation.LEFT,
@@ -202,6 +204,7 @@ class KeyEvent extends _WrappedEvent implements KeyboardEvent {
Point get page => _parent.page;
/** True if the shift key was pressed during this event. */
bool get shiftKey => _parent.shiftKey;
+ InputDevice get sourceDevice => parent.sourceDevice;
Window get view => _parent.view;
void _initUIEvent(String type, bool canBubble, bool cancelable,
Window view, int detail) {
@@ -211,6 +214,8 @@ class KeyEvent extends _WrappedEvent implements KeyboardEvent {
int get _charCode => charCode;
int get _keyCode => keyCode;
+ int get _which => which;
+
String get _keyIdentifier {
throw new UnsupportedError("keyIdentifier is unsupported.");
}
@@ -220,10 +225,6 @@ class KeyEvent extends _WrappedEvent implements KeyboardEvent {
throw new UnsupportedError(
"Cannot initialize a KeyboardEvent from a KeyEvent.");
}
- int get _layerX => throw new UnsupportedError('Not applicable to KeyEvent');
- int get _layerY => throw new UnsupportedError('Not applicable to KeyEvent');
- int get _pageX => throw new UnsupportedError('Not applicable to KeyEvent');
- int get _pageY => throw new UnsupportedError('Not applicable to KeyEvent');
@Experimental() // untriaged
bool getModifierState(String keyArgument) => throw new UnimplementedError();
@Experimental() // untriaged
« no previous file with comments | « tools/dom/scripts/htmlrenamer.py ('k') | tools/dom/src/dartium_KeyEvent.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698