Bug 895274 part.25 Rename NS_MOUSE_MOVE to eMouseMove r=smaug

This commit is contained in:
Masayuki Nakano 2015-08-29 08:58:29 +09:00
Родитель 8d32b818af
Коммит 717c415187
40 изменённых файлов: 75 добавлений и 77 удалений

Просмотреть файл

@ -537,7 +537,7 @@ Accessible::ChildAtPoint(int32_t aX, int32_t aY,
nsIntRect rootRect;
rootWidget->GetScreenBounds(rootRect);
WidgetMouseEvent dummyEvent(true, NS_MOUSE_MOVE, rootWidget,
WidgetMouseEvent dummyEvent(true, eMouseMove, rootWidget,
WidgetMouseEvent::eSynthesized);
dummyEvent.refPoint = LayoutDeviceIntPoint(aX - rootRect.x, aY - rootRect.y);

Просмотреть файл

@ -7842,7 +7842,7 @@ nsContentUtils::SendMouseEvent(nsCOMPtr<nsIPresShell> aPresShell,
else if (aType.EqualsLiteral("mouseup"))
msg = NS_MOUSE_BUTTON_UP;
else if (aType.EqualsLiteral("mousemove"))
msg = NS_MOUSE_MOVE;
msg = eMouseMove;
else if (aType.EqualsLiteral("mouseover"))
msg = NS_MOUSE_ENTER_WIDGET;
else if (aType.EqualsLiteral("mouseout"))

Просмотреть файл

@ -3061,7 +3061,7 @@ nsGlobalWindow::PreHandleEvent(EventChainPreVisitor& aVisitor)
aVisitor.mCanHandle = true;
aVisitor.mForceContentDispatch = true; //FIXME! Bug 329119
if ((msg == NS_MOUSE_MOVE) && gEntropyCollector) {
if (msg == eMouseMove && gEntropyCollector) {
//Chances are this counter will overflow during the life of the
//process, but that's OK for our case. Means we get a little
//more entropy.

Просмотреть файл

@ -279,7 +279,7 @@ EVENT(mouseleave,
EventNameType_All,
eMouseEventClass)
EVENT(mousemove,
NS_MOUSE_MOVE,
eMouseMove,
EventNameType_All,
eMouseEventClass)
EVENT(mouseout,

Просмотреть файл

@ -615,7 +615,7 @@ EventStateManager::PreHandleEvent(nsPresContext* aPresContext,
// Treat it as a synthetic move so we don't generate spurious
// "exit" or "move" events. Any necessary "out" or "over" events
// will be generated by GenerateMouseEnterExit
mouseEvent->mMessage = NS_MOUSE_MOVE;
mouseEvent->mMessage = eMouseMove;
mouseEvent->reason = WidgetMouseEvent::eSynthesized;
// then fall through...
} else {
@ -628,7 +628,7 @@ EventStateManager::PreHandleEvent(nsPresContext* aPresContext,
aEvent->mMessage = eVoidEvent;
break;
}
case NS_MOUSE_MOVE:
case eMouseMove:
case NS_POINTER_DOWN:
case NS_POINTER_MOVE: {
// on the Mac, GenerateDragGesture() may not return until the drag
@ -1172,7 +1172,7 @@ CrossProcessSafeEvent(const WidgetEvent& aEvent)
switch (aEvent.mMessage) {
case NS_MOUSE_BUTTON_DOWN:
case NS_MOUSE_BUTTON_UP:
case NS_MOUSE_MOVE:
case eMouseMove:
case NS_CONTEXTMENU:
case NS_MOUSE_ENTER_WIDGET:
case NS_MOUSE_EXIT_WIDGET:
@ -4082,7 +4082,7 @@ EventStateManager::GenerateMouseEnterExit(WidgetMouseEvent* aMouseEvent)
nsCOMPtr<nsIContent> targetBeforeEvent = mCurrentTargetContent;
switch(aMouseEvent->mMessage) {
case NS_MOUSE_MOVE:
case eMouseMove:
{
// Mouse movement is reported on the MouseEvent.movement{X,Y} fields.
// Movement is calculated in UIEvent::GetMovementPoint() as:

Просмотреть файл

@ -184,7 +184,7 @@ WheelTransaction::OnEvent(WidgetEvent* aEvent)
EndTransaction();
}
return;
case NS_MOUSE_MOVE:
case eMouseMove:
case NS_DRAGDROP_OVER: {
WidgetMouseEvent* mouseEvent = aEvent->AsMouseEvent();
if (mouseEvent->IsReal()) {

Просмотреть файл

@ -3026,7 +3026,7 @@ HTMLInputElement::NeedToInitializeEditorForEvent(
}
switch (aVisitor.mEvent->mMessage) {
case NS_MOUSE_MOVE:
case eMouseMove:
case NS_MOUSE_ENTER_WIDGET:
case NS_MOUSE_EXIT_WIDGET:
case NS_MOUSE_OVER:
@ -3197,7 +3197,7 @@ HTMLInputElement::PreHandleEvent(EventChainPreVisitor& aVisitor)
// we want to end the spin. We do this here (rather than in
// PostHandleEvent) because we don't want to let content preventDefault()
// the end of the spin.
if (aVisitor.mEvent->mMessage == NS_MOUSE_MOVE) {
if (aVisitor.mEvent->mMessage == eMouseMove) {
// Be aggressive about stopping the spin:
bool stopSpin = true;
nsNumberControlFrame* numberControlFrame =
@ -4118,7 +4118,7 @@ HTMLInputElement::PostHandleEventForRangeThumb(EventChainPostVisitor& aVisitor)
aVisitor.mEvent->mFlags.mMultipleActionsPrevented = true;
} break;
case NS_MOUSE_MOVE:
case eMouseMove:
case NS_TOUCH_MOVE:
if (!mIsDraggingRange) {
break;

Просмотреть файл

@ -2466,7 +2466,7 @@ nsGenericHTMLFormElement::IsElementDisabledForEvents(EventMessage aMessage,
uiStyle->mUserInput == NS_STYLE_USER_INPUT_DISABLED;
}
return disabled && aMessage != NS_MOUSE_MOVE;
return disabled && aMessage != eMouseMove;
}
void

Просмотреть файл

@ -2055,7 +2055,7 @@ TabChild::UpdateTapState(const WidgetTouchEvent& aEvent, nsEventStatus aStatus)
case NS_TOUCH_END:
if (!TouchManager::gPreventMouseEvents) {
APZCCallbackHelper::DispatchSynthesizedMouseEvent(
NS_MOUSE_MOVE, time, currentPoint, 0, mPuppetWidget);
eMouseMove, time, currentPoint, 0, mPuppetWidget);
APZCCallbackHelper::DispatchSynthesizedMouseEvent(
NS_MOUSE_BUTTON_DOWN, time, currentPoint, 0, mPuppetWidget);
APZCCallbackHelper::DispatchSynthesizedMouseEvent(

Просмотреть файл

@ -1395,7 +1395,7 @@ bool TabParent::SendRealMouseEvent(WidgetMouseEvent& event)
}
}
if (NS_MOUSE_MOVE == event.mMessage) {
if (eMouseMove == event.mMessage) {
if (event.reason == WidgetMouseEvent::eSynthesized) {
return SendSynthMouseMoveEvent(event);
} else {

Просмотреть файл

@ -1812,8 +1812,7 @@ CocoaEventTypeForEvent(const WidgetGUIEvent& anEvent, nsIFrame* aObjectFrame)
return NPCocoaEventMouseEntered;
case NS_MOUSE_OUT:
return NPCocoaEventMouseExited;
case NS_MOUSE_MOVE:
{
case eMouseMove: {
// We don't know via information on events from the widget code whether or not
// we're dragging. The widget code just generates mouse move events from native
// drag events. If anybody is capturing, this is a drag event.
@ -1848,7 +1847,7 @@ TranslateToNPCocoaEvent(WidgetGUIEvent* anEvent, nsIFrame* aObjectFrame)
InitializeNPCocoaEvent(&cocoaEvent);
cocoaEvent.type = CocoaEventTypeForEvent(*anEvent, aObjectFrame);
if (anEvent->mMessage == NS_MOUSE_MOVE ||
if (anEvent->mMessage == eMouseMove ||
anEvent->mMessage == NS_MOUSE_BUTTON_DOWN ||
anEvent->mMessage == NS_MOUSE_BUTTON_UP ||
anEvent->mMessage == NS_MOUSE_SCROLL ||
@ -2062,7 +2061,7 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent(const WidgetGUIEvent& anEvent)
pluginEvent.event = 0;
const WidgetMouseEvent* mouseEvent = anEvent.AsMouseEvent();
switch (anEvent.mMessage) {
case NS_MOUSE_MOVE:
case eMouseMove:
pluginEvent.event = WM_MOUSEMOVE;
break;
case NS_MOUSE_BUTTON_DOWN: {
@ -2111,7 +2110,7 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent(const WidgetGUIEvent& anEvent)
anEvent.mMessage == NS_MOUSE_DOUBLECLICK ||
anEvent.mMessage == NS_MOUSE_OVER ||
anEvent.mMessage == NS_MOUSE_OUT ||
anEvent.mMessage == NS_MOUSE_MOVE,
anEvent.mMessage == eMouseMove,
"Incorrect event type for coordinate translation");
nsPoint pt =
nsLayoutUtils::GetEventCoordinatesRelativeTo(&anEvent, mPluginFrame) -
@ -2220,7 +2219,7 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent(const WidgetGUIEvent& anEvent)
event.focus = mContentFocused;
}
break;
case NS_MOUSE_MOVE:
case eMouseMove:
{
XMotionEvent& event = pluginEvent.xmotion;
event.type = MotionNotify;
@ -2392,9 +2391,8 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent(const WidgetGUIEvent& anEvent)
nsIntPoint pluginPoint(presContext->AppUnitsToDevPixels(appPoint.x),
presContext->AppUnitsToDevPixels(appPoint.y));
switch (anEvent.mMessage)
{
case NS_MOUSE_MOVE:
switch (anEvent.mMessage) {
case eMouseMove:
{
// are these going to be touch events?
// pluginPoint.x;

Просмотреть файл

@ -874,7 +874,7 @@ APZCTreeManager::UpdateWheelTransaction(WidgetInputEvent& aEvent)
}
switch (aEvent.mMessage) {
case NS_MOUSE_MOVE:
case eMouseMove:
case NS_DRAGDROP_OVER: {
WidgetMouseEvent* mouseEvent = aEvent.AsMouseEvent();
if (!mouseEvent->IsReal()) {

Просмотреть файл

@ -496,7 +496,7 @@ APZCCallbackHelper::DispatchSynthesizedMouseEvent(EventMessage aMsg,
Modifiers aModifiers,
nsIWidget* aWidget)
{
MOZ_ASSERT(aMsg == NS_MOUSE_MOVE || aMsg == NS_MOUSE_BUTTON_DOWN ||
MOZ_ASSERT(aMsg == eMouseMove || aMsg == NS_MOUSE_BUTTON_DOWN ||
aMsg == NS_MOUSE_BUTTON_UP || aMsg == NS_MOUSE_MOZLONGTAP);
WidgetMouseEvent event(true, aMsg, nullptr,
@ -506,7 +506,7 @@ APZCCallbackHelper::DispatchSynthesizedMouseEvent(EventMessage aMsg,
event.button = WidgetMouseEvent::eLeftButton;
event.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_TOUCH;
event.ignoreRootScrollFrame = true;
if (aMsg != NS_MOUSE_MOVE) {
if (aMsg != eMouseMove) {
event.clickCount = 1;
}
event.modifiers = aModifiers;
@ -546,7 +546,7 @@ APZCCallbackHelper::FireSingleTapEvent(const LayoutDevicePoint& aPoint,
APZCCH_LOG("Dispatching single-tap component events to %s\n",
Stringify(aPoint).c_str());
int time = 0;
DispatchSynthesizedMouseEvent(NS_MOUSE_MOVE, time, aPoint, aModifiers, aWidget);
DispatchSynthesizedMouseEvent(eMouseMove, time, aPoint, aModifiers, aWidget);
DispatchSynthesizedMouseEvent(NS_MOUSE_BUTTON_DOWN, time, aPoint, aModifiers, aWidget);
DispatchSynthesizedMouseEvent(NS_MOUSE_BUTTON_UP, time, aPoint, aModifiers, aWidget);
}

Просмотреть файл

@ -508,10 +508,10 @@ AccessibleCaretEventHub::HandleMouseEvent(WidgetMouseEvent* aEvent)
mState->Name(), rv);
break;
case NS_MOUSE_MOVE:
AC_LOGV("Before NS_MOUSE_MOVE, state: %s", mState->Name());
case eMouseMove:
AC_LOGV("Before eMouseMove, state: %s", mState->Name());
rv = mState->OnMove(this, point);
AC_LOGV("After NS_MOUSE_MOVE, state: %s, consume: %d", mState->Name(), rv);
AC_LOGV("After eMouseMove, state: %s, consume: %d", mState->Name(), rv);
break;
case NS_MOUSE_BUTTON_UP:

Просмотреть файл

@ -245,7 +245,7 @@ SelectionCarets::HandleEvent(WidgetEvent* aEvent)
return nsEventStatus_eConsumeNoDefault;
}
} else if (aEvent->mMessage == NS_TOUCH_MOVE ||
aEvent->mMessage == NS_MOUSE_MOVE) {
aEvent->mMessage == eMouseMove) {
if (mDragMode == START_FRAME || mDragMode == END_FRAME) {
if (mActiveTouchId == nowTouchId) {
ptInRoot.y += mCaretCenterToDownPointOffsetY;

Просмотреть файл

@ -775,7 +775,7 @@ TouchCaret::HandleEvent(WidgetEvent* aEvent)
case NS_TOUCH_MOVE:
status = HandleTouchMoveEvent(aEvent->AsTouchEvent());
break;
case NS_MOUSE_MOVE:
case eMouseMove:
status = HandleMouseMoveEvent(aEvent->AsMouseEvent());
break;
case NS_TOUCH_CANCEL:

Просмотреть файл

@ -131,7 +131,7 @@ public:
static UniquePtr<WidgetEvent> CreateMouseMoveEvent(nscoord aX, nscoord aY)
{
return CreateMouseEvent(NS_MOUSE_MOVE, aX, aY);
return CreateMouseEvent(eMouseMove, aX, aY);
}
static UniquePtr<WidgetEvent> CreateMouseReleaseEvent(nscoord aX, nscoord aY)

Просмотреть файл

@ -5588,7 +5588,7 @@ PresShell::ProcessSynthMouseMoveEvent(bool aFromScroll)
refpoint += view->ViewToWidgetOffset();
}
NS_ASSERTION(view->GetWidget(), "view should have a widget here");
WidgetMouseEvent event(true, NS_MOUSE_MOVE, view->GetWidget(),
WidgetMouseEvent event(true, eMouseMove, view->GetWidget(),
WidgetMouseEvent::eSynthesized);
event.refPoint = LayoutDeviceIntPoint::FromAppUnitsToNearest(refpoint, viewAPD);
event.time = PR_IntervalNow();
@ -6567,7 +6567,7 @@ PresShell::RecordMouseLocation(WidgetGUIEvent* aEvent)
return;
}
if ((aEvent->mMessage == NS_MOUSE_MOVE &&
if ((aEvent->mMessage == eMouseMove &&
aEvent->AsMouseEvent()->reason == WidgetMouseEvent::eReal) ||
aEvent->mMessage == NS_MOUSE_ENTER_WIDGET ||
aEvent->mMessage == NS_MOUSE_BUTTON_DOWN ||
@ -6670,7 +6670,7 @@ DispatchPointerFromMouseOrTouch(PresShell* aShell,
}
int16_t button = mouseEvent->button;
switch (mouseEvent->mMessage) {
case NS_MOUSE_MOVE:
case eMouseMove:
if (mouseEvent->buttons == 0) {
button = -1;
}
@ -7931,7 +7931,7 @@ PresShell::HandleEventInternal(WidgetEvent* aEvent, nsEventStatus* aStatus)
AutoHandlingUserInputStatePusher userInpStatePusher(isHandlingUserInput,
aEvent, mDocument);
if (aEvent->mFlags.mIsTrusted && aEvent->mMessage == NS_MOUSE_MOVE) {
if (aEvent->mFlags.mIsTrusted && aEvent->mMessage == eMouseMove) {
nsIPresShell::AllowMouseCapture(
EventStateManager::GetActiveEventStateManager() == manager);
}
@ -7997,7 +7997,7 @@ PresShell::HandleEventInternal(WidgetEvent* aEvent, nsEventStatus* aStatus)
// reset the capturing content now that the mouse button is up
SetCapturingContent(nullptr, 0);
break;
case NS_MOUSE_MOVE:
case eMouseMove:
nsIPresShell::AllowMouseCapture(false);
break;
default:

Просмотреть файл

@ -881,7 +881,7 @@ nsListControlFrame::HandleEvent(nsPresContext* aPresContext,
{
NS_ENSURE_ARG_POINTER(aEventStatus);
/*const char * desc[] = {"NS_MOUSE_MOVE",
/*const char * desc[] = {"eMouseMove",
"NS_MOUSE_LEFT_BUTTON_UP",
"NS_MOUSE_LEFT_BUTTON_DOWN",
"<NA>","<NA>","<NA>","<NA>","<NA>","<NA>","<NA>",

Просмотреть файл

@ -2558,7 +2558,7 @@ nsFrame::HandleEvent(nsPresContext* aPresContext,
nsEventStatus* aEventStatus)
{
if (aEvent->mMessage == NS_MOUSE_MOVE) {
if (aEvent->mMessage == eMouseMove) {
// XXX If the second argument of HandleDrag() is WidgetMouseEvent,
// the implementation becomes simpler.
return HandleDrag(aPresContext, aEvent, aEventStatus);
@ -2604,7 +2604,7 @@ nsFrame::GetDataForTableSelection(const nsFrameSelection* aFrameSelection,
// (Mouse down does normal selection unless Ctrl/Cmd is pressed)
bool doTableSelection =
displaySelection == nsISelectionDisplay::DISPLAY_ALL && selectingTableCells &&
(aMouseEvent->mMessage == NS_MOUSE_MOVE ||
(aMouseEvent->mMessage == eMouseMove ||
(aMouseEvent->mMessage == NS_MOUSE_BUTTON_UP &&
aMouseEvent->button == WidgetMouseEvent::eLeftButton) ||
aMouseEvent->IsShift());

Просмотреть файл

@ -652,7 +652,7 @@ nsresult nsHTMLFramesetFrame::HandleEvent(nsPresContext* aPresContext,
if (mDragger) {
// the nsFramesetBorderFrame has captured NS_MOUSE_DOWN
switch (aEvent->mMessage) {
case NS_MOUSE_MOVE:
case eMouseMove:
MouseDrag(aPresContext, aEvent);
break;
case NS_MOUSE_BUTTON_UP:

Просмотреть файл

@ -2012,7 +2012,7 @@ nsImageFrame::HandleEvent(nsPresContext* aPresContext,
if ((aEvent->mMessage == NS_MOUSE_BUTTON_UP &&
aEvent->AsMouseEvent()->button == WidgetMouseEvent::eLeftButton) ||
aEvent->mMessage == NS_MOUSE_MOVE) {
aEvent->mMessage == eMouseMove) {
nsImageMap* map = GetImageMap();
bool isServerMap = IsServerImageMap();
if ((nullptr != map) || isServerMap) {

Просмотреть файл

@ -479,7 +479,7 @@ nsMenuFrame::HandleEvent(nsPresContext* aPresContext,
}
}
}
else if (aEvent->mMessage == NS_MOUSE_MOVE &&
else if (aEvent->mMessage == eMouseMove &&
(onmenu || (menuParent && menuParent->IsMenuBar()))) {
if (gEatMouseMove) {
gEatMouseMove = false;

Просмотреть файл

@ -144,7 +144,7 @@ nsResizerFrame::HandleEvent(nsPresContext* aPresContext,
break;
case NS_TOUCH_MOVE:
case NS_MOUSE_MOVE: {
case eMouseMove: {
if (mTrackingMouseMove)
{
nsCOMPtr<nsIBaseWindow> window;

Просмотреть файл

@ -66,7 +66,7 @@ nsScrollbarButtonFrame::HandleEvent(nsPresContext* aPresContext,
case NS_MOUSE_OUT:
mCursorOnThis = false;
break;
case NS_MOUSE_MOVE: {
case eMouseMove: {
nsPoint cursor =
nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent, this);
nsRect frameRect(nsPoint(0, 0), GetSize());

Просмотреть файл

@ -479,7 +479,7 @@ nsSliderFrame::HandleEvent(nsPresContext* aPresContext,
{
switch (aEvent->mMessage) {
case NS_TOUCH_MOVE:
case NS_MOUSE_MOVE: {
case eMouseMove: {
nsPoint eventPoint;
if (!GetEventPoint(aEvent, eventPoint)) {
break;

Просмотреть файл

@ -389,7 +389,7 @@ nsSplitterFrame::HandleEvent(nsPresContext* aPresContext,
nsWeakFrame weakFrame(this);
nsRefPtr<nsSplitterFrameInner> kungFuDeathGrip(mInner);
switch (aEvent->mMessage) {
case NS_MOUSE_MOVE:
case eMouseMove:
mInner->MouseDrag(aPresContext, aEvent);
break;

Просмотреть файл

@ -107,7 +107,7 @@ nsTitleBarFrame::HandleEvent(nsPresContext* aPresContext,
}
break;
case NS_MOUSE_MOVE: {
case eMouseMove: {
if(mTrackingMouseMove)
{
LayoutDeviceIntPoint nsMoveBy = aEvent->refPoint - mLastPoint;

Просмотреть файл

@ -2563,7 +2563,7 @@ nsTreeBodyFrame::HandleEvent(nsPresContext* aPresContext,
WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
if (aEvent->mMessage == NS_MOUSE_OVER || aEvent->mMessage == NS_MOUSE_MOVE) {
if (aEvent->mMessage == NS_MOUSE_OVER || aEvent->mMessage == eMouseMove) {
nsPoint pt = nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent, this);
int32_t xTwips = pt.x - mInnerBox.x;
int32_t yTwips = pt.y - mInnerBox.y;

Просмотреть файл

@ -46,7 +46,7 @@ NS_EVENT_MESSAGE(eOnline, eWindowEventFirst + 65)
NS_EVENT_MESSAGE(eLanguageChange, eWindowEventFirst + 70)
NS_EVENT_MESSAGE(eMouseEventFirst, 300)
NS_EVENT_MESSAGE(NS_MOUSE_MOVE, eMouseEventFirst)
NS_EVENT_MESSAGE(eMouseMove, eMouseEventFirst)
NS_EVENT_MESSAGE(NS_MOUSE_BUTTON_UP, eMouseEventFirst + 1)
NS_EVENT_MESSAGE(NS_MOUSE_BUTTON_DOWN, eMouseEventFirst + 2)
NS_EVENT_MESSAGE(NS_MOUSE_ENTER_WIDGET, eMouseEventFirst + 22)

Просмотреть файл

@ -128,7 +128,7 @@ MultiTouchInput::ToWidgetMouseEvent(nsIWidget* aWidget) const
mouseEventMessage = NS_MOUSE_BUTTON_DOWN;
break;
case MultiTouchInput::MULTITOUCH_MOVE:
mouseEventMessage = NS_MOUSE_MOVE;
mouseEventMessage = eMouseMove;
break;
case MultiTouchInput::MULTITOUCH_CANCEL:
case MultiTouchInput::MULTITOUCH_END:
@ -151,7 +151,7 @@ MultiTouchInput::ToWidgetMouseEvent(nsIWidget* aWidget) const
event.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_TOUCH;
event.modifiers = modifiers;
if (mouseEventMessage != NS_MOUSE_MOVE) {
if (mouseEventMessage != eMouseMove) {
event.clickCount = 1;
}
@ -185,7 +185,7 @@ MultiTouchInput::MultiTouchInput(const WidgetMouseEvent& aMouseEvent)
case NS_MOUSE_BUTTON_DOWN:
mType = MULTITOUCH_START;
break;
case NS_MOUSE_MOVE:
case eMouseMove:
mType = MULTITOUCH_MOVE;
break;
case NS_MOUSE_BUTTON_UP:

Просмотреть файл

@ -88,7 +88,7 @@ WidgetEvent::HasMouseEventMessage() const
case NS_MOUSE_OVER:
case NS_MOUSE_OUT:
case NS_MOUSE_MOZHITTEST:
case NS_MOUSE_MOVE:
case eMouseMove:
return true;
default:
return false;

Просмотреть файл

@ -834,7 +834,7 @@ AndroidGeckoEvent::MakeMouseEvent(nsIWidget* widget)
if (Points().Length() > 0) {
switch (Action()) {
case AndroidMotionEvent::ACTION_HOVER_MOVE:
msg = NS_MOUSE_MOVE;
msg = eMouseMove;
break;
case AndroidMotionEvent::ACTION_HOVER_ENTER:
msg = NS_MOUSE_ENTER_WIDGET;
@ -857,7 +857,7 @@ AndroidGeckoEvent::MakeMouseEvent(nsIWidget* widget)
// XXX can we synthesize different buttons?
event.button = WidgetMouseEvent::eLeftButton;
if (msg != NS_MOUSE_MOVE) {
if (msg != eMouseMove) {
event.clickCount = 1;
}
event.modifiers = DOMModifiers();

Просмотреть файл

@ -4743,7 +4743,7 @@ NewCGSRegionFromRegion(const nsIntRegion& aRegion,
if (!mGeckoChild)
return;
WidgetMouseEvent geckoEvent(true, NS_MOUSE_MOVE, mGeckoChild,
WidgetMouseEvent geckoEvent(true, eMouseMove, mGeckoChild,
WidgetMouseEvent::eReal);
[self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
@ -4761,7 +4761,7 @@ NewCGSRegionFromRegion(const nsIntRegion& aRegion,
gLastDragView = self;
WidgetMouseEvent geckoEvent(true, NS_MOUSE_MOVE, mGeckoChild,
WidgetMouseEvent geckoEvent(true, eMouseMove, mGeckoChild,
WidgetMouseEvent::eReal);
[self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
@ -4827,7 +4827,7 @@ NewCGSRegionFromRegion(const nsIntRegion& aRegion,
if (!mGeckoChild)
return;
WidgetMouseEvent geckoEvent(true, NS_MOUSE_MOVE, mGeckoChild,
WidgetMouseEvent geckoEvent(true, eMouseMove, mGeckoChild,
WidgetMouseEvent::eReal);
[self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
geckoEvent.button = WidgetMouseEvent::eRightButton;
@ -4880,7 +4880,7 @@ NewCGSRegionFromRegion(const nsIntRegion& aRegion,
if (!mGeckoChild)
return;
WidgetMouseEvent geckoEvent(true, NS_MOUSE_MOVE, mGeckoChild,
WidgetMouseEvent geckoEvent(true, eMouseMove, mGeckoChild,
WidgetMouseEvent::eReal);
[self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
geckoEvent.button = WidgetMouseEvent::eMiddleButton;

Просмотреть файл

@ -2531,7 +2531,7 @@ nsWindow::OnMotionNotifyEvent(GdkEventMotion *aEvent)
}
#endif /* MOZ_X11 */
WidgetMouseEvent event(true, NS_MOUSE_MOVE, this, WidgetMouseEvent::eReal);
WidgetMouseEvent event(true, eMouseMove, this, WidgetMouseEvent::eReal);
gdouble pressure = 0;
gdk_event_get_axis ((GdkEvent*)aEvent, GDK_AXIS_PRESSURE, &pressure);

Просмотреть файл

@ -2653,7 +2653,7 @@ case _value: eventName.AssignLiteral(_name) ; break
_ASSIGN_eventName(NS_MOUSE_BUTTON_UP,"NS_MOUSE_BUTTON_UP");
_ASSIGN_eventName(NS_MOUSE_CLICK,"NS_MOUSE_CLICK");
_ASSIGN_eventName(NS_MOUSE_DOUBLECLICK,"NS_MOUSE_DBLCLICK");
_ASSIGN_eventName(NS_MOUSE_MOVE,"NS_MOUSE_MOVE");
_ASSIGN_eventName(eMouseMove,"eMouseMove");
_ASSIGN_eventName(NS_LOAD,"NS_LOAD");
_ASSIGN_eventName(NS_POPSTATE,"NS_POPSTATE");
_ASSIGN_eventName(NS_BEFORE_SCRIPT_EXECUTE,"NS_BEFORE_SCRIPT_EXECUTE");
@ -2802,7 +2802,7 @@ nsBaseWidget::debug_DumpEvent(FILE * aFileOut,
const nsAutoCString & aWidgetName,
int32_t aWindowID)
{
if (aGuiEvent->mMessage == NS_MOUSE_MOVE) {
if (aGuiEvent->mMessage == eMouseMove) {
if (!debug_GetCachedBoolPref("nglayout.debug.motion_event_dumping"))
return;
}

Просмотреть файл

@ -1964,8 +1964,7 @@ void
nsWindow::ProcessMotionEvent()
{
if (mMoveEvent.needDispatch) {
WidgetMouseEvent event(true, NS_MOUSE_MOVE, this,
WidgetMouseEvent::eReal);
WidgetMouseEvent event(true, eMouseMove, this, WidgetMouseEvent::eReal);
event.refPoint.x = nscoord(mMoveEvent.pos.x());
event.refPoint.y = nscoord(mMoveEvent.pos.y());

Просмотреть файл

@ -158,7 +158,7 @@ private:
if (sender.state == UIGestureRecognizerStateEnded) {
ALOG("[ChildView[%p] handleTap]", self);
LayoutDeviceIntPoint lp = UIKitPointsToDevPixels([sender locationInView:self], [self contentScaleFactor]);
[self sendMouseEvent:NS_MOUSE_MOVE point:lp widget:mGeckoChild];
[self sendMouseEvent:eMouseMove point:lp widget:mGeckoChild];
[self sendMouseEvent:NS_MOUSE_BUTTON_DOWN point:lp widget:mGeckoChild];
[self sendMouseEvent:NS_MOUSE_BUTTON_UP point:lp widget:mGeckoChild];
}

Просмотреть файл

@ -946,7 +946,7 @@ WinUtils::GetIsMouseFromTouch(EventMessage aEventMessage)
{
const uint32_t MOZ_T_I_SIGNATURE = TABLET_INK_TOUCH | TABLET_INK_SIGNATURE;
const uint32_t MOZ_T_I_CHECK_TCH = TABLET_INK_TOUCH | TABLET_INK_CHECK;
return ((aEventMessage == NS_MOUSE_MOVE ||
return ((aEventMessage == eMouseMove ||
aEventMessage == NS_MOUSE_BUTTON_DOWN ||
aEventMessage == NS_MOUSE_BUTTON_UP) &&
(GetMessageExtraInfo() & MOZ_T_I_SIGNATURE) == MOZ_T_I_CHECK_TCH);

Просмотреть файл

@ -4029,10 +4029,11 @@ nsWindow::DispatchMouseEvent(EventMessage aEventMessage, WPARAM wParam,
CaptureMouse(true);
break;
// 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).
// eMouseMove 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 eMouseMove:
case NS_MOUSE_EXIT_WIDGET:
if (!(wParam & (MK_LBUTTON | MK_MBUTTON | MK_RBUTTON)) && sIsInMouseCapture)
CaptureMouse(false);
@ -4068,7 +4069,7 @@ nsWindow::DispatchMouseEvent(EventMessage aEventMessage, WPARAM wParam,
nsIntPoint mpScreen = eventPoint + WidgetToScreenOffsetUntyped();
// Suppress mouse moves caused by widget creation
if (aEventMessage == NS_MOUSE_MOVE) {
if (aEventMessage == eMouseMove) {
if ((sLastMouseMovePoint.x == mpScreen.x) && (sLastMouseMovePoint.y == mpScreen.y))
return result;
sLastMouseMovePoint.x = mpScreen.x;
@ -4124,7 +4125,7 @@ nsWindow::DispatchMouseEvent(EventMessage aEventMessage, WPARAM wParam,
// Set last Click time on MouseDown only
sLastMouseDownTime = curMsgTime;
break;
case NS_MOUSE_MOVE:
case eMouseMove:
if (!insideMovementThreshold) {
sLastClickCount = 0;
}
@ -4191,7 +4192,7 @@ nsWindow::DispatchMouseEvent(EventMessage aEventMessage, WPARAM wParam,
break;
}
break;
case NS_MOUSE_MOVE:
case eMouseMove:
pluginEvent.event = WM_MOUSEMOVE;
break;
case NS_MOUSE_EXIT_WIDGET:
@ -4211,7 +4212,7 @@ nsWindow::DispatchMouseEvent(EventMessage aEventMessage, WPARAM wParam,
if (mWidgetListener) {
if (nsToolkit::gMouseTrailer)
nsToolkit::gMouseTrailer->Disable();
if (aEventMessage == NS_MOUSE_MOVE) {
if (aEventMessage == eMouseMove) {
if (nsToolkit::gMouseTrailer && !sIsInMouseCapture) {
nsToolkit::gMouseTrailer->SetMouseTrailerWindow(mWnd);
}
@ -5123,7 +5124,7 @@ nsWindow::ProcessMessage(UINT msg, WPARAM& wParam, LPARAM& lParam,
userMovedMouse = true;
}
result = DispatchMouseEvent(NS_MOUSE_MOVE, wParam, lParam,
result = DispatchMouseEvent(eMouseMove, wParam, lParam,
false, WidgetMouseEvent::eLeftButton,
MOUSE_INPUT_SOURCE());
if (userMovedMouse) {