remove nsIMenuListener interface and its usage, cuts some memory usage, faster without it, and code is much cleaner. b=400259 r=smorgan sr=roc a=pav
git-svn-id: svn://10.0.0.236/trunk@239070 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -109,7 +109,6 @@
|
||||
#include "nsIMarkupDocumentViewer.h"
|
||||
|
||||
#if defined(XP_MACOSX)
|
||||
#include "nsIMenuListener.h"
|
||||
#include "nsIMenuBar.h"
|
||||
#define USE_NATIVE_MENUS
|
||||
#endif
|
||||
@@ -514,12 +513,9 @@ static void LoadNativeMenus(nsIDOMDocument *aDOMDoc, nsIWidget *aParentWindow)
|
||||
if (!pnsMenuBar)
|
||||
return;
|
||||
|
||||
// set pnsMenuBar as a nsMenuListener on aParentWindow
|
||||
nsCOMPtr<nsIMenuListener> menuListener = do_QueryInterface(pnsMenuBar);
|
||||
|
||||
// fake event
|
||||
nsMenuEvent fake(PR_TRUE, 0, nsnull);
|
||||
menuListener->MenuConstruct(fake, aParentWindow, menubarNode);
|
||||
pnsMenuBar->MenuConstruct(fake, aParentWindow, menubarNode);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user