Index: core/events/UIEvent.idl |
diff --git a/core/events/UIEvent.idl b/core/events/UIEvent.idl |
index 4d025d8050b968d75e006eb29804a3a86692fd14..7cb51a83bc6b87dd553eb9564e3f1fc384c7ce32 100644 |
--- a/core/events/UIEvent.idl |
+++ b/core/events/UIEvent.idl |
@@ -17,26 +17,25 @@ |
* Boston, MA 02110-1301, USA. |
*/ |
+// https://w3c.github.io/uievents/#interface-UIEvent |
+ |
[ |
- EventConstructor, |
+ Constructor(DOMString type, optional UIEventInit eventInitDict) |
] interface UIEvent : Event { |
- [InitializedByEventConstructor] readonly attribute Window? view; |
- [InitializedByEventConstructor] readonly attribute long detail; |
- |
- void initUIEvent([Default=Undefined] optional DOMString type, |
- [Default=Undefined] optional boolean canBubble, |
- [Default=Undefined] optional boolean cancelable, |
- [Default=Undefined] optional Window view, |
- [Default=Undefined] optional long detail); |
+ readonly attribute Window? view; |
+ readonly attribute long detail; |
+ [RuntimeEnabled=InputDevice] readonly attribute InputDevice? sourceDevice; |
- // Non-standard |
- [MeasureAs=UIEventLayerX] readonly attribute long layerX; |
- [MeasureAs=UIEventLayerY] readonly attribute long layerY; |
- [MeasureAs=UIEventPageX] readonly attribute long pageX; |
- [MeasureAs=UIEventPageY] readonly attribute long pageY; |
+ // https://w3c.github.io/uievents/#idl-interface-UIEvent-initializers |
+ // TODO(philipj): None of the initUIEvent() arguments should be optional. |
+ [Measure] void initUIEvent([Default=Undefined] optional DOMString type, |
+ [Default=Undefined] optional boolean bubbles, |
+ [Default=Undefined] optional boolean cancelable, |
+ [Default=Undefined] optional Window? view, |
+ [Default=Undefined] optional long detail); |
// FIXME: these belong on the KeyboardEvent interface |
- readonly attribute long keyCode; |
- readonly attribute long charCode; |
- readonly attribute long which; |
+ [MeasureAs=UIEventCharCode] readonly attribute long charCode; |
+ [MeasureAs=UIEventKeyCode] readonly attribute long keyCode; |
+ [MeasureAs=UIEventWhich] readonly attribute long which; |
}; |