Chromium Code Reviews| 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 |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 * Library General Public License for more details. | 12 * Library General Public License for more details. |
| 13 * | 13 * |
| 14 * You should have received a copy of the GNU Library General Public License | 14 * You should have received a copy of the GNU Library General Public License |
| 15 * along with this library; see the file COPYING.LIB. If not, write to | 15 * along with this library; see the file COPYING.LIB. If not, write to |
| 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 17 * Boston, MA 02110-1301, USA. | 17 * Boston, MA 02110-1301, USA. |
| 18 */ | 18 */ |
| 19 | 19 |
| 20 // http://www.w3.org/TR/DOM-Level-3-Events/#interface-MouseEvent | 20 // https://w3c.github.io/uievents/#interface-MouseEvent |
| 21 | 21 |
| 22 [ | 22 [ |
| 23 Constructor(DOMString type, optional MouseEventInit eventInitDict), | 23 Constructor(DOMString type, optional MouseEventInit eventInitDict), |
| 24 ConstructorCallWith=ScriptState, | 24 ConstructorCallWith=ScriptState, |
| 25 ] interface MouseEvent : UIEvent { | 25 ] interface MouseEvent : UIEvent { |
| 26 readonly attribute long screenX; | 26 readonly attribute long screenX; |
| 27 readonly attribute long screenY; | 27 readonly attribute long screenY; |
| 28 readonly attribute long clientX; | 28 readonly attribute long clientX; |
| 29 readonly attribute long clientY; | 29 readonly attribute long 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 // TODO(philipj): button should be short, not unsigned short. | |
|
Rick Byers
2015/06/03 13:42:13
note I believe this was a change as a result of po
philipj_slow
2015/06/03 14:40:48
I agree that this kind of thing doesn't need an in
Rick Byers
2015/06/03 14:50:29
Yes, plus IMHO your time is much better spent prov
| |
| 34 readonly attribute unsigned short button; | 35 readonly attribute unsigned short button; |
| 35 readonly attribute unsigned short buttons; | 36 readonly attribute unsigned short buttons; |
| 36 readonly attribute EventTarget? relatedTarget; | 37 readonly attribute EventTarget? relatedTarget; |
| 37 [MeasureAs=MouseEventMovementX] readonly attribute long movement X; | 38 // TODO(philipj): boolean getModifierState(DOMString keyArg); |
|
Rick Byers
2015/06/03 13:42:13
I wonder if we should be filing Available bugs for
philipj_slow
2015/06/03 14:40:48
Some missing thing could be trivial, but I suspect
Rick Byers
2015/06/03 14:50:29
Yeah many are non-trivial but still somewhat formu
| |
| 38 [MeasureAs=MouseEventMovementY] readonly attribute long movement Y; | |
| 39 [MeasureAs=PrefixedMouseEventMovementX, ImplementedAs=movementX] readonly at tribute long webkitMovementX; | |
| 40 [MeasureAs=PrefixedMouseEventMovementY, ImplementedAs=movementY] readonly at tribute long webkitMovementY; | |
| 41 | 39 |
| 42 [CallWith=ScriptState] void initMouseEvent([Default=Undefined] optional DOM String type, | 40 // https://w3c.github.io/uievents/#idl-interface-MouseEvent-initializers |
| 43 [Default=Undefined] optional boolean canB ubble, | 41 // TODO(philipj): None of the initMouseEvent() arguments should be optional. |
| 42 [CallWith=ScriptState] void initMouseEvent([Default=Undefined] optional DOMS tring type, | |
| 43 [Default=Undefined] optional boolean bubb les, | |
| 44 [Default=Undefined] optional boolean canc elable, | 44 [Default=Undefined] optional boolean canc elable, |
| 45 [Default=Undefined] optional Window view, | 45 [Default=Undefined] optional Window? view , |
| 46 [Default=Undefined] optional long detail, | 46 [Default=Undefined] optional long detail, |
| 47 [Default=Undefined] optional long screenX , | 47 [Default=Undefined] optional long screenX , |
| 48 [Default=Undefined] optional long screenY , | 48 [Default=Undefined] optional long screenY , |
| 49 [Default=Undefined] optional long clientX , | 49 [Default=Undefined] optional long clientX , |
| 50 [Default=Undefined] optional long clientY , | 50 [Default=Undefined] optional long clientY , |
| 51 [Default=Undefined] optional boolean ctrl Key, | 51 [Default=Undefined] optional boolean ctrl Key, |
| 52 [Default=Undefined] optional boolean altK ey, | 52 [Default=Undefined] optional boolean altK ey, |
| 53 [Default=Undefined] optional boolean shif tKey, | 53 [Default=Undefined] optional boolean shif tKey, |
| 54 [Default=Undefined] optional boolean meta Key, | 54 [Default=Undefined] optional boolean meta Key, |
| 55 [Default=Undefined] optional unsigned sho rt button, | 55 [Default=Undefined] optional unsigned sho rt button, |
| 56 [Default=Undefined] optional EventTarget relatedTarget); | 56 [Default=Undefined] optional EventTarget? relatedTarget); |
| 57 | |
| 58 // Pointer Lock | |
| 59 // https://dvcs.w3.org/hg/pointerlock/raw-file/default/index.html#extensions -to-the-mouseevent-interface | |
| 60 [MeasureAs=MouseEventMovementX] readonly attribute long movementX; | |
| 61 [MeasureAs=MouseEventMovementY] readonly attribute long movementY; | |
| 57 | 62 |
| 58 // Non-standard | 63 // Non-standard |
| 59 [MeasureAs=MouseEventOffsetX] readonly attribute long offsetX; | 64 [MeasureAs=MouseEventOffsetX] readonly attribute long offsetX; |
| 60 [MeasureAs=MouseEventOffsetY] readonly attribute long offsetY; | 65 [MeasureAs=MouseEventOffsetY] readonly attribute long offsetY; |
| 61 [MeasureAs=MouseEventX] readonly attribute long x; | 66 [MeasureAs=MouseEventX] readonly attribute long x; |
| 62 [MeasureAs=MouseEventY] readonly attribute long y; | 67 [MeasureAs=MouseEventY] readonly attribute long y; |
| 63 [MeasureAs=MouseEventFromElement] readonly attribute Node fromElement; | 68 [MeasureAs=MouseEventFromElement] readonly attribute Node fromElement; |
| 64 [MeasureAs=MouseEventToElement] readonly attribute Node toElement; | 69 [MeasureAs=MouseEventToElement] readonly attribute Node toElement; |
| 65 [MeasureAs=MouseEventWhich] readonly attribute long which; | 70 [MeasureAs=MouseEventWhich] readonly attribute long which; |
| 71 [MeasureAs=PrefixedMouseEventMovementX, ImplementedAs=movementX] readonly at tribute long webkitMovementX; | |
| 72 [MeasureAs=PrefixedMouseEventMovementY, ImplementedAs=movementY] readonly at tribute long webkitMovementY; | |
| 66 | 73 |
| 67 // FIXME: this belongs on the DragEvent interface | 74 // FIXME: this belongs on the DragEvent interface |
| 68 readonly attribute DataTransfer dataTransfer; | 75 readonly attribute DataTransfer dataTransfer; |
| 69 }; | 76 }; |
| OLD | NEW |