Bug 682208 - Remove extra call to GetSubmenuWidgetChain(). r=enndeakin
authorSteven Michaud <smichaud@pobox.com>
Wed, 04 Jan 2012 14:07:53 -0600
changeset 84984 95b9cb1a8e2d023408a12d516d2be42fbf207adb
parent 84983 0022f8be9feae8e2f706291719934617018fd8e7
child 84985 f84e21bcbb55ce371449e2b1c51d26823fcff283
push idunknown
push userunknown
push dateunknown
reviewersenndeakin
bugs682208
milestone12.0a1
Bug 682208 - Remove extra call to GetSubmenuWidgetChain(). r=enndeakin
widget/cocoa/nsChildView.mm
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -2768,17 +2768,16 @@ NSEvent* gLastDragMouseDownEvent = nil;
       }
 
       // if we're dealing with menus, we probably have submenus and
       // we don't want to rollup if the click is in a parent menu of
       // the current submenu
       PRUint32 popupsToRollup = PR_UINT32_MAX;
       if (gRollupListener) {
         nsAutoTArray<nsIWidget*, 5> widgetChain;
-        gRollupListener->GetSubmenuWidgetChain(&widgetChain);
         PRUint32 sameTypeCount = gRollupListener->GetSubmenuWidgetChain(&widgetChain);
         for (PRUint32 i = 0; i < widgetChain.Length(); i++) {
           nsIWidget* widget = widgetChain[i];
           NSWindow* currWindow = (NSWindow*)widget->GetNativeData(NS_NATIVE_WINDOW);
           if (nsCocoaUtils::IsEventOverWindow(theEvent, currWindow)) {
             // don't roll up if the mouse event occurred within a menu of the
             // same type. If the mouse event occurred in a menu higher than
             // that, roll up, but pass the number of popups to Rollup so