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

Unified Diff: Source/core/events/KeyboardEvent.idl

Issue 1159113007: Sync event interfaces with the UI Events spec (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 5 years, 6 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 | « Source/core/events/FocusEventInit.idl ('k') | Source/core/events/KeyboardEventInit.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/events/KeyboardEvent.idl
diff --git a/Source/core/events/KeyboardEvent.idl b/Source/core/events/KeyboardEvent.idl
index 2fe31b5f93d00c45b7d6f71541e3edbffcf0eca6..669fa7012d2b096b29ea726c0fcfbef10585bf5b 100644
--- a/Source/core/events/KeyboardEvent.idl
+++ b/Source/core/events/KeyboardEvent.idl
@@ -18,29 +18,30 @@
* Boston, MA 02110-1301, USA.
*/
+// https://w3c.github.io/uievents/#interface-KeyboardEvent
+
[
Constructor(DOMString type, optional KeyboardEventInit eventInitDict),
ConstructorCallWith=ScriptState,
] interface KeyboardEvent : UIEvent {
+ // KeyLocationCode
const unsigned long DOM_KEY_LOCATION_STANDARD = 0x00;
const unsigned long DOM_KEY_LOCATION_LEFT = 0x01;
const unsigned long DOM_KEY_LOCATION_RIGHT = 0x02;
const unsigned long DOM_KEY_LOCATION_NUMPAD = 0x03;
-
- [RuntimeEnabled=KeyboardEventCode] readonly attribute DOMString code;
[RuntimeEnabled=KeyboardEventKey] readonly attribute DOMString key;
- readonly attribute DOMString keyIdentifier;
+ [RuntimeEnabled=KeyboardEventCode] readonly attribute DOMString code;
readonly attribute unsigned long location;
- [ImplementedAs=location, DeprecateAs=KeyboardEventKeyLocation] readonly attribute unsigned long keyLocation; // Deprecated.
readonly attribute boolean ctrlKey;
readonly attribute boolean shiftKey;
readonly attribute boolean altKey;
readonly attribute boolean metaKey;
readonly attribute boolean repeat;
+ // TODO(philipj): readonly attribute boolean isComposing;
+ boolean getModifierState(DOMString keyArg);
- boolean getModifierState(DOMString keyArgument);
-
- // FIXME: this does not match the version in the DOM spec.
+ // https://w3c.github.io/uievents/#idl-interface-KeyboardEvent-initializers
+ // FIXME: this does not match the version in the spec.
[CallWith=ScriptState] void initKeyboardEvent([Default=Undefined] optional DOMString type,
[Default=Undefined] optional boolean canBubble,
[Default=Undefined] optional boolean cancelable,
@@ -52,7 +53,12 @@
[Default=Undefined] optional boolean shiftKey,
[Default=Undefined] optional boolean metaKey);
+ // https://w3c.github.io/uievents/#KeyboardEvent-supplemental-interface
readonly attribute long charCode;
readonly attribute long keyCode;
readonly attribute long which;
+
+ // Non-standard APIs
+ [Measure] readonly attribute DOMString keyIdentifier;
+ [ImplementedAs=location, DeprecateAs=KeyboardEventKeyLocation] readonly attribute unsigned long keyLocation;
};
« no previous file with comments | « Source/core/events/FocusEventInit.idl ('k') | Source/core/events/KeyboardEventInit.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698