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.
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 globalmenu/ chrome/ content/ firefoxOverlay. xul 2011-04-21 02:18:45 +0000
+++ extensions/
@@ -38,13 +38,4 @@
<overlay id="globalmenu- extension- browser- overlay" xmlns="http:// www.mozilla. org/keymaster/ gatekeeper/ there.is. only.xul"> on/x-javascript " src="chrome: //globalmenu/ content/ firefoxMenu. js" /> parentNode. _placesView) yImpl(event) ;"/> nuPopup" "PlacesCommandH ook.updateBookm arkAllTabsComma nd(); parentNode. _placesView) Impl(event, 'place: folder= BOOKMARKS_ MENU'); "/>
<script type="applicati
-
- <menupopup id="goPopup"
- onpopupshowing="if (!this.
- new HistoryMenuUnit
-
- <menupopup id="bookmarksMe
- onpopupshowing=
- if (!this.
- new PlacesMenuUnity
</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 HistoryMenuUnit yImpl). 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/ browserPlacesVi ews.js to see why it is done this way.