diff options
Diffstat (limited to 'Source/WebCore/dom/MouseEvent.idl')
-rw-r--r-- | Source/WebCore/dom/MouseEvent.idl | 74 |
1 files changed, 32 insertions, 42 deletions
diff --git a/Source/WebCore/dom/MouseEvent.idl b/Source/WebCore/dom/MouseEvent.idl index 7d3524051..7d6f60d60 100644 --- a/Source/WebCore/dom/MouseEvent.idl +++ b/Source/WebCore/dom/MouseEvent.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2015 Apple Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -18,48 +18,38 @@ */ [ - ConstructorConditional=DOM4_EVENTS_CONSTRUCTOR, - ConstructorTemplate=Event, + Constructor(DOMString type, optional MouseEventInit eventInitDict), + DoNotCheckConstants, ] interface MouseEvent : UIEvent { - [InitializedByEventConstructor] readonly attribute long screenX; - [InitializedByEventConstructor] readonly attribute long screenY; - [InitializedByEventConstructor] readonly attribute long clientX; - [InitializedByEventConstructor] readonly attribute long clientY; - [InitializedByEventConstructor] readonly attribute boolean ctrlKey; - [InitializedByEventConstructor] readonly attribute boolean shiftKey; - [InitializedByEventConstructor] readonly attribute boolean altKey; - [InitializedByEventConstructor] readonly attribute boolean metaKey; - [InitializedByEventConstructor] readonly attribute unsigned short button; - [InitializedByEventConstructor] readonly attribute EventTarget relatedTarget; - [Conditional=POINTER_LOCK] readonly attribute long webkitMovementX; - [Conditional=POINTER_LOCK] readonly attribute long webkitMovementY; - - [ObjCLegacyUnnamedParameters] void initMouseEvent([Default=Undefined] optional DOMString type, - [Default=Undefined] optional boolean canBubble, - [Default=Undefined] optional boolean cancelable, - [Default=Undefined] optional DOMWindow view, - [Default=Undefined] optional long detail, - [Default=Undefined] optional long screenX, - [Default=Undefined] optional long screenY, - [Default=Undefined] optional long clientX, - [Default=Undefined] optional long clientY, - [Default=Undefined] optional boolean ctrlKey, - [Default=Undefined] optional boolean altKey, - [Default=Undefined] optional boolean shiftKey, - [Default=Undefined] optional boolean metaKey, - [Default=Undefined] optional unsigned short button, - [Default=Undefined] optional EventTarget relatedTarget); + [Conditional=MOUSE_FORCE_EVENTS] const double WEBKIT_FORCE_AT_MOUSE_DOWN = 1; + [Conditional=MOUSE_FORCE_EVENTS] const double WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN = 2; - // extensions - readonly attribute long offsetX; - readonly attribute long offsetY; - readonly attribute long x; - readonly attribute long y; - readonly attribute Node fromElement; - readonly attribute Node toElement; + readonly attribute long screenX; + readonly attribute long screenY; + readonly attribute long clientX; + readonly attribute long clientY; + readonly attribute boolean ctrlKey; + readonly attribute boolean shiftKey; + readonly attribute boolean altKey; + readonly attribute boolean metaKey; + readonly attribute unsigned short button; + readonly attribute EventTarget? relatedTarget; + [Conditional=POINTER_LOCK] readonly attribute long movementX; + [Conditional=POINTER_LOCK] readonly attribute long movementY; + [Conditional=MOUSE_FORCE_EVENTS, ImplementedAs=force]readonly attribute double webkitForce; -#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT - readonly attribute Clipboard dataTransfer; -#endif -}; + // FIXME: Using "undefined" as default parameter value is wrong. + void initMouseEvent(optional DOMString type = "undefined", optional boolean canBubble = false, optional boolean cancelable = false, + optional DOMWindow? view = null, optional long detail = 0, + optional long screenX = 0, optional long screenY = 0, optional long clientX = 0, optional long clientY = 0, + optional boolean ctrlKey = false, optional boolean altKey = false, optional boolean shiftKey = false, optional boolean metaKey = false, + optional unsigned short button = 0, optional EventTarget? relatedTarget = null); + readonly attribute long offsetX; + readonly attribute long offsetY; + readonly attribute long x; + readonly attribute long y; + readonly attribute Node? fromElement; + readonly attribute Node? toElement; + readonly attribute DataTransfer dataTransfer; +}; |