mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 672054 - Part b: Remove nsIDOMNSMouseEvent; r=smaug
This commit is contained in:
parent
b12351fbda
commit
6aeeb50315
@ -3641,7 +3641,7 @@ nsGenericElement::DispatchClickEvent(nsPresContext* aPresContext,
|
||||
pressure = static_cast<nsMouseEvent*>(aSourceEvent)->pressure;
|
||||
inputSource = static_cast<nsMouseEvent*>(aSourceEvent)->inputSource;
|
||||
} else if (aSourceEvent->eventStructType == NS_KEY_EVENT) {
|
||||
inputSource = nsIDOMNSMouseEvent::MOZ_SOURCE_KEYBOARD;
|
||||
inputSource = nsIDOMMouseEvent::MOZ_SOURCE_KEYBOARD;
|
||||
}
|
||||
event.pressure = pressure;
|
||||
event.clickCount = clickCount;
|
||||
|
@ -54,7 +54,7 @@ nsDOMDragEvent::nsDOMDragEvent(nsPresContext* aPresContext,
|
||||
mEventIsInternal = PR_TRUE;
|
||||
mEvent->time = PR_Now();
|
||||
mEvent->refPoint.x = mEvent->refPoint.y = 0;
|
||||
static_cast<nsMouseEvent*>(mEvent)->inputSource = nsIDOMNSMouseEvent::MOZ_SOURCE_UNKNOWN;
|
||||
static_cast<nsMouseEvent*>(mEvent)->inputSource = nsIDOMMouseEvent::MOZ_SOURCE_UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ nsDOMMouseEvent::nsDOMMouseEvent(nsPresContext* aPresContext,
|
||||
mEventIsInternal = PR_TRUE;
|
||||
mEvent->time = PR_Now();
|
||||
mEvent->refPoint.x = mEvent->refPoint.y = 0;
|
||||
static_cast<nsMouseEvent*>(mEvent)->inputSource = nsIDOMNSMouseEvent::MOZ_SOURCE_UNKNOWN;
|
||||
static_cast<nsMouseEvent*>(mEvent)->inputSource = nsIDOMMouseEvent::MOZ_SOURCE_UNKNOWN;
|
||||
}
|
||||
|
||||
switch (mEvent->eventStructType)
|
||||
@ -98,7 +98,6 @@ DOMCI_DATA(MouseEvent, nsDOMMouseEvent)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN(nsDOMMouseEvent)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMMouseEvent)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMNSMouseEvent)
|
||||
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(MouseEvent)
|
||||
NS_INTERFACE_MAP_END_INHERITING(nsDOMUIEvent)
|
||||
|
||||
|
@ -41,13 +41,12 @@
|
||||
|
||||
#include "nsIDOMMouseEvent.h"
|
||||
#include "nsDOMUIEvent.h"
|
||||
#include "nsIDOMNSMouseEvent.h"
|
||||
|
||||
class nsIContent;
|
||||
class nsEvent;
|
||||
|
||||
class nsDOMMouseEvent : public nsDOMUIEvent,
|
||||
public nsIDOMNSMouseEvent
|
||||
public nsIDOMMouseEvent
|
||||
{
|
||||
public:
|
||||
nsDOMMouseEvent(nsPresContext* aPresContext, nsInputEvent* aEvent);
|
||||
@ -58,9 +57,6 @@ public:
|
||||
// nsIDOMMouseEvent Interface
|
||||
NS_DECL_NSIDOMMOUSEEVENT
|
||||
|
||||
// nsIDOMNSMouseEvent Interface
|
||||
NS_DECL_NSIDOMNSMOUSEEVENT
|
||||
|
||||
// Forward to base class
|
||||
NS_FORWARD_TO_NSDOMUIEVENT
|
||||
|
||||
|
@ -51,7 +51,7 @@ nsDOMMouseScrollEvent::nsDOMMouseScrollEvent(nsPresContext* aPresContext,
|
||||
mEventIsInternal = PR_TRUE;
|
||||
mEvent->time = PR_Now();
|
||||
mEvent->refPoint.x = mEvent->refPoint.y = 0;
|
||||
static_cast<nsMouseEvent*>(mEvent)->inputSource = nsIDOMNSMouseEvent::MOZ_SOURCE_UNKNOWN;
|
||||
static_cast<nsMouseEvent*>(mEvent)->inputSource = nsIDOMMouseEvent::MOZ_SOURCE_UNKNOWN;
|
||||
}
|
||||
|
||||
if(mEvent->eventStructType == NS_MOUSE_SCROLL_EVENT) {
|
||||
|
@ -51,7 +51,7 @@ nsDOMSimpleGestureEvent::nsDOMSimpleGestureEvent(nsPresContext* aPresContext, ns
|
||||
mEventIsInternal = PR_TRUE;
|
||||
mEvent->time = PR_Now();
|
||||
mEvent->refPoint.x = mEvent->refPoint.y = 0;
|
||||
static_cast<nsMouseEvent*>(mEvent)->inputSource = nsIDOMNSMouseEvent::MOZ_SOURCE_UNKNOWN;
|
||||
static_cast<nsMouseEvent*>(mEvent)->inputSource = nsIDOMMouseEvent::MOZ_SOURCE_UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,8 +26,8 @@ function prepareListener(eventName, expectedValue) {
|
||||
};
|
||||
}
|
||||
|
||||
const INPUT_SOURCE_UNKNOWN = Components.interfaces.nsIDOMNSMouseEvent.MOZ_SOURCE_UNKNOWN;
|
||||
const INPUT_SOURCE_KEYBOARD = Components.interfaces.nsIDOMNSMouseEvent.MOZ_SOURCE_KEYBOARD;
|
||||
const INPUT_SOURCE_UNKNOWN = Components.interfaces.nsIDOMMouseEvent.MOZ_SOURCE_UNKNOWN;
|
||||
const INPUT_SOURCE_KEYBOARD = Components.interfaces.nsIDOMMouseEvent.MOZ_SOURCE_KEYBOARD;
|
||||
|
||||
function doTest() {
|
||||
var eventNames = [
|
||||
|
@ -29,13 +29,13 @@ function check(event) {
|
||||
function doTest() {
|
||||
setup();
|
||||
|
||||
expectedInputSource = Components.interfaces.nsIDOMNSMouseEvent.MOZ_SOURCE_KEYBOARD;
|
||||
expectedInputSource = Components.interfaces.nsIDOMMouseEvent.MOZ_SOURCE_KEYBOARD;
|
||||
testKeyboard();
|
||||
|
||||
expectedInputSource = Components.interfaces.nsIDOMNSMouseEvent.MOZ_SOURCE_MOUSE;
|
||||
expectedInputSource = Components.interfaces.nsIDOMMouseEvent.MOZ_SOURCE_MOUSE;
|
||||
testMouse();
|
||||
|
||||
expectedInputSource = Components.interfaces.nsIDOMNSMouseEvent.MOZ_SOURCE_UNKNOWN;
|
||||
expectedInputSource = Components.interfaces.nsIDOMMouseEvent.MOZ_SOURCE_UNKNOWN;
|
||||
testScriptedClicks();
|
||||
|
||||
cleanup();
|
||||
|
@ -3401,7 +3401,7 @@ nsresult nsGenericHTMLElement::Click()
|
||||
// is called from chrome code.
|
||||
nsMouseEvent event(nsContentUtils::IsCallerChrome(),
|
||||
NS_MOUSE_CLICK, nsnull, nsMouseEvent::eReal);
|
||||
event.inputSource = nsIDOMNSMouseEvent::MOZ_SOURCE_UNKNOWN;
|
||||
event.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_UNKNOWN;
|
||||
|
||||
nsEventDispatcher::Dispatch(this, context, &event);
|
||||
|
||||
@ -3507,7 +3507,7 @@ nsGenericHTMLElement::PerformAccesskey(PRBool aKeyCausesActivation,
|
||||
// Click on it if the users prefs indicate to do so.
|
||||
nsMouseEvent event(aIsTrustedEvent, NS_MOUSE_CLICK,
|
||||
nsnull, nsMouseEvent::eReal);
|
||||
event.inputSource = nsIDOMNSMouseEvent::MOZ_SOURCE_KEYBOARD;
|
||||
event.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_KEYBOARD;
|
||||
|
||||
nsAutoPopupStatePusher popupStatePusher(aIsTrustedEvent ?
|
||||
openAllowed : openAbused);
|
||||
|
@ -368,7 +368,7 @@ nsHTMLButtonElement::PostHandleEvent(nsEventChainPostVisitor& aVisitor)
|
||||
nsMouseEvent event(NS_IS_TRUSTED_EVENT(aVisitor.mEvent),
|
||||
NS_MOUSE_CLICK, nsnull,
|
||||
nsMouseEvent::eReal);
|
||||
event.inputSource = nsIDOMNSMouseEvent::MOZ_SOURCE_KEYBOARD;
|
||||
event.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_KEYBOARD;
|
||||
nsEventDispatcher::Dispatch(static_cast<nsIContent*>(this),
|
||||
aVisitor.mPresContext, &event, nsnull,
|
||||
&status);
|
||||
|
@ -2179,7 +2179,7 @@ nsHTMLInputElement::PostHandleEvent(nsEventChainPostVisitor& aVisitor)
|
||||
{
|
||||
nsMouseEvent event(NS_IS_TRUSTED_EVENT(aVisitor.mEvent),
|
||||
NS_MOUSE_CLICK, nsnull, nsMouseEvent::eReal);
|
||||
event.inputSource = nsIDOMNSMouseEvent::MOZ_SOURCE_KEYBOARD;
|
||||
event.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_KEYBOARD;
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
|
||||
nsEventDispatcher::Dispatch(static_cast<nsIContent*>(this),
|
||||
@ -2217,7 +2217,7 @@ nsHTMLInputElement::PostHandleEvent(nsEventChainPostVisitor& aVisitor)
|
||||
nsMouseEvent event(NS_IS_TRUSTED_EVENT(aVisitor.mEvent),
|
||||
NS_MOUSE_CLICK, nsnull,
|
||||
nsMouseEvent::eReal);
|
||||
event.inputSource = nsIDOMNSMouseEvent::MOZ_SOURCE_KEYBOARD;
|
||||
event.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_KEYBOARD;
|
||||
rv = nsEventDispatcher::Dispatch(radioContent,
|
||||
aVisitor.mPresContext,
|
||||
&event, nsnull, &status);
|
||||
|
@ -314,7 +314,7 @@ nsHTMLLabelElement::PerformAccesskey(PRBool aKeyCausesActivation,
|
||||
// Click on it if the users prefs indicate to do so.
|
||||
nsMouseEvent event(aIsTrustedEvent, NS_MOUSE_CLICK,
|
||||
nsnull, nsMouseEvent::eReal);
|
||||
event.inputSource = nsIDOMNSMouseEvent::MOZ_SOURCE_KEYBOARD;
|
||||
event.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_KEYBOARD;
|
||||
|
||||
nsAutoPopupStatePusher popupStatePusher(aIsTrustedEvent ?
|
||||
openAllowed : openAbused);
|
||||
|
@ -694,7 +694,7 @@ nsXULElement::PerformAccesskey(PRBool aKeyCausesActivation,
|
||||
}
|
||||
}
|
||||
if (aKeyCausesActivation && tag != nsGkAtoms::textbox && tag != nsGkAtoms::menulist) {
|
||||
elm->ClickWithInputSource(nsIDOMNSMouseEvent::MOZ_SOURCE_KEYBOARD);
|
||||
elm->ClickWithInputSource(nsIDOMMouseEvent::MOZ_SOURCE_KEYBOARD);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -2077,7 +2077,7 @@ nsXULElement::Blur()
|
||||
NS_IMETHODIMP
|
||||
nsXULElement::Click()
|
||||
{
|
||||
return ClickWithInputSource(nsIDOMNSMouseEvent::MOZ_SOURCE_UNKNOWN);
|
||||
return ClickWithInputSource(nsIDOMMouseEvent::MOZ_SOURCE_UNKNOWN);
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -473,9 +473,6 @@
|
||||
|
||||
// Simple gestures include
|
||||
#include "nsIDOMSimpleGestureEvent.h"
|
||||
|
||||
#include "nsIDOMNSMouseEvent.h"
|
||||
|
||||
#include "nsIDOMMozTouchEvent.h"
|
||||
|
||||
#include "nsIEventListenerService.h"
|
||||
@ -2463,21 +2460,18 @@ nsDOMClassInfo::Init()
|
||||
|
||||
DOM_CLASSINFO_MAP_BEGIN(MouseEvent, nsIDOMMouseEvent)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMMouseEvent)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSMouseEvent)
|
||||
DOM_CLASSINFO_UI_EVENT_MAP_ENTRIES
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
||||
DOM_CLASSINFO_MAP_BEGIN(MouseScrollEvent, nsIDOMMouseScrollEvent)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMMouseScrollEvent)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMMouseEvent)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSMouseEvent)
|
||||
DOM_CLASSINFO_UI_EVENT_MAP_ENTRIES
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
||||
DOM_CLASSINFO_MAP_BEGIN(DragEvent, nsIDOMDragEvent)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMDragEvent)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMMouseEvent)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSMouseEvent)
|
||||
DOM_CLASSINFO_UI_EVENT_MAP_ENTRIES
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
||||
@ -3940,14 +3934,12 @@ nsDOMClassInfo::Init()
|
||||
DOM_CLASSINFO_MAP_BEGIN(SimpleGestureEvent, nsIDOMSimpleGestureEvent)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSimpleGestureEvent)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMMouseEvent)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSMouseEvent)
|
||||
DOM_CLASSINFO_UI_EVENT_MAP_ENTRIES
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
||||
DOM_CLASSINFO_MAP_BEGIN(MozTouchEvent, nsIDOMMozTouchEvent)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMMozTouchEvent)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMMouseEvent)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSMouseEvent)
|
||||
DOM_CLASSINFO_UI_EVENT_MAP_ENTRIES
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
||||
|
@ -74,7 +74,6 @@ XPIDLSRCS = \
|
||||
nsIDOMPaintRequest.idl \
|
||||
nsIDOMPaintRequestList.idl \
|
||||
nsIDOMSimpleGestureEvent.idl \
|
||||
nsIDOMNSMouseEvent.idl \
|
||||
nsIDOMMozTouchEvent.idl \
|
||||
nsIDOMDeviceOrientationEvent.idl\
|
||||
nsIDOMDeviceMotionEvent.idl \
|
||||
|
@ -40,7 +40,7 @@
|
||||
|
||||
interface nsIDOMDataTransfer;
|
||||
|
||||
[scriptable, uuid(326d652c-4c43-424e-95fe-4281d20975d7)]
|
||||
[scriptable, uuid(26b40393-c383-4e9a-977f-e8e1351926eb)]
|
||||
interface nsIDOMDragEvent : nsIDOMMouseEvent
|
||||
{
|
||||
readonly attribute nsIDOMDataTransfer dataTransfer;
|
||||
|
@ -22,6 +22,7 @@
|
||||
* Contributor(s):
|
||||
* Tom Pixley <joki@netscape.com> (original author)
|
||||
* Johnny Stenback <jst@netscape.com>
|
||||
* Oleg Romashin <romaxa@gmail.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
@ -47,7 +48,7 @@
|
||||
* http://www.w3.org/TR/DOM-Level-2-Events/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(260c32cb-d709-46d4-8889-00de1ab091c6)]
|
||||
[scriptable, uuid(7e6cb6e1-d3ba-4e60-a6ff-96350187a1e3)]
|
||||
interface nsIDOMMouseEvent : nsIDOMUIEvent
|
||||
{
|
||||
readonly attribute long screenX;
|
||||
@ -79,4 +80,36 @@ interface nsIDOMMouseEvent : nsIDOMUIEvent
|
||||
in boolean metaKeyArg,
|
||||
in unsigned short buttonArg,
|
||||
in nsIDOMEventTarget relatedTargetArg);
|
||||
|
||||
// Finger or touch pressure event value
|
||||
// ranges between 0.0 and 1.0
|
||||
readonly attribute float mozPressure;
|
||||
|
||||
const unsigned short MOZ_SOURCE_UNKNOWN = 0;
|
||||
const unsigned short MOZ_SOURCE_MOUSE = 1;
|
||||
const unsigned short MOZ_SOURCE_PEN = 2;
|
||||
const unsigned short MOZ_SOURCE_ERASER = 3;
|
||||
const unsigned short MOZ_SOURCE_CURSOR = 4;
|
||||
const unsigned short MOZ_SOURCE_TOUCH = 5;
|
||||
const unsigned short MOZ_SOURCE_KEYBOARD = 6;
|
||||
|
||||
readonly attribute unsigned short mozInputSource;
|
||||
|
||||
void initNSMouseEvent(in DOMString typeArg,
|
||||
in boolean canBubbleArg,
|
||||
in boolean cancelableArg,
|
||||
in nsIDOMWindow viewArg,
|
||||
in long detailArg,
|
||||
in long screenXArg,
|
||||
in long screenYArg,
|
||||
in long clientXArg,
|
||||
in long clientYArg,
|
||||
in boolean ctrlKeyArg,
|
||||
in boolean altKeyArg,
|
||||
in boolean shiftKeyArg,
|
||||
in boolean metaKeyArg,
|
||||
in unsigned short buttonArg,
|
||||
in nsIDOMEventTarget relatedTargetArg,
|
||||
in float pressure,
|
||||
in unsigned short inputSourceArg);
|
||||
};
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
#include "nsIDOMMouseEvent.idl"
|
||||
|
||||
[scriptable, uuid(196cb2ff-7a20-4226-9e14-00ef201d1b0c)]
|
||||
[scriptable, uuid(eac2ea89-7926-417a-bbc8-bb893e77bebb)]
|
||||
interface nsIDOMMouseScrollEvent : nsIDOMMouseEvent
|
||||
{
|
||||
const long HORIZONTAL_AXIS = 1;
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include "nsIDOMMouseEvent.idl"
|
||||
|
||||
|
||||
[scriptable, uuid(1add2f2b-2931-429f-a16f-b724469ac8c4)]
|
||||
[scriptable, uuid(e680bab6-740a-4097-b5e0-5e9d7d381cbc)]
|
||||
interface nsIDOMMozTouchEvent : nsIDOMMouseEvent
|
||||
{
|
||||
readonly attribute unsigned long streamId;
|
||||
|
@ -1,80 +0,0 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2008
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Oleg Romashin <romaxa@gmail.com> (original author)
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsIDOMMouseEvent.idl"
|
||||
|
||||
/**
|
||||
* The nsIDOMNSMouseEvent interface extends nsIDOMMouseEvent
|
||||
* by providing various information related to the mouse event.
|
||||
*/
|
||||
|
||||
[scriptable, uuid(78977629-3069-4381-b4fd-0beca7cb4e2f)]
|
||||
interface nsIDOMNSMouseEvent : nsIDOMMouseEvent
|
||||
{
|
||||
// Finger or touch pressure event value
|
||||
// ranges between 0.0 and 1.0
|
||||
readonly attribute float mozPressure;
|
||||
|
||||
const unsigned short MOZ_SOURCE_UNKNOWN = 0;
|
||||
const unsigned short MOZ_SOURCE_MOUSE = 1;
|
||||
const unsigned short MOZ_SOURCE_PEN = 2;
|
||||
const unsigned short MOZ_SOURCE_ERASER = 3;
|
||||
const unsigned short MOZ_SOURCE_CURSOR = 4;
|
||||
const unsigned short MOZ_SOURCE_TOUCH = 5;
|
||||
const unsigned short MOZ_SOURCE_KEYBOARD = 6;
|
||||
|
||||
readonly attribute unsigned short mozInputSource;
|
||||
|
||||
void initNSMouseEvent(in DOMString typeArg,
|
||||
in boolean canBubbleArg,
|
||||
in boolean cancelableArg,
|
||||
in nsIDOMWindow viewArg,
|
||||
in long detailArg,
|
||||
in long screenXArg,
|
||||
in long screenYArg,
|
||||
in long clientXArg,
|
||||
in long clientYArg,
|
||||
in boolean ctrlKeyArg,
|
||||
in boolean altKeyArg,
|
||||
in boolean shiftKeyArg,
|
||||
in boolean metaKeyArg,
|
||||
in unsigned short buttonArg,
|
||||
in nsIDOMEventTarget relatedTargetArg,
|
||||
in float pressure,
|
||||
in unsigned short inputSourceArg);
|
||||
};
|
@ -97,7 +97,7 @@
|
||||
* consuming events.
|
||||
*/
|
||||
|
||||
[scriptable, uuid(0efb9da9-e7c4-495e-815d-3f561cb6e6bb)]
|
||||
[scriptable, uuid(0fdcef08-b4e8-4d41-91a0-4f5d259bfb81)]
|
||||
interface nsIDOMSimpleGestureEvent : nsIDOMMouseEvent
|
||||
{
|
||||
/* Swipe direction constants */
|
||||
|
@ -50,7 +50,7 @@
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsIDOMKeyEvent.h"
|
||||
#include "nsIDOMNSMouseEvent.h"
|
||||
#include "nsIDOMMouseEvent.h"
|
||||
#include "nsIDOMDataTransfer.h"
|
||||
#include "nsIDOMEventTarget.h"
|
||||
#include "nsWeakPtr.h"
|
||||
@ -832,8 +832,8 @@ public:
|
||||
}
|
||||
|
||||
nsMouseEvent_base(PRBool isTrusted, PRUint32 msg, nsIWidget *w, PRUint8 type)
|
||||
: nsInputEvent(isTrusted, msg, w, type), button(0), pressure(0),
|
||||
inputSource(nsIDOMNSMouseEvent::MOZ_SOURCE_MOUSE) {}
|
||||
: nsInputEvent(isTrusted, msg, w, type), button(0), pressure(0)
|
||||
, inputSource(nsIDOMMouseEvent::MOZ_SOURCE_MOUSE) {}
|
||||
|
||||
/// The possible related target
|
||||
nsCOMPtr<nsISupports> relatedTarget;
|
||||
@ -844,7 +844,7 @@ public:
|
||||
// ranges between 0.0 and 1.0
|
||||
float pressure;
|
||||
|
||||
// Possible values at nsIDOMNSMouseEvent
|
||||
// Possible values at nsIDOMMouseEvent
|
||||
PRUint16 inputSource;
|
||||
};
|
||||
|
||||
|
@ -119,7 +119,7 @@
|
||||
#include "mozilla/WidgetTraceEvent.h"
|
||||
#include "nsIAppShell.h"
|
||||
#include "nsISupportsPrimitives.h"
|
||||
#include "nsIDOMNSMouseEvent.h"
|
||||
#include "nsIDOMMouseEvent.h"
|
||||
#include "nsITheme.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsIScreenManager.h"
|
||||
@ -6248,7 +6248,7 @@ PRBool nsWindow::OnTouch(WPARAM wParam, LPARAM lParam)
|
||||
touchPoint.ScreenToClient(mWnd);
|
||||
|
||||
nsMozTouchEvent touchEvent(PR_TRUE, msg, this, pInputs[i].dwID);
|
||||
touchEvent.inputSource = nsIDOMNSMouseEvent::MOZ_SOURCE_TOUCH;
|
||||
touchEvent.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_TOUCH;
|
||||
touchEvent.refPoint = touchPoint;
|
||||
|
||||
nsEventStatus status;
|
||||
@ -6280,7 +6280,7 @@ PRBool nsWindow::OnGesture(WPARAM wParam, LPARAM lParam)
|
||||
event.isAlt = IS_VK_DOWN(NS_VK_ALT);
|
||||
event.button = 0;
|
||||
event.time = ::GetMessageTime();
|
||||
event.inputSource = nsIDOMNSMouseEvent::MOZ_SOURCE_TOUCH;
|
||||
event.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_TOUCH;
|
||||
|
||||
PRBool endFeedback = PR_TRUE;
|
||||
|
||||
@ -6321,7 +6321,7 @@ PRBool nsWindow::OnGesture(WPARAM wParam, LPARAM lParam)
|
||||
event.isAlt = IS_VK_DOWN(NS_VK_ALT);
|
||||
event.button = 0;
|
||||
event.time = ::GetMessageTime();
|
||||
event.inputSource = nsIDOMNSMouseEvent::MOZ_SOURCE_TOUCH;
|
||||
event.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_TOUCH;
|
||||
|
||||
nsEventStatus status;
|
||||
DispatchEvent(&event, status);
|
||||
@ -6337,11 +6337,11 @@ PRBool nsWindow::OnGesture(WPARAM wParam, LPARAM lParam)
|
||||
|
||||
PRUint16 nsWindow::GetMouseInputSource()
|
||||
{
|
||||
PRUint16 inputSource = nsIDOMNSMouseEvent::MOZ_SOURCE_MOUSE;
|
||||
PRUint16 inputSource = nsIDOMMouseEvent::MOZ_SOURCE_MOUSE;
|
||||
LPARAM lParamExtraInfo = ::GetMessageExtraInfo();
|
||||
if ((lParamExtraInfo & TABLET_INK_SIGNATURE) == TABLET_INK_CHECK) {
|
||||
inputSource = (lParamExtraInfo & TABLET_INK_TOUCH) ?
|
||||
PRUint16(nsIDOMNSMouseEvent::MOZ_SOURCE_TOUCH) : nsIDOMNSMouseEvent::MOZ_SOURCE_PEN;
|
||||
PRUint16(nsIDOMMouseEvent::MOZ_SOURCE_TOUCH) : nsIDOMMouseEvent::MOZ_SOURCE_PEN;
|
||||
}
|
||||
return inputSource;
|
||||
}
|
||||
|
@ -77,6 +77,8 @@
|
||||
|
||||
#include "nsUXThemeData.h"
|
||||
|
||||
#include "nsIDOMMouseEvent.h"
|
||||
|
||||
/**
|
||||
* Forward class definitions
|
||||
*/
|
||||
@ -211,7 +213,7 @@ public:
|
||||
LPARAM lParam,
|
||||
PRBool aIsContextMenuKey = PR_FALSE,
|
||||
PRInt16 aButton = nsMouseEvent::eLeftButton,
|
||||
PRUint16 aInputSource = nsIDOMNSMouseEvent::MOZ_SOURCE_MOUSE);
|
||||
PRUint16 aInputSource = nsIDOMMouseEvent::MOZ_SOURCE_MOUSE);
|
||||
virtual PRBool DispatchWindowEvent(nsGUIEvent* event);
|
||||
virtual PRBool DispatchWindowEvent(nsGUIEvent*event, nsEventStatus &aStatus);
|
||||
virtual PRBool DispatchKeyEvent(PRUint32 aEventType, WORD aCharCode,
|
||||
|
@ -81,7 +81,7 @@ nsBaseDragService::nsBaseDragService()
|
||||
mHasImage(PR_FALSE), mUserCancelled(PR_FALSE),
|
||||
mDragAction(DRAGDROP_ACTION_NONE), mTargetSize(0,0),
|
||||
mImageX(0), mImageY(0), mScreenX(-1), mScreenY(-1), mSuppressLevel(0),
|
||||
mInputSource(nsIDOMNSMouseEvent::MOZ_SOURCE_MOUSE)
|
||||
mInputSource(nsIDOMMouseEvent::MOZ_SOURCE_MOUSE)
|
||||
{
|
||||
}
|
||||
|
||||
@ -281,9 +281,7 @@ nsBaseDragService::InvokeDragSessionWithImage(nsIDOMNode* aDOMNode,
|
||||
|
||||
aDragEvent->GetScreenX(&mScreenX);
|
||||
aDragEvent->GetScreenY(&mScreenY);
|
||||
|
||||
nsCOMPtr<nsIDOMNSMouseEvent> mouseEvent = do_QueryInterface(aDragEvent);
|
||||
mouseEvent->GetMozInputSource(&mInputSource);
|
||||
aDragEvent->GetMozInputSource(&mInputSource);
|
||||
|
||||
return InvokeDragSession(aDOMNode, aTransferableArray, aRegion, aActionType);
|
||||
}
|
||||
@ -309,9 +307,7 @@ nsBaseDragService::InvokeDragSessionWithSelection(nsISelection* aSelection,
|
||||
|
||||
aDragEvent->GetScreenX(&mScreenX);
|
||||
aDragEvent->GetScreenY(&mScreenY);
|
||||
|
||||
nsCOMPtr<nsIDOMNSMouseEvent> mouseEvent = do_QueryInterface(aDragEvent);
|
||||
mouseEvent->GetMozInputSource(&mInputSource);
|
||||
aDragEvent->GetMozInputSource(&mInputSource);
|
||||
|
||||
// just get the focused node from the selection
|
||||
// XXXndeakin this should actually be the deepest node that contains both
|
||||
@ -399,7 +395,7 @@ nsBaseDragService::EndDragSession(PRBool aDoneDrag)
|
||||
mImageY = 0;
|
||||
mScreenX = -1;
|
||||
mScreenY = -1;
|
||||
mInputSource = nsIDOMNSMouseEvent::MOZ_SOURCE_MOUSE;
|
||||
mInputSource = nsIDOMMouseEvent::MOZ_SOURCE_MOUSE;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -174,7 +174,7 @@ protected:
|
||||
|
||||
PRUint32 mSuppressLevel;
|
||||
|
||||
// The input source of the drag event. Possible values are from nsIDOMNSMouseEvent.
|
||||
// The input source of the drag event. Possible values are from nsIDOMMouseEvent.
|
||||
PRUint16 mInputSource;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user