Bug 571567 - use <menupopup> instead of <popup>. r=enn
authorDão Gottwald <dao@mozilla.com>
Tue, 22 Jun 2010 08:34:21 +0200
changeset 44124 1be071f3b9cbd470bb31f612b6a6354d6260be93
parent 44123 ab8f9bebe2cbb533ee4c59134077966e334a51fd
child 44126 c1ac92989e91de89ab12b9e0df82170cd10841a9
push idunknown
push userunknown
push dateunknown
reviewersenn
bugs571567
milestone1.9.3a6pre
Bug 571567 - use <menupopup> instead of <popup>. r=enn
browser/base/content/browser.xul
browser/base/content/web-panels.xul
browser/components/places/content/bookmarksPanel.xul
browser/components/places/content/history-panel.xul
browser/components/places/content/places.xul
browser/components/places/content/placesOverlay.xul
toolkit/components/console/content/console.xul
toolkit/components/help/content/helpContextOverlay.xul
toolkit/components/prompts/content/commonDialog.xul
toolkit/components/viewconfig/content/config.xul
toolkit/components/viewsource/content/viewPartialSource.xul
toolkit/components/viewsource/content/viewSource.xul
toolkit/obsolete/content/globalOverlay.xul
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -239,55 +239,55 @@
           <splitter class="tree-splitter"/>
           <treecol id="colNodeValue" label="nodeValue"
                    persist="width,hidden,ordinal" flex="1"/>
         </treecols>
         <treechildren id="inspector-tree-body"/>
       </tree>
     </panel>
 
-    <popup id="toolbar-context-menu"
-           onpopupshowing="onViewToolbarsPopupShowing(event);">
+    <menupopup id="toolbar-context-menu"
+               onpopupshowing="onViewToolbarsPopupShowing(event);">
       <menuseparator/>
       <menuitem command="cmd_ToggleTabsOnTop"
                 type="checkbox"
                 label="&viewTabsOnTop.label;"
                 accesskey="&viewTabsOnTop.accesskey;"/>
       <menuseparator/>
       <menuitem command="cmd_CustomizeToolbars"
                 label="&viewCustomizeToolbar.label;"
                 accesskey="&viewCustomizeToolbar.accesskey;"/>
-    </popup>
+    </menupopup>
 
-    <popup id="blockedPopupOptions" 
-           onpopupshowing="gPopupBlockerObserver.fillPopupList(event);">
+    <menupopup id="blockedPopupOptions" 
+               onpopupshowing="gPopupBlockerObserver.fillPopupList(event);">
       <menuitem observes="blockedPopupAllowSite"/>
       <menuitem observes="blockedPopupEditSettings"/>
       <menuitem observes="blockedPopupDontShowMessage"/>
       <menuseparator observes="blockedPopupsSeparator"/>
-    </popup>
+    </menupopup>
 
     <menupopup id="autohide-context"
            onpopupshowing="FullScreen.getAutohide(this.firstChild);">
       <menuitem type="checkbox" label="&fullScreenAutohide.label;"
                 accesskey="&fullScreenAutohide.accesskey;"
                 oncommand="FullScreen.setAutohide();"/>
       <menuseparator/>
       <menuitem label="&fullScreenExit.label;"
                 accesskey="&fullScreenExit.accesskey;"
                 oncommand="BrowserFullScreen();"/>
     </menupopup>
 
-    <popup id="contentAreaContextMenu"
-           onpopupshowing="if (event.target != this) return true; updateEditUIVisibility(); gContextMenu = new nsContextMenu(this, window.getBrowser()); return gContextMenu.shouldDisplay;"
-           onpopuphiding="if (event.target == this) { gContextMenu = null; updateEditUIVisibility(); }">
+    <menupopup id="contentAreaContextMenu"
+               onpopupshowing="if (event.target != this) return true; updateEditUIVisibility(); gContextMenu = new nsContextMenu(this, window.getBrowser()); return gContextMenu.shouldDisplay;"
+               onpopuphiding="if (event.target == this) { gContextMenu = null; updateEditUIVisibility(); }">
 #include browser-context.inc
-    </popup>
+    </menupopup>
 
-    <popup id="placesContext"/>
+    <menupopup id="placesContext"/>
 
     <panel id="notification-popup" position="after_start" noautofocus="true" hidden="true"/>
 
     <!-- Popup for site identity information -->
     <panel id="identity-popup" position="after_start" hidden="true" noautofocus="true"
            onpopupshown="document.getElementById('identity-popup-more-info-button').focus();"
            level="top">
       <hbox id="identity-popup-container" align="top">
--- a/browser/base/content/web-panels.xul
+++ b/browser/base/content/web-panels.xul
@@ -75,24 +75,24 @@
              oncommand="getPanelBrowser().webNavigation.goForward();"
              disabled="true"/>
     <command id="Browser:Stop" oncommand="PanelBrowserStop();"/>
     <command id="Browser:Reload" oncommand="PanelBrowserReload();"/>
   </commandset>
 
   <popupset id="mainPopupSet">
     <tooltip id="aHTMLTooltip" onpopupshowing="return FillInHTMLTooltip(document.tooltipNode);"/>
-    <popup id="contentAreaContextMenu"
-           onpopupshowing="if (event.target != this)
-                             return true;
-                           gContextMenu = new nsContextMenu(this, getPanelBrowser());
-                           return gContextMenu.shouldDisplay;"
-           onpopuphiding="if (event.target == this)
-                            gContextMenu = null;">
+    <menupopup id="contentAreaContextMenu"
+               onpopupshowing="if (event.target != this)
+                                 return true;
+                               gContextMenu = new nsContextMenu(this, getPanelBrowser());
+                               return gContextMenu.shouldDisplay;"
+               onpopuphiding="if (event.target == this)
+                                gContextMenu = null;">
 #include browser-context.inc
-    </popup>
+    </menupopup>
   </popupset>
 
   <commandset id="editMenuCommands"/> 
   <browser id="web-panels-browser" persist="cachedurl" type="content" flex="1"
            context="contentAreaContextMenu" tooltip="aHTMLTooltip"
            onclick="return window.parent.contentAreaClick(event, true);"/>
 </page>
--- a/browser/components/places/content/bookmarksPanel.xul
+++ b/browser/components/places/content/bookmarksPanel.xul
@@ -54,17 +54,17 @@
 
   <script type="application/javascript" 
           src="chrome://browser/content/bookmarks/sidebarUtils.js"/>
   <script type="application/javascript" 
           src="chrome://browser/content/bookmarks/bookmarksPanel.js"/>
 
   <commandset id="placesCommands"/>
   <commandset id="editMenuCommands"/>
-  <popup id="placesContext"/>
+  <menupopup id="placesContext"/>
 
   <!-- Bookmarks and history tooltip -->
   <tooltip id="bhTooltip"/>
 
   <hbox id="sidebar-search-container" align="center">
     <label id="sidebar-search-label"
            value="&search.label;" accesskey="&search.accesskey;" control="search-box"/>
     <textbox id="search-box" flex="1" type="search" class="compact"
--- a/browser/components/places/content/history-panel.xul
+++ b/browser/components/places/content/history-panel.xul
@@ -70,17 +70,17 @@
 
   <keyset id="editMenuKeys">
 #ifdef XP_MACOSX
     <key id="key_delete2" keycode="VK_BACK" command="cmd_delete"/>
 #endif
   </keyset>
 
   <!-- required to overlay the context menu -->
-  <popup id="placesContext" />
+  <menupopup id="placesContext"/>
 
   <!-- Bookmarks and history tooltip -->
   <tooltip id="bhTooltip"/>
 
   <hbox id="sidebar-search-container" align="center">
     <label id="sidebar-search-label"
            value="&find.label;" accesskey="&find.accesskey;" 
            control="search-box"/>
--- a/browser/components/places/content/places.xul
+++ b/browser/components/places/content/places.xul
@@ -174,20 +174,20 @@
 
   <keyset id="editMenuKeys">
 #ifdef XP_MACOSX
     <key id="key_delete2" keycode="VK_BACK" command="cmd_delete"/>
 #endif
   </keyset>
 
   <popupset id="placesPopupset">
-    <popup id="placesContext"/>
-    <popup id="placesColumnsContext"
-           onpopupshowing="ViewMenu.fillWithColumns(event, null, null, 'checkbox', null);"
-           oncommand="ViewMenu.showHideColumn(event.target); event.stopPropagation();"/>
+    <menupopup id="placesContext"/>
+    <menupopup id="placesColumnsContext"
+               onpopupshowing="ViewMenu.fillWithColumns(event, null, null, 'checkbox', null);"
+               oncommand="ViewMenu.showHideColumn(event.target); event.stopPropagation();"/>
   </popupset>
 
   <toolbox id="placesToolbox">
     <toolbar class="chromeclass-toolbar" id="placesToolbar" align="center">
       <toolbarbutton id="back-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
                      command="OrganizerCommand:Back"
                      tooltiptext="&backButton.tooltip;"
                      disabled="true"/>
--- a/browser/components/places/content/placesOverlay.xul
+++ b/browser/components/places/content/placesOverlay.xul
@@ -118,20 +118,20 @@
     <command id="placesCmd_copy"
              oncommand="goDoPlacesCommand('placesCmd_copy');"/>
     <command id="placesCmd_paste"
              oncommand="goDoPlacesCommand('placesCmd_paste');"/>
     <command id="placesCmd_delete"
              oncommand="goDoPlacesCommand('placesCmd_delete');"/>
   </commandset>
 
-  <popup id="placesContext"
-         onpopupshowing="this._view = PlacesUIUtils.getViewForNode(document.popupNode);
-                         return this._view.buildContextMenu(this);"
-         onpopuphiding="this._view.destroyContextMenu();">
+  <menupopup id="placesContext"
+             onpopupshowing="this._view = PlacesUIUtils.getViewForNode(document.popupNode);
+                             return this._view.buildContextMenu(this);"
+             onpopuphiding="this._view.destroyContextMenu();">
     <menuitem id="placesContext_open"
               command="placesCmd_open"
               label="&cmd.open.label;"
               accesskey="&cmd.open.accesskey;"
               default="true"
               selectiontype="single"
               selection="link"/>
     <menuitem id="placesContext_open:newwindow"
@@ -253,11 +253,11 @@
               selection="folder"/>
     <menuseparator id="placesContext_sortSeparator"/>
     <menuitem id="placesContext_show:info"
               command="placesCmd_show:info"
               label="&cmd.properties.label;" 
               accesskey="&cmd.properties.accesskey;"
               selection="bookmark|folder|query"
               forcehideselection="livemarkChild"/>
-  </popup>
+  </menupopup>
 
 </overlay>
--- a/toolkit/components/console/content/console.xul
+++ b/toolkit/components/console/content/console.xul
@@ -74,27 +74,27 @@
     <key id="key_close2" keycode="VK_ESCAPE" command="cmd_close"/>
     <key id="key_focus1" key="&focus1.commandkey;" modifiers="accel"
          oncommand="gTextBoxEval.focus()"/>
     <key id="key_focus2" key="&focus2.commandkey;" modifiers="alt"
          oncommand="gTextBoxEval.focus()"/>
   </keyset>
 
   <popupset id="ContextMenus">
-    <popup id="ConsoleContext">
+    <menupopup id="ConsoleContext">
       <menuitem type="radio" id="Console:sortAscend"
                 label="&sortFirst.label;" accesskey="&sortFirst.accesskey;"
                 oncommand="changeSortOrder('forward');"/>
       <menuitem type="radio" id="Console:sortDescend"
                 label="&sortLast.label;" accesskey="&sortLast.accesskey;"
                 oncommand="changeSortOrder('reverse');"/>
       <menuseparator/>
       <menuitem id="menu_copy_cm" command="cmd_copy"
                 label="&copyCmd.label;" accesskey="&copyCmd.accesskey;"/>
-    </popup>
+    </menupopup>
   </popupset>
   
   <toolbox id="console-toolbox">
     <toolbar class="chromeclass-toolbar" id="ToolbarMode">
       <hbox id="viewGroup">
         <toolbarbutton type="radio" group="mode" id="Console:modeAll" 
                        label="&all.label;" accesskey="&all.accesskey;"
                        oncommand="changeMode('All');"/>
--- a/toolkit/components/help/content/helpContextOverlay.xul
+++ b/toolkit/components/help/content/helpContextOverlay.xul
@@ -39,18 +39,18 @@
     <!ENTITY % helpDTD SYSTEM "chrome://help/locale/help.dtd">
     %helpDTD;
 ]>
 <overlay id="contentAreaContextOverlay"
          xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
 # Help Window's right-click menu
   <popupset id="contentAreaContextSet">
-    <popup id="contentAreaContextMenu"
-           onpopupshowing="goUpdateCommand('cmd_copy')">
+    <menupopup id="contentAreaContextMenu"
+               onpopupshowing="goUpdateCommand('cmd_copy')">
       <menuitem id="context-back"
                 label="&backButton.label;"
                 accesskey="&backButton.accesskey;"
                 observes="canGoBack"
                 oncommand="goBack()"/>
       <menuitem id="context-forward"
                 label="&forwardButton.label;"
                 accesskey="&forwardButton.accesskey;"
@@ -83,11 +83,11 @@
       <menuitem id="context-zlevel"
                 type="checkbox"
                 checked="true"
                 persist="checked"
                 label="&zLevel.label;"
                 accesskey="&zLevel.accesskey;"
                 oncommand="toggleZLevel(this);"/>
 #endif
-    </popup>
+    </menupopup>
   </popupset>
 </overlay>
--- a/toolkit/components/prompts/content/commonDialog.xul
+++ b/toolkit/components/prompts/content/commonDialog.xul
@@ -20,28 +20,28 @@
   <script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
 
   <commandset id="selectEditMenuItems">
     <command id="cmd_copy" oncommand="goDoCommand('cmd_copy')" disabled="true"/>
     <command id="cmd_selectAll" oncommand="goDoCommand('cmd_selectAll')"/>
   </commandset>
 
   <popupset id="contentAreaContextSet">
-    <popup id="contentAreaContextMenu"
-           onpopupshowing="goUpdateCommand('cmd_copy')">
+    <menupopup id="contentAreaContextMenu"
+               onpopupshowing="goUpdateCommand('cmd_copy')">
       <menuitem id="context-copy"
                 label="&copyCmd.label;"
                 accesskey="&copyCmd.accesskey;"
                 command="cmd_copy"
                 disabled="true"/>
       <menuitem id="context-selectall"
                 label="&selectAllCmd.label;"
                 accesskey="&selectAllCmd.accesskey;"
                 command="cmd_selectAll"/>
-    </popup>
+    </menupopup>
   </popupset>
 
   <hbox id="filler" style="min-width: 0%;">
     <spacer style="width: 29em;"/>
   </hbox>
 
   <grid>
     <columns>
--- a/toolkit/components/viewconfig/content/config.xul
+++ b/toolkit/components/viewconfig/content/config.xul
@@ -50,17 +50,17 @@
         height="500"
         onunload="onConfigUnload();"
         onload="onConfigLoad();">
 
 <script src="chrome://global/content/config.js"/>
 
 <stringbundle id="configBundle" src="chrome://global/locale/config.properties"/>
 
-<popup id="configContext" onpopupshowing="if (event.target == this) updateContextMenu();">
+<menupopup id="configContext" onpopupshowing="if (event.target == this) updateContextMenu();">
   <menuitem id="toggleSelected" default="true"
             label="&toggle.label;" accesskey="&toggle.accesskey;"
             oncommand="ModifySelected();"/>
   <menuitem id="modifySelected" default="true"
             label="&modify.label;" accesskey="&modify.accesskey;"
             oncommand="ModifySelected();"/>
   <menuseparator/>
   <menuitem id="copyPref" label="&copyPref.label;" accesskey="&copyPref.accesskey;" oncommand="copyPref();"/>
@@ -69,17 +69,17 @@
   <menu label="&new.label;" accesskey="&new.accesskey;">
     <menupopup>
       <menuitem label="&string.label;" accesskey="&string.accesskey;" oncommand="NewPref(nsIPrefBranch.PREF_STRING);"/>
       <menuitem label="&integer.label;" accesskey="&integer.accesskey;" oncommand="NewPref(nsIPrefBranch.PREF_INT);"/>
       <menuitem label="&boolean.label;" accesskey="&boolean.accesskey;" oncommand="NewPref(nsIPrefBranch.PREF_BOOL);"/>
     </menupopup>
   </menu>
   <menuitem id="resetSelected" label="&reset.label;" accesskey="&reset.accesskey;" oncommand="ResetSelected();"/>
-</popup>
+</menupopup>
 
 <keyset id="configTreeKeyset" disabled="true">
   <key keycode="VK_ENTER" oncommand="ModifySelected();"/>
   <key keycode="VK_RETURN" oncommand="ModifySelected();"/>
   <key key="&focusFilter.key;" modifiers="accel" oncommand="document.getElementById('textbox').focus();"/>
 </keyset>
 <deck id="configDeck" flex="1">
   <vbox id="warningScreen" flex="1" align="center" style="overflow: auto;">
--- a/toolkit/components/viewsource/content/viewPartialSource.xul
+++ b/toolkit/components/viewsource/content/viewPartialSource.xul
@@ -106,23 +106,23 @@
     <key id="key_textZoomEnlarge2" key="&textEnlarge.commandkey2;" command="cmd_textZoomEnlarge" modifiers="accel"/>
     <key id="key_textZoomEnlarge3" key="&textEnlarge.commandkey3;" command="cmd_textZoomEnlarge" modifiers="accel"/>
     <key id="key_textZoomReduce"  key="&textReduce.commandkey;" command="cmd_textZoomReduce" modifiers="accel"/>
     <key id="key_textZoomReduce2"  key="&textReduce.commandkey2;" command="cmd_textZoomReduce" modifiers="accel"/>
     <key id="key_textZoomReset" key="&textReset.commandkey;" command="cmd_textZoomReset" modifiers="accel"/>
     <key id="key_textZoomReset2" key="&textReset.commandkey2;" command="cmd_textZoomReset" modifiers="accel"/>
   </keyset>
 
-  <popup id="viewSourceContextMenu">
+  <menupopup id="viewSourceContextMenu">
     <menuitem id="cMenu_findAgain"/>
     <menuseparator/>
     <menuitem id="cMenu_copy"/>
     <menuseparator/>
     <menuitem id="cMenu_selectAll"/>
-  </popup>
+  </menupopup>
 
   <!-- Menu --> 
   <toolbox id="viewSource-toolbox">
     <menubar id="viewSource-main-menubar">
 
       <menu id="menu_file" label="&fileMenu.label;" accesskey="&fileMenu.accesskey;">
         <menupopup id="filemenu-popup">
           <menuitem key="key_savePage" command="cmd_savePage" id="menu_savePage"
--- a/toolkit/components/viewsource/content/viewSource.xul
+++ b/toolkit/components/viewsource/content/viewSource.xul
@@ -137,34 +137,34 @@
 #endif
 #ifdef XP_UNIX
     <key id="goBackKb2" key="&goBackCmd.commandKey;" command="Browser:Back" modifiers="accel"/>
     <key id="goForwardKb2" key="&goForwardCmd.commandKey;" command="Browser:Forward" modifiers="accel"/>
 #endif
 
   </keyset>
 
-  <popup id="viewSourceContextMenu">
+  <menupopup id="viewSourceContextMenu">
     <menuitem id="context-back"
               label="&backCmd.label;"
               accesskey="&backCmd.accesskey;"
               command="Browser:Back"
               observes="viewSourceNavigation"/>
     <menuitem id="context-forward"
               label="&forwardCmd.label;"
               accesskey="&forwardCmd.accesskey;"
               command="Browser:Forward"
               observes="viewSourceNavigation"/>
     <menuseparator observes="viewSourceNavigation"/>
     <menuitem id="cMenu_findAgain"/>
     <menuseparator/>
     <menuitem id="cMenu_copy"/>
     <menuseparator/>
     <menuitem id="cMenu_selectAll"/>
-  </popup>
+  </menupopup>
 
   <!-- Menu --> 
   <toolbox id="viewSource-toolbox">
     <menubar id="viewSource-main-menubar">
 
       <menu id="menu_file" label="&fileMenu.label;" accesskey="&fileMenu.accesskey;">
         <menupopup id="filemenu-popup">
           <menuitem key="key_savePage" command="cmd_savePage" id="menu_savePage"
--- a/toolkit/obsolete/content/globalOverlay.xul
+++ b/toolkit/obsolete/content/globalOverlay.xul
@@ -21,14 +21,14 @@
         }
       }
       return retVal;
     }
 
   ]]></script>
 
   <popupset id="aTooltipSet">
-    <popup id="aTooltip" class="tooltip" onpopupshowing="return FillInTooltip(document.tooltipNode);" > 
+    <tooltip id="aTooltip" class="tooltip" onpopupshowing="return FillInTooltip(document.tooltipNode);">
       <label id="TOOLTIP-tooltipText" class="tooltip-label" flex="1"/>
-    </popup>
+    </tooltip>
   </popupset>
 
 </overlay>