Bug 583386 - Implement latest Firefox Menu design. r=dolske, ui-r=faaborg, a=blocking2.0
authorJoshua M <soapyhamhocks@gmail.com>
Thu, 19 Aug 2010 11:59:20 -0700
changeset 51026 c8c886655ea135570b8da4ff88f93f3ca2aa15d9
parent 51025 5fd4fd971b0e99b5af6d207c986aba1b36ed6df2
child 51027 eef61fc41851e42de280f8aef46e1e72267648e1
push id15212
push usercpearce@mozilla.com
push dateFri, 20 Aug 2010 09:53:22 +0000
treeherdermozilla-central@c8c886655ea1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdolske, faaborg, blocking2
bugs583386
milestone2.0b5pre
first release with
nightly linux32
c8c886655ea1 / 4.0b5pre / 20100820025746 / files
nightly linux64
c8c886655ea1 / 4.0b5pre / 20100820031715 / files
nightly mac
c8c886655ea1 / 4.0b5pre / 20100820031134 / files
nightly win32
c8c886655ea1 / 4.0b5pre / 20100820041049 / files
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
Bug 583386 - Implement latest Firefox Menu design. r=dolske, ui-r=faaborg, a=blocking2.0
browser/base/content/browser-doctype.inc
browser/base/content/browser.js
browser/base/content/browser.xul
browser/locales/en-US/chrome/browser/browser.dtd
browser/themes/winstripe/browser/appmenu-icons.png
browser/themes/winstripe/browser/browser.css
browser/themes/winstripe/browser/jar.mn
--- a/browser/base/content/browser-doctype.inc
+++ b/browser/base/content/browser-doctype.inc
@@ -1,13 +1,15 @@
 <!DOCTYPE window [
 <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
 %brandDTD;
 <!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd" >
 %browserDTD;
+<!ENTITY % baseMenuDTD SYSTEM "chrome://browser/locale/baseMenuOverlay.dtd" >
+%baseMenuDTD;
 <!ENTITY % globalRegionDTD SYSTEM "chrome://global-region/locale/region.dtd">
 %globalRegionDTD;
 <!ENTITY % charsetDTD SYSTEM "chrome://global/locale/charsetOverlay.dtd" >
 %charsetDTD;
 <!ENTITY % textcontextDTD SYSTEM "chrome://global/locale/textcontext.dtd" >
 %textcontextDTD;
 <!ENTITY % customizeToolbarDTD SYSTEM "chrome://global/locale/customizeToolbar.dtd">
   %customizeToolbarDTD;
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -3577,26 +3577,33 @@ function BrowserToolboxCustomizeChange()
  * is a no op.
  */
 function updateEditUIVisibility()
 {
 #ifndef XP_MACOSX
   let editMenuPopupState = document.getElementById("menu_EditPopup").state;
   let contextMenuPopupState = document.getElementById("contentAreaContextMenu").state;
   let placesContextMenuPopupState = document.getElementById("placesContext").state;
+#ifdef MENUBAR_CAN_AUTOHIDE
+  let appMenuPopupState = document.getElementById("appmenu-popup").state;
+#endif
 
   // The UI is visible if the Edit menu is opening or open, if the context menu
   // is open, or if the toolbar has been customized to include the Cut, Copy,
   // or Paste toolbar buttons.
   gEditUIVisible = editMenuPopupState == "showing" ||
                    editMenuPopupState == "open" ||
                    contextMenuPopupState == "showing" ||
                    contextMenuPopupState == "open" ||
                    placesContextMenuPopupState == "showing" ||
                    placesContextMenuPopupState == "open" ||
+#ifdef MENUBAR_CAN_AUTOHIDE
+                   appMenuPopupState == "showing" ||
+                   appMenuPopupState == "open" ||
+#endif
                    document.getElementById("cut-button") ||
                    document.getElementById("copy-button") ||
                    document.getElementById("paste-button") ? true : false;
 
   // If UI is visible, update the edit commands' enabled state to reflect
   // whether or not they are actually enabled for the current focus/selection.
   if (gEditUIVisible)
     goUpdateGlobalEditMenuItems();
@@ -4681,31 +4688,31 @@ nsBrowserAccess.prototype = {
     return newWindow;
   },
 
   isTabContentWindow: function (aWindow) {
     return gBrowser.browsers.some(function (browser) browser.contentWindow == aWindow);
   }
 }
 
-function onViewToolbarsPopupShowing(aEvent) {
+function onViewToolbarsPopupShowing(aEvent, aInsertPoint) {
   var popup = aEvent.target;
   if (popup != aEvent.currentTarget)
     return;
 
   var i;
 
   // Empty the menu
   for (i = popup.childNodes.length-1; i >= 0; --i) {
     var deadItem = popup.childNodes[i];
     if (deadItem.hasAttribute("toolbarindex"))
       popup.removeChild(deadItem);
   }
 
-  var firstMenuItem = popup.firstChild;
+  var firstMenuItem = aInsertPoint || popup.firstChild;
 
   for (i = 0; i < gNavToolbox.childNodes.length; ++i) {
     var toolbar = gNavToolbox.childNodes[i];
     var toolbarName = toolbar.getAttribute("toolbarname");
     if (toolbarName) {
       let menuItem = document.createElement("menuitem");
       let hidingAttribute = toolbar.getAttribute("type") == "menubar" ?
                             "autohide" : "collapsed";
@@ -7457,16 +7464,20 @@ let gPrivateBrowsingUI = {
     // Disable the Clear Recent History... menu item when in PB mode
     // temporary fix until bug 463607 is fixed
     document.getElementById("Tools:Sanitize").setAttribute("disabled", "true");
 
     if (this._privateBrowsingService.autoStarted) {
       // Disable the menu item in auto-start mode
       document.getElementById("privateBrowsingItem")
               .setAttribute("disabled", "true");
+#ifdef MENUBAR_CAN_AUTOHIDE
+      document.getElementById("appmenu_privateBrowsing")
+              .setAttribute("disabled", "true");
+#endif
       document.getElementById("Tools:PrivateBrowsing")
               .setAttribute("disabled", "true");
     }
     else if (window.location.href == getBrowserURL()) {
       // Adjust the window's title
       let docElement = document.documentElement;
       docElement.setAttribute("title",
         docElement.getAttribute("title_privatebrowsing"));
@@ -7524,16 +7535,20 @@ let gPrivateBrowsingUI = {
       docElement.setAttribute("titlemodifier",
         docElement.getAttribute("titlemodifier_normal"));
       docElement.setAttribute("browsingmode", "normal");
     }
 
     // Enable the menu item in after exiting the auto-start mode
     document.getElementById("privateBrowsingItem")
             .removeAttribute("disabled");
+#ifdef MENUBAR_CAN_AUTOHIDE
+    document.getElementById("appmenu_privateBrowsing")
+            .removeAttribute("disabled");
+#endif
     document.getElementById("Tools:PrivateBrowsing")
             .removeAttribute("disabled");
 
     gLastOpenDirectory.reset();
 
     setTimeout(function () {
       DownloadMonitorPanel.updateStatus();
     }, 0);
@@ -7542,16 +7557,21 @@ let gPrivateBrowsingUI = {
       document.getElementById("Tools:PrivateBrowsing")
               .setAttribute("disabled", "true");
   },
 
   _setPBMenuTitle: function PBUI__setPBMenuTitle(aMode) {
     let pbMenuItem = document.getElementById("privateBrowsingItem");
     pbMenuItem.setAttribute("label", pbMenuItem.getAttribute(aMode + "label"));
     pbMenuItem.setAttribute("accesskey", pbMenuItem.getAttribute(aMode + "accesskey"));
+#ifdef MENUBAR_CAN_AUTOHIDE
+    let appmenupbMenuItem = document.getElementById("appmenu_privateBrowsing");
+    appmenupbMenuItem.setAttribute("label", appmenupbMenuItem.getAttribute(aMode + "label"));
+    appmenupbMenuItem.setAttribute("accesskey", appmenupbMenuItem.getAttribute(aMode + "accesskey"));
+#endif
   },
 
   toggleMode: function PBUI_toggleMode() {
     // prompt the users on entering the private mode, if needed
     if (!this.privateBrowsingEnabled)
       if (!this._shouldEnter())
         return;
 
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -444,158 +444,310 @@
               style="&dialog.style;"
               hidden="true"/>
     </panel>
 
     <tooltip id="tabbrowser-tab-tooltip" onpopupshowing="gBrowser.createTooltip(event);"/>
   </popupset>
 
 #ifdef MENUBAR_CAN_AUTOHIDE
-  <hbox id="appmenu-button-container">
-    <button id="appmenu-button"
-            type="menu"
-            label="&brandShortName;"
-            style="-moz-user-focus: ignore;">
-      <menupopup id="appmenu-popup">
-        <hbox flex="1" class="split-menuitem">
-          <menuitem id="appmenu_newTab"
-                    class="split-menuitem-item"
-                    flex="1"
-                    label="&tabCmd.label;"
-                    command="cmd_newNavigatorTab"/>
-          <menu class="split-menuitem-menu">
-            <menupopup>
-              <menuitem id="appmenu_newTab_sub"
-                        label="&tabCmd.label;"
-                        command="cmd_newNavigatorTab"/>
-              <menuitem id="appmenu_newNavigator"
-                        label="&newNavigatorCmd.label;"
-                        command="cmd_newNavigator"/>
-            </menupopup>
-          </menu>
-        </hbox>
-        <menuseparator/>
-        <menuitem id="appmenu_savePage"
-                  label="&savePageCmd.label;"
-                  command="Browser:SavePage"/>
-        <menuitem id="appmenu_sendLink"
-                  label="&sendPageCmd.label;"
-                  command="Browser:SendLink"/>
-        <hbox flex="1" class="split-menuitem">
-          <menuitem id="appmenu_print"
-                    class="split-menuitem-item"
-                    flex="1"
-                    label="&appMenuPrintCmd.label;"
-                    command="cmd_print"/>
-          <menu class="split-menuitem-menu">
-            <menupopup>
-              <menuitem id="menu_printSetup"
-                        label="&printSetupCmd.label;"
-                        command="cmd_pageSetup"/>
-              <menuitem id="menu_printPreview"
-                        label="&printPreviewCmd.label;"
-                        command="cmd_printPreview"/>
+<hbox id="appmenu-button-container">
+  <button id="appmenu-button"
+          type="menu"
+          label="&brandShortName;"
+          style="-moz-user-focus: ignore;">
+    <menupopup id="appmenu-popup"
+               onpopupshowing="updateEditUIVisibility();">
+      <hbox>
+        <vbox id="appmenuPrimaryPane">
+          <hbox flex="1"
+                class="split-menuitem">
+            <menuitem id="appmenu_newTab"
+                      class="split-menuitem-item"
+                      flex="1"
+                      label="&tabCmd.label;"
+                      command="cmd_newNavigatorTab"/>
+              <menu class="split-menuitem-menu">
+                <menupopup>
+                  <menuitem id="appmenu_newTab_popup"
+                            label="&tabCmd.label;"
+                            command="cmd_newNavigatorTab"/>
+                  <menuitem id="appmenu_newNavigator"
+                            label="&newNavigatorCmd.label;"
+                            command="cmd_newNavigator"/>
+                  <menuseparator/>
+                  <menuitem id="appmenu_openFile"
+                            label="&openFileCmd.label;"
+                            command="Browser:OpenFile"/>
+                </menupopup>
+               </menu>
+          </hbox>
+          <menuitem id="appmenu_privateBrowsing"
+                    class="menuitem-iconic"
+                    label="&privateBrowsingCmd.start.label;"
+                    accesskey="&privateBrowsingCmd.start.accesskey;"
+                    startlabel="&privateBrowsingCmd.start.label;"
+                    stoplabel="&privateBrowsingCmd.stop.label;"
+                    command="Tools:PrivateBrowsing"/>
+          <menuseparator class="menu-seperator"/>
+          <hbox class="split-menuitem">
+            <menuitem id="appmenu-edit-menuitem"
+                      label="&editMenu.label;"
+                      disabled="true"/>
+            <toolbarbutton id="appmenu-cut"
+                           class="appmenu-edit-button"
+                           command="cmd_cut"
+                           onclick="if (!this.disabled) hidePopup();"
+                           tooltiptext="&cutButton.tooltip;"/>
+            <toolbarbutton id="appmenu-copy"
+                           class="appmenu-edit-button"
+                           command="cmd_copy"
+                           onclick="if (!this.disabled) hidePopup();"
+                           tooltiptext="&copyButton.tooltip;"/>
+            <toolbarbutton id="appmenu-paste"
+                           class="appmenu-edit-button"
+                           command="cmd_paste"
+                           onclick="if (!this.disabled) hidePopup();"
+                           tooltiptext="&pasteButton.tooltip;"/>
+          </hbox>
+          <menuitem id="appmenu_find"
+                    label="&appMenuFind.label;"
+                    command="cmd_find"/>
+          <menuseparator/>
+          <menuitem id="appmenu_savePage"
+                    label="&savePageCmd.label;"
+                    command="Browser:SavePage"/>
+          <menuitem id="appmenu_sendLink"
+                    label="&sendPageCmd.label;"
+                    command="Browser:SendLink"/>
+          <hbox flex="1"
+                class="split-menuitem">
+            <menuitem id="appmenu_print"
+                      class="menuitem-iconic"
+                      flex="1"
+                      label="&printCmd.label;"
+                      command="cmd_print"/>
+            <menu class="split-menuitem-menu">
+              <menupopup>
+                <menuitem id="appmenu_print_popup"
+                          class="menuitem-iconic"
+                          label="&printCmd.label;"
+                          command="cmd_print"/>
+                <menuitem id="appmenu_printPreview"
+                          label="&printPreviewCmd.label;"
+                          command="cmd_printPreview"/>
+                <menuitem id="appmenu_printSetup"
+                          label="&printSetupCmd.label;"
+                          command="cmd_pageSetup"/>
+              </menupopup>
+            </menu>
+          </hbox>
+          <menuseparator/>
+          <menu id="appmenu_developer"
+                label="&developerMenu.label;">
+            <menupopup id="appmenu_developer_popup">
+              <menuitem id="appmenu_webConsole"
+                        label="&webConsoleCmd.label;"
+                        type="checkbox"
+                        oncommand="HUDConsoleUI.toggleHUD();"/>
+              <menuitem id="appmenu_pageInspect"
+                        label="&inspectMenu.label;"
+                        type="checkbox"
+                        command="Tools:Inspect"/>
+              <menuseparator/>
+              <menuitem id="appmenu_pageSource"
+                        label="&viewPageSourceCmd.label;"
+                        command="View:PageSource"/>
+              <menuseparator/>
+              <menuitem label="&goOfflineCmd.label;"
+                        accesskey="&goOfflineCmd.accesskey;"
+                        type="checkbox"
+                        oncommand="BrowserOffline.toggleOfflineStatus();"/>
             </menupopup>
           </menu>
-        </hbox>
-        <menuitem id="appmenu_find"
-                  label="&findOnCmd.label;"
-                  command="cmd_find"/>
-        <menuseparator/>
-        <menu id="appmenu_history"
-              label="&historyMenu.label;">
-          <menupopup id="appmenu_history_popup"
-                     placespopup="true"
-                     oncommand="this.parentNode._placesView._onCommand(event);"
-                     onclick="checkForMiddleClick(this, event);"
-                     onpopupshowing="if (!this.parentNode._placesView)
-                                       new HistoryMenu(event);"
-                     tooltip="bhTooltip"
-                     popupsinherittooltip="true">
-            <menuitem id="appmenu_sanitizeHistory"
-                      label="&clearRecentHistory.label;"
-                      key="key_sanitize"
-                      command="Tools:Sanitize"/>
-            <menuseparator/>
-            <menuitem id="appmenu_showAllHistory"
-                      label="&showAllHistoryCmd2.label;"
-                      key="showAllHistoryKb"
-                      command="Browser:ShowAllHistory"/>
-            <menuseparator class="hide-if-empty-places-result"/>
-          </menupopup>
-        </menu>
-        <menuseparator/>
-        <menu id="appmenu_developer"
-              label="&developerMenu.label;">
-          <menupopup id="appmenu_developer_popup">
-            <menuitem id="appmenu_pageSource"
-                      label="&pageSourceCmd.label;"
-                      command="View:PageSource"/>
-            <menuseparator/>
-            <menuitem id="appmenu_pageInspect"
-                      type="checkbox"
-                      label="&inspectMenu.label;"
-                      command="Tools:Inspect"/>
-            <menuitem id="appmenu_webConsole"
-                      label="&webConsoleCmd.label;"
-                      oncommand="HUDConsoleUI.toggleHUD();"/>
-          </menupopup>
-        </menu>
-        <menuseparator/>
-        <menu id="appmenu_customize"
-              label="&appMenuCustomize.label;">
-          <menupopup id="appmenu_customizeMenu"
-                     onpopupshowing="onViewToolbarsPopupShowing(event);">
-            <menuseparator/>
-            <menuitem command="cmd_ToggleTabsOnTop"
-                      type="checkbox"
-                      label="&viewTabsOnTop.label;"/>
-            <menuitem id="appmenu_toolbarLayout"
-                      label="&appMenuToolbarLayout.label;"
-                      command="cmd_CustomizeToolbars"/>
-            <menu id="appmenu_sidebars"
-                  label="&appMenuSidebars.label;">
-              <menupopup id="appmenu_sidebarMenu">
-                <menuitem id="appmenu_bookmarksSidebar"
-                          key="viewBookmarksSidebarKb"
-                          observes="viewBookmarksSidebar"/>
-                <menuitem id="appmenu_historySidebar"
-                          key="key_gotoHistory"
-                          observes="viewHistorySidebar"
-                          label="&historyButton.label;"/>
+          <menuseparator/>
+          <menuitem id="appmenu_fullScreen"
+                    label="&fullScreenCmd.label;"
+                    type="checkbox"
+                    observes="View:FullScreen"/>
+          <menuitem id="appmenu-quit"
+                    class="menuitem-iconic"
+#ifdef XP_WIN
+                    label="&quitApplicationCmdWin.label;"
+#else
+                    label="&quitApplicationCmd.label;"
+#endif
+                    command="cmd_quitApplication"/>
+        </vbox>
+        <vbox id="appmenuSecondaryPane">
+          <hbox class="split-menuitem">
+            <menuitem id="appmenu_BookmarkItem"
+                      class="menuitem-iconic"
+                      flex="1"
+                      label="&bookmarksMenu.label;"
+                      command="Browser:ShowAllBookmarks"/>
+            <menu id="appmenuBookmarkMenu"
+                  class="split-menuitem-menu">
+              <menupopup id="appmenuBookmarkMenu_popup"
+                         placespopup="true"
+                         context="placesContext"
+                         openInTabs="children"
+                         oncommand="BookmarksEventHandler.onCommand(event);"
+                         onclick="BookmarksEventHandler.onClick(event);"
+                         onpopupshowing="BookmarksMenuButton.onPopupShowing(event);
+                                         if (!this.parentNode._placesView)new PlacesMenu(event, 'place:folder=BOOKMARKS_MENU');
+                                         this.appendChild(document.getElementById('appmenuBookmarkMenu_unsorted_seperator'));
+                                         this.appendChild(document.getElementById('appmenuBookmarkMenu_unsorted-menuitem'));"
+                         tooltip="bhTooltip"
+                         popupsinherittooltip="true">
+                <menuseparator id="appmenuBookmarkMenu_unsorted_seperator"/>
+                <menuitem id="appmenuBookmarkMenu_unsorted-menuitem"
+                          label="&appMenuUnsorted.label;"
+                          oncommand="PlacesCommandHook.showPlacesOrganizer('UnfiledBookmarks');"
+                          class="menuitem-iconic"/>
+                <menuitem id="appmenuBookmarkMenu_organize_bookmarks"
+                          label="&organizeBookmarks.label;"
+                          key="manBookmarkKb"
+                          command="Browser:ShowAllBookmarks"
+                          context=""/>
+                <menuseparator/>
+                <menuitem id="appmenuBookmarkThisPage"
+                          class="menuitem-iconic"
+                          label="&bookmarkThisPageCmd.label;"
+                          command="Browser:AddBookmarkAs"
+                          key="addBookmarkAsKb"/>
+                <menuitem id="subscribeToPageMenuitem"
+                          class="menuitem-iconic"
+                          label="&subscribeToPageMenuitem.label;"
+                          oncommand="return FeedHandler.subscribeToFeed(null, event);"
+                          onclick="checkForMiddleClick(this, event);"
+                          disabled="true"/>
+                <menu id="subscribeToPageMenupopup"
+                      class="menu-iconic"
+                      label="&subscribeToPageMenupopup.label;"
+                      hidden="true">
+                  <menupopup id="subscribeToPageSubmenuMenupopup"
+                             onpopupshowing="return FeedHandler.buildFeedList(event.target);"
+                             oncommand="return FeedHandler.subscribeToFeed(null, event);"
+                             onclick="checkForMiddleClick(this, event);"/>
+                </menu>
+                <menuseparator/>
               </menupopup>
             </menu>
-            <menuseparator/>
-            <menuitem id="appmenu_openAddons"
+          </hbox>
+          <hbox class="split-menuitem">
+            <menuitem id="appmenu_HistoryItem"
+                      class="menuitem-iconic"
+                      flex="1"
+                      label="&historyMenu.label;"
+                      command="Browser:ShowAllHistory"/>
+            <menu id="appmenu_history"
+                  class="split-menuitem-menu">
+              <menupopup id="appmenu_history_popup"
+                         placespopup="true"
+                         oncommand="this.parentNode._placesView._onCommand(event);"
+                         onclick="checkForMiddleClick(this, event);"
+                         onpopupshowing="if (!this.parentNode._placesView) new HistoryMenu(event);"
+                         tooltip="bhTooltip"
+                         popupsinherittooltip="true">
+                <menuitem id="appmenu_showAllHistory"
+                          label="&showAllHistoryCmd2.label;"
+                          key="showAllHistoryKb"
+                          command="Browser:ShowAllHistory"/>
+                <menuseparator/>
+                <menuitem id="appmenu_sanitizeHistory"
+                          label="&clearRecentHistory.label;"
+                          key="key_sanitize"
+                          command="Tools:Sanitize"/>
+                <menuseparator class="hide-if-empty-places-result"/>
+                <menu id="historyUndoMenu"
+                      label="&historyUndoMenu.label;"
+                      disabled="true">
+                  <menupopup id="historyUndoPopup"
+                             onpopupshowing="_placesView.populateUndoSubmenu();"/>
+                </menu>
+                <menu id="historyUndoWindowMenu"
+                      label="&historyUndoWindowMenu.label;"
+                      disabled="true">
+                  <menupopup id="historyUndoPopup"
+                             onpopupshowing="_placesView.populateUndoWindowSubmenu();"/>
+                </menu>
+                <menuseparator/>
+              </menupopup>
+            </menu>
+          </hbox>
+            <menuitem id="appmenu_downloads"
+                      label="&downloads.label;"
+                      command="Tools:Downloads"/>
+            <spacer id="appmenuSecondaryPane-spacer"/>
+            <menuitem id="appmenu_addons"
+                      class="menuitem-iconic"
                       label="&addons.label;"
                       command="Tools:Addons"/>
-          </menupopup>
-        </menu>
-        <menuitem id="appmenu_preferences"
+            <hbox class="split-menuitem">
+              <menuitem id="appmenu_customize"
+                        label="&preferencesCmd.label;"
+                        class="split-menuitem-item"
+                        flex="1"
+                        oncommand="openPreferences();"/>
+              <menu class="split-menuitem-menu"
+                    label="&preferencesCmd.label;">
+                <menupopup id="appmenu_customizeMenu"
+                           onpopupshowing="onViewToolbarsPopupShowing(event, (document.getElementById('appmenuToggleStatusbar')));">
+                  <menuitem id="appmenu_preferences"
 #ifdef XP_UNIX
-                  label="&preferencesCmdUnix.label;"
+                            label="&preferencesCmdUnix.label;"
 #else
-                  label="&preferencesCmd.label;"
+                            label="&preferencesCmd.label;"
 #endif
-                  oncommand="openPreferences();"/>
-        <menuitem id="appmenu_openHelp"
-                  label="&appMenuHelp.label;"
-                  oncommand="openHelpLink('firefox-help')"
-                  onclick="checkForMiddleClick(this, event);"/>
-        <menuseparator/>
-        <menuitem id="appmenu_quit"
-#ifdef XP_WIN
-                  label="&quitApplicationCmdWin.label;"
-#else
-                  label="&quitApplicationCmd.label;"
-#endif
-                  command="cmd_quitApplication"/>
-      </menupopup>
-    </button>
-  </hbox>
+                            oncommand="openPreferences();"/>
+                  <menuseparator/>
+                  <menuitem id="appmenuToggleStatusbar"
+                            type="checkbox"
+                            command="cmd_toggleTaskbar"
+                            observes="toggle_taskbar"/>
+                  <menuseparator/>
+                  <menuitem id="appmenuToggleTabs"
+                            label="&viewTabsOnTop.label;"
+                            type="checkbox"
+                            command="cmd_ToggleTabsOnTop"/>
+                  <menuitem id="appmenu_toolbarLayout"
+                            label="&appMenuToolbarLayout.label;"
+                            command="cmd_CustomizeToolbars"/>
+                </menupopup>
+              </menu>
+            </hbox>
+            <hbox class="split-menuitem">
+              <menuitem id="appmenu_helpItem"
+                        flex="1"
+                        label="&helpMenu.label;"
+                        oncommand="openHelpLink('firefox-help')"/>
+              <menu id="appmenu_about_menu"
+                    class="split-menuitem-menu">
+                <menupopup>
+                  <menuitem id="appmenu_openHelp"
+                            label="&helpMenu.label;"
+                            oncommand="openHelpLink('firefox-help')"
+                            onclick="checkForMiddleClick(this, event);"/>
+                  <menuitem id="appmenu_help_getting_started"
+                            label="&appMenuGettingStarted.label;"
+                            oncommand="gBrowser.selectedTab = gBrowser.addTab('http://www.mozilla.com/firefox/central/');"
+                            onclick="checkForMiddleClick(this, event);"/>
+                  <menuseparator/>
+                  <menuitem id="appmenu_help_about"
+                            label="&aboutProduct.label;"
+                            oncommand="openAboutDialog();"/>
+                </menupopup>
+              </menu>
+            </hbox>
+        </vbox>
+      </hbox>
+    </menupopup>
+  </button>
+</hbox>
 #endif
 
 <deck flex="1" id="tab-view-deck">
 <vbox flex="1">
 
   <toolbox id="navigator-toolbox"
            defaultmode="icons" mode="icons"
 #ifdef WINCE
--- a/browser/locales/en-US/chrome/browser/browser.dtd
+++ b/browser/locales/en-US/chrome/browser/browser.dtd
@@ -260,21 +260,22 @@
 <!ENTITY historyUndoMenu.label "Recently Closed Tabs">
 <!-- LOCALIZATION NOTE (historyUndoWindowMenu): see bug 394759 -->
 <!ENTITY historyUndoWindowMenu.label "Recently Closed Windows">
 
 <!ENTITY historyHomeCmd.label "Home">
 <!ENTITY showAllHistoryCmd2.label "Show All History">
 <!ENTITY showAllHistoryCmd.commandkey "H">
 
-<!ENTITY appMenuPrintCmd.label "Print">
 <!ENTITY appMenuCustomize.label "Customize">
 <!ENTITY appMenuToolbarLayout.label "Toolbar Layout…">
 <!ENTITY appMenuSidebars.label "Sidebars">
-<!ENTITY appMenuHelp.label "Help">
+<!ENTITY appMenuFind.label "Find…">
+<!ENTITY appMenuUnsorted.label "Unsorted Bookmarks">
+<!ENTITY appMenuGettingStarted.label "Getting Started">
 
 <!ENTITY developerMenu.label "Developer">
 
 <!ENTITY openCmd.commandkey           "l">
 <!ENTITY urlbar.placeholder           "Go to a Web Site">
 <!ENTITY urlbar.accesskey             "d">
 <!ENTITY urlbar.switchToTab.label     "Switch to tab:">
 
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..87d2405a394e38c4a6e9b21638beae47bf0a63ae
GIT binary patch
literal 2236
zc$@*e2t)UYP)<h;3K|Lk000e1NJLTq002+`000mO1^@s6fl2tm00004XF*Lt006O%
z3;baP00009a7bBm000ic000ic0Tn1pfB*mh8FWQhbW?9;ba!ELWdKlNX>N2bPDNB8
zb~7$DE;UJt{NMlp2sueaK~z{r#h80gRQDCf%}mpO=uG~oqlu>VvAhu$mWQYfu~ZR-
z<s~Lo+z?ov3NGMol&0ZX6_SY{q}V74Wu%k<DV9*wK)@g%rA5+ebcP*S<SEEQ-ipR=
zf9Dr2UDgGbX{Wt2-?_iN=bRt+e(pKH^Si8Aq31B&A1Zc9J72r=OaZLJk7eld(Y{t&
zTMJ!PS65?vd^~=sSh9PXta#DW^aUe!Hj;`~7&%&rj8?5){q?HVFV{I*oBT*h*G)+;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3*?m*SM;{7D;`v(mWOkwG
zpMA)x{tE6fGMIaMLn6;W0^7qLi8{=E%gV~YVnb+-U#~S$Ygnl-M-;>FKO`n*<d9OC
z7j^u2*)_J`iAzc{xO5i-J=a*Mxy(u%f&hT#pb{o%;qD@YvOOQ|`*zyC48FF~x=QP-
zj>tx_D_5>`luD(aGX2Td$Gf^?U;>ND*Vm`oi}|vyoJX-VNBk=rQ=7beM<=7AV2H?<
zV)*mRA|uz)`GcICR%LSXlK*)zG&^-0i!KNOz%0PIZ((6i=(qJJIC0_x#@JVd(44f-
zWShMg`pjIzw1LUd($YdH5pPP_WM!2iwh^aDBn~O|_6{iy_I4?jR#r;#nf0X@{)zg|
zs`VC3sZ44EMZWX@nZQbUgo#i1-#By|i@x7W{hg)eSStR1VgDB@NT~Q-J*e9N0000<
KMNUMnLSTaCr8IH?
--- a/browser/themes/winstripe/browser/browser.css
+++ b/browser/themes/winstripe/browser/browser.css
@@ -166,16 +166,131 @@ statusbarpanel#statusbar-display {
 }
 
 .split-menuitem-item[_moz-menuactive="true"],
 .split-menuitem-menu[_moz-menuactive="true"] {
   background-color: -moz-menuhover;
   color: -moz-menuhovertext;
 }
 
+/* Style Firefox App Menu popup */
+
+.appmenu-edit-button {
+  -moz-appearance: none;
+  border: 1px solid transparent;
+  padding: 2px;
+  background: transparent;
+  -moz-border-radius: 3px;
+}
+
+.appmenu-edit-button[disabled="true"] {
+  opacity: .3;
+}
+
+@media all and (-moz-windows-default-theme) {
+  #appmenu-popup {
+    -moz-appearance: none;
+    background: white;
+    border: 1px solid rgba(0,0,0,.5);
+  }
+  #appmenuPrimaryPane {
+    margin-right: -1px;
+    background-color: rgba(255,255,255,0.5);
+    border-right: 1px solid #c4c4c5;
+    padding-left: 2px;
+  }
+  #appmenuSecondaryPane {
+    -moz-appearance: none;
+    background-color: #f1f5fb;
+    -moz-box-shadow: 1px 0 3px rgb(204,214,234) inset;
+    border: 0;
+    padding-top: 5px;
+    font-family: "Segoe UI Semibold", "Segoe UI", sans-serif;
+  }
+  .appmenu-edit-button:not([disabled]):hover {
+    border: 1px solid #b8d6fb;
+    -moz-box-shadow: inset 0 0 1px white;
+    background: -moz-linear-gradient(#fafbfd, #ebf3fd);
+    -moz-transition: .2s ease-in;
+  }
+}
+
+#appmenuSecondaryPane-spacer {
+  min-height: 1em;
+}
+
+#appmenu_print,
+#appmenu_print_popup,
+.appmenu-edit-button,
+#appmenu-quit {
+  list-style-image: url("appmenu-icons.png");
+}
+
+#appmenu-cut {
+  -moz-image-region: rect(0 16px 16px 0);
+}
+
+#appmenu-copy {
+  -moz-image-region: rect(0 32px 16px 16px);
+}
+
+#appmenu-paste {
+  -moz-image-region: rect(0 48px 16px 32px);
+}
+
+#appmenu_print,
+#appmenu_print_popup {
+  -moz-image-region: rect(0 64px 16px 48px);
+}
+
+#appmenu-quit {
+  -moz-image-region: rect(0 80px 16px 64px);
+}
+
+#appmenu-edit-menuitem {
+  -moz-appearance: none;
+  background: transparent;
+  font-style: italic;
+}
+
+#appmenu_BookmarkItem {
+  list-style-image: url("chrome://browser/skin/places/bookmark.png");
+  -moz-image-region: rect(0px 48px 16px 32px);
+}
+
+#appmenu_BookmarkItem > .menu-iconic-left,
+#appmenu_addons > .menu-iconic-left {
+  -moz-margin-end: -5px;
+  -moz-margin-start: 5px;
+  padding: 0;
+}
+
+#appmenu_privateBrowsing {
+  list-style-image: url("chrome://browser/skin/Privacy-16.png");
+}
+
+#appmenuBookmarkMenu_unsorted-menuitem {
+  list-style-image: url("chrome://browser/skin/places/unsortedBookmarks.png");
+}
+
+#appmenu_addons {
+  list-style-image: url("chrome://mozapps/skin/extensions/extensionGeneric-16.png");
+}
+
+#appmenu-button #subscribeToPageMenuitem:not([disabled]),
+#appmenu-button #subscribeToPageMenupopup:not([hidden]) {
+  list-style-image: url("chrome://browser/skin/feeds/feed-icons-16.png");
+  -moz-image-region: rect(0px 16px 16px 0px);
+}
+
+#appmenuBookmarkThisPage {
+  list-style-image: url("chrome://browser/skin/places/bookmark.png");
+  -moz-image-region: rect(0 16px 16px 0);
+}
+
 /* XXX: stop-gap until the button can be drawn in the title bar */
 %ifdef WINSTRIPE_AERO
 @media not all and (-moz-windows-compositor) {
 %endif
   #main-window[tabsontop="true"] > #appmenu-button-container > #appmenu-button {
     position: relative !important;
     margin-bottom: -1.6em !important;
   }
--- a/browser/themes/winstripe/browser/jar.mn
+++ b/browser/themes/winstripe/browser/jar.mn
@@ -7,16 +7,17 @@ browser.jar:
 *       skin/classic/browser/aboutPrivateBrowsing.css                (aboutPrivateBrowsing.css)
 *       skin/classic/browser/aboutSessionRestore.css                 (aboutSessionRestore.css)
         skin/classic/browser/aboutSessionRestore-window-icon.png     (aboutSessionRestore-window-icon.png)
         skin/classic/browser/aboutCertError.css                      (aboutCertError.css)
 #ifdef MOZ_SERVICES_SYNC
         skin/classic/browser/aboutSyncTabs.css
 #endif
         skin/classic/browser/actionicon-tab.png
+        skin/classic/browser/appmenu-icons.png
         skin/classic/browser/appmenu-dropmarker.png
 *       skin/classic/browser/browser.css                             (browser.css)
 *       skin/classic/browser/engineManager.css                       (engineManager.css)
         skin/classic/browser/fullscreen-video.css
         skin/classic/browser/Geolocation-16.png
         skin/classic/browser/Geolocation-64.png
         skin/classic/browser/Info.png                                (Info.png)
         skin/classic/browser/identity.png                            (identity.png)
@@ -121,16 +122,17 @@ browser.jar:
 *       skin/classic/aero/browser/aboutSessionRestore.css            (aboutSessionRestore.css)
         skin/classic/aero/browser/aboutSessionRestore-window-icon.png (aboutSessionRestore-window-icon-aero.png)
         skin/classic/aero/browser/aboutCertError.css                 (aboutCertError.css)
 #ifdef MOZ_SERVICES_SYNC
         skin/classic/aero/browser/aboutSyncTabs.css
 #endif
         skin/classic/aero/browser/actionicon-tab.png                 (actionicon-tab.png)
         skin/classic/aero/browser/appmenu-dropmarker.png
+        skin/classic/aero/browser/appmenu-icons.png
 *       skin/classic/aero/browser/browser.css                        (browser-aero.css)
 *       skin/classic/aero/browser/engineManager.css                  (engineManager.css)
         skin/classic/aero/browser/fullscreen-video.css
         skin/classic/aero/browser/Geolocation-16.png
         skin/classic/aero/browser/Geolocation-64.png
         skin/classic/aero/browser/Info.png                           (Info-aero.png)
         skin/classic/aero/browser/identity.png                       (identity-aero.png)
         skin/classic/aero/browser/keyhole-forward-mask.svg