зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1766350 - Get rid of unused internal event messages r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D144683
This commit is contained in:
Родитель
00e7a0e136
Коммит
75077811f9
|
@ -1242,10 +1242,9 @@ class EventStateManager : public nsSupportsWeakReference, public nsIObserver {
|
|||
|
||||
// Click and double-click events need to be handled even for content that
|
||||
// has no frame. This is required for Web compatibility.
|
||||
#define NS_EVENT_NEEDS_FRAME(event) \
|
||||
(!(event)->HasPluginActivationEventMessage() && \
|
||||
(event)->mMessage != eMouseClick && \
|
||||
(event)->mMessage != eMouseDoubleClick && \
|
||||
#define NS_EVENT_NEEDS_FRAME(event) \
|
||||
((event)->mMessage != eMouseClick && \
|
||||
(event)->mMessage != eMouseDoubleClick && \
|
||||
(event)->mMessage != eMouseAuxClick)
|
||||
|
||||
#endif // mozilla_EventStateManager_h_
|
||||
|
|
|
@ -790,10 +790,6 @@ class WidgetEvent : public WidgetEventTime {
|
|||
* event.
|
||||
*/
|
||||
bool HasIMEEventMessage() const;
|
||||
/**
|
||||
* Returns true if the event mMessage is one of plugin activation events.
|
||||
*/
|
||||
bool HasPluginActivationEventMessage() const;
|
||||
|
||||
/**
|
||||
* Returns true if the event can be sent to remote process.
|
||||
|
|
|
@ -33,20 +33,10 @@ NS_EVENT_MESSAGE(eVoidEvent)
|
|||
// EventListenerManager.
|
||||
NS_EVENT_MESSAGE(eAllEvents)
|
||||
|
||||
// Widget may be destroyed
|
||||
NS_EVENT_MESSAGE(eWindowClose)
|
||||
|
||||
NS_EVENT_MESSAGE(eKeyPress)
|
||||
NS_EVENT_MESSAGE(eKeyUp)
|
||||
NS_EVENT_MESSAGE(eKeyDown)
|
||||
|
||||
// These messages are dispatched when PluginInstaceChild receives native
|
||||
// keyboard events directly and it posts the information to the widget.
|
||||
// These messages shouldn't be handled by content and non-reserved chrome
|
||||
// event handlers.
|
||||
NS_EVENT_MESSAGE(eKeyDownOnPlugin)
|
||||
NS_EVENT_MESSAGE(eKeyUpOnPlugin)
|
||||
|
||||
// This message is sent after a content process handles a key event or accesskey
|
||||
// to indicate that an potential accesskey was not found. The parent process may
|
||||
// then respond by, for example, opening menus and processing other shortcuts.
|
||||
|
@ -58,17 +48,6 @@ NS_EVENT_MESSAGE(eScroll)
|
|||
NS_EVENT_MESSAGE(eMozVisualResize)
|
||||
NS_EVENT_MESSAGE(eMozVisualScroll)
|
||||
|
||||
// Application installation
|
||||
NS_EVENT_MESSAGE(eInstall)
|
||||
NS_EVENT_MESSAGE(eAppInstalled)
|
||||
|
||||
// A plugin was clicked or otherwise focused. ePluginActivate should be
|
||||
// used when the window is not active. ePluginFocus should be used when
|
||||
// the window is active. In the latter case, the dispatcher of the event
|
||||
// is expected to ensure that the plugin's widget is focused beforehand.
|
||||
NS_EVENT_MESSAGE(ePluginActivate)
|
||||
NS_EVENT_MESSAGE(ePluginFocus)
|
||||
|
||||
NS_EVENT_MESSAGE(eOffline)
|
||||
NS_EVENT_MESSAGE(eOnline)
|
||||
|
||||
|
@ -152,7 +131,6 @@ NS_EVENT_MESSAGE_FIRST_LAST(eDragDropEvent, eDragEnter, eDragLeave)
|
|||
// XUL specific events
|
||||
NS_EVENT_MESSAGE(eXULPopupShowing)
|
||||
NS_EVENT_MESSAGE(eXULPopupShown)
|
||||
NS_EVENT_MESSAGE(eXULPopupPositioned)
|
||||
NS_EVENT_MESSAGE(eXULPopupHiding)
|
||||
NS_EVENT_MESSAGE(eXULPopupHidden)
|
||||
NS_EVENT_MESSAGE(eXULBroadcast)
|
||||
|
@ -431,13 +409,6 @@ NS_EVENT_MESSAGE(eWheelOperationStart)
|
|||
// corresponding native event.
|
||||
NS_EVENT_MESSAGE(eWheelOperationEnd)
|
||||
|
||||
// System time is changed
|
||||
NS_EVENT_MESSAGE(eTimeChange)
|
||||
|
||||
// Network packet events.
|
||||
NS_EVENT_MESSAGE(eNetworkUpload)
|
||||
NS_EVENT_MESSAGE(eNetworkDownload)
|
||||
|
||||
// MediaRecorder events.
|
||||
NS_EVENT_MESSAGE(eMediaRecorderDataAvailable)
|
||||
NS_EVENT_MESSAGE(eMediaRecorderWarning)
|
||||
|
|
|
@ -782,7 +782,7 @@ class KeyboardInput : public InputData {
|
|||
KEY_DOWN,
|
||||
KEY_PRESS,
|
||||
KEY_UP,
|
||||
// Any other key event such as eKeyDownOnPlugin
|
||||
// Any other key event such as eAccessKeyNotFound
|
||||
KEY_OTHER,
|
||||
|
||||
// Used as an upper bound for ContiguousEnumSerializer
|
||||
|
|
|
@ -349,8 +349,6 @@ bool WidgetEvent::IsKeyEventMessage(EventMessage aMessage) {
|
|||
case eKeyDown:
|
||||
case eKeyPress:
|
||||
case eKeyUp:
|
||||
case eKeyDownOnPlugin:
|
||||
case eKeyUpOnPlugin:
|
||||
case eAccessKeyNotFound:
|
||||
return true;
|
||||
default:
|
||||
|
@ -372,10 +370,6 @@ bool WidgetEvent::HasIMEEventMessage() const {
|
|||
}
|
||||
}
|
||||
|
||||
bool WidgetEvent::HasPluginActivationEventMessage() const {
|
||||
return mMessage == ePluginActivate || mMessage == ePluginFocus;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* mozilla::WidgetEvent
|
||||
*
|
||||
|
@ -441,7 +435,7 @@ bool WidgetEvent::IsUsingCoordinates() const {
|
|||
return !mouseEvent->IsContextMenuKeyEvent();
|
||||
}
|
||||
return !HasKeyEventMessage() && !IsIMERelatedEvent() &&
|
||||
!HasPluginActivationEventMessage() && !IsContentCommandEvent();
|
||||
!IsContentCommandEvent();
|
||||
}
|
||||
|
||||
bool WidgetEvent::IsTargetedAtFocusedWindow() const {
|
||||
|
|
|
@ -2023,15 +2023,12 @@ nsEventStatus NativeKey::InitKeyEvent(
|
|||
if (mCharMessageHasGone) {
|
||||
aKeyEvent.PreventDefaultBeforeDispatch(CrossProcessForwarding::eAllow);
|
||||
}
|
||||
[[fallthrough]];
|
||||
case eKeyDownOnPlugin:
|
||||
aKeyEvent.mKeyCode = mDOMKeyCode;
|
||||
// Unique id for this keydown event and its associated keypress.
|
||||
sUniqueKeyEventId++;
|
||||
aKeyEvent.mUniqueId = sUniqueKeyEventId;
|
||||
break;
|
||||
case eKeyUp:
|
||||
case eKeyUpOnPlugin:
|
||||
aKeyEvent.mKeyCode = mDOMKeyCode;
|
||||
// Set defaultPrevented of the key event if the VK_MENU is not a system
|
||||
// key release, so that the menu bar does not trigger. This helps avoid
|
||||
|
|
Загрузка…
Ссылка в новой задаче