Bug 895274 part.28 Rename NS_MOUSE_ENTER_WIDGET to eMouseEnterIntoWidget r=smaug

This commit is contained in:
Masayuki Nakano 2015-08-29 08:58:31 +09:00
Родитель db00b74a82
Коммит 9895f90eca
16 изменённых файлов: 30 добавлений и 28 удалений

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

@ -7844,7 +7844,7 @@ nsContentUtils::SendMouseEvent(nsCOMPtr<nsIPresShell> aPresShell,
else if (aType.EqualsLiteral("mousemove"))
msg = eMouseMove;
else if (aType.EqualsLiteral("mouseover"))
msg = NS_MOUSE_ENTER_WIDGET;
msg = eMouseEnterIntoWidget;
else if (aType.EqualsLiteral("mouseout"))
msg = NS_MOUSE_EXIT_WIDGET;
else if (aType.EqualsLiteral("contextmenu")) {

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

@ -494,12 +494,12 @@ EventStateManager::PreHandleEvent(nsPresContext* aPresContext,
mCurrentTarget = aTargetFrame;
mCurrentTargetContent = nullptr;
// 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.
// Do not take account eMouseEnterIntoWidget/ExitFromWidget 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->mMessage != NS_MOUSE_ENTER_WIDGET &&
mouseEvent->mMessage != eMouseEnterIntoWidget &&
mouseEvent->mMessage != NS_MOUSE_EXIT_WIDGET) ||
aEvent->mClass == eWheelEventClass ||
aEvent->mClass == eKeyboardEventClass)) {
@ -583,8 +583,8 @@ EventStateManager::PreHandleEvent(nsPresContext* aPresContext,
}
break;
}
case NS_MOUSE_ENTER_WIDGET:
// In some cases on e10s NS_MOUSE_ENTER_WIDGET
case eMouseEnterIntoWidget:
// In some cases on e10s eMouseEnterIntoWidget
// event was sent twice into child process of content.
// (From specific widget code (sending is not permanent) and
// from ESM::DispatchMouseOrPointerEvent (sending is permanent)).
@ -605,7 +605,7 @@ EventStateManager::PreHandleEvent(nsPresContext* aPresContext,
}
// Flag helps to suppress double event sending into process of content.
// For more information see comment above, at NS_MOUSE_ENTER_WIDGET case.
// For more information see comment above, at eMouseEnterIntoWidget case.
aEvent->mFlags.mNoCrossProcessBoundaryForwarding = true;
// If the event is not a top-level window exit, then it's not
@ -1174,7 +1174,7 @@ CrossProcessSafeEvent(const WidgetEvent& aEvent)
case eMouseUp:
case eMouseMove:
case NS_CONTEXTMENU:
case NS_MOUSE_ENTER_WIDGET:
case eMouseEnterIntoWidget:
case NS_MOUSE_EXIT_WIDGET:
return true;
default:
@ -3317,7 +3317,7 @@ EventStateManager::PostHandleEvent(nsPresContext* aPresContext,
}
break;
case NS_MOUSE_ENTER_WIDGET:
case eMouseEnterIntoWidget:
if (mCurrentTarget) {
nsCOMPtr<nsIContent> targetContent;
mCurrentTarget->GetContentForEvent(aEvent, getter_AddRefs(targetContent));
@ -3803,7 +3803,7 @@ EventStateManager::DispatchMouseOrPointerEvent(WidgetMouseEvent* aMouseEvent,
HandleCrossProcessEvent(remoteEvent, &status);
} else if (aMessage == NS_MOUSE_OVER) {
nsAutoPtr<WidgetMouseEvent> remoteEvent;
CreateMouseOrPointerWidgetEvent(aMouseEvent, NS_MOUSE_ENTER_WIDGET,
CreateMouseOrPointerWidgetEvent(aMouseEvent, eMouseEnterIntoWidget,
aRelatedContent, remoteEvent);
HandleCrossProcessEvent(remoteEvent, &status);
}

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

@ -3027,7 +3027,7 @@ HTMLInputElement::NeedToInitializeEditorForEvent(
switch (aVisitor.mEvent->mMessage) {
case eMouseMove:
case NS_MOUSE_ENTER_WIDGET:
case eMouseEnterIntoWidget:
case NS_MOUSE_EXIT_WIDGET:
case NS_MOUSE_OVER:
case NS_MOUSE_OUT:

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

@ -1383,7 +1383,7 @@ 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 (NS_MOUSE_ENTER_WIDGET == event.mMessage) {
if (eMouseEnterIntoWidget == event.mMessage) {
mTabSetsCursor = true;
if (mCustomCursor) {
widget->SetCursor(mCustomCursor, mCustomCursorHotspotX, mCustomCursorHotspotY);

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

@ -6346,7 +6346,7 @@ void
PresShell::UpdateActivePointerState(WidgetGUIEvent* aEvent)
{
switch (aEvent->mMessage) {
case NS_MOUSE_ENTER_WIDGET:
case eMouseEnterIntoWidget:
// In this case we have to know information about available mouse pointers
if (WidgetMouseEvent* mouseEvent = aEvent->AsMouseEvent()) {
gActivePointersIds->Put(mouseEvent->pointerId,
@ -6569,7 +6569,7 @@ PresShell::RecordMouseLocation(WidgetGUIEvent* aEvent)
if ((aEvent->mMessage == eMouseMove &&
aEvent->AsMouseEvent()->reason == WidgetMouseEvent::eReal) ||
aEvent->mMessage == NS_MOUSE_ENTER_WIDGET ||
aEvent->mMessage == eMouseEnterIntoWidget ||
aEvent->mMessage == eMouseDown ||
aEvent->mMessage == eMouseUp) {
nsIFrame* rootFrame = GetRootFrame();
@ -6582,14 +6582,14 @@ PresShell::RecordMouseLocation(WidgetGUIEvent* aEvent)
nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent, rootFrame);
}
#ifdef DEBUG_MOUSE_LOCATION
if (aEvent->mMessage == NS_MOUSE_ENTER_WIDGET) {
if (aEvent->mMessage == eMouseEnterIntoWidget) {
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->mMessage == NS_MOUSE_ENTER_WIDGET) {
if (aEvent->mMessage == eMouseEnterIntoWidget) {
SynthesizeMouseMove(false);
}
} else if (aEvent->mMessage == NS_MOUSE_EXIT_WIDGET) {

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

@ -1788,7 +1788,7 @@ nsPluginFrame::HandleEvent(nsPresContext* aPresContext,
#ifdef XP_MACOSX
// we want to process some native mouse events in the cocoa event model
if ((anEvent->mMessage == NS_MOUSE_ENTER_WIDGET ||
if ((anEvent->mMessage == eMouseEnterIntoWidget ||
anEvent->mMessage == NS_WHEEL_WHEEL) &&
mInstanceOwner->GetEventModel() == NPEventModelCocoa) {
*anEventStatus = mInstanceOwner->ProcessEvent(*anEvent);

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

@ -87,7 +87,7 @@ 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_WIDGET:
case eMouseEnterIntoWidget:
case NS_MOUSE_OVER:
if (IsActivatedOnHover()) {
StartRepeat();

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

@ -755,7 +755,7 @@ nsViewManager::DispatchEvent(WidgetGUIEvent *aEvent,
// is really moving the mouse) since we get them when we
// create and destroy widgets.
mouseEvent->mMessage != NS_MOUSE_EXIT_WIDGET &&
mouseEvent->mMessage != NS_MOUSE_ENTER_WIDGET) ||
mouseEvent->mMessage != eMouseEnterIntoWidget) ||
aEvent->HasKeyEventMessage() ||
aEvent->HasIMEEventMessage() ||
aEvent->mMessage == NS_PLUGIN_INPUT_EVENT) {

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

@ -49,7 +49,7 @@ NS_EVENT_MESSAGE(eMouseEventFirst, 300)
NS_EVENT_MESSAGE(eMouseMove, eMouseEventFirst)
NS_EVENT_MESSAGE(eMouseUp, eMouseEventFirst + 1)
NS_EVENT_MESSAGE(eMouseDown, eMouseEventFirst + 2)
NS_EVENT_MESSAGE(NS_MOUSE_ENTER_WIDGET, eMouseEventFirst + 22)
NS_EVENT_MESSAGE(eMouseEnterIntoWidget, eMouseEventFirst + 22)
NS_EVENT_MESSAGE(NS_MOUSE_EXIT_WIDGET, eMouseEventFirst + 23)
NS_EVENT_MESSAGE(NS_MOUSE_DOUBLECLICK, eMouseEventFirst + 24)
NS_EVENT_MESSAGE(NS_MOUSE_CLICK, eMouseEventFirst + 27)

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

@ -82,7 +82,7 @@ WidgetEvent::HasMouseEventMessage() const
case eMouseUp:
case NS_MOUSE_CLICK:
case NS_MOUSE_DOUBLECLICK:
case NS_MOUSE_ENTER_WIDGET:
case eMouseEnterIntoWidget:
case NS_MOUSE_EXIT_WIDGET:
case NS_MOUSE_ACTIVATE:
case NS_MOUSE_OVER:

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

@ -837,7 +837,7 @@ AndroidGeckoEvent::MakeMouseEvent(nsIWidget* widget)
msg = eMouseMove;
break;
case AndroidMotionEvent::ACTION_HOVER_ENTER:
msg = NS_MOUSE_ENTER_WIDGET;
msg = eMouseEnterIntoWidget;
break;
case AndroidMotionEvent::ACTION_HOVER_EXIT:
msg = NS_MOUSE_EXIT_WIDGET;

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

@ -385,7 +385,7 @@ nsWindow::Show(bool aState)
// if it's a toplevel widget?
// XXX we should synthesize a NS_MOUSE_EXIT_WIDGET (for old top
// window)/NS_MOUSE_ENTER_WIDGET (for new top window) since we need
// window)/eMouseEnterIntoWidget (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.

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

@ -4652,7 +4652,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
NSPoint windowEventLocation = nsCocoaUtils::EventLocationForWindow(aEvent, [self window]);
NSPoint localEventLocation = [self convertPoint:windowEventLocation fromView:nil];
EventMessage msg = aEnter ? NS_MOUSE_ENTER_WIDGET : NS_MOUSE_EXIT_WIDGET;
EventMessage msg = aEnter ? eMouseEnterIntoWidget : NS_MOUSE_EXIT_WIDGET;
WidgetMouseEvent event(true, msg, mGeckoChild, WidgetMouseEvent::eReal);
event.refPoint = LayoutDeviceIntPoint::FromUntyped(
mGeckoChild->CocoaPointsToDevPixels(localEventLocation));

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

@ -2441,7 +2441,8 @@ nsWindow::OnEnterNotifyEvent(GdkEventCrossing *aEvent)
if (is_parent_ungrab_enter(aEvent))
return;
WidgetMouseEvent event(true, NS_MOUSE_ENTER_WIDGET, this, WidgetMouseEvent::eReal);
WidgetMouseEvent event(true, eMouseEnterIntoWidget, this,
WidgetMouseEvent::eReal);
event.refPoint.x = nscoord(aEvent->x);
event.refPoint.y = nscoord(aEvent->y);

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

@ -2647,7 +2647,7 @@ case _value: eventName.AssignLiteral(_name) ; break
_ASSIGN_eventName(eKeyDown,"eKeyDown");
_ASSIGN_eventName(eKeyPress,"eKeyPress");
_ASSIGN_eventName(eKeyUp,"eKeyUp");
_ASSIGN_eventName(NS_MOUSE_ENTER_WIDGET,"NS_MOUSE_ENTER_WIDGET");
_ASSIGN_eventName(eMouseEnterIntoWidget,"eMouseEnterIntoWidget");
_ASSIGN_eventName(NS_MOUSE_EXIT_WIDGET,"NS_MOUSE_EXIT_WIDGET");
_ASSIGN_eventName(eMouseDown,"eMouseDown");
_ASSIGN_eventName(eMouseUp,"eMouseUp");
@ -2807,7 +2807,7 @@ nsBaseWidget::debug_DumpEvent(FILE * aFileOut,
return;
}
if (aGuiEvent->mMessage == NS_MOUSE_ENTER_WIDGET ||
if (aGuiEvent->mMessage == eMouseEnterIntoWidget ||
aGuiEvent->mMessage == NS_MOUSE_EXIT_WIDGET) {
if (!debug_GetCachedBoolPref("nglayout.debug.crossing_event_dumping"))
return;

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

@ -4232,7 +4232,8 @@ nsWindow::DispatchMouseEvent(EventMessage aEventMessage, WPARAM wParam,
sCurrentWindow = this;
if (!mInDtor) {
LPARAM pos = sCurrentWindow->lParamToClient(lParamToScreen(lParam));
sCurrentWindow->DispatchMouseEvent(NS_MOUSE_ENTER_WIDGET, wParam, pos, false,
sCurrentWindow->DispatchMouseEvent(eMouseEnterIntoWidget,
wParam, pos, false,
WidgetMouseEvent::eLeftButton,
aInputSource);
}