зеркало из https://github.com/mozilla/gecko-dev.git
Bug 510037 - Remove obsolete widget events r=roc r=smaug
This commit is contained in:
Родитель
a783e5ff61
Коммит
e69fc3e4b4
|
@ -870,14 +870,6 @@ NS_METHOD nsDOMEvent::DuplicatePrivateData()
|
|||
newEvent = dragEvent;
|
||||
break;
|
||||
}
|
||||
case NS_MENU_EVENT:
|
||||
{
|
||||
newEvent = new nsMenuEvent(PR_FALSE, msg, nsnull);
|
||||
NS_ENSURE_TRUE(newEvent, NS_ERROR_OUT_OF_MEMORY);
|
||||
static_cast<nsMenuEvent*>(newEvent)->mCommand =
|
||||
static_cast<nsMenuEvent*>(mEvent)->mCommand;
|
||||
break;
|
||||
}
|
||||
case NS_SCRIPT_ERROR_EVENT:
|
||||
{
|
||||
newEvent = new nsScriptErrorEvent(PR_FALSE, msg);
|
||||
|
|
|
@ -86,7 +86,6 @@ class nsCompositionEvent;
|
|||
class nsMouseScrollEvent;
|
||||
class nsReconversionEvent;
|
||||
class nsTooltipEvent;
|
||||
class nsMenuEvent;
|
||||
class nsSimpleGestureEvent;
|
||||
class nsContentCommandEvent;
|
||||
|
||||
|
|
|
@ -80,7 +80,6 @@ class nsHashKey;
|
|||
#define NS_INPUT_EVENT 8
|
||||
#define NS_KEY_EVENT 9
|
||||
#define NS_MOUSE_EVENT 10
|
||||
#define NS_MENU_EVENT 11
|
||||
#define NS_SCRIPT_ERROR_EVENT 12
|
||||
#define NS_TEXT_EVENT 13
|
||||
#define NS_COMPOSITION_EVENT 14
|
||||
|
@ -193,15 +192,6 @@ class nsHashKey;
|
|||
|
||||
#define NS_OS_TOOLBAR (NS_WINDOW_START + 36)
|
||||
|
||||
// Menu item selected
|
||||
#define NS_MENU_SELECTED (NS_WINDOW_START + 38)
|
||||
|
||||
// Form control changed: currently == combo box selection changed
|
||||
// but could be expanded to mean textbox, checkbox changed, etc.
|
||||
// This is a GUI specific event that does not necessarily correspond
|
||||
// directly to a mouse click or a key press.
|
||||
#define NS_CONTROL_CHANGE (NS_WINDOW_START + 39)
|
||||
|
||||
// Indicates the display has changed depth
|
||||
#define NS_DISPLAYCHANGED (NS_WINDOW_START + 40)
|
||||
|
||||
|
@ -1263,26 +1253,6 @@ public:
|
|||
PRPackedBool mIsEnabled; // [out]
|
||||
};
|
||||
|
||||
/**
|
||||
* MenuItem event
|
||||
*
|
||||
* When this event occurs the widget field in nsGUIEvent holds the "target"
|
||||
* for the event
|
||||
*/
|
||||
|
||||
class nsMenuEvent : public nsGUIEvent
|
||||
{
|
||||
public:
|
||||
nsMenuEvent(PRBool isTrusted, PRUint32 msg, nsIWidget *w)
|
||||
: nsGUIEvent(isTrusted, msg, w, NS_MENU_EVENT),
|
||||
mMenuItem(nsnull), mCommand(0)
|
||||
{
|
||||
}
|
||||
|
||||
nsIMenuItem * mMenuItem;
|
||||
PRUint32 mCommand;
|
||||
};
|
||||
|
||||
/**
|
||||
* Form event
|
||||
*
|
||||
|
|
|
@ -4045,23 +4045,6 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM &wParam, LPARAM &lParam,
|
|||
static PRBool getWheelInfo = PR_TRUE;
|
||||
|
||||
switch (msg) {
|
||||
case WM_COMMAND:
|
||||
{
|
||||
WORD wNotifyCode = HIWORD(wParam); // notification code
|
||||
if ((CBN_SELENDOK == wNotifyCode) || (CBN_SELENDCANCEL == wNotifyCode)) { // Combo box change
|
||||
nsGUIEvent event(PR_TRUE, NS_CONTROL_CHANGE, this);
|
||||
nsIntPoint point(0,0);
|
||||
InitEvent(event, &point); // this add ref's event.widget
|
||||
result = DispatchWindowEvent(&event);
|
||||
} else if (wNotifyCode == 0) { // Menu selection
|
||||
nsMenuEvent event(PR_TRUE, NS_MENU_SELECTED, this);
|
||||
event.mCommand = LOWORD(wParam);
|
||||
InitEvent(event);
|
||||
result = DispatchWindowEvent(&event);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
#ifndef WINCE
|
||||
// WM_QUERYENDSESSION must be handled by all windows.
|
||||
// Otherwise Windows thinks the window can just be killed at will.
|
||||
|
|
|
@ -1103,7 +1103,6 @@ case _value: eventName.AssignWithConversion(_name) ; break
|
|||
switch(aGuiEvent->message)
|
||||
{
|
||||
_ASSIGN_eventName(NS_BLUR_CONTENT,"NS_BLUR_CONTENT");
|
||||
_ASSIGN_eventName(NS_CONTROL_CHANGE,"NS_CONTROL_CHANGE");
|
||||
_ASSIGN_eventName(NS_CREATE,"NS_CREATE");
|
||||
_ASSIGN_eventName(NS_DESTROY,"NS_DESTROY");
|
||||
_ASSIGN_eventName(NS_DRAGDROP_GESTURE,"NS_DND_GESTURE");
|
||||
|
@ -1122,7 +1121,6 @@ case _value: eventName.AssignWithConversion(_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_MENU_SELECTED,"NS_MENU_SELECTED");
|
||||
_ASSIGN_eventName(NS_MOUSE_ENTER,"NS_MOUSE_ENTER");
|
||||
_ASSIGN_eventName(NS_MOUSE_EXIT,"NS_MOUSE_EXIT");
|
||||
_ASSIGN_eventName(NS_MOUSE_BUTTON_DOWN,"NS_MOUSE_BUTTON_DOWN");
|
||||
|
|
Загрузка…
Ссылка в новой задаче