зеркало из https://github.com/mozilla/pjs.git
Fixing bug 238449. Make plugins not get mozilla context menus again. r+sr=dbaron@dbaron.org, a=asa@mozilla.org
This commit is contained in:
Родитель
3fcd745be6
Коммит
ea21d2ad3b
|
@ -125,7 +125,7 @@ static nsresult DispatchToInterface(nsIDOMEvent* aEvent,
|
|||
if (ifaceListener) {
|
||||
*aHasInterface = PR_TRUE;
|
||||
rv = (ifaceListener->*aMethod)(aEvent);
|
||||
NS_RELEASE(aListener);
|
||||
NS_RELEASE(ifaceListener);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
|
|
@ -178,7 +178,7 @@ public:
|
|||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD ContextMenu(nsIDOMEvent* aContextMenuEvent) { return NS_ERROR_FAILURE; /* means consume event */ }
|
||||
NS_IMETHOD ContextMenu(nsIDOMEvent* aContextMenuEvent);
|
||||
|
||||
nsresult Init(nsObjectFrame *aFrame);
|
||||
nsresult Destroy(nsObjectFrame *aFrame);
|
||||
|
@ -1835,8 +1835,8 @@ nsObjectFrame::HandleEvent(nsIPresContext* aPresContext,
|
|||
nsGUIEvent* anEvent,
|
||||
nsEventStatus* anEventStatus)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(anEventStatus);
|
||||
nsresult rv = NS_OK;
|
||||
NS_ENSURE_ARG_POINTER(anEventStatus);
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
//FIX FOR CRASHING WHEN NO INSTANCE OWVER
|
||||
if (!mInstanceOwner)
|
||||
|
@ -1994,6 +1994,14 @@ nsPluginDOMContextMenuListener::~nsPluginDOMContextMenuListener()
|
|||
|
||||
NS_IMPL_ISUPPORTS2(nsPluginDOMContextMenuListener, nsIDOMContextMenuListener, nsIEventListener)
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPluginDOMContextMenuListener::ContextMenu(nsIDOMEvent* aContextMenuEvent)
|
||||
{
|
||||
aContextMenuEvent->PreventDefault(); /* consume event */
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsPluginDOMContextMenuListener::Init(nsObjectFrame *aFrame)
|
||||
{
|
||||
nsIContent* content = aFrame->GetContent();
|
||||
|
|
|
@ -178,7 +178,7 @@ public:
|
|||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD ContextMenu(nsIDOMEvent* aContextMenuEvent) { return NS_ERROR_FAILURE; /* means consume event */ }
|
||||
NS_IMETHOD ContextMenu(nsIDOMEvent* aContextMenuEvent);
|
||||
|
||||
nsresult Init(nsObjectFrame *aFrame);
|
||||
nsresult Destroy(nsObjectFrame *aFrame);
|
||||
|
@ -1835,8 +1835,8 @@ nsObjectFrame::HandleEvent(nsIPresContext* aPresContext,
|
|||
nsGUIEvent* anEvent,
|
||||
nsEventStatus* anEventStatus)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(anEventStatus);
|
||||
nsresult rv = NS_OK;
|
||||
NS_ENSURE_ARG_POINTER(anEventStatus);
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
//FIX FOR CRASHING WHEN NO INSTANCE OWVER
|
||||
if (!mInstanceOwner)
|
||||
|
@ -1994,6 +1994,14 @@ nsPluginDOMContextMenuListener::~nsPluginDOMContextMenuListener()
|
|||
|
||||
NS_IMPL_ISUPPORTS2(nsPluginDOMContextMenuListener, nsIDOMContextMenuListener, nsIEventListener)
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPluginDOMContextMenuListener::ContextMenu(nsIDOMEvent* aContextMenuEvent)
|
||||
{
|
||||
aContextMenuEvent->PreventDefault(); /* consume event */
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsPluginDOMContextMenuListener::Init(nsObjectFrame *aFrame)
|
||||
{
|
||||
nsIContent* content = aFrame->GetContent();
|
||||
|
|
Загрузка…
Ссылка в новой задаче