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: sdk/lib/html/dart2js/html_dart2js.dart

Side-by-side diff isn't available for this file because of its large size.
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:
Download patch
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dart2js/html_dart2js.dart
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 9ebcdf455de8b784b6e08991478a69d50052d1be..aa69def3247cd0b2764368db5d18d45e12139224 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -21436,6 +21436,9 @@ class KeyboardEvent extends UIEvent {
@DomName('KeyboardEvent.charCode')
int get charCode => _charCode;
+ @DomName('KeyboardEvent.which')
+ int get which => _which;
+
@DomName('KeyboardEvent.KeyboardEvent')
@DocsEditable()
factory KeyboardEvent._(String type, [Map eventInitDict]) {
@@ -21472,9 +21475,6 @@ class KeyboardEvent extends UIEvent {
@DocsEditable()
final bool altKey;
- // Use implementation from UIEvent.
- // final int _charCode;
-
@DomName('KeyboardEvent.code')
@DocsEditable()
@Experimental() // untriaged
@@ -21489,9 +21489,6 @@ class KeyboardEvent extends UIEvent {
@Experimental() // untriaged
final String key;
- // Use implementation from UIEvent.
- // final int _keyCode;
-
@JSName('keyIdentifier')
@DomName('KeyboardEvent.keyIdentifier')
@DocsEditable()
@@ -21521,9 +21518,6 @@ class KeyboardEvent extends UIEvent {
@DocsEditable()
final bool shiftKey;
- // Use implementation from UIEvent.
- // final int which;
-
@DomName('KeyboardEvent.getModifierState')
@DocsEditable()
@Experimental() // untriaged
@@ -24218,7 +24212,7 @@ class MouseEvent extends UIEvent {
final int _webkitMovementY;
// Use implementation from UIEvent.
- // final int which;
+ // final int _which;
@DomName('MouseEvent.initMouseEvent')
@DocsEditable()
@@ -33445,10 +33439,11 @@ class UIEvent extends Event {
@Returns('Window|=Object')
final dynamic _get_view;
+ @JSName('which')
@DomName('UIEvent.which')
@DocsEditable()
@Unstable()
- final int which;
+ final int _which;
@JSName('initUIEvent')
@DomName('UIEvent.initUIEvent')
@@ -43160,22 +43155,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. */
@@ -43314,9 +43309,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,
@@ -43329,6 +43326,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) {
@@ -43338,6 +43336,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.");
}
@@ -43347,10 +43347,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 | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698