OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 14 matching lines...) Expand all Loading... |
25 ] interface MouseEvent : UIEvent { | 25 ] interface MouseEvent : UIEvent { |
26 readonly attribute double screenX; | 26 readonly attribute double screenX; |
27 readonly attribute double screenY; | 27 readonly attribute double screenY; |
28 readonly attribute double clientX; | 28 readonly attribute double clientX; |
29 readonly attribute double clientY; | 29 readonly attribute double clientY; |
30 readonly attribute boolean ctrlKey; | 30 readonly attribute boolean ctrlKey; |
31 readonly attribute boolean shiftKey; | 31 readonly attribute boolean shiftKey; |
32 readonly attribute boolean altKey; | 32 readonly attribute boolean altKey; |
33 readonly attribute boolean metaKey; | 33 readonly attribute boolean metaKey; |
34 readonly attribute short button; | 34 readonly attribute short button; |
35 readonly attribute unsigned short buttons; | 35 [Measure] readonly attribute unsigned short buttons; |
36 readonly attribute EventTarget? relatedTarget; | 36 readonly attribute EventTarget? relatedTarget; |
37 boolean getModifierState(DOMString keyArg); | 37 [Measure] boolean getModifierState(DOMString keyArg); |
38 | 38 |
39 // https://w3c.github.io/uievents/#idl-interface-MouseEvent-initializers | 39 // https://w3c.github.io/uievents/#idl-interface-MouseEvent-initializers |
40 // TODO(foolip): None of the initMouseEvent() arguments should be optional. | 40 // TODO(foolip): None of the initMouseEvent() arguments should be optional. |
41 [CallWith=ScriptState, Measure] void initMouseEvent([Default=Undefined] opti
onal DOMString type, | 41 [CallWith=ScriptState, Measure] void initMouseEvent([Default=Undefined] opti
onal DOMString type, |
42 [Default=Undefined] opti
onal boolean bubbles, | 42 [Default=Undefined] opti
onal boolean bubbles, |
43 [Default=Undefined] opti
onal boolean cancelable, | 43 [Default=Undefined] opti
onal boolean cancelable, |
44 [Default=Undefined] opti
onal Window? view, | 44 [Default=Undefined] opti
onal Window? view, |
45 [Default=Undefined] opti
onal long detail, | 45 [Default=Undefined] opti
onal long detail, |
46 [Default=Undefined] opti
onal long screenX, | 46 [Default=Undefined] opti
onal long screenX, |
47 [Default=Undefined] opti
onal long screenY, | 47 [Default=Undefined] opti
onal long screenY, |
48 [Default=Undefined] opti
onal long clientX, | 48 [Default=Undefined] opti
onal long clientX, |
49 [Default=Undefined] opti
onal long clientY, | 49 [Default=Undefined] opti
onal long clientY, |
50 [Default=Undefined] opti
onal boolean ctrlKey, | 50 [Default=Undefined] opti
onal boolean ctrlKey, |
51 [Default=Undefined] opti
onal boolean altKey, | 51 [Default=Undefined] opti
onal boolean altKey, |
52 [Default=Undefined] opti
onal boolean shiftKey, | 52 [Default=Undefined] opti
onal boolean shiftKey, |
53 [Default=Undefined] opti
onal boolean metaKey, | 53 [Default=Undefined] opti
onal boolean metaKey, |
54 [Default=Undefined] opti
onal unsigned short button, | 54 [Default=Undefined] opti
onal unsigned short button, |
55 [Default=Undefined] opti
onal EventTarget? relatedTarget); | 55 [Default=Undefined] opti
onal EventTarget? relatedTarget); |
56 | 56 |
57 readonly attribute double pageX; | 57 [Measure] readonly attribute double pageX; |
58 readonly attribute double pageY; | 58 [Measure] readonly attribute double pageY; |
59 [MeasureAs=MouseEventX] readonly attribute double x; | 59 [MeasureAs=MouseEventX] readonly attribute double x; |
60 [MeasureAs=MouseEventY] readonly attribute double y; | 60 [MeasureAs=MouseEventY] readonly attribute double y; |
61 [MeasureAs=MouseEventOffsetX] readonly attribute double offsetX; | 61 [MeasureAs=MouseEventOffsetX] readonly attribute double offsetX; |
62 [MeasureAs=MouseEventOffsetY] readonly attribute double offsetY; | 62 [MeasureAs=MouseEventOffsetY] readonly attribute double offsetY; |
63 | 63 |
64 // Pointer Lock | 64 // Pointer Lock |
65 // https://w3c.github.io/pointerlock/#extensions-to-the-mouseevent-interface | 65 // https://w3c.github.io/pointerlock/#extensions-to-the-mouseevent-interface |
66 [MeasureAs=MouseEventMovementX] readonly attribute long movementX; | 66 [MeasureAs=MouseEventMovementX] readonly attribute long movementX; |
67 [MeasureAs=MouseEventMovementY] readonly attribute long movementY; | 67 [MeasureAs=MouseEventMovementY] readonly attribute long movementY; |
68 | 68 |
69 // Canvas Hit Regions | 69 // Canvas Hit Regions |
70 // https://html.spec.whatwg.org/multipage/scripting.html#MouseEvent-partial | 70 // https://html.spec.whatwg.org/multipage/scripting.html#MouseEvent-partial |
71 [RuntimeEnabled=ExperimentalCanvasFeatures] readonly attribute DOMString? re
gion; | 71 [RuntimeEnabled=ExperimentalCanvasFeatures, Measure] readonly attribute DOMS
tring? region; |
72 | 72 |
73 // Non-standard | 73 // Non-standard |
74 [MeasureAs=MouseEventFromElement] readonly attribute Node fromElement; | 74 [MeasureAs=MouseEventFromElement] readonly attribute Node fromElement; |
75 [MeasureAs=MouseEventToElement] readonly attribute Node toElement; | 75 [MeasureAs=MouseEventToElement] readonly attribute Node toElement; |
76 [MeasureAs=MouseEventWhich] readonly attribute long which; | 76 [MeasureAs=MouseEventWhich] readonly attribute long which; |
77 [Measure] readonly attribute long layerX; | 77 [Measure] readonly attribute long layerX; |
78 [Measure] readonly attribute long layerY; | 78 [Measure] readonly attribute long layerY; |
79 }; | 79 }; |
OLD | NEW |