mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1158425 - Rename _SYNTH event names. r=smaug
This commit is contained in:
parent
bc912a20d9
commit
c3e1645f26
@ -2769,9 +2769,9 @@ Element::PreHandleEventForLinks(EventChainPreVisitor& aVisitor)
|
||||
// Optimisation: return early if this event doesn't interest us.
|
||||
// IMPORTANT: this switch and the switch below it must be kept in sync!
|
||||
switch (aVisitor.mEvent->message) {
|
||||
case NS_MOUSE_ENTER_SYNTH:
|
||||
case NS_MOUSE_OVER:
|
||||
case NS_FOCUS_CONTENT:
|
||||
case NS_MOUSE_EXIT_SYNTH:
|
||||
case NS_MOUSE_OUT:
|
||||
case NS_BLUR_CONTENT:
|
||||
break;
|
||||
default:
|
||||
@ -2790,7 +2790,7 @@ Element::PreHandleEventForLinks(EventChainPreVisitor& aVisitor)
|
||||
// updated even if the event is consumed before we have a chance to set it.
|
||||
switch (aVisitor.mEvent->message) {
|
||||
// Set the status bar similarly for mouseover and focus
|
||||
case NS_MOUSE_ENTER_SYNTH:
|
||||
case NS_MOUSE_OVER:
|
||||
aVisitor.mEventStatus = nsEventStatus_eConsumeNoDefault;
|
||||
// FALL THROUGH
|
||||
case NS_FOCUS_CONTENT: {
|
||||
@ -2805,7 +2805,7 @@ Element::PreHandleEventForLinks(EventChainPreVisitor& aVisitor)
|
||||
}
|
||||
break;
|
||||
}
|
||||
case NS_MOUSE_EXIT_SYNTH:
|
||||
case NS_MOUSE_OUT:
|
||||
aVisitor.mEventStatus = nsEventStatus_eConsumeNoDefault;
|
||||
// FALL THROUGH
|
||||
case NS_BLUR_CONTENT:
|
||||
|
@ -676,8 +676,8 @@ nsIContent::PreHandleEvent(EventChainPreVisitor& aVisitor)
|
||||
// Don't propagate mouseover and mouseout events when mouse is moving
|
||||
// inside chrome access only content.
|
||||
bool isAnonForEvents = IsRootOfChromeAccessOnlySubtree();
|
||||
if ((aVisitor.mEvent->message == NS_MOUSE_ENTER_SYNTH ||
|
||||
aVisitor.mEvent->message == NS_MOUSE_EXIT_SYNTH ||
|
||||
if ((aVisitor.mEvent->message == NS_MOUSE_OVER ||
|
||||
aVisitor.mEvent->message == NS_MOUSE_OUT ||
|
||||
aVisitor.mEvent->message == NS_POINTER_OVER ||
|
||||
aVisitor.mEvent->message == NS_POINTER_OUT) &&
|
||||
// Check if we should stop event propagation when event has just been
|
||||
@ -738,7 +738,7 @@ nsIContent::PreHandleEvent(EventChainPreVisitor& aVisitor)
|
||||
printf("Stopping %s propagation:"
|
||||
"\n\toriginalTarget=%s \n\tcurrentTarget=%s %s"
|
||||
"\n\trelatedTarget=%s %s \n%s",
|
||||
(aVisitor.mEvent->message == NS_MOUSE_ENTER_SYNTH)
|
||||
(aVisitor.mEvent->message == NS_MOUSE_OVER)
|
||||
? "mouseover" : "mouseout",
|
||||
NS_ConvertUTF16toUTF8(ot).get(),
|
||||
NS_ConvertUTF16toUTF8(ct).get(),
|
||||
|
@ -7653,9 +7653,9 @@ nsContentUtils::SendMouseEvent(nsCOMPtr<nsIPresShell> aPresShell,
|
||||
else if (aType.EqualsLiteral("mousemove"))
|
||||
msg = NS_MOUSE_MOVE;
|
||||
else if (aType.EqualsLiteral("mouseover"))
|
||||
msg = NS_MOUSE_ENTER;
|
||||
msg = NS_MOUSE_ENTER_WIDGET;
|
||||
else if (aType.EqualsLiteral("mouseout"))
|
||||
msg = NS_MOUSE_EXIT;
|
||||
msg = NS_MOUSE_EXIT_WIDGET;
|
||||
else if (aType.EqualsLiteral("contextmenu")) {
|
||||
msg = NS_CONTEXTMENU;
|
||||
contextMenuKey = (aButton == 0);
|
||||
|
@ -94,7 +94,7 @@ DataTransfer::DataTransfer(nsISupports* aParent, uint32_t aEventType,
|
||||
} else if (mIsExternal) {
|
||||
if (aEventType == NS_PASTE) {
|
||||
CacheExternalClipboardFormats();
|
||||
} else if (aEventType >= NS_DRAGDROP_EVENT_START && aEventType <= NS_DRAGDROP_LEAVE_SYNTH) {
|
||||
} else if (aEventType >= NS_DRAGDROP_EVENT_START && aEventType <= NS_DRAGDROP_LEAVE) {
|
||||
CacheExternalDragFormats();
|
||||
}
|
||||
}
|
||||
|
@ -191,11 +191,11 @@ EVENT(dragenter,
|
||||
EventNameType_HTMLXUL,
|
||||
eDragEventClass)
|
||||
EVENT(dragleave,
|
||||
NS_DRAGDROP_LEAVE_SYNTH,
|
||||
NS_DRAGDROP_LEAVE,
|
||||
EventNameType_HTMLXUL,
|
||||
eDragEventClass)
|
||||
EVENT(dragover,
|
||||
NS_DRAGDROP_OVER_SYNTH,
|
||||
NS_DRAGDROP_OVER,
|
||||
EventNameType_HTMLXUL,
|
||||
eDragEventClass)
|
||||
EVENT(dragstart,
|
||||
@ -283,11 +283,11 @@ EVENT(mousemove,
|
||||
EventNameType_All,
|
||||
eMouseEventClass)
|
||||
EVENT(mouseout,
|
||||
NS_MOUSE_EXIT_SYNTH,
|
||||
NS_MOUSE_OUT,
|
||||
EventNameType_All,
|
||||
eMouseEventClass)
|
||||
EVENT(mouseover,
|
||||
NS_MOUSE_ENTER_SYNTH,
|
||||
NS_MOUSE_OVER,
|
||||
EventNameType_All,
|
||||
eMouseEventClass)
|
||||
EVENT(mouseup,
|
||||
@ -720,7 +720,7 @@ NON_IDL_EVENT(commandupdate,
|
||||
EventNameType_XUL,
|
||||
eBasicEventClass)
|
||||
NON_IDL_EVENT(dragexit,
|
||||
NS_DRAGDROP_EXIT_SYNTH,
|
||||
NS_DRAGDROP_EXIT,
|
||||
EventNameType_XUL,
|
||||
eDragEventClass)
|
||||
NON_IDL_EVENT(dragdrop,
|
||||
|
@ -491,13 +491,13 @@ EventStateManager::PreHandleEvent(nsPresContext* aPresContext,
|
||||
mCurrentTarget = aTargetFrame;
|
||||
mCurrentTargetContent = nullptr;
|
||||
|
||||
// Do not take account NS_MOUSE_ENTER/EXIT so that loading a page
|
||||
// Do not take account NS_MOUSE_ENTER_WIDGET/EXIT_WIDGET so that loading a page
|
||||
// when user is not active doesn't change the state to active.
|
||||
WidgetMouseEvent* mouseEvent = aEvent->AsMouseEvent();
|
||||
if (aEvent->mFlags.mIsTrusted &&
|
||||
((mouseEvent && mouseEvent->IsReal() &&
|
||||
mouseEvent->message != NS_MOUSE_ENTER &&
|
||||
mouseEvent->message != NS_MOUSE_EXIT) ||
|
||||
mouseEvent->message != NS_MOUSE_ENTER_WIDGET &&
|
||||
mouseEvent->message != NS_MOUSE_EXIT_WIDGET) ||
|
||||
aEvent->mClass == eWheelEventClass ||
|
||||
aEvent->mClass == eKeyboardEventClass)) {
|
||||
if (gMouseOrKeyboardEventCounter == 0) {
|
||||
@ -580,8 +580,8 @@ EventStateManager::PreHandleEvent(nsPresContext* aPresContext,
|
||||
}
|
||||
break;
|
||||
}
|
||||
case NS_MOUSE_EXIT:
|
||||
// If this is a remote frame, we receive NS_MOUSE_EXIT from the parent
|
||||
case NS_MOUSE_EXIT_WIDGET:
|
||||
// If this is a remote frame, we receive NS_MOUSE_EXIT_WIDGET from the parent
|
||||
// the mouse exits our content. Since the parent may update the cursor
|
||||
// while the mouse is outside our frame, and since PuppetWidget caches the
|
||||
// current cursor internally, re-entering our content (say from over a
|
||||
@ -1181,9 +1181,9 @@ CrossProcessSafeEvent(const WidgetEvent& aEvent)
|
||||
case NS_MOUSE_BUTTON_UP:
|
||||
case NS_MOUSE_MOVE:
|
||||
case NS_CONTEXTMENU:
|
||||
case NS_MOUSE_ENTER:
|
||||
case NS_MOUSE_EXIT:
|
||||
case NS_MOUSE_ENTER_SYNTH:
|
||||
case NS_MOUSE_ENTER_WIDGET:
|
||||
case NS_MOUSE_EXIT_WIDGET:
|
||||
case NS_MOUSE_OVER:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
@ -3325,7 +3325,7 @@ EventStateManager::PostHandleEvent(nsPresContext* aPresContext,
|
||||
}
|
||||
break;
|
||||
|
||||
case NS_MOUSE_ENTER:
|
||||
case NS_MOUSE_ENTER_WIDGET:
|
||||
if (mCurrentTarget) {
|
||||
nsCOMPtr<nsIContent> targetContent;
|
||||
mCurrentTarget->GetContentForEvent(aEvent, getter_AddRefs(targetContent));
|
||||
@ -3747,8 +3747,8 @@ EventStateManager::DispatchMouseOrPointerEvent(WidgetMouseEvent* aMouseEvent,
|
||||
if (sIsPointerLocked &&
|
||||
(aMessage == NS_MOUSELEAVE ||
|
||||
aMessage == NS_MOUSEENTER ||
|
||||
aMessage == NS_MOUSE_ENTER_SYNTH ||
|
||||
aMessage == NS_MOUSE_EXIT_SYNTH)) {
|
||||
aMessage == NS_MOUSE_OVER ||
|
||||
aMessage == NS_MOUSE_OUT)) {
|
||||
mCurrentTargetContent = nullptr;
|
||||
nsCOMPtr<Element> pointerLockedElement =
|
||||
do_QueryReferent(EventStateManager::sPointerLockedElement);
|
||||
@ -3793,10 +3793,10 @@ EventStateManager::DispatchMouseOrPointerEvent(WidgetMouseEvent* aMouseEvent,
|
||||
// If we are entering/leaving remote content, dispatch a mouse enter/exit
|
||||
// event to the remote frame.
|
||||
if (IsRemoteTarget(aTargetContent)) {
|
||||
if (aMessage == NS_MOUSE_EXIT_SYNTH) {
|
||||
if (aMessage == NS_MOUSE_OUT) {
|
||||
// For remote content, send a "top-level" widget mouse exit event.
|
||||
nsAutoPtr<WidgetMouseEvent> remoteEvent;
|
||||
CreateMouseOrPointerWidgetEvent(aMouseEvent, NS_MOUSE_EXIT,
|
||||
CreateMouseOrPointerWidgetEvent(aMouseEvent, NS_MOUSE_EXIT_WIDGET,
|
||||
aRelatedContent, remoteEvent);
|
||||
remoteEvent->exit = WidgetMouseEvent::eTopLevel;
|
||||
|
||||
@ -3806,9 +3806,9 @@ EventStateManager::DispatchMouseOrPointerEvent(WidgetMouseEvent* aMouseEvent,
|
||||
// proper target via GetEventTarget which will return mCurrentTarget.
|
||||
mCurrentTarget = targetFrame;
|
||||
HandleCrossProcessEvent(remoteEvent, &status);
|
||||
} else if (aMessage == NS_MOUSE_ENTER_SYNTH) {
|
||||
} else if (aMessage == NS_MOUSE_OVER) {
|
||||
nsAutoPtr<WidgetMouseEvent> remoteEvent;
|
||||
CreateMouseOrPointerWidgetEvent(aMouseEvent, NS_MOUSE_ENTER,
|
||||
CreateMouseOrPointerWidgetEvent(aMouseEvent, NS_MOUSE_ENTER_WIDGET,
|
||||
aRelatedContent, remoteEvent);
|
||||
HandleCrossProcessEvent(remoteEvent, &status);
|
||||
}
|
||||
@ -3933,7 +3933,7 @@ EventStateManager::NotifyMouseOut(WidgetMouseEvent* aMouseEvent,
|
||||
NS_MOUSELEAVE);
|
||||
|
||||
// Fire mouseout
|
||||
DispatchMouseOrPointerEvent(aMouseEvent, isPointer ? NS_POINTER_OUT : NS_MOUSE_EXIT_SYNTH,
|
||||
DispatchMouseOrPointerEvent(aMouseEvent, isPointer ? NS_POINTER_OUT : NS_MOUSE_OUT,
|
||||
wrapper->mLastOverElement, aMovingInto);
|
||||
|
||||
wrapper->mLastOverFrame = nullptr;
|
||||
@ -4006,7 +4006,7 @@ EventStateManager::NotifyMouseOver(WidgetMouseEvent* aMouseEvent,
|
||||
// Fire mouseover
|
||||
wrapper->mLastOverFrame =
|
||||
DispatchMouseOrPointerEvent(aMouseEvent,
|
||||
isPointer ? NS_POINTER_OVER : NS_MOUSE_ENTER_SYNTH,
|
||||
isPointer ? NS_POINTER_OVER : NS_MOUSE_OVER,
|
||||
aContent, lastOverElement);
|
||||
wrapper->mLastOverElement = aContent;
|
||||
} else {
|
||||
@ -4164,7 +4164,7 @@ EventStateManager::GenerateMouseEnterExit(WidgetMouseEvent* aMouseEvent)
|
||||
break;
|
||||
case NS_POINTER_LEAVE:
|
||||
case NS_POINTER_CANCEL:
|
||||
case NS_MOUSE_EXIT:
|
||||
case NS_MOUSE_EXIT_WIDGET:
|
||||
{
|
||||
// This is actually the window mouse exit or pointer leave event. We're not moving
|
||||
// into any new element.
|
||||
@ -4293,7 +4293,7 @@ EventStateManager::GenerateDragDropEnterExit(nsPresContext* aPresContext,
|
||||
getter_AddRefs(lastContent));
|
||||
|
||||
FireDragEnterOrExit(sLastDragOverFrame->PresContext(),
|
||||
aDragEvent, NS_DRAGDROP_EXIT_SYNTH,
|
||||
aDragEvent, NS_DRAGDROP_EXIT,
|
||||
targetContent, lastContent, sLastDragOverFrame);
|
||||
}
|
||||
|
||||
@ -4302,7 +4302,7 @@ EventStateManager::GenerateDragDropEnterExit(nsPresContext* aPresContext,
|
||||
|
||||
if (sLastDragOverFrame) {
|
||||
FireDragEnterOrExit(sLastDragOverFrame->PresContext(),
|
||||
aDragEvent, NS_DRAGDROP_LEAVE_SYNTH,
|
||||
aDragEvent, NS_DRAGDROP_LEAVE,
|
||||
targetContent, lastContent, sLastDragOverFrame);
|
||||
}
|
||||
|
||||
@ -4321,10 +4321,10 @@ EventStateManager::GenerateDragDropEnterExit(nsPresContext* aPresContext,
|
||||
|
||||
nsRefPtr<nsPresContext> lastDragOverFramePresContext = sLastDragOverFrame->PresContext();
|
||||
FireDragEnterOrExit(lastDragOverFramePresContext,
|
||||
aDragEvent, NS_DRAGDROP_EXIT_SYNTH,
|
||||
aDragEvent, NS_DRAGDROP_EXIT,
|
||||
nullptr, lastContent, sLastDragOverFrame);
|
||||
FireDragEnterOrExit(lastDragOverFramePresContext,
|
||||
aDragEvent, NS_DRAGDROP_LEAVE_SYNTH,
|
||||
aDragEvent, NS_DRAGDROP_LEAVE,
|
||||
nullptr, lastContent, sLastDragOverFrame);
|
||||
|
||||
sLastDragOverFrame = nullptr;
|
||||
@ -4373,7 +4373,7 @@ EventStateManager::FireDragEnterOrExit(nsPresContext* aPresContext,
|
||||
|
||||
// collect any changes to moz cursor settings stored in the event's
|
||||
// data transfer.
|
||||
if (aMsg == NS_DRAGDROP_LEAVE_SYNTH || aMsg == NS_DRAGDROP_EXIT_SYNTH ||
|
||||
if (aMsg == NS_DRAGDROP_LEAVE || aMsg == NS_DRAGDROP_EXIT ||
|
||||
aMsg == NS_DRAGDROP_ENTER)
|
||||
UpdateDragDataTransfer(&event);
|
||||
}
|
||||
|
@ -347,7 +347,7 @@ HTMLButtonElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
|
||||
}
|
||||
break;
|
||||
|
||||
case NS_MOUSE_ENTER_SYNTH:
|
||||
case NS_MOUSE_OVER:
|
||||
{
|
||||
aVisitor.mPresContext->EventStateManager()->
|
||||
SetContentState(this, NS_EVENT_STATE_HOVER);
|
||||
@ -356,7 +356,7 @@ HTMLButtonElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
|
||||
break;
|
||||
|
||||
// XXX this doesn't seem to do anything yet
|
||||
case NS_MOUSE_EXIT_SYNTH:
|
||||
case NS_MOUSE_OUT:
|
||||
{
|
||||
aVisitor.mPresContext->EventStateManager()->
|
||||
SetContentState(nullptr, NS_EVENT_STATE_HOVER);
|
||||
|
@ -3370,10 +3370,10 @@ HTMLInputElement::NeedToInitializeEditorForEvent(
|
||||
|
||||
switch (aVisitor.mEvent->message) {
|
||||
case NS_MOUSE_MOVE:
|
||||
case NS_MOUSE_ENTER:
|
||||
case NS_MOUSE_EXIT:
|
||||
case NS_MOUSE_ENTER_SYNTH:
|
||||
case NS_MOUSE_EXIT_SYNTH:
|
||||
case NS_MOUSE_ENTER_WIDGET:
|
||||
case NS_MOUSE_EXIT_WIDGET:
|
||||
case NS_MOUSE_OVER:
|
||||
case NS_MOUSE_OUT:
|
||||
case NS_SCROLLPORT_UNDERFLOW:
|
||||
case NS_SCROLLPORT_OVERFLOW:
|
||||
return false;
|
||||
|
@ -1220,16 +1220,16 @@ bool TabParent::SendRealMouseEvent(WidgetMouseEvent& event)
|
||||
if (widget) {
|
||||
// When we mouseenter the tab, the tab's cursor should become the current
|
||||
// cursor. When we mouseexit, we stop.
|
||||
if (event.message == NS_MOUSE_ENTER ||
|
||||
event.message == NS_MOUSE_ENTER_SYNTH) {
|
||||
if (event.message == NS_MOUSE_ENTER_WIDGET ||
|
||||
event.message == NS_MOUSE_OVER) {
|
||||
mTabSetsCursor = true;
|
||||
if (mCursor != nsCursor(-1)) {
|
||||
widget->SetCursor(mCursor);
|
||||
}
|
||||
// We don't actually want to forward NS_MOUSE_ENTER messages.
|
||||
// We don't actually want to forward NS_MOUSE_ENTER_WIDGET messages.
|
||||
return true;
|
||||
} else if (event.message == NS_MOUSE_EXIT ||
|
||||
event.message == NS_MOUSE_EXIT_SYNTH) {
|
||||
} else if (event.message == NS_MOUSE_EXIT_WIDGET ||
|
||||
event.message == NS_MOUSE_OUT) {
|
||||
mTabSetsCursor = false;
|
||||
}
|
||||
}
|
||||
|
@ -1759,9 +1759,9 @@ CocoaEventTypeForEvent(const WidgetGUIEvent& anEvent, nsIFrame* aObjectFrame)
|
||||
}
|
||||
|
||||
switch (anEvent.message) {
|
||||
case NS_MOUSE_ENTER_SYNTH:
|
||||
case NS_MOUSE_OVER:
|
||||
return NPCocoaEventMouseEntered;
|
||||
case NS_MOUSE_EXIT_SYNTH:
|
||||
case NS_MOUSE_OUT:
|
||||
return NPCocoaEventMouseExited;
|
||||
case NS_MOUSE_MOVE:
|
||||
{
|
||||
@ -1803,8 +1803,8 @@ TranslateToNPCocoaEvent(WidgetGUIEvent* anEvent, nsIFrame* aObjectFrame)
|
||||
anEvent->message == NS_MOUSE_BUTTON_DOWN ||
|
||||
anEvent->message == NS_MOUSE_BUTTON_UP ||
|
||||
anEvent->message == NS_MOUSE_SCROLL ||
|
||||
anEvent->message == NS_MOUSE_ENTER_SYNTH ||
|
||||
anEvent->message == NS_MOUSE_EXIT_SYNTH)
|
||||
anEvent->message == NS_MOUSE_OVER ||
|
||||
anEvent->message == NS_MOUSE_OUT)
|
||||
{
|
||||
nsPoint pt = nsLayoutUtils::GetEventCoordinatesRelativeTo(anEvent, aObjectFrame) -
|
||||
aObjectFrame->GetContentRectRelativeToSelf().TopLeft();
|
||||
@ -2059,8 +2059,8 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent(const WidgetGUIEvent& anEvent)
|
||||
NS_ASSERTION(anEvent.message == NS_MOUSE_BUTTON_DOWN ||
|
||||
anEvent.message == NS_MOUSE_BUTTON_UP ||
|
||||
anEvent.message == NS_MOUSE_DOUBLECLICK ||
|
||||
anEvent.message == NS_MOUSE_ENTER_SYNTH ||
|
||||
anEvent.message == NS_MOUSE_EXIT_SYNTH ||
|
||||
anEvent.message == NS_MOUSE_OVER ||
|
||||
anEvent.message == NS_MOUSE_OUT ||
|
||||
anEvent.message == NS_MOUSE_MOVE,
|
||||
"Incorrect event type for coordinate translation");
|
||||
nsPoint pt =
|
||||
@ -2145,11 +2145,11 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent(const WidgetGUIEvent& anEvent)
|
||||
|
||||
switch (anEvent.message)
|
||||
{
|
||||
case NS_MOUSE_ENTER_SYNTH:
|
||||
case NS_MOUSE_EXIT_SYNTH:
|
||||
case NS_MOUSE_OVER:
|
||||
case NS_MOUSE_OUT:
|
||||
{
|
||||
XCrossingEvent& event = pluginEvent.xcrossing;
|
||||
event.type = anEvent.message == NS_MOUSE_ENTER_SYNTH ?
|
||||
event.type = anEvent.message == NS_MOUSE_OVER ?
|
||||
EnterNotify : LeaveNotify;
|
||||
event.root = root;
|
||||
event.time = anEvent.time;
|
||||
|
@ -374,12 +374,12 @@ nsEditorEventListener::HandleEvent(nsIDOMEvent* aEvent)
|
||||
return DragEnter(dragEvent);
|
||||
}
|
||||
// dragover
|
||||
case NS_DRAGDROP_OVER_SYNTH: {
|
||||
case NS_DRAGDROP_OVER: {
|
||||
nsCOMPtr<nsIDOMDragEvent> dragEvent = do_QueryInterface(aEvent);
|
||||
return DragOver(dragEvent);
|
||||
}
|
||||
// dragexit
|
||||
case NS_DRAGDROP_EXIT_SYNTH: {
|
||||
case NS_DRAGDROP_EXIT: {
|
||||
nsCOMPtr<nsIDOMDragEvent> dragEvent = do_QueryInterface(aEvent);
|
||||
return DragExit(dragEvent);
|
||||
}
|
||||
|
@ -6518,7 +6518,7 @@ void
|
||||
PresShell::UpdateActivePointerState(WidgetGUIEvent* aEvent)
|
||||
{
|
||||
switch (aEvent->message) {
|
||||
case NS_MOUSE_ENTER:
|
||||
case NS_MOUSE_ENTER_WIDGET:
|
||||
// In this case we have to know information about available mouse pointers
|
||||
if (WidgetMouseEvent* mouseEvent = aEvent->AsMouseEvent()) {
|
||||
gActivePointersIds->Put(mouseEvent->pointerId,
|
||||
@ -6543,7 +6543,7 @@ PresShell::UpdateActivePointerState(WidgetGUIEvent* aEvent)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case NS_MOUSE_EXIT:
|
||||
case NS_MOUSE_EXIT_WIDGET:
|
||||
// In this case we have to remove information about disappeared mouse pointers
|
||||
if (WidgetMouseEvent* mouseEvent = aEvent->AsMouseEvent()) {
|
||||
gActivePointersIds->Remove(mouseEvent->pointerId);
|
||||
@ -6739,7 +6739,7 @@ PresShell::RecordMouseLocation(WidgetGUIEvent* aEvent)
|
||||
|
||||
if ((aEvent->message == NS_MOUSE_MOVE &&
|
||||
aEvent->AsMouseEvent()->reason == WidgetMouseEvent::eReal) ||
|
||||
aEvent->message == NS_MOUSE_ENTER ||
|
||||
aEvent->message == NS_MOUSE_ENTER_WIDGET ||
|
||||
aEvent->message == NS_MOUSE_BUTTON_DOWN ||
|
||||
aEvent->message == NS_MOUSE_BUTTON_UP) {
|
||||
nsIFrame* rootFrame = GetRootFrame();
|
||||
@ -6752,15 +6752,15 @@ PresShell::RecordMouseLocation(WidgetGUIEvent* aEvent)
|
||||
nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent, rootFrame);
|
||||
}
|
||||
#ifdef DEBUG_MOUSE_LOCATION
|
||||
if (aEvent->message == NS_MOUSE_ENTER)
|
||||
if (aEvent->message == NS_MOUSE_ENTER_WIDGET)
|
||||
printf("[ps=%p]got mouse enter for %p\n",
|
||||
this, aEvent->widget);
|
||||
printf("[ps=%p]setting mouse location to (%d,%d)\n",
|
||||
this, mMouseLocation.x, mMouseLocation.y);
|
||||
#endif
|
||||
if (aEvent->message == NS_MOUSE_ENTER)
|
||||
if (aEvent->message == NS_MOUSE_ENTER_WIDGET)
|
||||
SynthesizeMouseMove(false);
|
||||
} else if (aEvent->message == NS_MOUSE_EXIT) {
|
||||
} else if (aEvent->message == NS_MOUSE_EXIT_WIDGET) {
|
||||
// Although we only care about the mouse moving into an area for which this
|
||||
// pres shell doesn't receive mouse move events, we don't check which widget
|
||||
// the mouse exit was for since this seems to vary by platform. Hopefully
|
||||
@ -7458,7 +7458,7 @@ PresShell::HandleEvent(nsIFrame* aFrame,
|
||||
}
|
||||
|
||||
WidgetMouseEvent* mouseEvent = aEvent->AsMouseEvent();
|
||||
bool isWindowLevelMouseExit = (aEvent->message == NS_MOUSE_EXIT) &&
|
||||
bool isWindowLevelMouseExit = (aEvent->message == NS_MOUSE_EXIT_WIDGET) &&
|
||||
(mouseEvent && mouseEvent->exit == WidgetMouseEvent::eTopLevel);
|
||||
|
||||
// Get the frame at the event point. However, don't do this if we're
|
||||
|
@ -862,8 +862,8 @@ nsListControlFrame::HandleEvent(nsPresContext* aPresContext,
|
||||
"<NA>","<NA>","<NA>","<NA>","<NA>","<NA>","<NA>","<NA>",
|
||||
"NS_MOUSE_RIGHT_BUTTON_UP",
|
||||
"NS_MOUSE_RIGHT_BUTTON_DOWN",
|
||||
"NS_MOUSE_ENTER_SYNTH",
|
||||
"NS_MOUSE_EXIT_SYNTH",
|
||||
"NS_MOUSE_OVER",
|
||||
"NS_MOUSE_OUT",
|
||||
"NS_MOUSE_LEFT_DOUBLECLICK",
|
||||
"NS_MOUSE_MIDDLE_DOUBLECLICK",
|
||||
"NS_MOUSE_RIGHT_DOUBLECLICK",
|
||||
|
@ -1783,7 +1783,7 @@ nsPluginFrame::HandleEvent(nsPresContext* aPresContext,
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
// we want to process some native mouse events in the cocoa event model
|
||||
if ((anEvent->message == NS_MOUSE_ENTER ||
|
||||
if ((anEvent->message == NS_MOUSE_ENTER_WIDGET ||
|
||||
anEvent->message == NS_WHEEL_WHEEL) &&
|
||||
mInstanceOwner->GetEventModel() == NPEventModelCocoa) {
|
||||
*anEventStatus = mInstanceOwner->ProcessEvent(*anEvent);
|
||||
|
@ -462,7 +462,7 @@ nsMenuFrame::HandleEvent(nsPresContext* aPresContext,
|
||||
*aEventStatus = nsEventStatus_eConsumeNoDefault;
|
||||
Execute(aEvent);
|
||||
}
|
||||
else if (aEvent->message == NS_MOUSE_EXIT_SYNTH) {
|
||||
else if (aEvent->message == NS_MOUSE_OUT) {
|
||||
// Kill our timer if one is active.
|
||||
if (mOpenTimer) {
|
||||
mOpenTimer->Cancel();
|
||||
|
@ -88,16 +88,16 @@ nsAutoRepeatBoxFrame::HandleEvent(nsPresContext* aPresContext,
|
||||
// repeat mode may be "hover" for repeating while the mouse is hovering
|
||||
// over the element, otherwise repetition is done while the element is
|
||||
// active (pressed).
|
||||
case NS_MOUSE_ENTER:
|
||||
case NS_MOUSE_ENTER_SYNTH:
|
||||
case NS_MOUSE_ENTER_WIDGET:
|
||||
case NS_MOUSE_OVER:
|
||||
if (IsActivatedOnHover()) {
|
||||
StartRepeat();
|
||||
mTrustedEvent = aEvent->mFlags.mIsTrusted;
|
||||
}
|
||||
break;
|
||||
|
||||
case NS_MOUSE_EXIT:
|
||||
case NS_MOUSE_EXIT_SYNTH:
|
||||
case NS_MOUSE_EXIT_WIDGET:
|
||||
case NS_MOUSE_OUT:
|
||||
// always stop on mouse exit
|
||||
StopRepeat();
|
||||
// Not really necessary but do this to be safe
|
||||
|
@ -63,7 +63,7 @@ nsScrollbarButtonFrame::HandleEvent(nsPresContext* aPresContext,
|
||||
case NS_MOUSE_BUTTON_UP:
|
||||
HandleRelease(aPresContext, aEvent, aEventStatus);
|
||||
break;
|
||||
case NS_MOUSE_EXIT_SYNTH:
|
||||
case NS_MOUSE_OUT:
|
||||
mCursorOnThis = false;
|
||||
break;
|
||||
case NS_MOUSE_MOVE: {
|
||||
|
@ -607,10 +607,10 @@ nsSliderFrame::HandleEvent(nsPresContext* aPresContext,
|
||||
#endif
|
||||
|
||||
// XXX hack until handle release is actually called in nsframe.
|
||||
// if (aEvent->message == NS_MOUSE_EXIT_SYNTH || aEvent->message == NS_MOUSE_RIGHT_BUTTON_UP || aEvent->message == NS_MOUSE_LEFT_BUTTON_UP)
|
||||
// if (aEvent->message == NS_MOUSE_OUT || aEvent->message == NS_MOUSE_RIGHT_BUTTON_UP || aEvent->message == NS_MOUSE_LEFT_BUTTON_UP)
|
||||
// HandleRelease(aPresContext, aEvent, aEventStatus);
|
||||
|
||||
if (aEvent->message == NS_MOUSE_EXIT_SYNTH && mChange)
|
||||
if (aEvent->message == NS_MOUSE_OUT && mChange)
|
||||
HandleRelease(aPresContext, aEvent, aEventStatus);
|
||||
|
||||
return nsFrame::HandleEvent(aPresContext, aEvent, aEventStatus);
|
||||
|
@ -2564,7 +2564,7 @@ nsTreeBodyFrame::HandleEvent(nsPresContext* aPresContext,
|
||||
WidgetGUIEvent* aEvent,
|
||||
nsEventStatus* aEventStatus)
|
||||
{
|
||||
if (aEvent->message == NS_MOUSE_ENTER_SYNTH || aEvent->message == NS_MOUSE_MOVE) {
|
||||
if (aEvent->message == NS_MOUSE_OVER || aEvent->message == NS_MOUSE_MOVE) {
|
||||
nsPoint pt = nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent, this);
|
||||
int32_t xTwips = pt.x - mInnerBox.x;
|
||||
int32_t yTwips = pt.y - mInnerBox.y;
|
||||
@ -2578,7 +2578,7 @@ nsTreeBodyFrame::HandleEvent(nsPresContext* aPresContext,
|
||||
InvalidateRow(mMouseOverRow);
|
||||
}
|
||||
}
|
||||
else if (aEvent->message == NS_MOUSE_EXIT_SYNTH) {
|
||||
else if (aEvent->message == NS_MOUSE_OUT) {
|
||||
if (mMouseOverRow != -1) {
|
||||
InvalidateRow(mMouseOverRow);
|
||||
mMouseOverRow = -1;
|
||||
|
@ -733,8 +733,8 @@ nsViewManager::DispatchEvent(WidgetGUIEvent *aEvent,
|
||||
// Ignore mouse exit and enter (we'll get moves if the user
|
||||
// is really moving the mouse) since we get them when we
|
||||
// create and destroy widgets.
|
||||
mouseEvent->message != NS_MOUSE_EXIT &&
|
||||
mouseEvent->message != NS_MOUSE_ENTER) ||
|
||||
mouseEvent->message != NS_MOUSE_EXIT_WIDGET &&
|
||||
mouseEvent->message != NS_MOUSE_ENTER_WIDGET) ||
|
||||
aEvent->HasKeyEventMessage() ||
|
||||
aEvent->HasIMEEventMessage() ||
|
||||
aEvent->message == NS_PLUGIN_INPUT_EVENT) {
|
||||
|
@ -71,13 +71,13 @@
|
||||
#define NS_MOUSE_MOVE (NS_MOUSE_MESSAGE_START)
|
||||
#define NS_MOUSE_BUTTON_UP (NS_MOUSE_MESSAGE_START + 1)
|
||||
#define NS_MOUSE_BUTTON_DOWN (NS_MOUSE_MESSAGE_START + 2)
|
||||
#define NS_MOUSE_ENTER (NS_MOUSE_MESSAGE_START + 22)
|
||||
#define NS_MOUSE_EXIT (NS_MOUSE_MESSAGE_START + 23)
|
||||
#define NS_MOUSE_ENTER_WIDGET (NS_MOUSE_MESSAGE_START + 22)
|
||||
#define NS_MOUSE_EXIT_WIDGET (NS_MOUSE_MESSAGE_START + 23)
|
||||
#define NS_MOUSE_DOUBLECLICK (NS_MOUSE_MESSAGE_START + 24)
|
||||
#define NS_MOUSE_CLICK (NS_MOUSE_MESSAGE_START + 27)
|
||||
#define NS_MOUSE_ACTIVATE (NS_MOUSE_MESSAGE_START + 30)
|
||||
#define NS_MOUSE_ENTER_SYNTH (NS_MOUSE_MESSAGE_START + 31)
|
||||
#define NS_MOUSE_EXIT_SYNTH (NS_MOUSE_MESSAGE_START + 32)
|
||||
#define NS_MOUSE_OVER (NS_MOUSE_MESSAGE_START + 31)
|
||||
#define NS_MOUSE_OUT (NS_MOUSE_MESSAGE_START + 32)
|
||||
#define NS_MOUSE_MOZHITTEST (NS_MOUSE_MESSAGE_START + 33)
|
||||
#define NS_MOUSEENTER (NS_MOUSE_MESSAGE_START + 34)
|
||||
#define NS_MOUSELEAVE (NS_MOUSE_MESSAGE_START + 35)
|
||||
@ -132,9 +132,7 @@
|
||||
#define NS_DRAGDROP_END (NS_DRAGDROP_EVENT_START + 6)
|
||||
#define NS_DRAGDROP_START (NS_DRAGDROP_EVENT_START + 7)
|
||||
#define NS_DRAGDROP_DROP (NS_DRAGDROP_EVENT_START + 8)
|
||||
#define NS_DRAGDROP_OVER_SYNTH (NS_DRAGDROP_EVENT_START + 1)
|
||||
#define NS_DRAGDROP_EXIT_SYNTH (NS_DRAGDROP_EVENT_START + 2)
|
||||
#define NS_DRAGDROP_LEAVE_SYNTH (NS_DRAGDROP_EVENT_START + 9)
|
||||
#define NS_DRAGDROP_LEAVE (NS_DRAGDROP_EVENT_START + 9)
|
||||
|
||||
// Events for popups
|
||||
#define NS_XUL_EVENT_START 1500
|
||||
|
@ -195,7 +195,7 @@ MultiTouchInput::MultiTouchInput(const WidgetMouseEvent& aMouseEvent)
|
||||
// manner, such as a synchronous event or action cancelling the touch, or a
|
||||
// touch point leaving the document window and going into a non-document
|
||||
// area capable of handling user interactions.
|
||||
case NS_MOUSE_EXIT:
|
||||
case NS_MOUSE_EXIT_WIDGET:
|
||||
mType = MULTITOUCH_CANCEL;
|
||||
break;
|
||||
default:
|
||||
|
@ -322,8 +322,8 @@ public:
|
||||
, mDefaultPreventedOnContent(false)
|
||||
{
|
||||
mFlags.mCancelable =
|
||||
(aMessage != NS_DRAGDROP_EXIT_SYNTH &&
|
||||
aMessage != NS_DRAGDROP_LEAVE_SYNTH &&
|
||||
(aMessage != NS_DRAGDROP_EXIT &&
|
||||
aMessage != NS_DRAGDROP_LEAVE &&
|
||||
aMessage != NS_DRAGDROP_END);
|
||||
}
|
||||
|
||||
|
@ -82,11 +82,11 @@ WidgetEvent::HasMouseEventMessage() const
|
||||
case NS_MOUSE_BUTTON_UP:
|
||||
case NS_MOUSE_CLICK:
|
||||
case NS_MOUSE_DOUBLECLICK:
|
||||
case NS_MOUSE_ENTER:
|
||||
case NS_MOUSE_EXIT:
|
||||
case NS_MOUSE_ENTER_WIDGET:
|
||||
case NS_MOUSE_EXIT_WIDGET:
|
||||
case NS_MOUSE_ACTIVATE:
|
||||
case NS_MOUSE_ENTER_SYNTH:
|
||||
case NS_MOUSE_EXIT_SYNTH:
|
||||
case NS_MOUSE_OVER:
|
||||
case NS_MOUSE_OUT:
|
||||
case NS_MOUSE_MOZHITTEST:
|
||||
case NS_MOUSE_MOVE:
|
||||
return true;
|
||||
@ -108,7 +108,7 @@ WidgetEvent::HasDragEventMessage() const
|
||||
case NS_DRAGDROP_END:
|
||||
case NS_DRAGDROP_START:
|
||||
case NS_DRAGDROP_DROP:
|
||||
case NS_DRAGDROP_LEAVE_SYNTH:
|
||||
case NS_DRAGDROP_LEAVE:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
@ -834,10 +834,10 @@ AndroidGeckoEvent::MakeMouseEvent(nsIWidget* widget)
|
||||
msg = NS_MOUSE_MOVE;
|
||||
break;
|
||||
case AndroidMotionEvent::ACTION_HOVER_ENTER:
|
||||
msg = NS_MOUSE_ENTER;
|
||||
msg = NS_MOUSE_ENTER_WIDGET;
|
||||
break;
|
||||
case AndroidMotionEvent::ACTION_HOVER_EXIT:
|
||||
msg = NS_MOUSE_EXIT;
|
||||
msg = NS_MOUSE_EXIT_WIDGET;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -382,8 +382,8 @@ nsWindow::Show(bool aState)
|
||||
// XXX should we bring this to the front when it's shown,
|
||||
// if it's a toplevel widget?
|
||||
|
||||
// XXX we should synthesize a NS_MOUSE_EXIT (for old top
|
||||
// window)/NS_MOUSE_ENTER (for new top window) since we need
|
||||
// XXX we should synthesize a NS_MOUSE_EXIT_WIDGET (for old top
|
||||
// window)/NS_MOUSE_ENTER_WIDGET (for new top window) since we need
|
||||
// to pretend that the top window always has focus. Not sure
|
||||
// if Show() is the right place to do this, though.
|
||||
|
||||
|
@ -4549,7 +4549,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
NSPoint windowEventLocation = nsCocoaUtils::EventLocationForWindow(aEvent, [self window]);
|
||||
NSPoint localEventLocation = [self convertPoint:windowEventLocation fromView:nil];
|
||||
|
||||
uint32_t msg = aEnter ? NS_MOUSE_ENTER : NS_MOUSE_EXIT;
|
||||
uint32_t msg = aEnter ? NS_MOUSE_ENTER_WIDGET : NS_MOUSE_EXIT_WIDGET;
|
||||
WidgetMouseEvent event(true, msg, mGeckoChild, WidgetMouseEvent::eReal);
|
||||
event.refPoint = LayoutDeviceIntPoint::FromUntyped(
|
||||
mGeckoChild->CocoaPointsToDevPixels(localEventLocation));
|
||||
|
@ -2542,7 +2542,7 @@ nsWindow::OnEnterNotifyEvent(GdkEventCrossing *aEvent)
|
||||
if (is_parent_ungrab_enter(aEvent))
|
||||
return;
|
||||
|
||||
WidgetMouseEvent event(true, NS_MOUSE_ENTER, this, WidgetMouseEvent::eReal);
|
||||
WidgetMouseEvent event(true, NS_MOUSE_ENTER_WIDGET, this, WidgetMouseEvent::eReal);
|
||||
|
||||
event.refPoint.x = nscoord(aEvent->x);
|
||||
event.refPoint.y = nscoord(aEvent->y);
|
||||
@ -2583,7 +2583,7 @@ nsWindow::OnLeaveNotifyEvent(GdkEventCrossing *aEvent)
|
||||
if (aEvent->subwindow != nullptr)
|
||||
return;
|
||||
|
||||
WidgetMouseEvent event(true, NS_MOUSE_EXIT, this, WidgetMouseEvent::eReal);
|
||||
WidgetMouseEvent event(true, NS_MOUSE_EXIT_WIDGET, this, WidgetMouseEvent::eReal);
|
||||
|
||||
event.refPoint.x = nscoord(aEvent->x);
|
||||
event.refPoint.y = nscoord(aEvent->y);
|
||||
|
@ -1938,8 +1938,8 @@ case _value: eventName.AssignLiteral(_name) ; break
|
||||
_ASSIGN_eventName(NS_KEY_DOWN,"NS_KEY_DOWN");
|
||||
_ASSIGN_eventName(NS_KEY_PRESS,"NS_KEY_PRESS");
|
||||
_ASSIGN_eventName(NS_KEY_UP,"NS_KEY_UP");
|
||||
_ASSIGN_eventName(NS_MOUSE_ENTER,"NS_MOUSE_ENTER");
|
||||
_ASSIGN_eventName(NS_MOUSE_EXIT,"NS_MOUSE_EXIT");
|
||||
_ASSIGN_eventName(NS_MOUSE_ENTER_WIDGET,"NS_MOUSE_ENTER_WIDGET");
|
||||
_ASSIGN_eventName(NS_MOUSE_EXIT_WIDGET,"NS_MOUSE_EXIT_WIDGET");
|
||||
_ASSIGN_eventName(NS_MOUSE_BUTTON_DOWN,"NS_MOUSE_BUTTON_DOWN");
|
||||
_ASSIGN_eventName(NS_MOUSE_BUTTON_UP,"NS_MOUSE_BUTTON_UP");
|
||||
_ASSIGN_eventName(NS_MOUSE_CLICK,"NS_MOUSE_CLICK");
|
||||
@ -2099,8 +2099,8 @@ nsBaseWidget::debug_DumpEvent(FILE * aFileOut,
|
||||
return;
|
||||
}
|
||||
|
||||
if (aGuiEvent->message == NS_MOUSE_ENTER ||
|
||||
aGuiEvent->message == NS_MOUSE_EXIT)
|
||||
if (aGuiEvent->message == NS_MOUSE_ENTER_WIDGET ||
|
||||
aGuiEvent->message == NS_MOUSE_EXIT_WIDGET)
|
||||
{
|
||||
if (!debug_GetCachedBoolPref("nglayout.debug.crossing_event_dumping"))
|
||||
return;
|
||||
|
@ -3780,8 +3780,8 @@ bool nsWindow::DispatchMouseEvent(uint32_t aEventType, WPARAM wParam,
|
||||
&& nsWindowType::eWindowType_toplevel == mWindowType
|
||||
// Currently this scheme is used only when pointer events is enabled.
|
||||
&& gfxPrefs::PointerEventsEnabled()
|
||||
// NS_MOUSE_EXIT is received, when InkCollector has been already initialized.
|
||||
&& NS_MOUSE_EXIT != aEventType) {
|
||||
// NS_MOUSE_EXIT_WIDGET is received, when InkCollector has been already initialized.
|
||||
&& NS_MOUSE_EXIT_WIDGET != aEventType) {
|
||||
InkCollector::sInkCollector->SetTarget(mWnd);
|
||||
}
|
||||
|
||||
@ -3790,11 +3790,11 @@ bool nsWindow::DispatchMouseEvent(uint32_t aEventType, WPARAM wParam,
|
||||
CaptureMouse(true);
|
||||
break;
|
||||
|
||||
// NS_MOUSE_MOVE and NS_MOUSE_EXIT are here because we need to make sure capture flag
|
||||
// NS_MOUSE_MOVE and NS_MOUSE_EXIT_WIDGET are here because we need to make sure capture flag
|
||||
// isn't left on after a drag where we wouldn't see a button up message (see bug 324131).
|
||||
case NS_MOUSE_BUTTON_UP:
|
||||
case NS_MOUSE_MOVE:
|
||||
case NS_MOUSE_EXIT:
|
||||
case NS_MOUSE_EXIT_WIDGET:
|
||||
if (!(wParam & (MK_LBUTTON | MK_MBUTTON | MK_RBUTTON)) && sIsInMouseCapture)
|
||||
CaptureMouse(false);
|
||||
break;
|
||||
@ -3887,7 +3887,7 @@ bool nsWindow::DispatchMouseEvent(uint32_t aEventType, WPARAM wParam,
|
||||
else if (aEventType == NS_MOUSE_MOVE && !insideMovementThreshold) {
|
||||
sLastClickCount = 0;
|
||||
}
|
||||
else if (aEventType == NS_MOUSE_EXIT) {
|
||||
else if (aEventType == NS_MOUSE_EXIT_WIDGET) {
|
||||
event.exit = IsTopLevelMouseExit(mWnd) ?
|
||||
WidgetMouseEvent::eTopLevel : WidgetMouseEvent::eChild;
|
||||
}
|
||||
@ -3950,7 +3950,7 @@ bool nsWindow::DispatchMouseEvent(uint32_t aEventType, WPARAM wParam,
|
||||
case NS_MOUSE_MOVE:
|
||||
pluginEvent.event = WM_MOUSEMOVE;
|
||||
break;
|
||||
case NS_MOUSE_EXIT:
|
||||
case NS_MOUSE_EXIT_WIDGET:
|
||||
pluginEvent.event = WM_MOUSELEAVE;
|
||||
break;
|
||||
default:
|
||||
@ -3980,20 +3980,20 @@ bool nsWindow::DispatchMouseEvent(uint32_t aEventType, WPARAM wParam,
|
||||
if (sCurrentWindow == nullptr || sCurrentWindow != this) {
|
||||
if ((nullptr != sCurrentWindow) && (!sCurrentWindow->mInDtor)) {
|
||||
LPARAM pos = sCurrentWindow->lParamToClient(lParamToScreen(lParam));
|
||||
sCurrentWindow->DispatchMouseEvent(NS_MOUSE_EXIT, wParam, pos, false,
|
||||
sCurrentWindow->DispatchMouseEvent(NS_MOUSE_EXIT_WIDGET, wParam, pos, false,
|
||||
WidgetMouseEvent::eLeftButton,
|
||||
aInputSource);
|
||||
}
|
||||
sCurrentWindow = this;
|
||||
if (!mInDtor) {
|
||||
LPARAM pos = sCurrentWindow->lParamToClient(lParamToScreen(lParam));
|
||||
sCurrentWindow->DispatchMouseEvent(NS_MOUSE_ENTER, wParam, pos, false,
|
||||
sCurrentWindow->DispatchMouseEvent(NS_MOUSE_ENTER_WIDGET, wParam, pos, false,
|
||||
WidgetMouseEvent::eLeftButton,
|
||||
aInputSource);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (aEventType == NS_MOUSE_EXIT) {
|
||||
} else if (aEventType == NS_MOUSE_EXIT_WIDGET) {
|
||||
if (sCurrentWindow == this) {
|
||||
sCurrentWindow = nullptr;
|
||||
}
|
||||
@ -4864,7 +4864,7 @@ nsWindow::ProcessMessage(UINT msg, WPARAM& wParam, LPARAM& lParam,
|
||||
|
||||
case WM_NCMOUSEMOVE:
|
||||
// If we receive a mouse move event on non-client chrome, make sure and
|
||||
// send an NS_MOUSE_EXIT event as well.
|
||||
// send an NS_MOUSE_EXIT_WIDGET event as well.
|
||||
if (mMousePresent && !sIsInMouseCapture)
|
||||
SendMessage(mWnd, WM_MOUSELEAVE, 0, 0);
|
||||
break;
|
||||
@ -4901,7 +4901,7 @@ nsWindow::ProcessMessage(UINT msg, WPARAM& wParam, LPARAM& lParam,
|
||||
// Synthesize an event position because we don't get one from
|
||||
// WM_MOUSELEAVE.
|
||||
LPARAM pos = lParamToClient(::GetMessagePos());
|
||||
DispatchMouseEvent(NS_MOUSE_EXIT, mouseState, pos, false,
|
||||
DispatchMouseEvent(NS_MOUSE_EXIT_WIDGET, mouseState, pos, false,
|
||||
WidgetMouseEvent::eLeftButton, MOUSE_INPUT_SOURCE());
|
||||
}
|
||||
break;
|
||||
@ -4909,7 +4909,7 @@ nsWindow::ProcessMessage(UINT msg, WPARAM& wParam, LPARAM& lParam,
|
||||
case MOZ_WM_PEN_LEAVES_HOVER_OF_DIGITIZER:
|
||||
{
|
||||
LPARAM pos = lParamToClient(::GetMessagePos());
|
||||
DispatchMouseEvent(NS_MOUSE_EXIT, wParam, pos, false,
|
||||
DispatchMouseEvent(NS_MOUSE_EXIT_WIDGET, wParam, pos, false,
|
||||
WidgetMouseEvent::eLeftButton,
|
||||
nsIDOMMouseEvent::MOZ_SOURCE_PEN);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user