Bug 920377 part.30 Get rid of nsGUIEvent r=roc

This commit is contained in:
Masayuki Nakano 2013-10-02 12:46:03 +09:00
parent 7d8c972382
commit d9fe18d02f
124 changed files with 561 additions and 453 deletions

View File

@ -23,7 +23,7 @@ namespace mozilla {
TextComposition::TextComposition(nsPresContext* aPresContext,
nsINode* aNode,
nsGUIEvent* aEvent) :
WidgetGUIEvent* aEvent) :
mPresContext(aPresContext), mNode(aNode),
mNativeContext(aEvent->widget->GetInputContext().mNativeIMEContext),
mIsSynthesizedForTests(aEvent->mFlags.mIsSynthesizedForTests)
@ -46,7 +46,7 @@ TextComposition::MatchesNativeContext(nsIWidget* aWidget) const
}
void
TextComposition::DispatchEvent(nsGUIEvent* aEvent,
TextComposition::DispatchEvent(WidgetGUIEvent* aEvent,
nsEventStatus* aStatus,
nsDispatchingCallback* aCallBack)
{

View File

@ -33,7 +33,7 @@ class TextComposition MOZ_FINAL
public:
TextComposition(nsPresContext* aPresContext,
nsINode* aNode,
nsGUIEvent* aEvent);
WidgetGUIEvent* aEvent);
TextComposition(const TextComposition& aOther);
@ -92,7 +92,7 @@ private:
* DispatchEvent() dispatches the aEvent to the mContent synchronously.
* The caller must ensure that it's safe to dispatch the event.
*/
void DispatchEvent(nsGUIEvent* aEvent,
void DispatchEvent(WidgetGUIEvent* aEvent,
nsEventStatus* aStatus,
nsDispatchingCallback* aCallBack);

View File

@ -523,9 +523,9 @@ nsDOMEvent::DuplicatePrivateData()
}
case NS_GUI_EVENT:
{
nsGUIEvent* oldGUIEvent = static_cast<nsGUIEvent*>(mEvent);
WidgetGUIEvent* oldGUIEvent = static_cast<WidgetGUIEvent*>(mEvent);
// Not copying widget, it is a weak reference.
nsGUIEvent* guiEvent = new nsGUIEvent(false, msg, nullptr);
WidgetGUIEvent* guiEvent = new WidgetGUIEvent(false, msg, nullptr);
guiEvent->AssignGUIEventData(*oldGUIEvent, true);
newEvent = guiEvent;
break;
@ -690,8 +690,8 @@ nsDOMEvent::DuplicatePrivateData()
}
case NS_SVGZOOM_EVENT:
{
nsGUIEvent* oldGUIEvent = static_cast<nsGUIEvent*>(mEvent);
nsGUIEvent* guiEvent = new nsGUIEvent(false, msg, nullptr);
WidgetGUIEvent* oldGUIEvent = static_cast<WidgetGUIEvent*>(mEvent);
WidgetGUIEvent* guiEvent = new WidgetGUIEvent(false, msg, nullptr);
guiEvent->eventStructType = NS_SVGZOOM_EVENT;
guiEvent->AssignGUIEventData(*oldGUIEvent, true);
newEvent = guiEvent;
@ -1041,7 +1041,7 @@ nsDOMEvent::GetScreenCoords(nsPresContext* aPresContext,
return nsIntPoint(0, 0);
}
nsGUIEvent* guiEvent = static_cast<nsGUIEvent*>(aEvent);
WidgetGUIEvent* guiEvent = static_cast<WidgetGUIEvent*>(aEvent);
if (!guiEvent->widget) {
return LayoutDeviceIntPoint::ToUntyped(aPoint);
}
@ -1096,7 +1096,7 @@ nsDOMEvent::GetClientCoords(nsPresContext* aPresContext,
aEvent->eventStructType != NS_DRAG_EVENT &&
aEvent->eventStructType != NS_SIMPLE_GESTURE_EVENT) ||
!aPresContext ||
!static_cast<nsGUIEvent*>(aEvent)->widget) {
!static_cast<WidgetGUIEvent*>(aEvent)->widget) {
return aDefaultPoint;
}

View File

@ -23,7 +23,7 @@
using namespace mozilla;
nsDOMUIEvent::nsDOMUIEvent(mozilla::dom::EventTarget* aOwner,
nsPresContext* aPresContext, nsGUIEvent* aEvent)
nsPresContext* aPresContext, WidgetGUIEvent* aEvent)
: nsDOMEvent(aOwner, aPresContext,
aEvent ? aEvent : new InternalUIEvent(false, 0, 0))
, mClientPoint(0, 0), mLayerPoint(0, 0), mPagePoint(0, 0), mMovementPoint(0, 0)
@ -122,7 +122,7 @@ nsDOMUIEvent::GetMovementPoint()
mEvent->eventStructType != NS_WHEEL_EVENT &&
mEvent->eventStructType != NS_DRAG_EVENT &&
mEvent->eventStructType != NS_SIMPLE_GESTURE_EVENT) ||
!(static_cast<nsGUIEvent*>(mEvent)->widget)) {
!(static_cast<WidgetGUIEvent*>(mEvent)->widget)) {
return nsIntPoint(0, 0);
}
@ -509,7 +509,7 @@ nsDOMUIEvent::GetModifierStateInternal(const nsAString& aKey)
nsresult NS_NewDOMUIEvent(nsIDOMEvent** aInstancePtrResult,
mozilla::dom::EventTarget* aOwner,
nsPresContext* aPresContext,
nsGUIEvent *aEvent)
WidgetGUIEvent* aEvent)
{
nsDOMUIEvent* it = new nsDOMUIEvent(aOwner, aPresContext, aEvent);
return CallQueryInterface(it, aInstancePtrResult);

View File

@ -22,7 +22,8 @@ class nsDOMUIEvent : public nsDOMEvent,
typedef mozilla::CSSIntPoint CSSIntPoint;
public:
nsDOMUIEvent(mozilla::dom::EventTarget* aOwner,
nsPresContext* aPresContext, nsGUIEvent* aEvent);
nsPresContext* aPresContext,
mozilla::WidgetGUIEvent* aEvent);
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsDOMUIEvent, nsDOMEvent)
@ -48,7 +49,8 @@ public:
return nsIntPoint(0, 0);
}
nsGUIEvent* event = static_cast<nsGUIEvent*>(aEvent);
mozilla::WidgetGUIEvent* event =
static_cast<mozilla::WidgetGUIEvent*>(aEvent);
if (!event->widget) {
return mozilla::LayoutDeviceIntPoint::ToUntyped(aEvent->refPoint);
}
@ -71,7 +73,7 @@ public:
aEvent->eventStructType != NS_DRAG_EVENT &&
aEvent->eventStructType != NS_SIMPLE_GESTURE_EVENT) ||
!aPresContext ||
!static_cast<nsGUIEvent*>(aEvent)->widget) {
!static_cast<mozilla::WidgetGUIEvent*>(aEvent)->widget) {
return aDefaultClientPoint
? *aDefaultClientPoint
: CSSIntPoint(0, 0);

View File

@ -697,7 +697,7 @@ nsEventDispatcher::CreateEvent(mozilla::dom::EventTarget* aOwner,
case NS_SCROLLPORT_EVENT:
case NS_UI_EVENT:
return NS_NewDOMUIEvent(aDOMEvent, aOwner, aPresContext,
static_cast<nsGUIEvent*>(aEvent));
static_cast<WidgetGUIEvent*>(aEvent));
case NS_SCROLLAREA_EVENT:
return NS_NewDOMScrollAreaEvent(aDOMEvent, aOwner, aPresContext,
static_cast<InternalScrollAreaEvent*>(aEvent));
@ -731,7 +731,7 @@ nsEventDispatcher::CreateEvent(mozilla::dom::EventTarget* aOwner,
static_cast<InternalClipboardEvent*>(aEvent));
case NS_SVGZOOM_EVENT:
return NS_NewDOMSVGZoomEvent(aDOMEvent, aOwner, aPresContext,
static_cast<nsGUIEvent*>(aEvent));
static_cast<WidgetGUIEvent*>(aEvent));
case NS_SMIL_TIME_EVENT:
return NS_NewDOMTimeEvent(aDOMEvent, aOwner, aPresContext, aEvent);

View File

@ -289,7 +289,7 @@ public:
kScrollSeriesTimeout = 80
};
protected:
static nsIntPoint GetScreenPoint(nsGUIEvent* aEvent);
static nsIntPoint GetScreenPoint(WidgetGUIEvent* aEvent);
static void OnFailToScrollTarget();
static void OnTimeout(nsITimer *aTimer, void *aClosure);
static void SetTimeout();
@ -422,7 +422,7 @@ nsMouseWheelTransaction::OnEvent(nsEvent* aEvent)
if (IsMouseEventReal(aEvent)) {
// If the cursor is moving to be outside the frame,
// terminate the scrollwheel transaction.
nsIntPoint pt = GetScreenPoint((nsGUIEvent*)aEvent);
nsIntPoint pt = GetScreenPoint(static_cast<WidgetGUIEvent*>(aEvent));
nsIntRect r = sTargetFrame->GetScreenRectExternal();
if (!r.Contains(pt)) {
EndTransaction();
@ -521,7 +521,7 @@ nsMouseWheelTransaction::SetTimeout()
}
nsIntPoint
nsMouseWheelTransaction::GetScreenPoint(nsGUIEvent* aEvent)
nsMouseWheelTransaction::GetScreenPoint(WidgetGUIEvent* aEvent)
{
NS_ASSERTION(aEvent, "aEvent is null");
NS_ASSERTION(aEvent->widget, "aEvent-widget is null");
@ -899,7 +899,7 @@ nsEventStateManager::PreHandleEvent(nsPresContext* aPresContext,
mouseEvent->reason = nsMouseEvent::eSynthesized;
// then fall through...
} else {
GenerateMouseEnterExit((nsGUIEvent*)aEvent);
GenerateMouseEnterExit(static_cast<WidgetGUIEvent*>(aEvent));
//This is a window level mouse exit event and should stop here
aEvent->message = 0;
break;
@ -914,7 +914,7 @@ nsEventStateManager::PreHandleEvent(nsPresContext* aPresContext,
// into UpdateCursor().
GenerateDragGesture(aPresContext, (nsMouseEvent*)aEvent);
UpdateCursor(aPresContext, aEvent, mCurrentTarget, aStatus);
GenerateMouseEnterExit((nsGUIEvent*)aEvent);
GenerateMouseEnterExit(static_cast<WidgetGUIEvent*>(aEvent));
// Flush pending layout changes, so that later mouse move events
// will go to the right nodes.
FlushPendingEvents(aPresContext);
@ -929,7 +929,8 @@ nsEventStateManager::PreHandleEvent(nsPresContext* aPresContext,
case NS_DRAGDROP_OVER:
// NS_DRAGDROP_DROP is fired before NS_DRAGDROP_DRAGDROP so send
// the enter/exit events before NS_DRAGDROP_DROP.
GenerateDragDropEnterExit(aPresContext, (nsGUIEvent*)aEvent);
GenerateDragDropEnterExit(aPresContext,
static_cast<WidgetGUIEvent*>(aEvent));
break;
case NS_KEY_PRESS:
@ -1581,7 +1582,7 @@ nsEventStateManager::HandleCrossProcessEvent(nsEvent *aEvent,
void
nsEventStateManager::CreateClickHoldTimer(nsPresContext* inPresContext,
nsIFrame* inDownFrame,
nsGUIEvent* inMouseDownEvent)
WidgetGUIEvent* inMouseDownEvent)
{
if (!inMouseDownEvent->mFlags.mIsTrusted)
return;
@ -3375,7 +3376,8 @@ nsEventStateManager::PostHandleEvent(nsPresContext* aPresContext,
case NS_DRAGDROP_EXIT:
// make sure to fire the enter and exit_synth events after the
// NS_DRAGDROP_EXIT event, otherwise we'll clean up too early
GenerateDragDropEnterExit(presContext, (nsGUIEvent*)aEvent);
GenerateDragDropEnterExit(presContext,
static_cast<WidgetGUIEvent*>(aEvent));
break;
case NS_KEY_UP:
@ -3467,7 +3469,7 @@ nsEventStateManager::GetCrossProcessTarget()
}
bool
nsEventStateManager::IsTargetCrossProcess(nsGUIEvent *aEvent)
nsEventStateManager::IsTargetCrossProcess(WidgetGUIEvent* aEvent)
{
// Check to see if there is a focused, editable content in chrome,
// in that case, do not forward IME events to content
@ -3755,7 +3757,7 @@ public:
nsIFrame* frame = aVisitor.mPresContext->GetPrimaryFrameFor(mTarget);
if (frame) {
frame->HandleEvent(aVisitor.mPresContext,
(nsGUIEvent*) aVisitor.mEvent,
static_cast<WidgetGUIEvent*>(aVisitor.mEvent),
&aVisitor.mEventStatus);
}
}
@ -3777,7 +3779,8 @@ nsEventStateManager::IsHandlingUserInput()
}
nsIFrame*
nsEventStateManager::DispatchMouseEvent(nsGUIEvent* aEvent, uint32_t aMessage,
nsEventStateManager::DispatchMouseEvent(WidgetGUIEvent* aEvent,
uint32_t aMessage,
nsIContent* aTargetContent,
nsIContent* aRelatedContent)
{
@ -3840,7 +3843,7 @@ class MouseEnterLeaveDispatcher
public:
MouseEnterLeaveDispatcher(nsEventStateManager* aESM,
nsIContent* aTarget, nsIContent* aRelatedTarget,
nsGUIEvent* aEvent, uint32_t aType)
WidgetGUIEvent* aEvent, uint32_t aType)
: mESM(aESM), mEvent(aEvent), mType(aType)
{
nsPIDOMWindow* win =
@ -3881,12 +3884,13 @@ public:
nsEventStateManager* mESM;
nsCOMArray<nsIContent> mTargets;
nsCOMPtr<nsIContent> mRelatedTarget;
nsGUIEvent* mEvent;
WidgetGUIEvent* mEvent;
uint32_t mType;
};
void
nsEventStateManager::NotifyMouseOut(nsGUIEvent* aEvent, nsIContent* aMovingInto)
nsEventStateManager::NotifyMouseOut(WidgetGUIEvent* aEvent,
nsIContent* aMovingInto)
{
if (!mLastMouseOverElement)
return;
@ -3946,7 +3950,8 @@ nsEventStateManager::NotifyMouseOut(nsGUIEvent* aEvent, nsIContent* aMovingInto)
}
void
nsEventStateManager::NotifyMouseOver(nsGUIEvent* aEvent, nsIContent* aContent)
nsEventStateManager::NotifyMouseOver(WidgetGUIEvent* aEvent,
nsIContent* aContent)
{
NS_ASSERTION(aContent, "Mouse must be over something");
@ -4045,7 +4050,7 @@ GetWindowInnerRectCenter(nsPIDOMWindow* aWindow,
}
void
nsEventStateManager::GenerateMouseEnterExit(nsGUIEvent* aEvent)
nsEventStateManager::GenerateMouseEnterExit(WidgetGUIEvent* aEvent)
{
EnsureDocument(mPresContext);
if (!mDocument)
@ -4199,7 +4204,7 @@ nsEventStateManager::SetPointerLock(nsIWidget* aWidget,
void
nsEventStateManager::GenerateDragDropEnterExit(nsPresContext* aPresContext,
nsGUIEvent* aEvent)
WidgetGUIEvent* aEvent)
{
//Hold onto old target content through the event and reset after.
nsCOMPtr<nsIContent> targetBeforeEvent = mCurrentTargetContent;
@ -4268,7 +4273,7 @@ nsEventStateManager::GenerateDragDropEnterExit(nsPresContext* aPresContext,
void
nsEventStateManager::FireDragEnterOrExit(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
WidgetGUIEvent* aEvent,
uint32_t aMsg,
nsIContent* aRelatedTarget,
nsIContent* aTargetContent,
@ -4838,7 +4843,7 @@ nsEventStateManager::ContentRemoved(nsIDocument* aDocument, nsIContent* aContent
}
bool
nsEventStateManager::EventStatusOK(nsGUIEvent* aEvent)
nsEventStateManager::EventStatusOK(WidgetGUIEvent* aEvent)
{
return !(aEvent->message == NS_MOUSE_BUTTON_DOWN &&
static_cast<nsMouseEvent*>(aEvent)->button == nsMouseEvent::eLeftButton &&

View File

@ -111,7 +111,7 @@ public:
*/
bool SetContentState(nsIContent *aContent, nsEventStates aState);
void ContentRemoved(nsIDocument* aDocument, nsIContent* aContent);
bool EventStatusOK(nsGUIEvent* aEvent);
bool EventStatusOK(mozilla::WidgetGUIEvent* aEvent);
/**
* Register accesskey on the given element. When accesskey is activated then
@ -250,19 +250,20 @@ protected:
* content. This returns the primary frame for the content (or null
* if it goes away during the event).
*/
nsIFrame* DispatchMouseEvent(nsGUIEvent* aEvent, uint32_t aMessage,
nsIFrame* DispatchMouseEvent(mozilla::WidgetGUIEvent* aEvent,
uint32_t aMessage,
nsIContent* aTargetContent,
nsIContent* aRelatedContent);
/**
* Synthesize DOM and frame mouseover and mouseout events from this
* MOUSE_MOVE or MOUSE_EXIT event.
*/
void GenerateMouseEnterExit(nsGUIEvent* aEvent);
void GenerateMouseEnterExit(mozilla::WidgetGUIEvent* aEvent);
/**
* Tell this ESM and ESMs in parent documents that the mouse is
* over some content in this document.
*/
void NotifyMouseOver(nsGUIEvent* aEvent, nsIContent* aContent);
void NotifyMouseOver(mozilla::WidgetGUIEvent* aEvent, nsIContent* aContent);
/**
* Tell this ESM and ESMs in affected child documents that the mouse
* has exited this document's currently hovered content.
@ -272,8 +273,9 @@ protected:
* NotifyMouseOut will NOT change the current hover content to null;
* in that case the caller is responsible for updating hover state.
*/
void NotifyMouseOut(nsGUIEvent* aEvent, nsIContent* aMovingInto);
void GenerateDragDropEnterExit(nsPresContext* aPresContext, nsGUIEvent* aEvent);
void NotifyMouseOut(mozilla::WidgetGUIEvent* aEvent, nsIContent* aMovingInto);
void GenerateDragDropEnterExit(nsPresContext* aPresContext,
mozilla::WidgetGUIEvent* aEvent);
/**
* Fire the dragenter and dragexit/dragleave events when the mouse moves to a
* new target.
@ -283,7 +285,7 @@ protected:
* @param aTargetFrame target frame for the event
*/
void FireDragEnterOrExit(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
mozilla::WidgetGUIEvent* aEvent,
uint32_t aMsg,
nsIContent* aRelatedTarget,
nsIContent* aTargetContent,
@ -713,7 +715,7 @@ protected:
bool RemoteQueryContentEvent(nsEvent *aEvent);
mozilla::dom::TabParent *GetCrossProcessTarget();
bool IsTargetCrossProcess(nsGUIEvent *aEvent);
bool IsTargetCrossProcess(mozilla::WidgetGUIEvent* aEvent);
bool DispatchCrossProcessEvent(nsEvent* aEvent, nsFrameLoader* remote,
nsEventStatus *aStatus);
@ -814,10 +816,11 @@ public:
// Functions used for click hold context menus
nsCOMPtr<nsITimer> mClickHoldTimer;
void CreateClickHoldTimer ( nsPresContext* aPresContext, nsIFrame* inDownFrame,
nsGUIEvent* inMouseDownEvent ) ;
void KillClickHoldTimer ( ) ;
void FireContextClick ( ) ;
void CreateClickHoldTimer(nsPresContext* aPresContext,
nsIFrame* aDownFrame,
mozilla::WidgetGUIEvent* aMouseDownEvent);
void KillClickHoldTimer();
void FireContextClick();
void SetPointerLock(nsIWidget* aWidget, nsIContent* aElement) ;
static void sClickHoldCallback ( nsITimer* aTimer, void* aESM ) ;

View File

@ -534,7 +534,7 @@ nsIMEStateManager::DispatchCompositionEvent(nsINode* aEventTargetNode,
EnsureTextCompositionArray();
nsGUIEvent* GUIEvent = static_cast<nsGUIEvent*>(aEvent);
WidgetGUIEvent* GUIEvent = static_cast<WidgetGUIEvent*>(aEvent);
TextComposition* composition =
sTextCompositions->GetCompositionFor(GUIEvent->widget);

View File

@ -3116,7 +3116,7 @@ HTMLInputElement::PreHandleEvent(nsEventChainPreVisitor& aVisitor)
}
void
HTMLInputElement::StartRangeThumbDrag(nsGUIEvent* aEvent)
HTMLInputElement::StartRangeThumbDrag(WidgetGUIEvent* aEvent)
{
mIsDraggingRange = true;
mRangeThumbDragStartValue = GetValueAsDecimal();
@ -3127,7 +3127,7 @@ HTMLInputElement::StartRangeThumbDrag(nsGUIEvent* aEvent)
}
void
HTMLInputElement::FinishRangeThumbDrag(nsGUIEvent* aEvent)
HTMLInputElement::FinishRangeThumbDrag(WidgetGUIEvent* aEvent)
{
MOZ_ASSERT(mIsDraggingRange);

View File

@ -147,8 +147,8 @@ public:
virtual nsresult PreHandleEvent(nsEventChainPreVisitor& aVisitor) MOZ_OVERRIDE;
virtual nsresult PostHandleEvent(nsEventChainPostVisitor& aVisitor) MOZ_OVERRIDE;
void PostHandleEventForRangeThumb(nsEventChainPostVisitor& aVisitor);
void StartRangeThumbDrag(nsGUIEvent* aEvent);
void FinishRangeThumbDrag(nsGUIEvent* aEvent = nullptr);
void StartRangeThumbDrag(WidgetGUIEvent* aEvent);
void FinishRangeThumbDrag(WidgetGUIEvent* aEvent = nullptr);
void CancelRangeThumbDrag(bool aIsForUserEvent = true);
void SetValueOfRangeForUserEvent(Decimal aValue);

View File

@ -135,7 +135,7 @@ HTMLTextAreaElement::Select()
}
nsEventStatus status = nsEventStatus_eIgnore;
nsGUIEvent event(true, NS_FORM_SELECTED, nullptr);
WidgetGUIEvent event(true, NS_FORM_SELECTED, nullptr);
// XXXbz HTMLInputElement guards against this reentering; shouldn't we?
nsEventDispatcher::Dispatch(static_cast<nsIContent*>(this), presContext,
&event, nullptr, &status);

View File

@ -525,7 +525,7 @@ SVGSVGElement::SetCurrentScaleTranslate(float s, float x, float y)
if (presShell && IsRoot()) {
bool scaling = (mPreviousScale != mCurrentScale);
nsEventStatus status = nsEventStatus_eIgnore;
nsGUIEvent event(true, scaling ? NS_SVG_ZOOM : NS_SVG_SCROLL, 0);
WidgetGUIEvent event(true, scaling ? NS_SVG_ZOOM : NS_SVG_SCROLL, 0);
event.eventStructType = scaling ? NS_SVGZOOM_EVENT : NS_EVENT;
presShell->HandleDOMEventWithTarget(this, &event, &status);
InvalidateTransformNotifyFrame();

View File

@ -19,9 +19,9 @@ namespace dom {
SVGZoomEvent::SVGZoomEvent(EventTarget* aOwner,
nsPresContext* aPresContext,
nsGUIEvent* aEvent)
WidgetGUIEvent* aEvent)
: nsDOMUIEvent(aOwner, aPresContext,
aEvent ? aEvent : new nsGUIEvent(false, NS_SVG_ZOOM, 0))
aEvent ? aEvent : new WidgetGUIEvent(false, NS_SVG_ZOOM, 0))
, mPreviousScale(0)
, mNewScale(0)
{
@ -84,7 +84,7 @@ nsresult
NS_NewDOMSVGZoomEvent(nsIDOMEvent** aInstancePtrResult,
mozilla::dom::EventTarget* aOwner,
nsPresContext* aPresContext,
nsGUIEvent *aEvent)
mozilla::WidgetGUIEvent* aEvent)
{
mozilla::dom::SVGZoomEvent* it =
new mozilla::dom::SVGZoomEvent(aOwner, aPresContext, aEvent);

View File

@ -22,7 +22,7 @@ class SVGZoomEvent MOZ_FINAL : public nsDOMUIEvent
{
public:
SVGZoomEvent(EventTarget* aOwner, nsPresContext* aPresContext,
nsGUIEvent* aEvent);
WidgetGUIEvent* aEvent);
// Forward to base class
NS_FORWARD_TO_NSDOMUIEVENT

View File

@ -1790,7 +1790,7 @@ nsDOMWindowUtils::DispatchDOMEventViaPresShell(nsIDOMNode* aTarget,
}
static void
InitEvent(nsGUIEvent& aEvent, LayoutDeviceIntPoint* aPt = nullptr)
InitEvent(WidgetGUIEvent& aEvent, LayoutDeviceIntPoint* aPt = nullptr)
{
if (aPt) {
aEvent.refPoint = *aPt;

View File

@ -237,7 +237,7 @@ nsresult
NS_NewDOMUIEvent(nsIDOMEvent** aInstancePtrResult,
mozilla::dom::EventTarget* aOwner,
nsPresContext* aPresContext,
nsGUIEvent* aEvent);
mozilla::WidgetGUIEvent* aEvent);
nsresult
NS_NewDOMMouseEvent(nsIDOMEvent** aInstancePtrResult,
mozilla::dom::EventTarget* aOwner,
@ -308,7 +308,7 @@ nsresult
NS_NewDOMSVGZoomEvent(nsIDOMEvent** aResult,
mozilla::dom::EventTarget* aOwner,
nsPresContext* aPresContext,
nsGUIEvent* aEvent);
mozilla::WidgetGUIEvent* aEvent);
nsresult
NS_NewDOMTimeEvent(nsIDOMEvent** aResult,
mozilla::dom::EventTarget* aOwner,

View File

@ -1907,7 +1907,7 @@ TabChild::RecvSelectionEvent(const WidgetSelectionEvent& event)
}
nsEventStatus
TabChild::DispatchWidgetEvent(nsGUIEvent& event)
TabChild::DispatchWidgetEvent(WidgetGUIEvent& event)
{
if (!mWidget)
return nsEventStatus_eConsumeNoDefault;

View File

@ -382,7 +382,7 @@ protected:
virtual bool RecvDestroy() MOZ_OVERRIDE;
virtual bool RecvSetUpdateHitRegion(const bool& aEnabled) MOZ_OVERRIDE;
nsEventStatus DispatchWidgetEvent(nsGUIEvent& event);
nsEventStatus DispatchWidgetEvent(WidgetGUIEvent& event);
virtual PIndexedDBChild* AllocPIndexedDBChild(const nsCString& aGroup,
const nsCString& aASCIIOrigin,

View File

@ -727,7 +727,7 @@ TabParent::GetEventCapturer()
}
bool
TabParent::TryCapture(const nsGUIEvent& aEvent)
TabParent::TryCapture(const WidgetGUIEvent& aEvent)
{
MOZ_ASSERT(sEventCapturer == this && mEventCaptureDepth > 0);

View File

@ -100,7 +100,7 @@ public:
* It's an error to call TryCapture() if this isn't the event
* capturer.
*/
bool TryCapture(const nsGUIEvent& aEvent);
bool TryCapture(const WidgetGUIEvent& aEvent);
void Destroy();

View File

@ -114,7 +114,7 @@ public:
void Destroy(nsIContent* aContent);
nsEventStatus ProcessEvent(const nsGUIEvent& anEvent)
nsEventStatus ProcessEvent(const WidgetGUIEvent& anEvent)
{
return nsEventStatus_eConsumeNoDefault;
}
@ -1790,8 +1790,8 @@ nsresult nsPluginInstanceOwner::DispatchFocusToPlugin(nsIDOMEvent* aFocusEvent)
nsEvent* theEvent = aFocusEvent->GetInternalNSEvent();
if (theEvent) {
// we only care about the message in ProcessEvent
nsGUIEvent focusEvent(theEvent->mFlags.mIsTrusted, theEvent->message,
nullptr);
WidgetGUIEvent focusEvent(theEvent->mFlags.mIsTrusted, theEvent->message,
nullptr);
nsEventStatus rv = ProcessEvent(focusEvent);
if (nsEventStatus_eConsumeNoDefault == rv) {
aFocusEvent->PreventDefault();
@ -1831,7 +1831,7 @@ nsresult nsPluginInstanceOwner::DispatchKeyToPlugin(nsIDOMEvent* aKeyEvent)
if (mInstance) {
nsEvent *event = aKeyEvent->GetInternalNSEvent();
if (event && event->eventStructType == NS_KEY_EVENT) {
nsEventStatus rv = ProcessEvent(*static_cast<nsGUIEvent*>(event));
nsEventStatus rv = ProcessEvent(*static_cast<WidgetGUIEvent*>(event));
if (nsEventStatus_eConsumeNoDefault == rv) {
aKeyEvent->PreventDefault();
aKeyEvent->StopPropagation();
@ -1866,7 +1866,7 @@ nsPluginInstanceOwner::ProcessMouseDown(nsIDOMEvent* aMouseEvent)
nsEvent* event = aMouseEvent->GetInternalNSEvent();
if (event && event->eventStructType == NS_MOUSE_EVENT) {
mLastMouseDownButtonType = static_cast<nsMouseEvent*>(event)->button;
nsEventStatus rv = ProcessEvent(*static_cast<nsGUIEvent*>(event));
nsEventStatus rv = ProcessEvent(*static_cast<WidgetGUIEvent*>(event));
if (nsEventStatus_eConsumeNoDefault == rv) {
return aMouseEvent->PreventDefault(); // consume event
}
@ -1888,7 +1888,7 @@ nsresult nsPluginInstanceOwner::DispatchMouseToPlugin(nsIDOMEvent* aMouseEvent)
nsEvent* event = aMouseEvent->GetInternalNSEvent();
if (event && event->eventStructType == NS_MOUSE_EVENT) {
nsEventStatus rv = ProcessEvent(*static_cast<nsGUIEvent*>(event));
nsEventStatus rv = ProcessEvent(*static_cast<WidgetGUIEvent*>(event));
if (nsEventStatus_eConsumeNoDefault == rv) {
aMouseEvent->PreventDefault();
aMouseEvent->StopPropagation();
@ -1974,7 +1974,7 @@ static unsigned int XInputEventState(const WidgetInputEvent& anEvent)
}
#endif
nsEventStatus nsPluginInstanceOwner::ProcessEvent(const nsGUIEvent& anEvent)
nsEventStatus nsPluginInstanceOwner::ProcessEvent(const WidgetGUIEvent& anEvent)
{
nsEventStatus rv = nsEventStatus_eIgnore;

View File

@ -106,7 +106,7 @@ public:
void* GetPluginPortFromWidget();
void ReleasePluginPort(void* pluginPort);
nsEventStatus ProcessEvent(const nsGUIEvent & anEvent);
nsEventStatus ProcessEvent(const mozilla::WidgetGUIEvent& anEvent);
#ifdef XP_MACOSX
enum { ePluginPaintEnable, ePluginPaintDisable };

View File

@ -272,7 +272,7 @@ static LRESULT CALLBACK PluginWndProcInternal(HWND hWnd, UINT msg, WPARAM wParam
nsCOMPtr<nsIWidget> widget;
win->GetPluginWidget(getter_AddRefs(widget));
if (widget) {
nsGUIEvent event(true, NS_PLUGIN_ACTIVATE, widget);
WidgetGUIEvent event(true, NS_PLUGIN_ACTIVATE, widget);
nsEventStatus status;
widget->DispatchEvent(&event, status);
}

View File

@ -34,8 +34,8 @@ class APZCTreeManager;
* Controller for all panning and zooming logic. Any time a user input is
* detected and it must be processed in some way to affect what the user sees,
* it goes through here. Listens for any input event from InputData and can
* optionally handle nsGUIEvent-derived touch events, but this must be done on
* the main thread. Note that this class completely cross-platform.
* optionally handle WidgetGUIEvent-derived touch events, but this must be done
* on the main thread. Note that this class completely cross-platform.
*
* Input events originate on the UI thread of the platform that this runs on,
* and are then sent to this class. This class processes the event in some way;

View File

@ -303,7 +303,7 @@ GetClosest(nsIFrame* aRoot, const nsPoint& aPointRelativeToRootFrame,
}
nsIFrame*
FindFrameTargetedByInputEvent(const nsGUIEvent *aEvent,
FindFrameTargetedByInputEvent(const WidgetGUIEvent* aEvent,
nsIFrame* aRootFrame,
const nsPoint& aPointRelativeToRootFrame,
uint32_t aFlags)

View File

@ -22,7 +22,7 @@ enum {
* that are suitable targets, to account for inaccurate pointing devices.
*/
nsIFrame*
FindFrameTargetedByInputEvent(const nsGUIEvent *aEvent,
FindFrameTargetedByInputEvent(const WidgetGUIEvent* aEvent,
nsIFrame* aRootFrame,
const nsPoint& aPointRelativeToRootFrame,
uint32_t aFlags = 0);

View File

@ -1274,10 +1274,10 @@ public:
};
virtual void Paint(nsView* aViewToPaint, const nsRegion& aDirtyRegion,
uint32_t aFlags) = 0;
virtual nsresult HandleEvent(nsIFrame* aFrame,
nsGUIEvent* aEvent,
bool aDontRetargetEvents,
nsEventStatus* aEventStatus) = 0;
virtual nsresult HandleEvent(nsIFrame* aFrame,
mozilla::WidgetGUIEvent* aEvent,
bool aDontRetargetEvents,
nsEventStatus* aEventStatus) = 0;
virtual bool ShouldIgnoreInvalidation() = 0;
/**
* Notify that we're going to call Paint with PAINT_LAYERS
@ -1307,7 +1307,8 @@ public:
virtual void ScheduleViewManagerFlush() = 0;
virtual void ClearMouseCaptureOnView(nsView* aView) = 0;
virtual bool IsVisible() = 0;
virtual void DispatchSynthMouseMove(nsGUIEvent *aEvent, bool aFlushOnHoverChange) = 0;
virtual void DispatchSynthMouseMove(mozilla::WidgetGUIEvent* aEvent,
bool aFlushOnHoverChange) = 0;
virtual void AddSizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf,
nsArenaMemoryStats *aArenaObjectsSize,

View File

@ -1295,7 +1295,7 @@ nsLayoutUtils::GetEventCoordinatesRelativeTo(const nsEvent* aEvent, nsIFrame* aF
aEvent->eventStructType != NS_QUERY_CONTENT_EVENT))
return nsPoint(NS_UNCONSTRAINEDSIZE, NS_UNCONSTRAINEDSIZE);
const nsGUIEvent* GUIEvent = static_cast<const nsGUIEvent*>(aEvent);
const WidgetGUIEvent* GUIEvent = static_cast<const WidgetGUIEvent*>(aEvent);
return GetEventCoordinatesRelativeTo(aEvent,
LayoutDeviceIntPoint::ToUntyped(GUIEvent->refPoint),
aFrame);
@ -1310,7 +1310,7 @@ nsLayoutUtils::GetEventCoordinatesRelativeTo(const nsEvent* aEvent,
return nsPoint(NS_UNCONSTRAINEDSIZE, NS_UNCONSTRAINEDSIZE);
}
const nsGUIEvent* GUIEvent = static_cast<const nsGUIEvent*>(aEvent);
const WidgetGUIEvent* GUIEvent = static_cast<const WidgetGUIEvent*>(aEvent);
nsIWidget* widget = GUIEvent->widget;
if (!widget) {
return nsPoint(NS_UNCONSTRAINEDSIZE, NS_UNCONSTRAINEDSIZE);

View File

@ -441,7 +441,7 @@ public:
/**
* Get the coordinates of a given DOM mouse event, relative to a given
* frame. Works only for DOM events generated by nsGUIEvents.
* frame. Works only for DOM events generated by WidgetGUIEvents.
* @param aDOMEvent the event
* @param aFrame the frame to make coordinates relative to
* @return the point, or (NS_UNCONSTRAINEDSIZE, NS_UNCONSTRAINEDSIZE) if

View File

@ -475,7 +475,7 @@ public:
}
if (frame) {
frame->HandleEvent(aVisitor.mPresContext,
(nsGUIEvent*) aVisitor.mEvent,
static_cast<WidgetGUIEvent*>(aVisitor.mEvent),
&aVisitor.mEventStatus);
}
}
@ -3401,7 +3401,7 @@ PresShell::ScheduleViewManagerFlush()
}
void
PresShell::DispatchSynthMouseMove(nsGUIEvent *aEvent,
PresShell::DispatchSynthMouseMove(WidgetGUIEvent* aEvent,
bool aFlushOnHoverChange)
{
RestyleManager* restyleManager = mPresContext->RestyleManager();
@ -5839,8 +5839,8 @@ PresShell::GetParentPresShell()
}
nsresult
PresShell::RetargetEventToParent(nsGUIEvent* aEvent,
nsEventStatus* aEventStatus)
PresShell::RetargetEventToParent(WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
// Send this events straight up to the parent pres shell.
// We do this for keystroke events in zombie documents or if either a frame
@ -5873,7 +5873,7 @@ PresShell::GetFocusedDOMWindowInOurWindow()
}
void
PresShell::RecordMouseLocation(nsGUIEvent* aEvent)
PresShell::RecordMouseLocation(WidgetGUIEvent* aEvent)
{
if (!mPresContext)
return;
@ -6005,10 +6005,10 @@ nsIFrame* GetNearestFrameContainingPresShell(nsIPresShell* aPresShell)
}
nsresult
PresShell::HandleEvent(nsIFrame *aFrame,
nsGUIEvent* aEvent,
bool aDontRetargetEvents,
nsEventStatus* aEventStatus)
PresShell::HandleEvent(nsIFrame* aFrame,
WidgetGUIEvent* aEvent,
bool aDontRetargetEvents,
nsEventStatus* aEventStatus)
{
NS_ASSERTION(aFrame, "null frame");
@ -6554,8 +6554,8 @@ PresShell::ShowEventTargetDebug()
#endif
nsresult
PresShell::HandlePositionedEvent(nsIFrame* aTargetFrame,
nsGUIEvent* aEvent,
PresShell::HandlePositionedEvent(nsIFrame* aTargetFrame,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
nsresult rv = NS_OK;

View File

@ -183,10 +183,10 @@ public:
virtual void Paint(nsView* aViewToPaint, const nsRegion& aDirtyRegion,
uint32_t aFlags) MOZ_OVERRIDE;
virtual nsresult HandleEvent(nsIFrame* aFrame,
nsGUIEvent* aEvent,
bool aDontRetargetEvents,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
virtual nsresult HandleEvent(nsIFrame* aFrame,
mozilla::WidgetGUIEvent* aEvent,
bool aDontRetargetEvents,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
virtual NS_HIDDEN_(nsresult) HandleDOMEventWithTarget(nsIContent* aTargetContent,
nsEvent* aEvent,
nsEventStatus* aStatus) MOZ_OVERRIDE;
@ -198,7 +198,8 @@ public:
virtual void WillPaintWindow() MOZ_OVERRIDE;
virtual void DidPaintWindow() MOZ_OVERRIDE;
virtual void ScheduleViewManagerFlush() MOZ_OVERRIDE;
virtual void DispatchSynthMouseMove(nsGUIEvent *aEvent, bool aFlushOnHoverChange) MOZ_OVERRIDE;
virtual void DispatchSynthMouseMove(mozilla::WidgetGUIEvent* aEvent,
bool aFlushOnHoverChange) MOZ_OVERRIDE;
virtual void ClearMouseCaptureOnView(nsView* aView) MOZ_OVERRIDE;
virtual bool IsVisible() MOZ_OVERRIDE;
@ -606,7 +607,7 @@ protected:
// Check if aEvent is a mouse event and record the mouse location for later
// synth mouse moves.
void RecordMouseLocation(nsGUIEvent* aEvent);
void RecordMouseLocation(mozilla::WidgetGUIEvent* aEvent);
class nsSynthMouseMoveEvent MOZ_FINAL : public nsARefreshObserver {
public:
nsSynthMouseMoveEvent(PresShell* aPresShell, bool aFromScroll)
@ -646,13 +647,13 @@ protected:
already_AddRefed<nsIPresShell> GetParentPresShell();
nsIContent* GetCurrentEventContent();
nsIFrame* GetCurrentEventFrame();
nsresult RetargetEventToParent(nsGUIEvent* aEvent,
nsEventStatus* aEventStatus);
nsresult RetargetEventToParent(mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus);
void PushCurrentEventInfo(nsIFrame* aFrame, nsIContent* aContent);
void PopCurrentEventInfo();
nsresult HandleEventInternal(nsEvent* aEvent, nsEventStatus *aStatus);
nsresult HandlePositionedEvent(nsIFrame* aTargetFrame,
nsGUIEvent* aEvent,
nsresult HandlePositionedEvent(nsIFrame* aTargetFrame,
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus);
// This returns the focused DOM window under our top level window.
// I.e., when we are deactive, this returns the *last* focused DOM window.

View File

@ -1093,8 +1093,8 @@ nsComboboxControlFrame::OnSetSelectedIndex(int32_t aOldIndex, int32_t aNewIndex)
NS_IMETHODIMP
nsComboboxControlFrame::HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus)
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
NS_ENSURE_ARG_POINTER(aEventStatus);

View File

@ -75,7 +75,7 @@ public:
nsReflowStatus& aStatus) MOZ_OVERRIDE;
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus);
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,

View File

@ -134,8 +134,8 @@ nsFormControlFrame::SetFocus(bool aOn, bool aRepaint)
NS_METHOD
nsFormControlFrame::HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus)
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
// Check for user-input:none style
const nsStyleUserInterface* uiStyle = StyleUserInterface();

View File

@ -42,7 +42,7 @@ public:
* @see nsIFrame::HandleEvent
*/
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
virtual nscoord GetBaseline() const MOZ_OVERRIDE;

View File

@ -15,6 +15,8 @@
#include "nsIDOMHTMLInputElement.h"
#include "nsTextNode.h"
using namespace mozilla;
nsGfxButtonControlFrame::nsGfxButtonControlFrame(nsStyleContext* aContext):
nsHTMLButtonControlFrame(aContext)
{
@ -216,8 +218,8 @@ nsGfxButtonControlFrame::GetContentInsertionFrame()
NS_IMETHODIMP
nsGfxButtonControlFrame::HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus)
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
// Override the HandleEvent to prevent the nsFrame::HandleEvent
// from being called. The nsFrame::HandleEvent causes the button label

View File

@ -27,7 +27,7 @@ public:
virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
virtual nsIAtom* GetType() const MOZ_OVERRIDE;

View File

@ -78,8 +78,8 @@ nsHTMLButtonControlFrame::SetFocus(bool aOn, bool aRepaint)
NS_IMETHODIMP
nsHTMLButtonControlFrame::HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus)
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
// if disabled do nothing
if (mRenderer.isDisabled()) {

View File

@ -40,7 +40,7 @@ public:
nsReflowStatus& aStatus) MOZ_OVERRIDE;
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
virtual void Init(nsIContent* aContent,

View File

@ -43,8 +43,8 @@ public:
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus);
virtual nsIAtom* GetType() const;
@ -147,8 +147,8 @@ nsImageControlFrame::Reflow(nsPresContext* aPresContext,
}
NS_METHOD
nsImageControlFrame::HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsImageControlFrame::HandleEvent(nsPresContext* aPresContext,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
NS_ENSURE_ARG_POINTER(aEventStatus);

View File

@ -848,8 +848,8 @@ nsListControlFrame::CaptureMouseEvents(bool aGrabMouseEvents)
//---------------------------------------------------------
NS_IMETHODIMP
nsListControlFrame::HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsListControlFrame::HandleEvent(nsPresContext* aPresContext,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
NS_ENSURE_ARG_POINTER(aEventStatus);

View File

@ -54,7 +54,7 @@ public:
// nsIFrame
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
NS_IMETHOD SetInitialChildList(ChildListID aListID,

View File

@ -455,7 +455,7 @@ nsRangeFrame::GetValueAsFractionOfRange()
}
Decimal
nsRangeFrame::GetValueAtEventPoint(nsGUIEvent* aEvent)
nsRangeFrame::GetValueAtEventPoint(WidgetGUIEvent* aEvent)
{
MOZ_ASSERT(aEvent->eventStructType == NS_MOUSE_EVENT ||
aEvent->eventStructType == NS_TOUCH_EVENT,

View File

@ -111,7 +111,7 @@ public:
*/
bool ShouldUseNativeStyle() const;
mozilla::Decimal GetValueAtEventPoint(nsGUIEvent* aEvent);
mozilla::Decimal GetValueAtEventPoint(mozilla::WidgetGUIEvent* aEvent);
/**
* Helper that's used when the value of the range changes to reposition the

View File

@ -2346,8 +2346,8 @@ nsFrame::FireDOMEvent(const nsAString& aDOMEventName, nsIContent *aContent)
NS_IMETHODIMP
nsFrame::HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus)
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
if (aEvent->message == NS_MOUSE_MOVE) {
@ -2556,8 +2556,8 @@ nsFrame::IsSelectable(bool* aSelectable, uint8_t* aSelectStyle) const
*/
NS_IMETHODIMP
nsFrame::HandlePress(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus)
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
NS_ENSURE_ARG_POINTER(aEventStatus);
if (nsEventStatus_eConsumeNoDefault == *aEventStatus) {
@ -2824,9 +2824,9 @@ nsFrame::SelectByTypeAtPoint(nsPresContext* aPresContext,
*/
NS_IMETHODIMP
nsFrame::HandleMultiplePress(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus,
bool aControlHeld)
bool aControlHeld)
{
NS_ENSURE_ARG_POINTER(aEvent);
NS_ENSURE_ARG_POINTER(aEventStatus);
@ -2942,8 +2942,8 @@ nsFrame::PeekBackwardAndForward(nsSelectionAmount aAmountBack,
}
NS_IMETHODIMP nsFrame::HandleDrag(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus)
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
MOZ_ASSERT(aEvent->eventStructType == NS_MOUSE_EVENT, "HandleDrag can only handle mouse event");
@ -3020,7 +3020,7 @@ HandleFrameSelection(nsFrameSelection* aFrameSelection,
int32_t aContentOffsetForTableSel,
int32_t aTargetForTableSel,
nsIContent* aParentContentForTableSel,
nsGUIEvent* aEvent,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
if (!aFrameSelection) {
@ -3075,7 +3075,7 @@ HandleFrameSelection(nsFrameSelection* aFrameSelection,
}
NS_IMETHODIMP nsFrame::HandleRelease(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
if (aEvent->eventStructType != NS_MOUSE_EVENT) {

View File

@ -163,8 +163,8 @@ public:
virtual void GetChildLists(nsTArray<ChildList>* aLists) const MOZ_OVERRIDE;
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
NS_IMETHOD GetContentForEvent(nsEvent* aEvent,
nsIContent** aContent) MOZ_OVERRIDE;
NS_IMETHOD GetCursor(const nsPoint& aPoint,
@ -349,21 +349,21 @@ public:
// Selection Methods
NS_IMETHOD HandlePress(nsPresContext* aPresContext,
nsGUIEvent * aEvent,
nsEventStatus* aEventStatus);
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus);
NS_IMETHOD HandleMultiplePress(nsPresContext* aPresContext,
nsGUIEvent * aEvent,
nsEventStatus* aEventStatus,
bool aControlHeld);
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus,
bool aControlHeld);
NS_IMETHOD HandleDrag(nsPresContext* aPresContext,
nsGUIEvent * aEvent,
nsEventStatus* aEventStatus);
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus);
NS_IMETHOD HandleRelease(nsPresContext* aPresContext,
nsGUIEvent * aEvent,
nsEventStatus* aEventStatus);
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus);
enum { SELECT_ACCUMULATE = 0x01 };

View File

@ -87,7 +87,7 @@ public:
#endif
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus);
NS_IMETHOD GetCursor(const nsPoint& aPoint,
@ -681,7 +681,7 @@ void nsHTMLFramesetFrame::GetSizeOfChild(nsIFrame* aChild,
NS_METHOD nsHTMLFramesetFrame::HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
NS_ENSURE_ARG_POINTER(aEventStatus);
@ -1278,7 +1278,7 @@ nsHTMLFramesetFrame::SetBorderResize(nsHTMLFramesetBorderFrame* aBorderFrame)
void
nsHTMLFramesetFrame::StartMouseDrag(nsPresContext* aPresContext,
nsHTMLFramesetBorderFrame* aBorder,
nsGUIEvent* aEvent)
WidgetGUIEvent* aEvent)
{
#if 0
int32_t index;
@ -1307,7 +1307,7 @@ nsHTMLFramesetFrame::StartMouseDrag(nsPresContext* aPresContext,
void
nsHTMLFramesetFrame::MouseDrag(nsPresContext* aPresContext,
nsGUIEvent* aEvent)
WidgetGUIEvent* aEvent)
{
// if the capture ended, reset the drag state
if (nsIPresShell::GetCapturingContent() != GetContent()) {
@ -1579,7 +1579,7 @@ void nsHTMLFramesetBorderFrame::PaintBorder(nsRenderingContext& aRenderingContex
NS_IMETHODIMP
nsHTMLFramesetBorderFrame::HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
NS_ENSURE_ARG_POINTER(aEventStatus);

View File

@ -88,8 +88,8 @@ public:
nsIntPoint& aCellIndex);
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
NS_IMETHOD GetCursor(const nsPoint& aPoint,
nsIFrame::Cursor& aCursor) MOZ_OVERRIDE;
@ -110,12 +110,12 @@ public:
virtual bool IsLeaf() const MOZ_OVERRIDE;
void StartMouseDrag(nsPresContext* aPresContext,
nsHTMLFramesetBorderFrame* aBorder,
nsGUIEvent* aEvent);
void StartMouseDrag(nsPresContext* aPresContext,
nsHTMLFramesetBorderFrame* aBorder,
mozilla::WidgetGUIEvent* aEvent);
void MouseDrag(nsPresContext* aPresContext,
nsGUIEvent* aEvent);
mozilla::WidgetGUIEvent* aEvent);
void EndMouseDrag(nsPresContext* aPresContext);

View File

@ -3117,7 +3117,7 @@ nsGfxScrollFrameInner::FireScrollEvent()
{
mScrollEvent.Forget();
nsGUIEvent event(true, NS_SCROLL_EVENT, nullptr);
WidgetGUIEvent event(true, NS_SCROLL_EVENT, nullptr);
nsEventStatus status = nsEventStatus_eIgnore;
nsIContent* content = mOuter->GetContent();
nsPresContext* prescontext = mOuter->PresContext();

View File

@ -1359,12 +1359,12 @@ public:
* is. Does it cause the event to continue propagating through the frame hierarchy
* or is it just returned to the widgets?
*
* @see nsGUIEvent
* @see WidgetGUIEvent
* @see nsEventStatus
*/
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus) = 0;
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus) = 0;
NS_IMETHOD GetContentForEvent(nsEvent* aEvent,
nsIContent** aContent) = 0;

View File

@ -1640,7 +1640,7 @@ nsImageFrame::GetContentForEvent(nsEvent* aEvent,
// XXX what should clicks on transparent pixels do?
NS_IMETHODIMP
nsImageFrame::HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
NS_ENSURE_ARG_POINTER(aEventStatus);

View File

@ -91,8 +91,8 @@ public:
NS_IMETHOD GetContentForEvent(nsEvent* aEvent,
nsIContent** aContent);
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus);
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus);
NS_IMETHOD GetCursor(const nsPoint& aPoint,
nsIFrame::Cursor& aCursor);
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,

View File

@ -1960,8 +1960,8 @@ nsObjectFrame::PaintPlugin(nsDisplayListBuilder* aBuilder,
NS_IMETHODIMP
nsObjectFrame::HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* anEvent,
nsEventStatus* anEventStatus)
WidgetGUIEvent* anEvent,
nsEventStatus* anEventStatus)
{
NS_ENSURE_ARG_POINTER(anEvent);
NS_ENSURE_ARG_POINTER(anEventStatus);

View File

@ -70,7 +70,7 @@ public:
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus);
virtual nsIAtom* GetType() const;

View File

@ -2069,7 +2069,7 @@ nsBoxFrame::WrapListsInRedirector(nsDisplayListBuilder* aBuilder,
}
bool
nsBoxFrame::GetEventPoint(nsGUIEvent* aEvent, nsPoint &aPoint) {
nsBoxFrame::GetEventPoint(WidgetGUIEvent* aEvent, nsPoint &aPoint) {
nsIntPoint refPoint;
bool res = GetEventPoint(aEvent, refPoint);
aPoint = nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent, refPoint, this);
@ -2077,7 +2077,7 @@ nsBoxFrame::GetEventPoint(nsGUIEvent* aEvent, nsPoint &aPoint) {
}
bool
nsBoxFrame::GetEventPoint(nsGUIEvent* aEvent, nsIntPoint &aPoint) {
nsBoxFrame::GetEventPoint(WidgetGUIEvent* aEvent, nsIntPoint &aPoint) {
NS_ENSURE_TRUE(aEvent, false);
if (aEvent->eventStructType == NS_TOUCH_EVENT) {

View File

@ -212,10 +212,10 @@ protected:
// Get the point associated with this event. Returns true if a single valid
// point was found. Otherwise false.
bool GetEventPoint(nsGUIEvent *aEvent, nsPoint &aPoint);
bool GetEventPoint(mozilla::WidgetGUIEvent* aEvent, nsPoint& aPoint);
// Gets the event coordinates relative to the widget offset associated with
// this frame. Return true if a single valid point was found.
bool GetEventPoint(nsGUIEvent *aEvent, nsIntPoint &aPoint);
bool GetEventPoint(mozilla::WidgetGUIEvent* aEvent, nsIntPoint& aPoint);
protected:
void RegUnregAccessKey(bool aDoReg);

View File

@ -46,7 +46,7 @@ nsButtonBoxFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
NS_IMETHODIMP
nsButtonBoxFrame::HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
NS_ENSURE_ARG_POINTER(aEventStatus);
@ -116,7 +116,7 @@ nsButtonBoxFrame::HandleEvent(nsPresContext* aPresContext,
}
void
nsButtonBoxFrame::DoMouseClick(nsGUIEvent* aEvent, bool aTrustEvent)
nsButtonBoxFrame::DoMouseClick(WidgetGUIEvent* aEvent, bool aTrustEvent)
{
// Don't execute if we're disabled.
if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::disabled,

View File

@ -25,10 +25,11 @@ public:
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
virtual void MouseClicked (nsPresContext* aPresContext, nsGUIEvent* aEvent)
virtual void MouseClicked(nsPresContext* aPresContext,
mozilla::WidgetGUIEvent* aEvent)
{ DoMouseClick(aEvent, false); }
#ifdef DEBUG
@ -41,7 +42,7 @@ public:
* Our implementation of MouseClicked.
* @param aTrustEvent if true and aEvent as null, then assume the event was trusted
*/
void DoMouseClick(nsGUIEvent* aEvent, bool aTrustEvent);
void DoMouseClick(mozilla::WidgetGUIEvent* aEvent, bool aTrustEvent);
void UpdateMouseThrough() MOZ_OVERRIDE { AddStateBits(NS_FRAME_MOUSE_THROUGH_NEVER); }
}; // class nsButtonBoxFrame

View File

@ -379,7 +379,7 @@ nsMenuBarFrame::ChangeMenuItem(nsMenuFrame* aMenuItem,
}
nsMenuFrame*
nsMenuBarFrame::Enter(nsGUIEvent* aEvent)
nsMenuBarFrame::Enter(WidgetGUIEvent* aEvent)
{
if (!mCurrentMenu)
return nullptr;

View File

@ -80,7 +80,7 @@ public:
// Called when Enter is pressed while the menubar is focused. If the current
// menu is open, let the child handle the key.
nsMenuFrame* Enter(nsGUIEvent* aEvent);
nsMenuFrame* Enter(mozilla::WidgetGUIEvent* aEvent);
// Used to handle ALT+key combos
nsMenuFrame* FindMenuWithShortcut(nsIDOMKeyEvent* aKeyEvent);

View File

@ -390,9 +390,9 @@ nsMenuFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
}
NS_IMETHODIMP
nsMenuFrame::HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus)
nsMenuFrame::HandleEvent(nsPresContext* aPresContext,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
NS_ENSURE_ARG_POINTER(aEventStatus);
if (nsEventStatus_eConsumeNoDefault == *aEventStatus ||
@ -787,7 +787,7 @@ nsMenuFrame::SetDebug(nsBoxLayoutState& aState, nsIFrame* aList, bool aDebug)
// In either case, do nothing if the item is disabled.
//
nsMenuFrame*
nsMenuFrame::Enter(nsGUIEvent *aEvent)
nsMenuFrame::Enter(WidgetGUIEvent* aEvent)
{
if (IsDisabled()) {
#ifdef XP_WIN
@ -1166,7 +1166,7 @@ nsMenuFrame::BuildAcceleratorText(bool aNotify)
}
void
nsMenuFrame::Execute(nsGUIEvent *aEvent)
nsMenuFrame::Execute(WidgetGUIEvent* aEvent)
{
// flip "checked" state if we're a checkbox menu, or an un-checked radio menu
bool needToFlipChecked = false;
@ -1198,7 +1198,7 @@ nsMenuFrame::ShouldBlink()
}
void
nsMenuFrame::StartBlinking(nsGUIEvent *aEvent, bool aFlipChecked)
nsMenuFrame::StartBlinking(WidgetGUIEvent* aEvent, bool aFlipChecked)
{
StopBlinking();
CreateMenuCommandEvent(aEvent, aFlipChecked);
@ -1237,7 +1237,7 @@ nsMenuFrame::StopBlinking()
}
void
nsMenuFrame::CreateMenuCommandEvent(nsGUIEvent *aEvent, bool aFlipChecked)
nsMenuFrame::CreateMenuCommandEvent(WidgetGUIEvent* aEvent, bool aFlipChecked)
{
// Create a trusted event if the triggering event was trusted, or if
// we're called from chrome code (since at least one of our caller

View File

@ -108,9 +108,9 @@ public:
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
// this method can destroy the frame
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
NS_IMETHOD AppendFrames(ChildListID aListID,
nsFrameList& aFrameList) MOZ_OVERRIDE;
@ -144,7 +144,7 @@ public:
// one in its parent popup. This will carry out the command attached to
// the menuitem. If the menu should be opened, this frame will be returned,
// otherwise null will be returned.
nsMenuFrame* Enter(nsGUIEvent* aEvent);
nsMenuFrame* Enter(mozilla::WidgetGUIEvent* aEvent);
virtual void SetParent(nsIFrame* aParent) MOZ_OVERRIDE;
@ -234,7 +234,7 @@ protected:
void BuildAcceleratorText(bool aNotify);
// Called to execute our command handler. This method can destroy the frame.
void Execute(nsGUIEvent *aEvent);
void Execute(mozilla::WidgetGUIEvent *aEvent);
// This method can destroy the frame
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
@ -245,9 +245,10 @@ protected:
bool SizeToPopup(nsBoxLayoutState& aState, nsSize& aSize);
bool ShouldBlink();
void StartBlinking(nsGUIEvent *aEvent, bool aFlipChecked);
void StartBlinking(mozilla::WidgetGUIEvent* aEvent, bool aFlipChecked);
void StopBlinking();
void CreateMenuCommandEvent(nsGUIEvent *aEvent, bool aFlipChecked);
void CreateMenuCommandEvent(mozilla::WidgetGUIEvent* aEvent,
bool aFlipChecked);
void PassMenuCommandEventToPopupManager();
protected:

View File

@ -1606,7 +1606,7 @@ nsMenuPopupFrame::ChangeMenuItem(nsMenuFrame* aMenuItem,
}
nsMenuFrame*
nsMenuPopupFrame::Enter(nsGUIEvent* aEvent)
nsMenuPopupFrame::Enter(WidgetGUIEvent* aEvent)
{
mIncrementalString.Truncate();

View File

@ -215,7 +215,7 @@ public:
// that menu, or null if no menu should be opened. Also, calling Enter will
// reset the current incremental search string, calculated in
// FindMenuWithShortcut.
nsMenuFrame* Enter(nsGUIEvent* aEvent);
nsMenuFrame* Enter(mozilla::WidgetGUIEvent* aEvent);
nsPopupType PopupType() const { return mPopupType; }
bool IsMenu() MOZ_OVERRIDE { return mPopupType == ePopupTypeMenu; }

View File

@ -51,7 +51,7 @@ nsResizerFrame::nsResizerFrame(nsIPresShell* aPresShell, nsStyleContext* aContex
NS_IMETHODIMP
nsResizerFrame::HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
NS_ENSURE_ARG_POINTER(aEventStatus);
@ -540,7 +540,8 @@ nsResizerFrame::GetDirection()
}
void
nsResizerFrame::MouseClicked(nsPresContext* aPresContext, nsGUIEvent *aEvent)
nsResizerFrame::MouseClicked(nsPresContext* aPresContext,
WidgetGUIEvent *aEvent)
{
// Execute the oncommand event handler.
nsContentUtils::DispatchXULCommand(mContent,

View File

@ -26,11 +26,12 @@ public:
nsResizerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
virtual void MouseClicked(nsPresContext* aPresContext, nsGUIEvent *aEvent) MOZ_OVERRIDE;
virtual void MouseClicked(nsPresContext* aPresContext,
mozilla::WidgetGUIEvent* aEvent) MOZ_OVERRIDE;
protected:
nsIContent* GetContentToResize(nsIPresShell* aPresShell, nsIBaseWindow** aWindow);

View File

@ -15,6 +15,8 @@
#include "nsFrameManager.h"
#include "mozilla/BasicEvents.h"
using namespace mozilla;
// Interface IDs
//#define DEBUG_REFLOW
@ -68,9 +70,9 @@ public:
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus);
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus);
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
@ -213,9 +215,9 @@ nsRootBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
NS_IMETHODIMP
nsRootBoxFrame::HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus)
nsRootBoxFrame::HandleEvent(nsPresContext* aPresContext,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
NS_ENSURE_ARG_POINTER(aEventStatus);
if (nsEventStatus_eConsumeNoDefault == *aEventStatus) {

View File

@ -12,6 +12,8 @@
#include "mozilla/BasicEvents.h"
#include "nsIContent.h"
using namespace mozilla;
class nsAutoRepeatBoxFrame : public nsButtonBoxFrame
{
public:
@ -26,17 +28,17 @@ public:
nsIAtom* aAttribute,
int32_t aModType);
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus);
NS_IMETHOD HandlePress(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus);
NS_IMETHOD HandlePress(nsPresContext* aPresContext,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus);
NS_IMETHOD HandleRelease(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus);
NS_IMETHOD HandleRelease(nsPresContext* aPresContext,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus);
protected:
nsAutoRepeatBoxFrame(nsIPresShell* aPresShell, nsStyleContext* aContext):
@ -72,9 +74,9 @@ NS_NewAutoRepeatBoxFrame (nsIPresShell* aPresShell, nsStyleContext* aContext)
NS_IMPL_FRAMEARENA_HELPERS(nsAutoRepeatBoxFrame)
NS_IMETHODIMP
nsAutoRepeatBoxFrame::HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus)
nsAutoRepeatBoxFrame::HandleEvent(nsPresContext* aPresContext,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
NS_ENSURE_ARG_POINTER(aEventStatus);
if (nsEventStatus_eConsumeNoDefault == *aEventStatus) {
@ -114,8 +116,8 @@ nsAutoRepeatBoxFrame::HandleEvent(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsAutoRepeatBoxFrame::HandlePress(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsAutoRepeatBoxFrame::HandlePress(nsPresContext* aPresContext,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
if (!IsActivatedOnHover()) {
@ -128,8 +130,8 @@ nsAutoRepeatBoxFrame::HandlePress(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsAutoRepeatBoxFrame::HandleRelease(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsAutoRepeatBoxFrame::HandleRelease(nsPresContext* aPresContext,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
if (!IsActivatedOnHover()) {

View File

@ -39,8 +39,8 @@ NS_NewScrollbarButtonFrame (nsIPresShell* aPresShell, nsStyleContext* aContext)
NS_IMPL_FRAMEARENA_HELPERS(nsScrollbarButtonFrame)
NS_IMETHODIMP
nsScrollbarButtonFrame::HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsScrollbarButtonFrame::HandleEvent(nsPresContext* aPresContext,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
NS_ENSURE_ARG_POINTER(aEventStatus);
@ -80,9 +80,9 @@ nsScrollbarButtonFrame::HandleEvent(nsPresContext* aPresContext,
bool
nsScrollbarButtonFrame::HandleButtonPress(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus)
nsScrollbarButtonFrame::HandleButtonPress(nsPresContext* aPresContext,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
// Get the desired action for the scrollbar button.
LookAndFeel::IntID tmpAction;
@ -169,9 +169,9 @@ nsScrollbarButtonFrame::HandleButtonPress(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsScrollbarButtonFrame::HandleRelease(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus)
nsScrollbarButtonFrame::HandleRelease(nsPresContext* aPresContext,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
nsIPresShell::SetCapturingContent(nullptr, 0);
// we're not active anymore
@ -192,7 +192,8 @@ void nsScrollbarButtonFrame::Notify()
}
void
nsScrollbarButtonFrame::MouseClicked(nsPresContext* aPresContext, nsGUIEvent* aEvent)
nsScrollbarButtonFrame::MouseClicked(nsPresContext* aPresContext,
WidgetGUIEvent* aEvent)
{
nsButtonBoxFrame::MouseClicked(aPresContext, aEvent);
//MouseClicked();

View File

@ -33,8 +33,8 @@ public:
friend nsIFrame* NS_NewScrollbarButtonFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
static nsresult GetChildWithTag(nsPresContext* aPresContext,
@ -42,24 +42,31 @@ public:
static nsresult GetParentWithTag(nsIAtom* atom, nsIFrame* start, nsIFrame*& result);
bool HandleButtonPress(nsPresContext* aPresContext,
nsGUIEvent * aEvent,
nsEventStatus* aEventStatus);
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus);
NS_IMETHOD HandleMultiplePress(nsPresContext* aPresContext,
nsGUIEvent * aEvent,
nsEventStatus* aEventStatus,
bool aControlHeld) MOZ_OVERRIDE { return NS_OK; }
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus,
bool aControlHeld) MOZ_OVERRIDE
{
return NS_OK;
}
NS_IMETHOD HandleDrag(nsPresContext* aPresContext,
nsGUIEvent * aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE { return NS_OK; }
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE
{
return NS_OK;
}
NS_IMETHOD HandleRelease(nsPresContext* aPresContext,
nsGUIEvent * aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
protected:
virtual void MouseClicked(nsPresContext* aPresContext, nsGUIEvent* aEvent) MOZ_OVERRIDE;
virtual void MouseClicked(nsPresContext* aPresContext,
mozilla::WidgetGUIEvent* aEvent) MOZ_OVERRIDE;
void DoButtonAction(bool aSmoothScroll);
void StartRepeat() {

View File

@ -103,34 +103,34 @@ nsScrollbarFrame::AttributeChanged(int32_t aNameSpaceID,
}
NS_IMETHODIMP
nsScrollbarFrame::HandlePress(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus)
nsScrollbarFrame::HandlePress(nsPresContext* aPresContext,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
return NS_OK;
}
NS_IMETHODIMP
nsScrollbarFrame::HandleMultiplePress(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus,
nsScrollbarFrame::HandleMultiplePress(nsPresContext* aPresContext,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus,
bool aControlHeld)
{
return NS_OK;
}
NS_IMETHODIMP
nsScrollbarFrame::HandleDrag(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus)
nsScrollbarFrame::HandleDrag(nsPresContext* aPresContext,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
return NS_OK;
}
NS_IMETHODIMP
nsScrollbarFrame::HandleRelease(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus)
nsScrollbarFrame::HandleRelease(nsPresContext* aPresContext,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
return NS_OK;
}

View File

@ -40,21 +40,21 @@ public:
NS_DECL_FRAMEARENA_HELPERS
NS_IMETHOD HandlePress(nsPresContext* aPresContext,
nsGUIEvent * aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
NS_IMETHOD HandleMultiplePress(nsPresContext* aPresContext,
nsGUIEvent * aEvent,
nsEventStatus* aEventStatus,
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus,
bool aControlHeld) MOZ_OVERRIDE;
NS_IMETHOD HandleDrag(nsPresContext* aPresContext,
nsGUIEvent * aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
NS_IMETHOD HandleRelease(nsPresContext* aPresContext,
nsGUIEvent * aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
virtual void Init(nsIContent* aContent,
nsIFrame* aParent,

View File

@ -412,8 +412,8 @@ nsSliderFrame::DoLayout(nsBoxLayoutState& aState)
NS_IMETHODIMP
nsSliderFrame::HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus)
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
NS_ENSURE_ARG_POINTER(aEventStatus);
@ -823,7 +823,8 @@ nsSliderFrame::StartDrag(nsIDOMEvent* aEvent)
nsGkAtoms::_true, eCaseMatters))
return NS_OK;
nsGUIEvent *event = static_cast<nsGUIEvent*>(aEvent->GetInternalNSEvent());
WidgetGUIEvent *event =
static_cast<WidgetGUIEvent*>(aEvent->GetInternalNSEvent());
if (!ShouldScrollForEvent(event)) {
return NS_OK;
@ -938,7 +939,7 @@ nsSliderFrame::RemoveListener()
}
bool
nsSliderFrame::ShouldScrollForEvent(nsGUIEvent* aEvent)
nsSliderFrame::ShouldScrollForEvent(WidgetGUIEvent* aEvent)
{
switch (aEvent->message) {
case NS_TOUCH_START:
@ -956,7 +957,7 @@ nsSliderFrame::ShouldScrollForEvent(nsGUIEvent* aEvent)
}
bool
nsSliderFrame::ShouldScrollToClickForEvent(nsGUIEvent* aEvent)
nsSliderFrame::ShouldScrollToClickForEvent(WidgetGUIEvent* aEvent)
{
if (!ShouldScrollForEvent(aEvent)) {
return false;
@ -991,7 +992,7 @@ nsSliderFrame::ShouldScrollToClickForEvent(nsGUIEvent* aEvent)
}
bool
nsSliderFrame::IsEventOverThumb(nsGUIEvent* aEvent)
nsSliderFrame::IsEventOverThumb(WidgetGUIEvent* aEvent)
{
nsIFrame* thumbFrame = mFrames.FirstChild();
if (!thumbFrame) {
@ -1014,8 +1015,8 @@ nsSliderFrame::IsEventOverThumb(nsGUIEvent* aEvent)
NS_IMETHODIMP
nsSliderFrame::HandlePress(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus)
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
if (!ShouldScrollForEvent(aEvent) || ShouldScrollToClickForEvent(aEvent)) {
return NS_OK;
@ -1054,8 +1055,8 @@ nsSliderFrame::HandlePress(nsPresContext* aPresContext,
NS_IMETHODIMP
nsSliderFrame::HandleRelease(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus)
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
StopRepeat();

View File

@ -87,8 +87,8 @@ public:
nsIFrame* asPrevInFlow) MOZ_OVERRIDE;
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
NS_IMETHOD SetInitialChildList(ChildListID aListID,
@ -107,29 +107,35 @@ public:
void EnsureOrient();
NS_IMETHOD HandlePress(nsPresContext* aPresContext,
nsGUIEvent * aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
NS_IMETHOD HandleMultiplePress(nsPresContext* aPresContext,
nsGUIEvent * aEvent,
nsEventStatus* aEventStatus,
bool aControlHeld) MOZ_OVERRIDE { return NS_OK; }
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus,
bool aControlHeld) MOZ_OVERRIDE
{
return NS_OK;
}
NS_IMETHOD HandleDrag(nsPresContext* aPresContext,
nsGUIEvent * aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE { return NS_OK; }
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE
{
return NS_OK;
}
NS_IMETHOD HandleRelease(nsPresContext* aPresContext,
nsGUIEvent * aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
private:
bool GetScrollToClick();
nsIFrame* GetScrollbar();
bool ShouldScrollForEvent(nsGUIEvent* aEvent);
bool ShouldScrollToClickForEvent(nsGUIEvent* aEvent);
bool IsEventOverThumb(nsGUIEvent* aEvent);
bool ShouldScrollForEvent(mozilla::WidgetGUIEvent* aEvent);
bool ShouldScrollToClickForEvent(mozilla::WidgetGUIEvent* aEvent);
bool IsEventOverThumb(mozilla::WidgetGUIEvent* aEvent);
void PageUpDown(nscoord change);
void SetCurrentThumbPosition(nsIContent* aScrollbar, nscoord aNewPos, bool aIsSmooth,

View File

@ -37,6 +37,8 @@
#include "mozilla/dom/Element.h"
#include "mozilla/MouseEvents.h"
using namespace mozilla;
class nsSplitterInfo {
public:
nscoord min;
@ -68,8 +70,8 @@ public:
nsresult MouseUp(nsIDOMEvent* aMouseEvent);
nsresult MouseMove(nsIDOMEvent* aMouseEvent);
void MouseDrag(nsPresContext* aPresContext, nsGUIEvent* aEvent);
void MouseUp(nsPresContext* aPresContext, nsGUIEvent* aEvent);
void MouseDrag(nsPresContext* aPresContext, WidgetGUIEvent* aEvent);
void MouseUp(nsPresContext* aPresContext, WidgetGUIEvent* aEvent);
void AdjustChildren(nsPresContext* aPresContext);
void AdjustChildren(nsPresContext* aPresContext, nsSplitterInfo* aChildInfos, int32_t aCount, bool aIsHorizontal);
@ -324,16 +326,16 @@ nsSplitterFrame::GetInitialOrientation(bool& aIsHorizontal)
NS_IMETHODIMP
nsSplitterFrame::HandlePress(nsPresContext* aPresContext,
nsGUIEvent * aEvent,
nsEventStatus* aEventStatus)
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
return NS_OK;
}
NS_IMETHODIMP
nsSplitterFrame::HandleMultiplePress(nsPresContext* aPresContext,
nsGUIEvent * aEvent,
nsEventStatus* aEventStatus,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus,
bool aControlHeld)
{
return NS_OK;
@ -341,16 +343,16 @@ nsSplitterFrame::HandleMultiplePress(nsPresContext* aPresContext,
NS_IMETHODIMP
nsSplitterFrame::HandleDrag(nsPresContext* aPresContext,
nsGUIEvent * aEvent,
nsEventStatus* aEventStatus)
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
return NS_OK;
}
NS_IMETHODIMP
nsSplitterFrame::HandleRelease(nsPresContext* aPresContext,
nsGUIEvent * aEvent,
nsEventStatus* aEventStatus)
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
return NS_OK;
}
@ -373,9 +375,9 @@ nsSplitterFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
NS_IMETHODIMP
nsSplitterFrame::HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus)
nsSplitterFrame::HandleEvent(nsPresContext* aPresContext,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
NS_ENSURE_ARG_POINTER(aEventStatus);
if (nsEventStatus_eConsumeNoDefault == *aEventStatus) {
@ -403,7 +405,8 @@ nsSplitterFrame::HandleEvent(nsPresContext* aPresContext,
}
void
nsSplitterFrameInner::MouseUp(nsPresContext* aPresContext, nsGUIEvent* aEvent)
nsSplitterFrameInner::MouseUp(nsPresContext* aPresContext,
WidgetGUIEvent* aEvent)
{
if (mDragging && mOuter) {
AdjustChildren(aPresContext);
@ -435,7 +438,8 @@ nsSplitterFrameInner::MouseUp(nsPresContext* aPresContext, nsGUIEvent* aEvent)
}
void
nsSplitterFrameInner::MouseDrag(nsPresContext* aPresContext, nsGUIEvent* aEvent)
nsSplitterFrameInner::MouseDrag(nsPresContext* aPresContext,
WidgetGUIEvent* aEvent)
{
if (mDragging && mOuter) {

View File

@ -47,24 +47,24 @@ public:
NS_IMETHOD DoLayout(nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE;
NS_IMETHOD HandlePress(nsPresContext* aPresContext,
nsGUIEvent * aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
NS_IMETHOD HandleMultiplePress(nsPresContext* aPresContext,
nsGUIEvent * aEvent,
nsEventStatus* aEventStatus,
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus,
bool aControlHeld) MOZ_OVERRIDE;
NS_IMETHOD HandleDrag(nsPresContext* aPresContext,
nsGUIEvent * aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
NS_IMETHOD HandleRelease(nsPresContext* aPresContext,
nsGUIEvent * aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,

View File

@ -57,8 +57,8 @@ nsTitleBarFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
NS_IMETHODIMP
nsTitleBarFrame::HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus)
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
NS_ENSURE_ARG_POINTER(aEventStatus);
if (nsEventStatus_eConsumeNoDefault == *aEventStatus) {
@ -170,7 +170,8 @@ nsTitleBarFrame::HandleEvent(nsPresContext* aPresContext,
}
void
nsTitleBarFrame::MouseClicked(nsPresContext* aPresContext, nsGUIEvent* aEvent)
nsTitleBarFrame::MouseClicked(nsPresContext* aPresContext,
WidgetGUIEvent* aEvent)
{
// Execute the oncommand event handler.
nsContentUtils::DispatchXULCommand(mContent,

View File

@ -21,11 +21,12 @@ public:
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
virtual void MouseClicked(nsPresContext* aPresContext, nsGUIEvent* aEvent);
virtual void MouseClicked(nsPresContext* aPresContext,
mozilla::WidgetGUIEvent* aEvent);
void UpdateMouseThrough() MOZ_OVERRIDE { AddStateBits(NS_FRAME_MOUSE_THROUGH_NEVER); }

View File

@ -498,7 +498,7 @@ nsXULPopupManager::InitTriggerEvent(nsIDOMEvent* aEvent, nsIContent* aPopup,
if ((event->eventStructType == NS_MOUSE_EVENT ||
event->eventStructType == NS_MOUSE_SCROLL_EVENT ||
event->eventStructType == NS_WHEEL_EVENT) &&
!(static_cast<nsGUIEvent *>(event))->widget) {
!(static_cast<WidgetGUIEvent*>(event))->widget) {
// no widget, so just use the client point if available
nsCOMPtr<nsIDOMMouseEvent> mouseEvent = do_QueryInterface(aEvent);
nsIntPoint clientPt;
@ -1765,11 +1765,12 @@ nsXULPopupManager::CancelMenuTimer(nsMenuParent* aMenuParent)
}
}
static nsGUIEvent* DOMKeyEventToGUIEvent(nsIDOMEvent* aEvent)
static WidgetGUIEvent*
DOMKeyEventToGUIEvent(nsIDOMEvent* aEvent)
{
nsEvent* evt = aEvent ? aEvent->GetInternalNSEvent() : nullptr;
return evt && evt->eventStructType == NS_KEY_EVENT ?
static_cast<nsGUIEvent *>(evt) : nullptr;
static_cast<WidgetGUIEvent*>(evt) : nullptr;
}
bool
@ -1786,7 +1787,7 @@ nsXULPopupManager::HandleShortcutNavigation(nsIDOMKeyEvent* aKeyEvent,
if (result) {
aFrame->ChangeMenuItem(result, false);
if (action) {
nsGUIEvent* evt = DOMKeyEventToGUIEvent(aKeyEvent);
WidgetGUIEvent* evt = DOMKeyEventToGUIEvent(aKeyEvent);
nsMenuFrame* menuToOpen = result->Enter(evt);
if (menuToOpen) {
nsCOMPtr<nsIContent> content = menuToOpen->GetContent();
@ -2019,7 +2020,7 @@ nsXULPopupManager::HandleKeyboardEventWithKeyCode(
// Otherwise, tell the active menubar, if any, to activate the menu. The
// Enter method will return a menu if one needs to be opened as a result.
nsMenuFrame* menuToOpen = nullptr;
nsGUIEvent* GUIEvent = DOMKeyEventToGUIEvent(aKeyEvent);
WidgetGUIEvent* GUIEvent = DOMKeyEventToGUIEvent(aKeyEvent);
if (aTopVisibleMenuItem) {
menuToOpen = aTopVisibleMenuItem->Frame()->Enter(GUIEvent);
} else if (mActiveMenuBar) {

View File

@ -2551,7 +2551,7 @@ nsTreeBodyFrame::GetCursor(const nsPoint& aPoint,
return nsLeafBoxFrame::GetCursor(aPoint, aCursor);
}
static uint32_t GetDropEffect(nsGUIEvent* aEvent)
static uint32_t GetDropEffect(WidgetGUIEvent* aEvent)
{
NS_ASSERTION(aEvent->eventStructType == NS_DRAG_EVENT, "wrong event type");
WidgetDragEvent* dragEvent = static_cast<WidgetDragEvent*>(aEvent);
@ -2565,7 +2565,7 @@ static uint32_t GetDropEffect(nsGUIEvent* aEvent)
NS_IMETHODIMP
nsTreeBodyFrame::HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
if (aEvent->message == NS_MOUSE_ENTER_SYNTH || aEvent->message == NS_MOUSE_MOVE) {
@ -4334,7 +4334,9 @@ nsTreeBodyFrame::CanAutoScroll(int32_t aRowIndex)
// For non-containers, if the mouse is in the top 50% of the row, the drop is
// _before_ and the bottom 50% _after_
void
nsTreeBodyFrame::ComputeDropPosition(nsGUIEvent* aEvent, int32_t* aRow, int16_t* aOrient,
nsTreeBodyFrame::ComputeDropPosition(WidgetGUIEvent* aEvent,
int32_t* aRow,
int16_t* aOrient,
int16_t* aScrollLines)
{
*aOrient = -1;
@ -4473,7 +4475,7 @@ void
nsTreeBodyFrame::FireScrollEvent()
{
mScrollEvent.Forget();
nsGUIEvent event(true, NS_SCROLL_EVENT, nullptr);
WidgetGUIEvent event(true, NS_SCROLL_EVENT, nullptr);
// scroll events fired at elements don't bubble
event.mFlags.mBubbles = false;
nsEventDispatcher::Dispatch(GetContent(), PresContext(), &event);

View File

@ -154,7 +154,7 @@ public:
nsIFrame::Cursor& aCursor) MOZ_OVERRIDE;
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,
mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
@ -402,7 +402,9 @@ protected:
// Also calc if we're in the region in which we want to auto-scroll the tree.
// A positive value of |aScrollLines| means scroll down, a negative value
// means scroll up, a zero value means that we aren't in drag scroll region.
void ComputeDropPosition(nsGUIEvent* aEvent, int32_t* aRow, int16_t* aOrient,
void ComputeDropPosition(mozilla::WidgetGUIEvent* aEvent,
int32_t* aRow,
int16_t* aOrient,
int16_t* aScrollLines);
// Mark ourselves dirty if we're a select widget

View File

@ -370,7 +370,8 @@ public:
virtual bool PaintWindow(nsIWidget* aWidget, nsIntRegion aRegion) MOZ_OVERRIDE;
virtual void DidPaintWindow() MOZ_OVERRIDE;
virtual void RequestRepaint() MOZ_OVERRIDE;
virtual nsEventStatus HandleEvent(nsGUIEvent* aEvent, bool aUseAttachedEvents) MOZ_OVERRIDE;
virtual nsEventStatus HandleEvent(mozilla::WidgetGUIEvent* aEvent,
bool aUseAttachedEvents) MOZ_OVERRIDE;
virtual ~nsView();

View File

@ -121,8 +121,9 @@ public:
* @param aViewTarget dispatch the event to this view
* @param aStatus event handling status
*/
void DispatchEvent(nsGUIEvent *aEvent,
nsView* aViewTarget, nsEventStatus* aStatus);
void DispatchEvent(mozilla::WidgetGUIEvent *aEvent,
nsView* aViewTarget,
nsEventStatus* aStatus);
/**
* Given a parent view, insert another view as its child.

View File

@ -1064,7 +1064,8 @@ nsView::RequestRepaint()
}
nsEventStatus
nsView::HandleEvent(nsGUIEvent* aEvent, bool aUseAttachedEvents)
nsView::HandleEvent(WidgetGUIEvent* aEvent,
bool aUseAttachedEvents)
{
NS_PRECONDITION(nullptr != aEvent->widget, "null widget ptr");

View File

@ -44,6 +44,7 @@
we ask for a specific z-order, we don't assume that widget z-ordering actually works.
*/
using namespace mozilla;
using namespace mozilla::layers;
#define NSCOORD_NONE INT32_MIN
@ -686,7 +687,9 @@ void nsViewManager::DidPaintWindow()
}
void
nsViewManager::DispatchEvent(nsGUIEvent *aEvent, nsView* aView, nsEventStatus* aStatus)
nsViewManager::DispatchEvent(WidgetGUIEvent *aEvent,
nsView* aView,
nsEventStatus* aStatus)
{
PROFILER_LABEL("event", "nsViewManager::DispatchEvent");

View File

@ -1024,6 +1024,5 @@ public:
// TODO: Remove following typedefs
typedef mozilla::WidgetEvent nsEvent;
typedef mozilla::WidgetGUIEvent nsGUIEvent;
#endif // mozilla_BasicEvents_h__

View File

@ -104,7 +104,6 @@ class InternalMutationEvent;
// TODO: Remove following typedefs
typedef mozilla::WidgetEvent nsEvent;
typedef mozilla::WidgetGUIEvent nsGUIEvent;
typedef mozilla::WidgetMouseEvent nsMouseEvent;
namespace mozilla {

View File

@ -664,7 +664,7 @@ nsWindow::WidgetToScreenOffset()
}
NS_IMETHODIMP
nsWindow::DispatchEvent(nsGUIEvent *aEvent,
nsWindow::DispatchEvent(WidgetGUIEvent* aEvent,
nsEventStatus &aStatus)
{
aStatus = DispatchEvent(aEvent);
@ -672,7 +672,7 @@ nsWindow::DispatchEvent(nsGUIEvent *aEvent,
}
nsEventStatus
nsWindow::DispatchEvent(nsGUIEvent *aEvent)
nsWindow::DispatchEvent(WidgetGUIEvent* aEvent)
{
if (mWidgetListener) {
nsEventStatus status = mWidgetListener->HandleEvent(aEvent, mUseAttachedEvents);
@ -1128,7 +1128,7 @@ nsWindow::OnSizeChanged(const gfxIntSize& aSize)
}
void
nsWindow::InitEvent(nsGUIEvent& event, nsIntPoint* aPoint)
nsWindow::InitEvent(WidgetGUIEvent& event, nsIntPoint* aPoint)
{
if (aPoint) {
event.refPoint.x = aPoint->x;

View File

@ -56,7 +56,7 @@ public:
void OnSizeChanged(const gfxIntSize& aSize);
void InitEvent(nsGUIEvent& event, nsIntPoint* aPoint = 0);
void InitEvent(mozilla::WidgetGUIEvent& event, nsIntPoint* aPoint = 0);
//
// nsIWidget
@ -100,8 +100,9 @@ public:
NS_IMETHOD SetFocus(bool aRaise = false);
NS_IMETHOD GetScreenBounds(nsIntRect &aRect);
virtual nsIntPoint WidgetToScreenOffset();
NS_IMETHOD DispatchEvent(nsGUIEvent *aEvent, nsEventStatus &aStatus);
nsEventStatus DispatchEvent(nsGUIEvent *aEvent);
NS_IMETHOD DispatchEvent(mozilla::WidgetGUIEvent* aEvent,
nsEventStatus& aStatus);
nsEventStatus DispatchEvent(mozilla::WidgetGUIEvent* aEvent);
NS_IMETHOD MakeFullScreen(bool aFullScreen);
NS_IMETHOD SetWindowClass(const nsAString& xulWinType);
@ -125,7 +126,12 @@ public:
bool aDoCapture) { return NS_ERROR_NOT_IMPLEMENTED; }
NS_IMETHOD GetAttention(int32_t aCycleCount) { return NS_ERROR_NOT_IMPLEMENTED; }
NS_IMETHOD BeginResizeDrag(nsGUIEvent* aEvent, int32_t aHorizontal, int32_t aVertical) { return NS_ERROR_NOT_IMPLEMENTED; }
NS_IMETHOD BeginResizeDrag(mozilla::WidgetGUIEvent* aEvent,
int32_t aHorizontal,
int32_t aVertical)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHOD NotifyIME(NotificationToIME aNotification) MOZ_OVERRIDE;
NS_IMETHOD_(void) SetInputContext(const InputContext& aContext,

View File

@ -337,7 +337,7 @@ public:
* @return TRUE if the event is consumed by web contents
* or chrome contents. Otherwise, FALSE.
*/
bool DispatchEvent(nsGUIEvent& aEvent);
bool DispatchEvent(WidgetGUIEvent& aEvent);
/**
* SetSelection() dispatches NS_SELECTION_SET event for the aRange.

View File

@ -4175,7 +4175,7 @@ TextInputHandlerBase::OnDestroyWidget(nsChildView* aDestroyingWidget)
}
bool
TextInputHandlerBase::DispatchEvent(nsGUIEvent& aEvent)
TextInputHandlerBase::DispatchEvent(WidgetGUIEvent& aEvent)
{
if (aEvent.message == NS_KEY_PRESS) {
WidgetInputEvent& inputEvent = static_cast<WidgetInputEvent&>(aEvent);

View File

@ -466,7 +466,8 @@ public:
static bool ConvertStatus(nsEventStatus aStatus)
{ return aStatus == nsEventStatus_eConsumeNoDefault; }
NS_IMETHOD DispatchEvent(nsGUIEvent* event, nsEventStatus & aStatus);
NS_IMETHOD DispatchEvent(mozilla::WidgetGUIEvent* aEvent,
nsEventStatus& aStatus);
virtual bool ComputeShouldAccelerate(bool aDefault);
virtual bool ShouldUseOffMainThreadCompositing() MOZ_OVERRIDE;
@ -523,7 +524,7 @@ public:
// Mac specific methods
virtual bool DispatchWindowEvent(nsGUIEvent& event);
virtual bool DispatchWindowEvent(mozilla::WidgetGUIEvent& event);
void WillPaintWindow();
bool PaintWindow(nsIntRegion aRegion);

View File

@ -966,7 +966,7 @@ nsChildView::BackingScaleFactorChanged()
if (IsPluginView()) {
nsEventStatus status = nsEventStatus_eIgnore;
nsGUIEvent guiEvent(true, NS_PLUGIN_RESOLUTION_CHANGED, this);
WidgetGUIEvent guiEvent(true, NS_PLUGIN_RESOLUTION_CHANGED, this);
guiEvent.time = PR_IntervalNow();
DispatchEvent(&guiEvent, status);
}
@ -1588,7 +1588,8 @@ nsresult nsChildView::ConfigureChildren(const nsTArray<Configuration>& aConfigur
}
// Invokes callback and ProcessEvent methods on Event Listener object
NS_IMETHODIMP nsChildView::DispatchEvent(nsGUIEvent* event, nsEventStatus& aStatus)
NS_IMETHODIMP nsChildView::DispatchEvent(WidgetGUIEvent* event,
nsEventStatus& aStatus)
{
#ifdef DEBUG
debug_DumpEvent(stdout, event->widget, event, nsAutoCString("something"), 0);
@ -1632,7 +1633,7 @@ NS_IMETHODIMP nsChildView::DispatchEvent(nsGUIEvent* event, nsEventStatus& aStat
return NS_OK;
}
bool nsChildView::DispatchWindowEvent(nsGUIEvent &event)
bool nsChildView::DispatchWindowEvent(WidgetGUIEvent& event)
{
nsEventStatus status;
DispatchEvent(&event, status);
@ -3146,7 +3147,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
return;
nsEventStatus status = nsEventStatus_eIgnore;
nsGUIEvent focusGuiEvent(true, eventType, mGeckoChild);
WidgetGUIEvent focusGuiEvent(true, eventType, mGeckoChild);
focusGuiEvent.time = PR_IntervalNow();
mGeckoChild->DispatchEvent(&focusGuiEvent, status);
}

View File

@ -267,7 +267,8 @@ public:
LayersBackend aBackendHint = mozilla::layers::LAYERS_NONE,
LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
bool* aAllowRetaining = nullptr);
NS_IMETHOD DispatchEvent(nsGUIEvent* event, nsEventStatus & aStatus) ;
NS_IMETHOD DispatchEvent(mozilla::WidgetGUIEvent* aEvent,
nsEventStatus& aStatus);
NS_IMETHOD CaptureRollupEvents(nsIRollupListener * aListener, bool aDoCapture);
NS_IMETHOD GetAttention(int32_t aCycleCount);
virtual bool HasPendingInputEvent();

View File

@ -1676,7 +1676,7 @@ NS_IMETHODIMP nsCocoaWindow::GetSheetWindowParent(NSWindow** sheetWindowParent)
// Invokes callback and ProcessEvent methods on Event Listener object
NS_IMETHODIMP
nsCocoaWindow::DispatchEvent(nsGUIEvent* event, nsEventStatus& aStatus)
nsCocoaWindow::DispatchEvent(WidgetGUIEvent* event, nsEventStatus& aStatus)
{
aStatus = nsEventStatus_eIgnore;

View File

@ -261,7 +261,7 @@ nsWindow::DoDraw(void)
}
nsEventStatus
nsWindow::DispatchInputEvent(nsGUIEvent &aEvent, bool* aWasCaptured)
nsWindow::DispatchInputEvent(WidgetGUIEvent& aEvent, bool* aWasCaptured)
{
if (aWasCaptured) {
*aWasCaptured = false;
@ -478,7 +478,7 @@ nsWindow::GetNativeData(uint32_t aDataType)
}
NS_IMETHODIMP
nsWindow::DispatchEvent(nsGUIEvent *aEvent, nsEventStatus &aStatus)
nsWindow::DispatchEvent(WidgetGUIEvent* aEvent, nsEventStatus& aStatus)
{
if (mWidgetListener)
aStatus = mWidgetListener->HandleEvent(aEvent, mUseAttachedEvents);

View File

@ -47,7 +47,7 @@ public:
virtual ~nsWindow();
static void DoDraw(void);
static nsEventStatus DispatchInputEvent(nsGUIEvent &aEvent,
static nsEventStatus DispatchInputEvent(mozilla::WidgetGUIEvent& aEvent,
bool* aWasCaptured = nullptr);
NS_IMETHOD Create(nsIWidget *aParent,
@ -83,7 +83,8 @@ public:
return NS_OK;
}
virtual nsIntPoint WidgetToScreenOffset();
NS_IMETHOD DispatchEvent(nsGUIEvent *aEvent, nsEventStatus &aStatus);
NS_IMETHOD DispatchEvent(mozilla::WidgetGUIEvent* aEvent,
nsEventStatus& aStatus);
NS_IMETHOD CaptureRollupEvents(nsIRollupListener *aListener,
bool aDoCapture)
{

View File

@ -1565,7 +1565,7 @@ nsGtkIMModule::DeleteText(const int32_t aOffset, const uint32_t aNChars)
}
void
nsGtkIMModule::InitEvent(nsGUIEvent &aEvent)
nsGtkIMModule::InitEvent(WidgetGUIEvent& aEvent)
{
aEvent.time = PR_Now() / 1000;
}

View File

@ -274,7 +274,7 @@ protected:
nsresult DeleteText(const int32_t aOffset, const uint32_t aNChars);
// Initializes the GUI event.
void InitEvent(nsGUIEvent& aEvent);
void InitEvent(mozilla::WidgetGUIEvent& aEvent);
// Called before destroying the context to work around some platform bugs.
void PrepareToDestroyContext(GtkIMContext *aContext);

Some files were not shown because too many files have changed in this diff Show More