Good catch, thanks!

I've not had time to review it properly yet, but just at first glance,
this looks wrong to me:

--- extensions/globalmenu/chrome/content/firefoxOverlay.xul     2011-04-16 
19:37:53 +0000
+++ extensions/globalmenu/chrome/content/firefoxOverlay.xul     2011-04-21 
02:18:45 +0000
@@ -38,13 +38,4 @@
   
 <overlay id="globalmenu-extension-browser-overlay" 
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";>
   <script type="application/x-javascript" 
src="chrome://globalmenu/content/firefoxMenu.js" />
-
-  <menupopup id="goPopup"
-    onpopupshowing="if (!this.parentNode._placesView)
-                      new HistoryMenuUnityImpl(event);"/>
-
-  <menupopup id="bookmarksMenuPopup"
-    onpopupshowing="PlacesCommandHook.updateBookmarkAllTabsCommand();
-                    if (!this.parentNode._placesView)
-                      new PlacesMenuUnityImpl(event, 
'place:folder=BOOKMARKS_MENU');"/>
 </overlay>


I overlay this deliberately to override the default popupshowing handlers 
(because I'm providing my own implementation of PlacesMenu and HistoryMenu, 
called PlacesMenuUnityImpl and HistoryMenuUnityImpl). Without this, the 
bookmarks and history menu break in weird ways because Firefox *thinks* it is 
drawing the menus itself, and expects frames to exist and XBL bindings to have 
been loaded. The implementations I provide put the menus in to the same state 
they would be on Mac OSX (where there are no menu frames too).

You might want to have a look in browser/base/content/browser-
menubar.inc and browser/components/places/content/browserPlacesViews.js
to see why it is done this way.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/767966

Title:
  globalmenu extension pollutes main window javascript scope

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to