<?xml version="1.0"?>

<?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/usercontext/usercontext.css" type="text/css"?>
<?xml-stylesheet href="chrome://devtools/skin/devtools-browser.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/controlcenter/panel.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/customizableui/panelUI.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/browser-lightweightTheme.css" type="text/css"?>

<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
<?xul-overlay href="chrome://browser/content/baseMenuOverlay.xul"?>
<?xul-overlay href="chrome://browser/content/places/placesOverlay.xul"?>

<!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 % charsetDTD SYSTEM "chrome://global/locale/charsetMenu.dtd" >
%charsetDTD;
<!ENTITY % textcontextDTD SYSTEM "chrome://global/locale/textcontext.dtd" >
%textcontextDTD;
<!ENTITY % customizeToolbarDTD SYSTEM "chrome://global/locale/customizeToolbar.dtd">
  %customizeToolbarDTD;
<!ENTITY % placesDTD SYSTEM "chrome://browser/locale/places/places.dtd">
%placesDTD;
<!ENTITY % safebrowsingDTD SYSTEM "chrome://browser/locale/safebrowsing/phishing-afterload-warning-message.dtd">
%safebrowsingDTD;
<!ENTITY % aboutHomeDTD SYSTEM "chrome://browser/locale/aboutHome.dtd">
%aboutHomeDTD;
<!ENTITY % syncBrandDTD SYSTEM "chrome://browser/locale/syncBrand.dtd">
%syncBrandDTD;
]>


<window id="main-window"
        xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
        xmlns:svg="http://www.w3.org/2000/svg"
        xmlns:html="http://www.w3.org/1999/xhtml"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        onload="gBrowserInit.onLoad()" onunload="gBrowserInit.onUnload()" onclose="return WindowIsClosing();"
        title="&mainWindow.title;"
        title_normal="&mainWindow.title;"
        title_privatebrowsing="&mainWindow.titlemodifier; &mainWindow.titlePrivateBrowsingSuffix;"
        titlemodifier="&mainWindow.titlemodifier;"
        titlemodifier_normal="&mainWindow.titlemodifier;"
        titlemodifier_privatebrowsing="&mainWindow.titlemodifier; &mainWindow.titlePrivateBrowsingSuffix;"
        titlemenuseparator="&mainWindow.titlemodifiermenuseparator;"
        lightweightthemes="true"
        lightweightthemesfooter="browser-bottombox"
        windowtype="navigator:browser"
        macanimationtype="document"
        screenX="4" screenY="4"
        fullscreenbutton="true"
        sizemode="normal"
        retargetdocumentfocus="urlbar"
        persist="screenX screenY width height sizemode">


<script type="application/javascript" src="chrome://global/content/printUtils.js"/>
<script type="application/javascript" src="chrome://global/content/viewZoomOverlay.js"/>
<script type="application/javascript" src="chrome://browser/content/places/browserPlacesViews.js"/>
<script type="application/javascript" src="chrome://browser/content/browser.js"/>
<script type="application/javascript" src="chrome://browser/content/customizableui/panelUI.js"/>
<script type="application/javascript" src="chrome://global/content/viewSourceUtils.js"/>

<script type="application/javascript" src="chrome://browser/content/browser-addons.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-captivePortal.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-ctrlTab.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-customization.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-devedition.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-feeds.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-fullScreenAndPointerLock.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-fullZoom.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-gestureSupport.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-media.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-places.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-plugins.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-refreshblocker.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-safebrowsing.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-sidebar.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-social.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-syncui.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-tabsintitlebar.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-thumbnails.js"/>
<script type="application/javascript" src="chrome://browser/content/browser-trackingprotection.js"/>

<script type="application/javascript" src="chrome://browser/content/browser-data-submission-info-bar.js"/>

<script type="application/javascript" src="chrome://browser/content/browser-fxaccounts.js"/>
<script type="application/javascript" src="chrome://browser/content/nsContextMenu.js"/>

<script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>

<script type="application/javascript" src="chrome://browser/content/downloads/downloads.js"/>
<script type="application/javascript" src="chrome://browser/content/downloads/indicator.js"/>
<script type="application/javascript" src="chrome://browser/content/places/editBookmarkOverlay.js"/>



  <stringbundleset id="stringbundleset">
    <stringbundle id="bundle_brand" src="chrome://branding/locale/brand.properties"/>
    <stringbundle id="bundle_shell" src="chrome://browser/locale/shellservice.properties"/>
    <stringbundle id="bundle_preferences" src="chrome://browser/locale/preferences/preferences.properties"/>
  </stringbundleset>

  <commandset id="mainCommandSet">
    <command id="cmd_newNavigator" oncommand="OpenBrowserWindow()" reserved="true"/>
    <command id="cmd_handleBackspace" oncommand="BrowserHandleBackspace();" />
    <command id="cmd_handleShiftBackspace" oncommand="BrowserHandleShiftBackspace();" />

    <command id="cmd_newNavigatorTab" oncommand="BrowserOpenTab(event);" reserved="true"/>
    <command id="cmd_newNavigatorTabNoEvent" oncommand="BrowserOpenTab();" reserved="true"/>
    <command id="Browser:OpenFile"  oncommand="BrowserOpenFileWindow();"/>
    <command id="Browser:SavePage" oncommand="saveBrowser(gBrowser.selectedBrowser);"/>

    <command id="Browser:SendLink"
             oncommand="MailIntegration.sendLinkForBrowser(gBrowser.selectedBrowser);"/>

    <command id="cmd_pageSetup" oncommand="PrintUtils.showPageSetup();"/>
    <command id="cmd_print" oncommand="PrintUtils.printWindow(window.gBrowser.selectedBrowser.outerWindowID, window.gBrowser.selectedBrowser);"/>
    <command id="cmd_printPreview" oncommand="PrintUtils.printPreview(PrintPreviewListener);"/>
    <command id="cmd_close" oncommand="BrowserCloseTabOrWindow()" reserved="true"/>
    <command id="cmd_closeWindow" oncommand="BrowserTryToCloseWindow()" reserved="true"/>
    <command id="cmd_toggleMute" oncommand="gBrowser.selectedTab.toggleMuteAudio()"/>
    <command id="cmd_CustomizeToolbars" oncommand="BrowserCustomizeToolbar()"/>
    <command id="cmd_quitApplication" oncommand="goQuitApplication()" reserved="true"/>


    <commandset id="editMenuCommands"/>

    <command id="View:PageSource" oncommand="BrowserViewSource(window.gBrowser.selectedBrowser);" observes="canViewSource"/>
    <command id="View:PageInfo" oncommand="BrowserPageInfo();"/>
    <command id="View:FullScreen" oncommand="BrowserFullScreen();"/>
    <command id="View:ReaderView" oncommand="ReaderParent.toggleReaderMode(event);"/>
    <command id="cmd_find"
             oncommand="gFindBar.onFindCommand();"
             observes="isImage"/>
    <command id="cmd_findAgain"
             oncommand="gFindBar.onFindAgainCommand(false);"
             observes="isImage"/>
    <command id="cmd_findPrevious"
             oncommand="gFindBar.onFindAgainCommand(true);"
             observes="isImage"/>
    <!-- work-around bug 392512 -->
    <command id="Browser:AddBookmarkAs"
             oncommand="PlacesCommandHook.bookmarkCurrentPage(true, PlacesUtils.bookmarksMenuFolderId);"/>
    <!-- The command disabled state must be manually updated through
         PlacesCommandHook.updateBookmarkAllTabsCommand() -->
    <command id="Browser:BookmarkAllTabs"
             oncommand="PlacesCommandHook.bookmarkCurrentPages();"/>
    <command id="Browser:Home"    oncommand="BrowserHome();"/>
    <command id="Browser:Back"    oncommand="BrowserBack();" disabled="true"/>
    <command id="Browser:BackOrBackDuplicate" oncommand="BrowserBack(event);" disabled="true">
      <observes element="Browser:Back" attribute="disabled"/>
    </command>
    <command id="Browser:Forward" oncommand="BrowserForward();" disabled="true"/>
    <command id="Browser:ForwardOrForwardDuplicate" oncommand="BrowserForward(event);" disabled="true">
      <observes element="Browser:Forward" attribute="disabled"/>
    </command>
    <command id="Browser:Stop"    oncommand="BrowserStop();" disabled="true"/>
    <command id="Browser:Reload"  oncommand="if (event.shiftKey) BrowserReloadSkipCache(); else BrowserReload()" disabled="true"/>
    <command id="Browser:ReloadOrDuplicate" oncommand="BrowserReloadOrDuplicate(event)" disabled="true">
      <observes element="Browser:Reload" attribute="disabled"/>
    </command>
    <command id="Browser:ReloadSkipCache" oncommand="BrowserReloadSkipCache()" disabled="true">
      <observes element="Browser:Reload" attribute="disabled"/>
    </command>
    <command id="Browser:NextTab" oncommand="gBrowser.tabContainer.advanceSelectedTab(1, true);" reserved="true"/>
    <command id="Browser:PrevTab" oncommand="gBrowser.tabContainer.advanceSelectedTab(-1, true);" reserved="true"/>
    <command id="Browser:ShowAllTabs" oncommand="allTabs.open();"/>
    <command id="cmd_fullZoomReduce"  oncommand="FullZoom.reduce()"/>
    <command id="cmd_fullZoomEnlarge" oncommand="FullZoom.enlarge()"/>
    <command id="cmd_fullZoomReset"   oncommand="FullZoom.reset()"/>
    <command id="cmd_fullZoomToggle"  oncommand="ZoomManager.toggleZoom();"/>
    <command id="cmd_gestureRotateLeft" oncommand="gGestureSupport.rotate(event.sourceEvent)"/>
    <command id="cmd_gestureRotateRight" oncommand="gGestureSupport.rotate(event.sourceEvent)"/>
    <command id="cmd_gestureRotateEnd" oncommand="gGestureSupport.rotateEnd()"/>
    <command id="Browser:OpenLocation" oncommand="openLocation();"/>
    <command id="Browser:RestoreLastSession" oncommand="restoreLastSession();" disabled="true"/>
    <command id="Browser:NewUserContextTab" oncommand="openNewUserContextTab(event.sourceEvent);" reserved="true"/>
    <command id="Browser:OpenAboutContainers" oncommand="openPreferences('paneContainers');"/>

    <command id="Tools:Search" oncommand="BrowserSearch.webSearch();"/>
    <command id="Tools:Downloads" oncommand="BrowserDownloadsUI();"/>
    <command id="Tools:Addons" oncommand="BrowserOpenAddonsMgr();"/>
    <command id="Tools:Sanitize"
     oncommand="Cc['@mozilla.org/browser/browserglue;1'].getService(Ci.nsIBrowserGlue).sanitize(window);"/>
    <command id="Tools:PrivateBrowsing"
      oncommand="OpenBrowserWindow({private: true});" reserved="true"/>
    <command id="History:UndoCloseTab" oncommand="undoCloseTab();"/>
    <command id="History:UndoCloseWindow" oncommand="undoCloseWindow();"/>
    <command id="Social:SharePage" oncommand="SocialShare.sharePage();"/>
    <command id="Social:Addons" oncommand="BrowserOpenAddonsMgr('addons://list/service');"/>
  </commandset>

  <commandset id="placesCommands">
    <command id="Browser:ShowAllBookmarks"
             oncommand="PlacesCommandHook.showPlacesOrganizer('UnfiledBookmarks');"/>
    <command id="Browser:ShowAllHistory"
             oncommand="PlacesCommandHook.showPlacesOrganizer('History');"/>
  </commandset>

  <broadcasterset id="mainBroadcasterSet">
    <broadcaster id="Social:PageShareable" disabled="true"/>
    <broadcaster id="viewBookmarksSidebar" autoCheck="false" label="&bookmarksButton.label;"
                 type="checkbox" group="sidebar" sidebarurl="chrome://browser/content/bookmarks/bookmarksPanel.xul"
                 oncommand="SidebarUI.toggle('viewBookmarksSidebar');"/>

    <!-- for both places and non-places, the sidebar lives at
         chrome://browser/content/history/history-panel.xul so there are no
         problems when switching between versions -->
    <broadcaster id="viewHistorySidebar" autoCheck="false" sidebartitle="&historyButton.label;"
                 type="checkbox" group="sidebar"
                 sidebarurl="chrome://browser/content/history/history-panel.xul"
                 oncommand="SidebarUI.toggle('viewHistorySidebar');"/>

    <broadcaster id="viewWebPanelsSidebar" autoCheck="false"
                 type="checkbox" group="sidebar" sidebarurl="chrome://browser/content/web-panels.xul"
                 oncommand="SidebarUI.toggle('viewWebPanelsSidebar');"/>

    <broadcaster id="bookmarkThisPageBroadcaster"
                 label="&bookmarkThisPageCmd.label;"
                 bookmarklabel="&bookmarkThisPageCmd.label;"
                 editlabel="&editThisBookmarkCmd.label;"/>

    <!-- popup blocking menu items -->
    <broadcaster id="blockedPopupAllowSite"
                 accesskey="&allowPopups.accesskey;"
                 oncommand="gPopupBlockerObserver.toggleAllowPopupsForSite(event);"/>
    <broadcaster id="blockedPopupEditSettings"
                 label="&editPopupSettingsUnix.label;"
                 accesskey="&editPopupSettings.accesskey;"
                 oncommand="gPopupBlockerObserver.editPopupSettings();"/>
    <broadcaster id="blockedPopupDontShowMessage"
                 accesskey="&dontShowMessage.accesskey;"
                 type="checkbox"
                 oncommand="gPopupBlockerObserver.dontShowMessage();"/>
    <broadcaster id="blockedPopupsSeparator"/>
    <broadcaster id="isImage"/>
    <broadcaster id="canViewSource"/>
    <broadcaster id="isFrameImage"/>
    <broadcaster id="singleFeedMenuitemState" disabled="true"/>
    <broadcaster id="multipleFeedsMenuState" hidden="true"/>

    <!-- Sync broadcasters -->
    <!-- A broadcaster of a number of attributes suitable for "sync now" UI -
        A 'syncstatus' attribute is set while actively syncing, and the label
        attribute which changes from "sync now" to "syncing" etc. -->
    <broadcaster id="sync-status"/>
    <!-- broadcasters of the "hidden" attribute to reflect setup state for
         menus -->
    <broadcaster id="sync-setup-state"/>
    <broadcaster id="sync-syncnow-state" hidden="true"/>
    <broadcaster id="sync-reauth-state" hidden="true"/>
    <broadcaster id="viewTabsSidebar" autoCheck="false" sidebartitle="&syncedTabs.sidebar.label;"
                 type="checkbox" group="sidebar"
                 sidebarurl="chrome://browser/content/syncedtabs/sidebar.xhtml"
                 oncommand="SidebarUI.toggle('viewTabsSidebar');"/>
    <broadcaster id="workOfflineMenuitemState"/>

    <broadcaster id="devtoolsMenuBroadcaster_PageSource"
                 label="&pageSourceCmd.label;"
                 key="key_viewSource"
                 command="View:PageSource">
      <observes element="canViewSource" attribute="disabled"/>
    </broadcaster>
  </broadcasterset>

  <keyset id="mainKeyset">
    <key id="key_newNavigator"
         key="&newNavigatorCmd.key;"
         command="cmd_newNavigator"
         modifiers="accel"/>
    <key id="key_newNavigatorTab" key="&tabCmd.commandkey;" modifiers="accel" command="cmd_newNavigatorTabNoEvent"/>
    <key id="focusURLBar" key="&openCmd.commandkey;" command="Browser:OpenLocation"
         modifiers="accel"/>
    <key id="focusURLBar2" key="&urlbar.accesskey;" command="Browser:OpenLocation"
         modifiers="alt"/>

    <key id="key_search" key="&searchFocus.commandkey;" command="Tools:Search" modifiers="accel"/>
    <key id="key_search2" key="&searchFocusUnix.commandkey;" command="Tools:Search" modifiers="accel"/>
    <key id="key_openDownloads" key="&downloadsUnix.commandkey;" command="Tools:Downloads" modifiers="accel,shift"/>
    <key id="key_openAddons" key="&addons.commandkey;" command="Tools:Addons" modifiers="accel,shift"/>
    <key id="openFileKb" key="&openFileCmd.commandkey;" command="Browser:OpenFile"  modifiers="accel"/>
    <key id="key_savePage" key="&savePageCmd.commandkey;" command="Browser:SavePage" modifiers="accel"/>
    <key id="printKb" key="&printCmd.commandkey;" command="cmd_print"  modifiers="accel"/>
    <key id="key_close" key="&closeCmd.key;" command="cmd_close" modifiers="accel"/>
    <key id="key_closeWindow" key="&closeCmd.key;" command="cmd_closeWindow" modifiers="accel,shift"/>
    <key id="key_toggleMute" key="&toggleMuteCmd.key;" command="cmd_toggleMute" modifiers="control"/>
    <key id="key_undo"
         key="&undoCmd.key;"
         modifiers="accel"/>
    <key id="key_redo" key="&undoCmd.key;" modifiers="accel,shift"/>
    <key id="key_cut"
         key="&cutCmd.key;"
         modifiers="accel"/>
    <key id="key_copy"
         key="&copyCmd.key;"
         modifiers="accel"/>
    <key id="key_paste"
         key="&pasteCmd.key;"
         modifiers="accel"/>
    <key id="key_delete" keycode="VK_DELETE" command="cmd_delete"/>
    <key id="key_selectAll" key="&selectAllCmd.key;" modifiers="accel"/>

    <key keycode="VK_BACK" command="cmd_handleBackspace"/>
    <key keycode="VK_BACK" command="cmd_handleShiftBackspace" modifiers="shift"/>
    <key id="goBackKb"  keycode="VK_LEFT" command="Browser:Back" modifiers="alt"/>
    <key id="goForwardKb"  keycode="VK_RIGHT" command="Browser:Forward" modifiers="alt"/>
    <key id="goBackKb2" key="&goBackCmd.commandKey;" command="Browser:Back" modifiers="accel"/>
    <key id="goForwardKb2" key="&goForwardCmd.commandKey;" command="Browser:Forward" modifiers="accel"/>
    <key id="goHome" keycode="VK_HOME" command="Browser:Home" modifiers="alt"/>
    <key keycode="VK_F5" command="Browser:Reload"/>
    <key id="showAllHistoryKb" key="&showAllHistoryCmd.commandkey;" command="Browser:ShowAllHistory" modifiers="accel,shift"/>
    <key keycode="VK_F5" command="Browser:ReloadSkipCache" modifiers="accel"/>
    <key id="key_fullScreen" keycode="VK_F11" command="View:FullScreen"/>
    <key id="toggleReaderMode" key="&toggleReaderMode.key;" command="View:ReaderView" modifiers="accel,alt" disabled="true"/>
    <key key="&reloadCmd.commandkey;" command="Browser:Reload" modifiers="accel" id="key_reload"/>
    <key key="&reloadCmd.commandkey;" command="Browser:ReloadSkipCache" modifiers="accel,shift"/>
    <key id="key_viewSource" key="&pageSourceCmd.commandkey;" command="View:PageSource" modifiers="accel"/>
    <key id="key_viewInfo"   key="&pageInfoCmd.commandkey;"   command="View:PageInfo"   modifiers="accel"/>
    <key id="key_find" key="&findOnCmd.commandkey;" command="cmd_find" modifiers="accel"/>
    <key id="key_findAgain" key="&findAgainCmd.commandkey;" command="cmd_findAgain" modifiers="accel"/>
    <key id="key_findPrevious" key="&findAgainCmd.commandkey;" command="cmd_findPrevious" modifiers="accel,shift"/>
    <key keycode="&findAgainCmd.commandkey2;" command="cmd_findAgain"/>
    <key keycode="&findAgainCmd.commandkey2;"  command="cmd_findPrevious" modifiers="shift"/>

    <key id="addBookmarkAsKb" key="&bookmarkThisPageCmd.commandkey;" command="Browser:AddBookmarkAs" modifiers="accel"/>
    <key id="manBookmarkKb" key="&bookmarksGtkCmd.commandkey;" command="Browser:ShowAllBookmarks" modifiers="accel,shift"/>
    <key id="viewBookmarksSidebarKb" key="&bookmarksCmd.commandkey;" command="viewBookmarksSidebar" modifiers="accel"/>

    <key id="key_stop" keycode="VK_ESCAPE" command="Browser:Stop"/>


    <key id="key_gotoHistory"
         key="&historySidebarCmd.commandKey;"
         modifiers="accel"
         command="viewHistorySidebar"/>

    <key id="key_fullZoomReduce"  key="&fullZoomReduceCmd.commandkey;"   command="cmd_fullZoomReduce"  modifiers="accel"/>
    <key                          key="&fullZoomReduceCmd.commandkey2;"  command="cmd_fullZoomReduce"  modifiers="accel"/>
    <key id="key_fullZoomEnlarge" key="&fullZoomEnlargeCmd.commandkey;"  command="cmd_fullZoomEnlarge" modifiers="accel"/>
    <key                          key="&fullZoomEnlargeCmd.commandkey2;" command="cmd_fullZoomEnlarge" modifiers="accel"/>
    <key                          key="&fullZoomEnlargeCmd.commandkey3;" command="cmd_fullZoomEnlarge" modifiers="accel"/>
    <key id="key_fullZoomReset"   key="&fullZoomResetCmd.commandkey;"    command="cmd_fullZoomReset"   modifiers="accel"/>
    <key                          key="&fullZoomResetCmd.commandkey2;"   command="cmd_fullZoomReset"   modifiers="accel"/>

    <key id="key_showAllTabs" command="Browser:ShowAllTabs" keycode="VK_TAB" modifiers="control,shift"/>

    <key id="key_switchTextDirection" key="&bidiSwitchTextDirectionItem.commandkey;" command="cmd_switchTextDirection" modifiers="accel,shift" />

    <key id="key_privatebrowsing" command="Tools:PrivateBrowsing" key="&privateBrowsingCmd.commandkey;" modifiers="accel,shift"/>
    <key id="key_sanitize" command="Tools:Sanitize" keycode="VK_DELETE" modifiers="accel,shift"/>
    <key id="key_quitApplication" key="&quitApplicationCmdUnix.key;" command="cmd_quitApplication" modifiers="accel"/>

    <key id="key_undoCloseTab" command="History:UndoCloseTab" key="&tabCmd.commandkey;" modifiers="accel,shift"/>
    <key id="key_undoCloseWindow" command="History:UndoCloseWindow" key="&newNavigatorCmd.key;" modifiers="accel,shift"/>


   <key id="key_selectTab1" oncommand="gBrowser.selectTabAtIndex(0, event);" key="1" modifiers="alt"/>
   <key id="key_selectTab2" oncommand="gBrowser.selectTabAtIndex(1, event);" key="2" modifiers="alt"/>
   <key id="key_selectTab3" oncommand="gBrowser.selectTabAtIndex(2, event);" key="3" modifiers="alt"/>
   <key id="key_selectTab4" oncommand="gBrowser.selectTabAtIndex(3, event);" key="4" modifiers="alt"/>
   <key id="key_selectTab5" oncommand="gBrowser.selectTabAtIndex(4, event);" key="5" modifiers="alt"/>
   <key id="key_selectTab6" oncommand="gBrowser.selectTabAtIndex(5, event);" key="6" modifiers="alt"/>
   <key id="key_selectTab7" oncommand="gBrowser.selectTabAtIndex(6, event);" key="7" modifiers="alt"/>
   <key id="key_selectTab8" oncommand="gBrowser.selectTabAtIndex(7, event);" key="8" modifiers="alt"/>
   <key id="key_selectLastTab" oncommand="gBrowser.selectTabAtIndex(-1, event);" key="9" modifiers="alt"/>

  </keyset>

  <keyset id="baseMenuKeyset" />

  <popupset id="mainPopupSet">
    <menupopup id="tabContextMenu"
               onpopupshowing="if (event.target == this) TabContextMenu.updateContextMenu(this);"
               onpopuphidden="if (event.target == this) TabContextMenu.contextTab = null;">
      <menuitem id="context_reloadTab" label="&reloadTab.label;" accesskey="&reloadTab.accesskey;"
                oncommand="gBrowser.reloadTab(TabContextMenu.contextTab);"/>
      <menuitem id="context_toggleMuteTab" oncommand="TabContextMenu.contextTab.toggleMuteAudio();"/>
      <menuseparator/>
      <menuitem id="context_pinTab" label="&pinTab.label;"
                accesskey="&pinTab.accesskey;"
                oncommand="gBrowser.pinTab(TabContextMenu.contextTab);"/>
      <menuitem id="context_unpinTab" label="&unpinTab.label;" hidden="true"
                accesskey="&unpinTab.accesskey;"
                oncommand="gBrowser.unpinTab(TabContextMenu.contextTab);"/>
      <menuitem id="context_openTabInWindow" label="&moveToNewWindow.label;"
                accesskey="&moveToNewWindow.accesskey;"
                tbattr="tabbrowser-multiple"
                oncommand="gBrowser.replaceTabWithWindow(TabContextMenu.contextTab);"/>
      <menuseparator id="context_sendTabToDevice_separator" hidden="true"/>
      <menu id="context_sendTabToDevice" label="&sendTabToDevice.label;"
            accesskey="&sendTabToDevice.accesskey;" hidden="true">
        <menupopup id="context_sendTabToDevicePopupMenu"
                   onpopupshowing="gFxAccounts.populateSendTabToDevicesMenu(event.target, TabContextMenu.contextTab.linkedBrowser.currentURI.spec, TabContextMenu.contextTab.linkedBrowser.contentTitle);"/>
      </menu>
      <menuseparator/>
      <menuitem id="context_reloadAllTabs" label="&reloadAllTabs.label;" accesskey="&reloadAllTabs.accesskey;"
                tbattr="tabbrowser-multiple-visible"
                oncommand="gBrowser.reloadAllTabs();"/>
      <menuitem id="context_bookmarkAllTabs"
                label="&bookmarkAllTabs.label;"
                accesskey="&bookmarkAllTabs.accesskey;"
                command="Browser:BookmarkAllTabs"/>
      <menuitem id="context_closeTabsToTheEnd" label="&closeTabsToTheEnd.label;" accesskey="&closeTabsToTheEnd.accesskey;"
                oncommand="gBrowser.removeTabsToTheEndFrom(TabContextMenu.contextTab, {animate: true});"/>
      <menuitem id="context_closeOtherTabs" label="&closeOtherTabs.label;" accesskey="&closeOtherTabs.accesskey;"
                oncommand="gBrowser.removeAllTabsBut(TabContextMenu.contextTab);"/>
      <menuseparator/>
      <menuitem id="context_undoCloseTab"
                label="&undoCloseTab.label;"
                accesskey="&undoCloseTab.accesskey;"
                observes="History:UndoCloseTab"/>
      <menuitem id="context_closeTab" label="&closeTab.label;" accesskey="&closeTab.accesskey;"
                oncommand="gBrowser.removeTab(TabContextMenu.contextTab, { animate: true });"/>
    </menupopup>

    <!-- bug 415444/582485: event.stopPropagation is here for the cloned version
         of this menupopup -->
    <menupopup id="backForwardMenu"
               onpopupshowing="return FillHistoryMenu(event.target);"
               oncommand="gotoHistoryIndex(event); event.stopPropagation();"
               onclick="checkForMiddleClick(this, event);"/>
    <tooltip id="aHTMLTooltip" page="true"/>
    <tooltip id="remoteBrowserTooltip"/>

    <!-- for search and content formfill/pw manager -->

    <panel type="autocomplete-richlistbox"
           id="PopupAutoComplete"
           noautofocus="true"
           hidden="true"
           overflowpadding="4"
           norolluponanchor="true" />

    <!-- for search with one-off buttons -->
    <panel type="autocomplete" id="PopupSearchAutoComplete" noautofocus="true" hidden="true"/>

    <!-- for url bar autocomplete -->
    <panel type="autocomplete-richlistbox"
           id="PopupAutoCompleteRichResult"
           noautofocus="true"
           hidden="true"
           flip="none"
           level="parent"
           overflowpadding="30" />

    <panel id="DateTimePickerPanel"
           type="arrow"
           hidden="true"
           orient="vertical"
           noautofocus="true"
           consumeoutsideclicks="false"
           level="parent">
      <iframe id="dateTimePopupFrame"/>
    </panel>

    <!-- for select dropdowns. The menupopup is what shows the list of options,
         and the popuponly menulist makes things like the menuactive attributes
         work correctly on the menupopup. ContentSelectDropdown expects the
         popuponly menulist to be its immediate parent. -->
    <menulist popuponly="true" id="ContentSelectDropdown" hidden="true">
      <menupopup rolluponmousewheel="true"
                 activateontab="true" position="after_start"
        />
    </menulist>

    <!-- for invalid form error message -->
    <panel id="invalid-form-popup" type="arrow" orient="vertical" noautofocus="true" hidden="true" level="parent">
      <description/>
    </panel>

    <panel id="editBookmarkPanel"
           type="arrow"
           orient="vertical"
           ignorekeys="true"
           hidden="true"
           tabspecific="true"
           onpopupshown="StarUI.panelShown(event);"
           aria-labelledby="editBookmarkPanelTitle">
      <row id="editBookmarkPanelHeader" align="center" hidden="true">
        <vbox align="center">
          <image id="editBookmarkPanelStarIcon"/>
        </vbox>
        <vbox>
          <label id="editBookmarkPanelTitle"/>
          <description id="editBookmarkPanelDescription"/>
        </vbox>
      </row>
      <vbox id="editBookmarkPanelContent" flex="1" hidden="true"/>
      <hbox id="editBookmarkPanelBottomButtons" pack="end">
        <button id="editBookmarkPanelRemoveButton"
                class="editBookmarkPanelBottomButton"
                oncommand="StarUI.removeBookmarkButtonCommand();"
                accesskey="&editBookmark.removeBookmark.accessKey;"/>
        <button id="editBookmarkPanelDoneButton"
                class="editBookmarkPanelBottomButton"
                label="&editBookmark.done.label;"
                default="true"
                oncommand="StarUI.panel.hidePopup();"/>
      </hbox>
    </panel>

    <!-- UI tour experience -->
    <panel id="UITourTooltip"
           type="arrow"
           hidden="true"
           noautofocus="true"
           noautohide="true"
           align="start"
           orient="vertical"
           role="alert">
     <vbox>
      <hbox id="UITourTooltipBody">
        <image id="UITourTooltipIcon"/>
        <vbox flex="1">
          <hbox id="UITourTooltipTitleContainer">
            <label id="UITourTooltipTitle" flex="1"/>
            <toolbarbutton id="UITourTooltipClose" class="close-icon"
                           tooltiptext="&uiTour.infoPanel.close;"/>
          </hbox>
          <description id="UITourTooltipDescription" flex="1"/>
        </vbox>
      </hbox>
      <hbox id="UITourTooltipButtons" flex="1" align="center"/>
     </vbox>
    </panel>
    <!-- type="default" forces frames to be created so that the panel's size can be determined -->
    <panel id="UITourHighlightContainer"
           type="default"
           hidden="true"
           noautofocus="true"
           noautohide="true"
           flip="none"
           consumeoutsideclicks="false"
           mousethrough="always">
      <box id="UITourHighlight"></box>
    </panel>

    <panel id="social-share-panel"
           class="social-panel"
           type="arrow"
           orient="vertical"
           onpopupshowing="SocialShare.onShowing()"
           onpopuphidden="SocialShare.onHidden()"
           hidden="true">
      <hbox class="social-share-toolbar">
        <toolbarbutton id="manage-share-providers" class="share-provider-button"
                       tooltiptext="&social.addons.label;"
                       oncommand="BrowserOpenAddonsMgr('addons://list/service');
                                  this.parentNode.parentNode.hidePopup();"/>
        <arrowscrollbox id="social-share-provider-buttons" orient="horizontal" flex="1" pack="end">
          <toolbarbutton id="add-share-provider" class="share-provider-button" type="radio"
                         group="share-providers" tooltiptext="&findShareServices.label;"
                         oncommand="SocialShare.showDirectory()"/>
        </arrowscrollbox>
      </hbox>
      <hbox id="share-container" flex="1"/>
    </panel>

    <menupopup id="toolbar-context-menu"
               onpopupshowing="onViewToolbarsPopupShowing(event, document.getElementById('viewToolbarsMenuSeparator'));">
      <menuitem oncommand="gCustomizeMode.addToPanel(document.popupNode)"
                accesskey="&customizeMenu.moveToPanel.accesskey;"
                label="&customizeMenu.moveToPanel.label;"
                contexttype="toolbaritem"
                class="customize-context-moveToPanel"/>
      <menuitem oncommand="gCustomizeMode.removeFromArea(document.popupNode)"
                accesskey="&customizeMenu.removeFromToolbar.accesskey;"
                label="&customizeMenu.removeFromToolbar.label;"
                contexttype="toolbaritem"
                class="customize-context-removeFromToolbar"/>
      <menuitem id="toolbar-context-reloadAllTabs"
                class="toolbaritem-tabsmenu"
                contexttype="tabbar"
                oncommand="gBrowser.reloadAllTabs();"
                label="&toolbarContextMenu.reloadAllTabs.label;"
                accesskey="&toolbarContextMenu.reloadAllTabs.accesskey;"/>
      <menuitem id="toolbar-context-bookmarkAllTabs"
                class="toolbaritem-tabsmenu"
                contexttype="tabbar"
                command="Browser:BookmarkAllTabs"
                label="&toolbarContextMenu.bookmarkAllTabs.label;"
                accesskey="&toolbarContextMenu.bookmarkAllTabs.accesskey;"/>
      <menuitem id="toolbar-context-undoCloseTab"
                class="toolbaritem-tabsmenu"
                contexttype="tabbar"
                label="&toolbarContextMenu.undoCloseTab.label;"
                accesskey="&toolbarContextMenu.undoCloseTab.accesskey;"
                observes="History:UndoCloseTab"/>
      <menuseparator/>
      <menuseparator id="viewToolbarsMenuSeparator"/>
      <!-- XXXgijs: we're using oncommand handler here to avoid the event being
                    redirected to the command element, thus preventing
                    listeners on the menupopup or further up the tree from
                    seeing the command event pass by. The observes attribute is
                    here so that the menuitem is still disabled and re-enabled
                    correctly. -->
      <menuitem oncommand="BrowserCustomizeToolbar()"
                observes="cmd_CustomizeToolbars"
                class="viewCustomizeToolbar"
                label="&viewCustomizeToolbar.label;"
                accesskey="&viewCustomizeToolbar.accesskey;"/>
    </menupopup>

    <menupopup id="blockedPopupOptions"
               onpopupshowing="gPopupBlockerObserver.fillPopupList(event);"
               onpopuphiding="gPopupBlockerObserver.onPopupHiding(event);">
      <menuitem observes="blockedPopupAllowSite"/>
      <menuitem observes="blockedPopupEditSettings"/>
      <menuitem observes="blockedPopupDontShowMessage"/>
      <menuseparator observes="blockedPopupsSeparator"/>
    </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>

    <menupopup id="contentAreaContextMenu" pagemenu="#page-menu-separator"
               onpopupshowing="if (event.target != this)
                                 return true;
                               gContextMenu = new nsContextMenu(this, event.shiftKey);
                               if (gContextMenu.shouldDisplay)
                                 updateEditUIVisibility();
                               return gContextMenu.shouldDisplay;"
               onpopuphiding="if (event.target != this)
                                return;
                              gContextMenu.hiding();
                              gContextMenu = null;
                              updateEditUIVisibility();">


      <menugroup id="context-navigation">
        <menuitem id="context-back"
                  class="menuitem-iconic"
                  tooltiptext="&backButton.tooltip;"
                  aria-label="&backCmd.label;"
                  command="Browser:BackOrBackDuplicate"
                  onclick="checkForMiddleClick(this, event);"/>
        <menuitem id="context-forward"
                  class="menuitem-iconic"
                  tooltiptext="&forwardButton.tooltip;"
                  aria-label="&forwardCmd.label;"
                  command="Browser:ForwardOrForwardDuplicate"
                  onclick="checkForMiddleClick(this, event);"/>
        <menuitem id="context-reload"
                  class="menuitem-iconic"
                  tooltiptext="&reloadButton.tooltip;"
                  aria-label="&reloadCmd.label;"
                  oncommand="gContextMenu.reload(event);"
                  onclick="checkForMiddleClick(this, event);"/>
        <menuitem id="context-stop"
                  class="menuitem-iconic"
                  tooltiptext="&stopButton.tooltip;"
                  aria-label="&stopCmd.label;"
                  command="Browser:Stop"/>
        <menuitem id="context-bookmarkpage"
                  class="menuitem-iconic"
                  observes="bookmarkThisPageBroadcaster"
                  aria-label="&bookmarkPageCmd2.label;"
                  oncommand="gContextMenu.bookmarkThisPage();"/>
      </menugroup>
      <menuseparator id="context-sep-navigation"/>
      <menuseparator id="page-menu-separator"/>
      <menuitem id="spell-no-suggestions"
                disabled="true"
                label="&spellNoSuggestions.label;"/>
      <menuitem id="spell-add-to-dictionary"
                label="&spellAddToDictionary.label;"
                accesskey="&spellAddToDictionary.accesskey;"
                oncommand="InlineSpellCheckerUI.addToDictionary();"/>
      <menuitem id="spell-undo-add-to-dictionary"
                label="&spellUndoAddToDictionary.label;"
                accesskey="&spellUndoAddToDictionary.accesskey;"
                oncommand="InlineSpellCheckerUI.undoAddToDictionary();" />
      <menuseparator id="spell-suggestions-separator"/>
      <menuitem id="context-openlinkincurrent"
                label="&openLinkCmdInCurrent.label;"
                accesskey="&openLinkCmdInCurrent.accesskey;"
                oncommand="gContextMenu.openLinkInCurrent();"/>
      <menuitem id="context-openlinkincontainertab"
                accesskey="&openLinkCmdInTab.accesskey;"
                oncommand="gContextMenu.openLinkInTab(event);"/>
      <menuitem id="context-openlinkintab"
                label="&openLinkCmdInTab.label;"
                accesskey="&openLinkCmdInTab.accesskey;"
                data-usercontextid="0"
                oncommand="gContextMenu.openLinkInTab(event);"/>

      <menu id="context-openlinkinusercontext-menu"
            label="&openLinkCmdInContainerTab.label;"
            accesskey="&openLinkCmdInContainerTab.accesskey;"
            hidden="true">
        <menupopup oncommand="gContextMenu.openLinkInTab(event);"
                   onpopupshowing="return gContextMenu.createContainerMenu(event);" />
      </menu>

      <menuitem id="context-openlink"
                label="&openLinkCmd.label;"
                accesskey="&openLinkCmd.accesskey;"
                oncommand="gContextMenu.openLink();"/>
      <menuitem id="context-openlinkprivate"
                label="&openLinkInPrivateWindowCmd.label;"
                accesskey="&openLinkInPrivateWindowCmd.accesskey;"
                oncommand="gContextMenu.openLinkInPrivateWindow();"/>
      <menuseparator id="context-sep-open"/>
      <menuitem id="context-bookmarklink"
                label="&bookmarkThisLinkCmd.label;"
                accesskey="&bookmarkThisLinkCmd.accesskey;"
                oncommand="gContextMenu.bookmarkLink();"/>
      <menuitem id="context-sharelink"
                label="&shareLink.label;"
                accesskey="&shareLink.accesskey;"
                oncommand="gContextMenu.shareLink();"/>
      <menuitem id="context-savelink"
                label="&saveLinkCmd.label;"
                accesskey="&saveLinkCmd.accesskey;"
                oncommand="gContextMenu.saveLink();"/>
      <menuitem id="context-copyemail"
                label="&copyEmailCmd.label;"
                accesskey="&copyEmailCmd.accesskey;"
                oncommand="gContextMenu.copyEmail();"/>
      <menuitem id="context-copylink"
                label="&copyLinkCmd.label;"
                accesskey="&copyLinkCmd.accesskey;"
                oncommand="gContextMenu.copyLink();"/>
      <menuseparator id="context-sep-copylink"/>
      <menuitem id="context-media-play"
                label="&mediaPlay.label;"
                accesskey="&mediaPlay.accesskey;"
                oncommand="gContextMenu.mediaCommand('play');"/>
      <menuitem id="context-media-pause"
                label="&mediaPause.label;"
                accesskey="&mediaPause.accesskey;"
                oncommand="gContextMenu.mediaCommand('pause');"/>
      <menuitem id="context-media-mute"
                label="&mediaMute.label;"
                accesskey="&mediaMute.accesskey;"
                oncommand="gContextMenu.mediaCommand('mute');"/>
      <menuitem id="context-media-unmute"
                label="&mediaUnmute.label;"
                accesskey="&mediaUnmute.accesskey;"
                oncommand="gContextMenu.mediaCommand('unmute');"/>
      <menu id="context-media-playbackrate" label="&mediaPlaybackRate2.label;" accesskey="&mediaPlaybackRate2.accesskey;">
        <menupopup>
          <menuitem id="context-media-playbackrate-050x"
                    label="&mediaPlaybackRate050x2.label;"
                    accesskey="&mediaPlaybackRate050x2.accesskey;"
                    type="radio"
                    name="playbackrate"
                    oncommand="gContextMenu.mediaCommand('playbackRate', 0.5);"/>
          <menuitem id="context-media-playbackrate-100x"
                    label="&mediaPlaybackRate100x2.label;"
                    accesskey="&mediaPlaybackRate100x2.accesskey;"
                    type="radio"
                    name="playbackrate"
                    checked="true"
                    oncommand="gContextMenu.mediaCommand('playbackRate', 1.0);"/>
          <menuitem id="context-media-playbackrate-125x"
                    label="&mediaPlaybackRate125x2.label;"
                    accesskey="&mediaPlaybackRate125x2.accesskey;"
                    type="radio"
                    name="playbackrate"
                    oncommand="gContextMenu.mediaCommand('playbackRate', 1.25);"/>
          <menuitem id="context-media-playbackrate-150x"
                    label="&mediaPlaybackRate150x2.label;"
                    accesskey="&mediaPlaybackRate150x2.accesskey;"
                    type="radio"
                    name="playbackrate"
                    oncommand="gContextMenu.mediaCommand('playbackRate', 1.5);"/>
          <menuitem id="context-media-playbackrate-200x"
                    label="&mediaPlaybackRate200x2.label;"
                    accesskey="&mediaPlaybackRate200x2.accesskey;"
                    type="radio"
                    name="playbackrate"
                    oncommand="gContextMenu.mediaCommand('playbackRate', 2.0);"/>
        </menupopup>
      </menu>
      <menuitem id="context-media-loop"
                label="&mediaLoop.label;"
                accesskey="&mediaLoop.accesskey;"
                type="checkbox"
                oncommand="gContextMenu.mediaCommand('loop');"/>
      <menuitem id="context-media-showcontrols"
                label="&mediaShowControls.label;"
                accesskey="&mediaShowControls.accesskey;"
                oncommand="gContextMenu.mediaCommand('showcontrols');"/>
      <menuitem id="context-media-hidecontrols"
                label="&mediaHideControls.label;"
                accesskey="&mediaHideControls.accesskey;"
                oncommand="gContextMenu.mediaCommand('hidecontrols');"/>
      <menuitem id="context-video-fullscreen"
                accesskey="&videoFullScreen.accesskey;"
                label="&videoFullScreen.label;"
                oncommand="gContextMenu.mediaCommand('fullscreen');"/>
      <menuitem id="context-leave-dom-fullscreen"
                accesskey="&leaveDOMFullScreen.accesskey;"
                label="&leaveDOMFullScreen.label;"
                oncommand="gContextMenu.leaveDOMFullScreen();"/>
      <menuseparator id="context-media-sep-commands"/>
      <menuitem id="context-reloadimage"
                label="&reloadImageCmd.label;"
                accesskey="&reloadImageCmd.accesskey;"
                oncommand="gContextMenu.reloadImage();"/>
      <menuitem id="context-viewimage"
                label="&viewImageCmd.label;"
                accesskey="&viewImageCmd.accesskey;"
                oncommand="gContextMenu.viewMedia(event);"
                onclick="checkForMiddleClick(this, event);"/>
      <menuitem id="context-viewvideo"
                label="&viewVideoCmd.label;"
                accesskey="&viewVideoCmd.accesskey;"
                oncommand="gContextMenu.viewMedia(event);"
                onclick="checkForMiddleClick(this, event);"/>
      <menuitem id="context-copyimage-contents"
                label="&copyImageContentsCmd.label;"
                accesskey="&copyImageContentsCmd.accesskey;"
                oncommand="goDoCommand('cmd_copyImage');"/>
      <menuitem id="context-copyimage"
                label="&copyImageCmd.label;"
                accesskey="&copyImageCmd.accesskey;"
                oncommand="gContextMenu.copyMediaLocation();"/>
      <menuitem id="context-copyvideourl"
                label="&copyVideoURLCmd.label;"
                accesskey="&copyVideoURLCmd.accesskey;"
                oncommand="gContextMenu.copyMediaLocation();"/>
      <menuitem id="context-copyaudiourl"
                label="&copyAudioURLCmd.label;"
                accesskey="&copyAudioURLCmd.accesskey;"
                oncommand="gContextMenu.copyMediaLocation();"/>
      <menuseparator id="context-sep-copyimage"/>
      <menuitem id="context-saveimage"
                label="&saveImageCmd.label;"
                accesskey="&saveImageCmd.accesskey;"
                oncommand="gContextMenu.saveMedia();"/>
      <menuitem id="context-shareimage"
                label="&shareImage.label;"
                accesskey="&shareImage.accesskey;"
                oncommand="gContextMenu.shareImage();"/>
      <menuitem id="context-sendimage"
                label="&emailImageCmd.label;"
                accesskey="&emailImageCmd.accesskey;"
                oncommand="gContextMenu.sendMedia();"/>
      <menuitem id="context-setDesktopBackground"
                label="&setDesktopBackgroundCmd.label;"
                accesskey="&setDesktopBackgroundCmd.accesskey;"
                oncommand="gContextMenu.setDesktopBackground();"/>
      <menuitem id="context-viewimageinfo"
                label="&viewImageInfoCmd.label;"
                accesskey="&viewImageInfoCmd.accesskey;"
                oncommand="gContextMenu.viewImageInfo();"/>
      <menuitem id="context-viewimagedesc"
                label="&viewImageDescCmd.label;"
                accesskey="&viewImageDescCmd.accesskey;"
                oncommand="gContextMenu.viewImageDesc(event);"
                onclick="checkForMiddleClick(this, event);"/>
      <menuitem id="context-savevideo"
                label="&saveVideoCmd.label;"
                accesskey="&saveVideoCmd.accesskey;"
                oncommand="gContextMenu.saveMedia();"/>
      <menuitem id="context-sharevideo"
                label="&shareVideo.label;"
                accesskey="&shareVideo.accesskey;"
                oncommand="gContextMenu.shareVideo();"/>
      <menuitem id="context-saveaudio"
                label="&saveAudioCmd.label;"
                accesskey="&saveAudioCmd.accesskey;"
                oncommand="gContextMenu.saveMedia();"/>
      <menuitem id="context-video-saveimage"
                accesskey="&videoSaveImage.accesskey;"
                label="&videoSaveImage.label;"
                oncommand="gContextMenu.saveVideoFrameAsImage();"/>
      <menuitem id="context-sendvideo"
                label="&emailVideoCmd.label;"
                accesskey="&emailVideoCmd.accesskey;"
                oncommand="gContextMenu.sendMedia();"/>
      <menu id="context-castvideo"
                label="&castVideoCmd.label;"
                accesskey="&castVideoCmd.accesskey;">
        <menupopup id="context-castvideo-popup" onpopupshowing="gContextMenu.populateCastVideoMenu(this)"/>
      </menu>
      <menuitem id="context-sendaudio"
                label="&emailAudioCmd.label;"
                accesskey="&emailAudioCmd.accesskey;"
                oncommand="gContextMenu.sendMedia();"/>
      <menuitem id="context-ctp-play"
                label="&playPluginCmd.label;"
                accesskey="&playPluginCmd.accesskey;"
                oncommand="gContextMenu.playPlugin();"/>
      <menuitem id="context-ctp-hide"
                label="&hidePluginCmd.label;"
                accesskey="&hidePluginCmd.accesskey;"
                oncommand="gContextMenu.hidePlugin();"/>
      <menuseparator id="context-sep-ctp"/>
      <menuitem id="context-sharepage"
                label="&sharePageCmd.label;"
                accesskey="&sharePageCmd.accesskey;"
                oncommand="SocialShare.sharePage();"/>
      <menuitem id="context-savepage"
                label="&savePageCmd.label;"
                accesskey="&savePageCmd.accesskey2;"
                oncommand="gContextMenu.savePageAs();"/>
      <menuseparator id="context-sep-sendpagetodevice" hidden="true"/>
      <menu id="context-sendpagetodevice"
                label="&sendPageToDevice.label;"
                accesskey="&sendPageToDevice.accesskey;"
                hidden="true">
        <menupopup id="context-sendpagetodevice-popup"
                   onpopupshowing="(() => { let browser = gBrowser || getPanelBrowser(); gFxAccounts.populateSendTabToDevicesMenu(event.target, browser.currentURI.spec, browser.contentTitle); })()"/>
      </menu>
      <menuseparator id="context-sep-viewbgimage"/>
      <menuitem id="context-viewbgimage"
                label="&viewBGImageCmd.label;"
                accesskey="&viewBGImageCmd.accesskey;"
                oncommand="gContextMenu.viewBGImage(event);"
                onclick="checkForMiddleClick(this, event);"/>
      <menuitem id="context-undo"
                label="&undoCmd.label;"
                accesskey="&undoCmd.accesskey;"
                command="cmd_undo"/>
      <menuseparator id="context-sep-undo"/>
      <menuitem id="context-cut"
                label="&cutCmd.label;"
                accesskey="&cutCmd.accesskey;"
                command="cmd_cut"/>
      <menuitem id="context-copy"
                label="&copyCmd.label;"
                accesskey="&copyCmd.accesskey;"
                command="cmd_copy"/>
      <menuitem id="context-paste"
                label="&pasteCmd.label;"
                accesskey="&pasteCmd.accesskey;"
                command="cmd_paste"/>
      <menuitem id="context-delete"
                label="&deleteCmd.label;"
                accesskey="&deleteCmd.accesskey;"
                command="cmd_delete"/>
      <menuseparator id="context-sep-paste"/>
      <menuitem id="context-selectall"
                label="&selectAllCmd.label;"
                accesskey="&selectAllCmd.accesskey;"
                command="cmd_selectAll"/>
      <menuseparator id="context-sep-selectall"/>
      <menuitem id="context-keywordfield"
                label="&keywordfield.label;"
                accesskey="&keywordfield.accesskey;"
                oncommand="AddKeywordForSearchField();"/>
      <menuitem id="context-searchselect"
                oncommand="BrowserSearch.loadSearchFromContext(this.searchTerms);"/>
      <menuseparator id="context-sep-sendlinktodevice" hidden="true"/>
      <menu id="context-sendlinktodevice"
                label="&sendLinkToDevice.label;"
                accesskey="&sendLinkToDevice.accesskey;"
                hidden="true">
        <menupopup id="context-sendlinktodevice-popup"
                   onpopupshowing="gFxAccounts.populateSendTabToDevicesMenu(event.target, gContextMenu.linkURL, gContextMenu.linkTextStr);"/>
      </menu>
      <menuitem id="context-shareselect"
                label="&shareSelect.label;"
                accesskey="&shareSelect.accesskey;"
                oncommand="gContextMenu.shareSelect();"/>
      <menuseparator id="frame-sep"/>
      <menu id="frame" label="&thisFrameMenu.label;" accesskey="&thisFrameMenu.accesskey;">
        <menupopup>
          <menuitem id="context-showonlythisframe"
                    label="&showOnlyThisFrameCmd.label;"
                    accesskey="&showOnlyThisFrameCmd.accesskey;"
                    oncommand="gContextMenu.showOnlyThisFrame();"/>
          <menuitem id="context-openframeintab"
                    label="&openFrameCmdInTab.label;"
                    accesskey="&openFrameCmdInTab.accesskey;"
                    oncommand="gContextMenu.openFrameInTab();"/>
          <menuitem id="context-openframe"
                    label="&openFrameCmd.label;"
                    accesskey="&openFrameCmd.accesskey;"
                    oncommand="gContextMenu.openFrame();"/>
          <menuseparator id="open-frame-sep"/>
          <menuitem id="context-reloadframe"
                    label="&reloadFrameCmd.label;"
                    accesskey="&reloadFrameCmd.accesskey;"
                    oncommand="gContextMenu.reloadFrame();"/>
          <menuseparator/>
          <menuitem id="context-bookmarkframe"
                    label="&bookmarkThisFrameCmd.label;"
                    accesskey="&bookmarkThisFrameCmd.accesskey;"
                    oncommand="gContextMenu.addBookmarkForFrame();"/>
          <menuitem id="context-saveframe"
                    label="&saveFrameCmd.label;"
                    accesskey="&saveFrameCmd.accesskey;"
                    oncommand="gContextMenu.saveFrame();"/>
          <menuseparator/>
          <menuitem id="context-printframe"
                    label="&printFrameCmd.label;"
                    accesskey="&printFrameCmd.accesskey;"
                    oncommand="gContextMenu.printFrame();"/>
          <menuseparator/>
          <menuitem id="context-viewframesource"
                    label="&viewFrameSourceCmd.label;"
                    accesskey="&viewFrameSourceCmd.accesskey;"
                    oncommand="gContextMenu.viewFrameSource();"
                    observes="isFrameImage"/>
          <menuitem id="context-viewframeinfo"
                    label="&viewFrameInfoCmd.label;"
                    accesskey="&viewFrameInfoCmd.accesskey;"
                    oncommand="gContextMenu.viewFrameInfo();"/>
        </menupopup>
      </menu>
      <menuitem id="context-viewpartialsource-selection"
                label="&viewPartialSourceForSelectionCmd.label;"
                accesskey="&viewPartialSourceCmd.accesskey;"
                oncommand="gContextMenu.viewPartialSource('selection');"
                observes="isImage"/>
      <menuitem id="context-viewpartialsource-mathml"
                label="&viewPartialSourceForMathMLCmd.label;"
                accesskey="&viewPartialSourceCmd.accesskey;"
                oncommand="gContextMenu.viewPartialSource('mathml');"
                observes="isImage"/>
      <menuseparator id="context-sep-viewsource"/>
      <menuitem id="context-viewsource"
                label="&viewPageSourceCmd.label;"
                accesskey="&viewPageSourceCmd.accesskey;"
                oncommand="BrowserViewSource(gContextMenu.browser);"
                observes="canViewSource"/>
      <menuitem id="context-viewinfo"
                label="&viewPageInfoCmd.label;"
                accesskey="&viewPageInfoCmd.accesskey;"
                oncommand="gContextMenu.viewInfo();"/>
      <menuseparator id="spell-separator"/>
      <menuitem id="spell-check-enabled"
                label="&spellCheckToggle.label;"
                type="checkbox"
                accesskey="&spellCheckToggle.accesskey;"
                oncommand="InlineSpellCheckerUI.toggleEnabled(window);"/>
      <menuitem id="spell-add-dictionaries-main"
                label="&spellAddDictionaries.label;"
                accesskey="&spellAddDictionaries.accesskey;"
                oncommand="gContextMenu.addDictionaries();"/>
      <menu id="spell-dictionaries"
            label="&spellDictionaries.label;"
            accesskey="&spellDictionaries.accesskey;">
          <menupopup id="spell-dictionaries-menu">
              <menuseparator id="spell-language-separator"/>
              <menuitem id="spell-add-dictionaries"
                        label="&spellAddDictionaries.label;"
                        accesskey="&spellAddDictionaries.accesskey;"
                        oncommand="gContextMenu.addDictionaries();"/>
          </menupopup>
      </menu>
      <menuseparator hidden="true" id="context-sep-bidi"/>
      <menuitem hidden="true" id="context-bidi-text-direction-toggle"
                label="&bidiSwitchTextDirectionItem.label;"
                accesskey="&bidiSwitchTextDirectionItem.accesskey;"
                command="cmd_switchTextDirection"/>
      <menuitem hidden="true" id="context-bidi-page-direction-toggle"
                label="&bidiSwitchPageDirectionItem.label;"
                accesskey="&bidiSwitchPageDirectionItem.accesskey;"
                oncommand="gContextMenu.switchPageDirection();"/>
      <menuseparator id="fill-login-separator" hidden="true"/>
      <menu id="fill-login"
            label="&fillLoginMenu.label;"
            label-login="&fillLoginMenu.label;"
            label-password="&fillPasswordMenu.label;"
            label-username="&fillUsernameMenu.label;"
            accesskey="&fillLoginMenu.accesskey;"
            accesskey-login="&fillLoginMenu.accesskey;"
            accesskey-password="&fillPasswordMenu.accesskey;"
            accesskey-username="&fillUsernameMenu.accesskey;"
            hidden="true">
        <menupopup id="fill-login-popup">
          <menuitem id="fill-login-no-logins"
                    label="&noLoginSuggestions.label;"
                    disabled="true"
                    hidden="true"/>
          <menuseparator id="saved-logins-separator"/>
          <menuitem id="fill-login-saved-passwords"
                    label="&viewSavedLogins.label;"
                    oncommand="gContextMenu.openPasswordManager();"/>
        </menupopup>
      </menu>
      <menuseparator id="inspect-separator" hidden="true"/>
      <menuitem id="context-inspect"
                hidden="true"
                label="&inspectContextMenu.label;"
                accesskey="&inspectContextMenu.accesskey;"
                oncommand="gContextMenu.inspectNode();"/>
      <menuseparator id="context-media-eme-separator" hidden="true"/>
      <menuitem id="context-media-eme-learnmore"
                class="menuitem-iconic"
                hidden="true"
                label="&emeLearnMoreContextMenu.label;"
                accesskey="&emeLearnMoreContextMenu.accesskey;"
                oncommand="gContextMenu.drmLearnMore(event);"
                onclick="checkForMiddleClick(this, event);"/>
    </menupopup>

    <menupopup id="placesContext">
      <menuseparator id="placesContext_recentlyBookmarkedSeparator"
                     ignoreitem="true"
                     hidden="true"/>
      <menuitem id="placesContext_hideRecentlyBookmarked"
                label="&hideRecentlyBookmarked.label;"
                accesskey="&hideRecentlyBookmarked.accesskey;"
                oncommand="BookmarkingUI.hideRecentlyBookmarked();"
                closemenu="single"
                ignoreitem="true"
                hidden="true"/>
      <menuitem id="placesContext_showRecentlyBookmarked"
                label="&showRecentlyBookmarked.label;"
                accesskey="&showRecentlyBookmarked.accesskey;"
                oncommand="BookmarkingUI.showRecentlyBookmarked();"
                closemenu="single"
                ignoreitem="true"
                hidden="true"/>
    </menupopup>

    <panel id="ctrlTab-panel" hidden="true" norestorefocus="true" level="top">
      <hbox>
        <button class="ctrlTab-preview" flex="1"/>
        <button class="ctrlTab-preview" flex="1"/>
        <button class="ctrlTab-preview" flex="1"/>
        <button class="ctrlTab-preview" flex="1"/>
        <button class="ctrlTab-preview" flex="1"/>
        <button class="ctrlTab-preview" flex="1"/>
      </hbox>
      <hbox pack="center">
        <button id="ctrlTab-showAll" class="ctrlTab-preview" noicon="true"/>
      </hbox>
    </panel>

    <!-- Bookmarks and history tooltip -->
    <tooltip id="bhTooltip"/>

    <tooltip id="tabbrowser-tab-tooltip" onpopupshowing="gBrowser.createTooltip(event);"/>

    <tooltip id="back-button-tooltip">
      <label class="tooltip-label" value="&backButton.tooltip;"/>
      <label class="tooltip-label" value="&backForwardButtonMenu.tooltip;"/>
    </tooltip>

    <tooltip id="forward-button-tooltip">
      <label class="tooltip-label" value="&forwardButton.tooltip;"/>
      <label class="tooltip-label" value="&backForwardButtonMenu.tooltip;"/>
    </tooltip>

    <tooltip id="share-button-tooltip" onpopupshowing="SocialShare.createTooltip(event);">
      <label class="tooltip-label"/>
      <label class="tooltip-label"/>
    </tooltip>


    <panel id="notification-popup"
           type="arrow"
           position="after_start"
           hidden="true"
           orient="vertical"
           noautofocus="true"
           role="alert"/>

    <popupnotification id="webRTC-shareDevices-notification" hidden="true">
      <popupnotificationcontent id="webRTC-selectCamera" orient="vertical">
        <label value="&getUserMedia.selectCamera.label;"
               accesskey="&getUserMedia.selectCamera.accesskey;"
               control="webRTC-selectCamera-menulist"/>
        <menulist id="webRTC-selectCamera-menulist">
          <menupopup id="webRTC-selectCamera-menupopup"/>
        </menulist>
      </popupnotificationcontent>

      <popupnotificationcontent id="webRTC-selectWindowOrScreen" orient="vertical">
        <label id="webRTC-selectWindow-label"
               control="webRTC-selectWindow-menulist"/>
        <menulist id="webRTC-selectWindow-menulist"
                  oncommand="webrtcUI.updateMainActionLabel(this);">
          <menupopup id="webRTC-selectWindow-menupopup"/>
        </menulist>
        <description id="webRTC-all-windows-shared" hidden="true">&getUserMedia.allWindowsShared.message;</description>
      </popupnotificationcontent>

      <popupnotificationcontent id="webRTC-preview" hidden="true">
        <html:video id="webRTC-previewVideo"/>
        <vbox id="webRTC-previewWarningBox">
          <spacer flex="1"/>
          <description id="webRTC-previewWarning"/>
        </vbox>
      </popupnotificationcontent>

      <popupnotificationcontent id="webRTC-selectMicrophone" orient="vertical">
        <label value="&getUserMedia.selectMicrophone.label;"
               accesskey="&getUserMedia.selectMicrophone.accesskey;"
               control="webRTC-selectMicrophone-menulist"/>
        <menulist id="webRTC-selectMicrophone-menulist">
          <menupopup id="webRTC-selectMicrophone-menupopup"/>
        </menulist>
      </popupnotificationcontent>
    </popupnotification>

    <popupnotification id="servicesInstall-notification" hidden="true">
      <popupnotificationcontent orient="vertical" align="start">
        <!-- XXX bug 974146, tests are looking for this, can't remove yet. -->
      </popupnotificationcontent>
    </popupnotification>

    <popupnotification id="password-notification" hidden="true">
      <popupnotificationcontent orient="vertical">
        <textbox id="password-notification-username"/>
        <textbox id="password-notification-password" type="password" show-content=""/>
        <checkbox id="password-notification-visibilityToggle" hidden="true"/>
      </popupnotificationcontent>
    </popupnotification>


    <popupnotification id="addon-progress-notification" hidden="true">
      <popupnotificationcontent orient="vertical">
        <progressmeter id="addon-progress-notification-progressmeter"/>
        <label id="addon-progress-notification-progresstext" crop="end"/>
      </popupnotificationcontent>
      <button id="addon-progress-cancel"
              oncommand="this.parentNode.cancel();"/>
      <button id="addon-progress-accept" disabled="true"/>
    </popupnotification>

    <popupnotification id="addon-install-confirmation-notification" hidden="true">
      <popupnotificationcontent id="addon-install-confirmation-content" orient="vertical"/>
      <button id="addon-install-confirmation-cancel"
              oncommand="PopupNotifications.getNotification('addon-install-confirmation').remove();"/>
      <button id="addon-install-confirmation-accept"
              oncommand="gXPInstallObserver.acceptInstallation();
                         PopupNotifications.getNotification('addon-install-confirmation').remove();"/>
    </popupnotification>

<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->

<panel id="PanelUI-popup"
       role="group"
       type="arrow"
       hidden="true"
       flip="slide"
       position="bottomcenter topright"
       noautofocus="true">
  <panelmultiview id="PanelUI-multiView" mainViewId="PanelUI-mainView">
    <panelview id="PanelUI-mainView" context="customizationPanelContextMenu">
      <vbox id="PanelUI-contents-scroller">
        <vbox id="PanelUI-contents" class="panelUI-grid"/>
      </vbox>

      <footer id="PanelUI-footer">
        <toolbarbutton id="PanelUI-update-status"
                       oncommand="gMenuButtonUpdateBadge.onMenuPanelCommand(event);"
                       wrap="true"
                       hidden="true"/>
        <hbox id="PanelUI-footer-fxa">
          <hbox id="PanelUI-fxa-status"
                defaultlabel="&fxaSignIn.label;"
                signedinTooltiptext="&fxaSignedIn.tooltip;"
                tooltiptext="&fxaSignedIn.tooltip;"
                errorlabel="&fxaSignInError.label;"
                unverifiedlabel="&fxaUnverified.label;"
                onclick="if (event.which == 1) gFxAccounts.onMenuPanelCommand();">
            <image id="PanelUI-fxa-avatar"/>
            <toolbarbutton id="PanelUI-fxa-label"
                           fxabrandname="&syncBrand.fxAccount.label;"/>
          </hbox>
          <toolbarseparator/>
          <toolbarbutton id="PanelUI-fxa-icon"
                         oncommand="gSyncUI.doSync();"
                         closemenu="none">
            <observes element="sync-status" attribute="syncstatus"/>
            <observes element="sync-status" attribute="tooltiptext"/>
          </toolbarbutton>
        </hbox>

        <hbox id="PanelUI-footer-inner">
          <toolbarbutton id="PanelUI-customize" label="&appMenuCustomize.label;"
                         exitLabel="&appMenuCustomizeExit.label;"
                         tooltiptext="&appMenuCustomize.tooltip;"
                         exitTooltiptext="&appMenuCustomizeExit.tooltip;"
                         closemenu="none"
                         oncommand="gCustomizeMode.toggle();"/>
          <toolbarseparator/>
          <toolbarbutton id="PanelUI-help" label="&helpMenu.label;"
                         closemenu="none"
                         tooltiptext="&appMenuHelp.tooltip;"
                         oncommand="PanelUI.showHelpView(this);"/>
          <toolbarseparator/>
          <toolbarbutton id="PanelUI-quit"
                         label="&quitApplicationCmd.label;"
                         command="cmd_quitApplication"/>
        </hbox>
      </footer>
    </panelview>

    <panelview id="PanelUI-history" flex="1">
      <label value="&appMenuHistory.label;" class="panel-subview-header"/>
      <vbox class="panel-subview-body">
        <toolbarbutton id="appMenuViewHistorySidebar"
                       label="&appMenuHistory.viewSidebar.label;"
                       type="checkbox"
                       class="subviewbutton"
                       key="key_gotoHistory"
                       oncommand="SidebarUI.toggle('viewHistorySidebar'); PanelUI.hide();">
          <observes element="viewHistorySidebar" attribute="checked"/>
        </toolbarbutton>
        <toolbarbutton id="appMenuClearRecentHistory"
                       label="&appMenuHistory.clearRecent.label;"
                       class="subviewbutton"
                       command="Tools:Sanitize"/>
        <toolbarbutton id="appMenuRestoreLastSession"
                       label="&appMenuHistory.restoreSession.label;"
                       class="subviewbutton"
                       command="Browser:RestoreLastSession"/>
        <menuseparator id="PanelUI-recentlyClosedTabs-separator"/>
        <vbox id="PanelUI-recentlyClosedTabs" tooltip="bhTooltip"/>
        <menuseparator id="PanelUI-recentlyClosedWindows-separator"/>
        <vbox id="PanelUI-recentlyClosedWindows" tooltip="bhTooltip"/>
        <menuseparator id="PanelUI-historyItems-separator"/>
        <vbox id="PanelUI-historyItems" tooltip="bhTooltip"/>
      </vbox>
      <toolbarbutton id="PanelUI-historyMore"
                     class="panel-subview-footer subviewbutton"
                     label="&appMenuHistory.showAll.label;"
                     oncommand="PlacesCommandHook.showPlacesOrganizer('History'); CustomizableUI.hidePanelForNode(this);"/>
    </panelview>

    <panelview id="PanelUI-remotetabs" flex="1" class="PanelUI-subView">
      <label value="&appMenuRemoteTabs.label;" class="panel-subview-header"/>
      <vbox class="panel-subview-body">
        <!-- this widget has 3 boxes in the body, but only 1 is ever visible -->
        <!-- When Sync is ready to sync -->
        <vbox id="PanelUI-remotetabs-main" observes="sync-syncnow-state">
          <vbox id="PanelUI-remotetabs-buttons">
            <toolbarbutton id="PanelUI-remotetabs-view-sidebar"
                           class="subviewbutton"
                           observes="viewTabsSidebar"
                           label="&appMenuRemoteTabs.sidebar.label;"/>
            <toolbarbutton id="PanelUI-remotetabs-syncnow"
                           observes="sync-status"
                           class="subviewbutton"
                           oncommand="gSyncUI.doSync();"
                           closemenu="none"/>
            <menuseparator id="PanelUI-remotetabs-separator"/>
          </vbox>
          <deck id="PanelUI-remotetabs-deck">
            <!-- Sync is ready to Sync and the "tabs" engine is enabled -->
            <vbox id="PanelUI-remotetabs-tabspane">
              <vbox id="PanelUI-remotetabs-tabslist"
                    notabsforclientlabel="&appMenuRemoteTabs.notabs.label;"
                    />
            </vbox>
            <!-- Sync is ready to Sync but the "tabs" engine isn't enabled-->
            <hbox id="PanelUI-remotetabs-tabsdisabledpane" pack="center" flex="1">
              <vbox class="PanelUI-remotetabs-instruction-box">
                <hbox pack="center">
                  <image class="fxaSyncIllustration" alt=""/>
                </hbox>
                <label class="PanelUI-remotetabs-instruction-label">&appMenuRemoteTabs.tabsnotsyncing.label;</label>
                <hbox pack="center">
                  <toolbarbutton class="PanelUI-remotetabs-prefs-button"
                                 label="&appMenuRemoteTabs.openprefs.label;"
                                 oncommand="gSyncUI.openSetup(null, 'synced-tabs');"/>
                </hbox>
              </vbox>
            </hbox>
            <!-- Sync is ready to Sync but we are still fetching the tabs to show -->
            <vbox id="PanelUI-remotetabs-fetching">
              <!-- Show intentionally blank panel, see bug 1239845 -->
            </vbox>
            <!-- Sync has only 1 (ie, this) device connected -->
            <hbox id="PanelUI-remotetabs-nodevicespane" pack="center" flex="1">
              <vbox class="PanelUI-remotetabs-instruction-box">
                <hbox pack="center">
                  <image class="fxaSyncIllustration" alt=""/>
                </hbox>
                <label class="PanelUI-remotetabs-instruction-title">&appMenuRemoteTabs.noclients.title;</label>
                <label class="PanelUI-remotetabs-instruction-label">&appMenuRemoteTabs.noclients.subtitle;</label>
                <!-- The inner HTML for PanelUI-remotetabs-mobile-promo is built at runtime -->
                <label id="PanelUI-remotetabs-mobile-promo" fxAccountsBrand="&syncBrand.fxAccount.label;"/>
              </vbox>
            </hbox>
          </deck>
        </vbox>
        <!-- a box to ensure contained boxes are centered horizonally -->
        <hbox pack="center" flex="1">
          <!-- When Sync is not configured -->
          <vbox id="PanelUI-remotetabs-setupsync"
                flex="1"
                align="center"
                class="PanelUI-remotetabs-instruction-box"
                observes="sync-setup-state">
            <image class="fxaSyncIllustration" alt=""/>
            <label class="PanelUI-remotetabs-instruction-label">&appMenuRemoteTabs.notsignedin.label;</label>
            <toolbarbutton class="PanelUI-remotetabs-prefs-button"
                           label="&appMenuRemoteTabs.signin.label;"
                           oncommand="gSyncUI.openSetup(null, 'synced-tabs');"/>
          </vbox>
          <!-- When Sync needs re-authentication. This uses the exact same messaging
               as "Sync is not configured" but remains a separate box so we get
               the goodness of observing broadcasters to manage the hidden states -->
          <vbox id="PanelUI-remotetabs-reauthsync"
                flex="1"
                align="center"
                class="PanelUI-remotetabs-instruction-box"
                observes="sync-reauth-state">
            <image class="fxaSyncIllustration" alt=""/>
            <label class="PanelUI-remotetabs-instruction-label">&appMenuRemoteTabs.notsignedin.label;</label>
            <toolbarbutton class="PanelUI-remotetabs-prefs-button"
                           label="&appMenuRemoteTabs.signin.label;"
                           oncommand="gSyncUI.openSetup(null, 'synced-tabs');"/>
          </vbox>
        </hbox>
      </vbox>
    </panelview>

    <panelview id="PanelUI-bookmarks" flex="1" class="PanelUI-subView">
      <label value="&bookmarksMenu.label;" class="panel-subview-header"/>
      <vbox class="panel-subview-body">
        <toolbarbutton id="panelMenuBookmarkThisPage"
                       class="subviewbutton"
                       observes="bookmarkThisPageBroadcaster"
                       command="Browser:AddBookmarkAs"
                       onclick="PanelUI.hide();"/>
        <toolbarseparator/>
        <toolbarbutton id="panelMenu_viewBookmarksSidebar"
                       label="&viewBookmarksSidebar2.label;"
                       class="subviewbutton"
                       key="viewBookmarksSidebarKb"
                       oncommand="SidebarUI.toggle('viewBookmarksSidebar'); PanelUI.hide();">
          <observes element="viewBookmarksSidebar" attribute="checked"/>
        </toolbarbutton>
        <toolbarbutton id="panelMenu_viewBookmarksToolbar"
                       label="&viewBookmarksToolbar.label;"
                       type="checkbox"
                       toolbarId="PersonalToolbar"
                       class="subviewbutton"
                       oncommand="onViewToolbarCommand(event); PanelUI.hide();"/>
        <toolbarseparator/>
        <toolbarbutton id="panelMenu_bookmarksToolbar"
                       label="&personalbarCmd.label;"
                       class="subviewbutton cui-withicon"
                       oncommand="PlacesCommandHook.showPlacesOrganizer('BookmarksToolbar'); PanelUI.hide();"/>
        <toolbarbutton id="panelMenu_unsortedBookmarks"
                       label="&otherBookmarksCmd.label;"
                       class="subviewbutton cui-withicon"
                       oncommand="PlacesCommandHook.showPlacesOrganizer('UnfiledBookmarks'); PanelUI.hide();"/>
        <toolbarseparator class="small-separator"/>
        <toolbaritem id="panelMenu_bookmarksMenu"
                     orient="vertical"
                     smoothscroll="false"
                     onclick="if (event.button == 1) BookmarkingUI.onPanelMenuViewCommand(event, this._placesView);"
                     oncommand="BookmarkingUI.onPanelMenuViewCommand(event, this._placesView);"
                     flatList="true"
                     tooltip="bhTooltip">
          <!-- bookmarks menu items will go here -->
        </toolbaritem>
      </vbox>
      <toolbarbutton id="panelMenu_showAllBookmarks"
                     label="&showAllBookmarks2.label;"
                     class="subviewbutton panel-subview-footer"
                     command="Browser:ShowAllBookmarks"
                     onclick="PanelUI.hide();"/>
    </panelview>

    <panelview id="PanelUI-socialapi" flex="1"/>

    <panelview id="PanelUI-feeds" flex="1" oncommand="FeedHandler.subscribeToFeed(null, event);">
      <label value="&feedsMenu2.label;" class="panel-subview-header"/>
    </panelview>

    <panelview id="PanelUI-containers" flex="1">
      <label value="&containersMenu.label;" class="panel-subview-header"/>
      <vbox id="PanelUI-containersItems"/>
    </panelview>

    <panelview id="PanelUI-helpView" flex="1" class="PanelUI-subView">
      <label value="&helpMenu.label;" class="panel-subview-header"/>
      <vbox id="PanelUI-helpItems" class="panel-subview-body"/>
    </panelview>

    <panelview id="PanelUI-developer" flex="1">
      <label value="&webDeveloperMenu.label;" class="panel-subview-header"/>
      <vbox id="PanelUI-developerItems" class="panel-subview-body"/>
    </panelview>

    <panelview id="PanelUI-sidebar" flex="1">
      <label value="&appMenuSidebars.label;" class="panel-subview-header"/>
      <vbox id="PanelUI-sidebarItems" class="panel-subview-body"/>
    </panelview>

    <panelview id="PanelUI-characterEncodingView" flex="1">
      <label value="&charsetMenu2.label;" class="panel-subview-header"/>
      <vbox class="panel-subview-body">
        <vbox id="PanelUI-characterEncodingView-pinned"
              class="PanelUI-characterEncodingView-list"/>
        <toolbarseparator/>
        <vbox id="PanelUI-characterEncodingView-charsets"
              class="PanelUI-characterEncodingView-list"/>
        <toolbarseparator/>
        <vbox>
          <label id="PanelUI-characterEncodingView-autodetect-label"/>
          <vbox id="PanelUI-characterEncodingView-autodetect"
                class="PanelUI-characterEncodingView-list"/>
        </vbox>
      </vbox>
    </panelview>

    <panelview id="PanelUI-panicView" flex="1">
      <vbox class="panel-subview-body">
        <hbox id="PanelUI-panic-timeframe">
          <image id="PanelUI-panic-timeframe-icon" alt=""/>
          <vbox flex="1">
            <hbox id="PanelUI-panic-header">
              <image id="PanelUI-panic-timeframe-icon-small" alt=""/>
              <description id="PanelUI-panic-mainDesc" flex="1">&panicButton.view.mainTimeframeDesc;</description>
            </hbox>
            <radiogroup id="PanelUI-panic-timeSpan" aria-labelledby="PanelUI-panic-mainDesc" closemenu="none">
              <radio id="PanelUI-panic-5min" label="&panicButton.view.5min;" selected="true"
                     value="5" class="subviewradio"/>
              <radio id="PanelUI-panic-2hr" label="&panicButton.view.2hr;"
                     value="2" class="subviewradio"/>
              <radio id="PanelUI-panic-day" label="&panicButton.view.day;"
                     value="6" class="subviewradio"/>
            </radiogroup>
          </vbox>
        </hbox>
        <vbox id="PanelUI-panic-explanations">
          <label id="PanelUI-panic-actionlist-main-label">&panicButton.view.mainActionDesc;</label>

          <label id="PanelUI-panic-actionlist-windows" class="PanelUI-panic-actionlist">&panicButton.view.deleteTabsAndWindows;</label>
          <label id="PanelUI-panic-actionlist-cookies" class="PanelUI-panic-actionlist">&panicButton.view.deleteCookies;</label>
          <label id="PanelUI-panic-actionlist-history" class="PanelUI-panic-actionlist">&panicButton.view.deleteHistory;</label>
          <label id="PanelUI-panic-actionlist-newwindow" class="PanelUI-panic-actionlist">&panicButton.view.openNewWindow;</label>

          <label id="PanelUI-panic-warning">&panicButton.view.undoWarning;</label>
        </vbox>
        <button id="PanelUI-panic-view-button"
                label="&panicButton.view.forgetButton;"/>
      </vbox>
    </panelview>

  </panelmultiview>
  <!-- These menupopups are located here to prevent flickering,
       see bug 492960 comment 20. -->
  <menupopup id="customizationPanelItemContextMenu">
    <menuitem oncommand="gCustomizeMode.addToToolbar(document.popupNode)"
              closemenu="single"
              class="customize-context-moveToToolbar"
              accesskey="&customizeMenu.moveToToolbar.accesskey;"
              label="&customizeMenu.moveToToolbar.label;"/>
    <menuitem oncommand="gCustomizeMode.removeFromArea(document.popupNode)"
              closemenu="single"
              class="customize-context-removeFromPanel"
              accesskey="&customizeMenu.removeFromMenu.accesskey;"
              label="&customizeMenu.removeFromMenu.label;"/>
    <menuseparator/>
    <menuitem command="cmd_CustomizeToolbars"
              class="viewCustomizeToolbar"
              accesskey="&viewCustomizeToolbar.accesskey;"
              label="&viewCustomizeToolbar.label;"/>
  </menupopup>

  <menupopup id="customizationPaletteItemContextMenu">
    <menuitem oncommand="gCustomizeMode.addToToolbar(document.popupNode)"
              class="customize-context-addToToolbar"
              accesskey="&customizeMenu.addToToolbar.accesskey;"
              label="&customizeMenu.addToToolbar.label;"/>
    <menuitem oncommand="gCustomizeMode.addToPanel(document.popupNode)"
              class="customize-context-addToPanel"
              accesskey="&customizeMenu.addToPanel.accesskey;"
              label="&customizeMenu.addToPanel.label;"/>
  </menupopup>

  <menupopup id="customizationPanelContextMenu">
    <menuitem command="cmd_CustomizeToolbars"
              accesskey="&customizeMenu.addMoreItems.accesskey;"
              label="&customizeMenu.addMoreItems.label;"/>
  </menupopup>
</panel>

<panel id="widget-overflow"
       role="group"
       type="arrow"
       noautofocus="true"
       context="toolbar-context-menu"
       position="bottomcenter topright"
       hidden="true">
  <vbox id="widget-overflow-scroller">
    <vbox id="widget-overflow-list" class="widget-overflow-list"
          overflowfortoolbar="nav-bar"/>
  </vbox>
</panel>

<panel id="customization-tipPanel"
       type="arrow"
       flip="none"
       side="left"
       position="leftcenter topright"
       noautohide="true"
       hidden="true">
  <hbox class="customization-tipPanel-wrapper">
    <vbox class="customization-tipPanel-infoBox"/>
    <vbox class="customization-tipPanel-content" flex="1">
      <description class="customization-tipPanel-contentMessage"/>
      <image class="customization-tipPanel-contentImage"/>
    </vbox>
    <vbox pack="start" align="end" class="customization-tipPanel-closeBox">
      <toolbarbutton oncommand="gCustomizeMode.hideTip()" class="close-icon"/>
    </vbox>
  </hbox>
</panel>

<panel id="panic-button-success-notification"
       type="arrow"
       position="bottomcenter topright"
       hidden="true"
       role="alert"
       orient="vertical">
  <hbox id="panic-button-success-header">
    <image id="panic-button-success-icon" alt=""/>
    <vbox>
      <description>&panicButton.thankyou.msg1;</description>
      <description>&panicButton.thankyou.msg2;</description>
    </vbox>
  </hbox>
  <button label="&panicButton.thankyou.buttonlabel;"
          id="panic-button-success-closebutton"
          oncommand="PanicButtonNotifier.close()"/>
</panel>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->

<panel id="identity-popup"
       type="arrow"
       hidden="true"
       role="alertdialog"
       onpopupshown="gIdentityHandler.onPopupShown(event);"
       onpopuphidden="gIdentityHandler.onPopupHidden(event);"
       orient="vertical">

  <broadcasterset>
    <broadcaster id="identity-popup-mcb-learn-more" class="text-link plain" value="&identity.learnMore;"/>
    <broadcaster id="identity-popup-insecure-login-forms-learn-more" class="text-link plain" value="&identity.learnMore;"/>
  </broadcasterset>

  <panelmultiview id="identity-popup-multiView"
                  mainViewId="identity-popup-mainView">
    <panelview id="identity-popup-mainView" flex="1">

      <!-- Security Section -->
      <hbox id="identity-popup-security" class="identity-popup-section">
        <vbox id="identity-popup-security-content" flex="1">
          <label class="plain">
            <label class="identity-popup-headline host"></label>
            <label class="identity-popup-headline hostless" crop="end"/>
          </label>
          <description class="identity-popup-connection-not-secure"
                       value="&identity.connectionNotSecure;"
                       when-connection="not-secure secure-cert-user-overridden"/>
          <description class="identity-popup-connection-secure"
                       value="&identity.connectionSecure;"
                       when-connection="secure secure-ev"/>
          <description value="&identity.connectionInternal;"
                       when-connection="chrome"/>
          <description value="&identity.connectionFile;"
                       when-connection="file"/>

          <vbox id="identity-popup-security-descriptions">
            <description class="identity-popup-warning-gray"
                         when-mixedcontent="active-blocked">&identity.activeBlocked;</description>
            <description class="identity-popup-warning-yellow"
                         when-mixedcontent="passive-loaded">&identity.passiveLoaded;</description>
            <description when-mixedcontent="active-loaded">&identity.activeLoaded;</description>
            <description class="identity-popup-warning-yellow"
                         when-ciphers="weak">&identity.weakEncryption;</description>
            <description when-loginforms="insecure">&identity.insecureLoginForms2;</description>
          </vbox>
        </vbox>
        <button id="identity-popup-security-expander"
                class="identity-popup-expander"
                when-connection="not-secure secure secure-ev secure-cert-user-overridden"
                oncommand="gIdentityHandler.toggleSubView('security', this)"/>
      </hbox>

      <!-- Tracking Protection Section -->
      <hbox id="tracking-protection-container"
            class="identity-popup-section"
            when-connection="not-secure secure secure-ev secure-cert-user-overridden file">
        <vbox id="tracking-protection-content" flex="1">
          <description class="identity-popup-headline"
                       crop="end"
                       value="&trackingProtection.title;" />

          <label id="tracking-blocked"
                 crop="end">&trackingProtection.detectedBlocked3;</label>
          <label id="tracking-loaded"
                 crop="end">&trackingProtection.detectedNotBlocked3;</label>
          <label id="tracking-not-detected"
                 crop="end">&trackingProtection.notDetected3;</label>

          <button id="tracking-action-unblock"
                  label="&trackingProtection.unblock.label;"
                  accesskey="&trackingProtection.unblock.accesskey;"
                  oncommand="TrackingProtection.disableForCurrentPage();" />
          <button id="tracking-action-unblock-private"
                  label="&trackingProtection.unblockPrivate.label;"
                  accesskey="&trackingProtection.unblockPrivate.accesskey;"
                  oncommand="TrackingProtection.disableForCurrentPage();" />
          <button id="tracking-action-block"
                  label="&trackingProtection.block2.label;"
                  accesskey="&trackingProtection.block2.accesskey;"
                  oncommand="TrackingProtection.enableForCurrentPage();" />
        </vbox>
      </hbox>

      <!-- Permissions Section -->
      <hbox class="identity-popup-section">
        <vbox id="identity-popup-permissions-content" flex="1">
          <label id="identity-popup-permissions-headline"
                 class="identity-popup-headline"
                 value="&identity.permissions;"/>
          <vbox id="identity-popup-permission-list"/>
          <description id="identity-popup-permission-reload-hint">&identity.permissionsReloadHint;</description>
          <description id="identity-popup-permission-empty-hint">&identity.permissionsEmpty;</description>
        </vbox>
      </hbox>
    </panelview>

    <!-- Security SubView -->
    <panelview id="identity-popup-securityView" flex="1">
      <vbox id="identity-popup-securityView-header">
        <label class="plain">
          <label class="identity-popup-headline host"></label>
          <label class="identity-popup-headline hostless" crop="end"/>
        </label>
        <description class="identity-popup-connection-not-secure"
                     value="&identity.connectionNotSecure;"
                     when-connection="not-secure secure-cert-user-overridden"/>
        <description class="identity-popup-connection-secure"
                     value="&identity.connectionSecure;"
                     when-connection="secure secure-ev"/>
      </vbox>

      <vbox id="identity-popup-securityView-body" flex="1">
        <!-- (EV) Certificate Information -->
        <description id="identity-popup-content-verified-by"
                     when-connection="secure-ev">&identity.connectionVerified2;</description>
        <description id="identity-popup-content-owner"
                     when-connection="secure-ev"
                     class="header"/>
        <description id="identity-popup-content-supplemental"
                     when-connection="secure-ev"/>
        <description id="identity-popup-content-verifier"
                     when-connection="secure secure-ev secure-cert-user-overridden"/>

        <!-- Remove Certificate Exception -->
        <button when-connection="secure-cert-user-overridden"
                label="&identity.removeCertException.label;"
                accesskey="&identity.removeCertException.accesskey;"
                oncommand="gIdentityHandler.removeCertException()"/>

        <!-- Connection is Not Secure -->
        <description when-connection="not-secure"
                     and-when-loginforms="secure">&identity.description.insecure;</description>

        <!-- Insecure login forms -->
        <description when-loginforms="insecure">&identity.description.insecureLoginForms; <label observes="identity-popup-insecure-login-forms-learn-more"/></description>

        <!-- Weak Cipher -->
        <description when-ciphers="weak">&identity.description.weakCipher;</description>
        <description class="identity-popup-warning-yellow"
                     when-ciphers="weak">&identity.description.weakCipher2;</description>

        <!-- Active Mixed Content Blocked -->
        <description class="identity-popup-warning-gray"
                     when-mixedcontent="active-blocked">&identity.description.activeBlocked; <label observes="identity-popup-mcb-learn-more"/></description>

        <!-- Passive Mixed Content Loaded -->
        <description when-mixedcontent="passive-loaded">&identity.description.passiveLoaded;</description>
        <description class="identity-popup-warning-yellow"
                     when-mixedcontent="passive-loaded">&identity.description.passiveLoaded2; <label observes="identity-popup-mcb-learn-more"/></description>

        <!-- Passive Mixed Content Loaded, Active Mixed Content Blocked -->
        <description when-mixedcontent="passive-loaded active-blocked">&identity.description.passiveLoaded;</description>
        <description when-mixedcontent="passive-loaded active-blocked"
                     class="identity-popup-warning-yellow">&identity.description.passiveLoaded3; <label observes="identity-popup-mcb-learn-more"/></description>

        <!-- Active Mixed Content Blocking Disabled -->
        <description when-mixedcontent="active-loaded"
                     and-when-loginforms="secure">&identity.description.activeLoaded;</description>
        <description when-mixedcontent="active-loaded"
                     and-when-loginforms="secure">&identity.description.activeLoaded2; <label observes="identity-popup-mcb-learn-more"/></description>
        <!-- Show only the first message when there are insecure login forms,
             and make sure the Learn More link is included. -->
        <description when-mixedcontent="active-loaded"
                     and-when-loginforms="insecure">&identity.description.activeLoaded; <label observes="identity-popup-mcb-learn-more"/></description>

        <!-- Buttons to enable/disable mixed content blocking. -->
        <button when-mixedcontent="active-blocked"
                label="&identity.disableMixedContentBlocking.label;"
                accesskey="&identity.disableMixedContentBlocking.accesskey;"
                oncommand="gIdentityHandler.disableMixedContentProtection()"/>
        <button when-mixedcontent="active-loaded"
                label="&identity.enableMixedContentBlocking.label;"
                accesskey="&identity.enableMixedContentBlocking.accesskey;"
                oncommand="gIdentityHandler.enableMixedContentProtection()"/>
      </vbox>

      <vbox id="identity-popup-securityView-footer">
        <!-- More Security Information -->
        <button label="&identity.moreInfoLinkText2;"
                oncommand="gIdentityHandler.handleMoreInfoClick(event);"/>
      </vbox>

    </panelview>
  </panelmultiview>
</panel>

    <hbox id="downloads-animation-container" mousethrough="always">
      <vbox id="downloads-notification-anchor">
        <vbox id="downloads-indicator-notification"/>
      </vbox>
    </hbox>

    <hbox id="bookmarked-notification-container" mousethrough="always">
      <vbox id="bookmarked-notification-anchor">
        <vbox id="bookmarked-notification"/>
      </vbox>
      <vbox id="bookmarked-notification-dropmarker-anchor">
        <image id="bookmarked-notification-dropmarker-icon"/>
      </vbox>
    </hbox>

    <tooltip id="dynamic-shortcut-tooltip"
             onpopupshowing="UpdateDynamicShortcutTooltipText(this);"/>

    <menupopup id="SyncedTabsSidebarContext">
      <menuitem label="&syncedTabs.context.open.label;"
                accesskey="&syncedTabs.context.open.accesskey;"
                id="syncedTabsOpenSelected" where="current"/>
      <menuitem label="&syncedTabs.context.openInNewTab.label;"
                accesskey="&syncedTabs.context.openInNewTab.accesskey;"
                id="syncedTabsOpenSelectedInTab" where="tab"/>
      <menuitem label="&syncedTabs.context.openInNewWindow.label;"
                accesskey="&syncedTabs.context.openInNewWindow.accesskey;"
                id="syncedTabsOpenSelectedInWindow" where="window"/>
      <menuitem label="&syncedTabs.context.openInNewPrivateWindow.label;"
                accesskey="&syncedTabs.context.openInNewPrivateWindow.accesskey;"
                id="syncedTabsOpenSelectedInPrivateWindow" where="window" private="true"/>
      <menuseparator/>
      <menuitem label="&syncedTabs.context.bookmarkSingleTab.label;"
                accesskey="&syncedTabs.context.bookmarkSingleTab.accesskey;"
                id="syncedTabsBookmarkSelected"/>
      <menuitem label="&syncedTabs.context.copy.label;"
                accesskey="&syncedTabs.context.copy.accesskey;"
                id="syncedTabsCopySelected"/>
      <menuseparator/>
      <menuitem label="&syncSyncNowItem.label;"
                accesskey="&syncSyncNowItem.accesskey;"
                id="syncedTabsRefresh"/>
    </menupopup>
    <menupopup id="SyncedTabsSidebarTabsFilterContext"
               class="textbox-contextmenu">
      <menuitem label="&undoCmd.label;"
                accesskey="&undoCmd.accesskey;"
                cmd="cmd_undo"/>
      <menuseparator/>
      <menuitem label="&cutCmd.label;"
                accesskey="&cutCmd.accesskey;"
                cmd="cmd_cut"/>
      <menuitem label="&copyCmd.label;"
                accesskey="&copyCmd.accesskey;"
                cmd="cmd_copy"/>
      <menuitem label="&pasteCmd.label;"
                accesskey="&pasteCmd.accesskey;"
                cmd="cmd_paste"/>
      <menuitem label="&deleteCmd.label;"
                accesskey="&deleteCmd.accesskey;"
                cmd="cmd_delete"/>
      <menuseparator/>
      <menuitem label="&selectAllCmd.label;"
                accesskey="&selectAllCmd.accesskey;"
                cmd="cmd_selectAll"/>
      <menuseparator/>
      <menuitem label="&syncSyncNowItem.label;"
                accesskey="&syncSyncNowItem.accesskey;"
                id="syncedTabsRefreshFilter"/>
    </menupopup>
  </popupset>


<deck flex="1" id="tab-view-deck">
<vbox flex="1" id="browser-panel">

  <toolbox id="navigator-toolbox" mode="icons">
    <!-- Menu -->
    <toolbar type="menubar" id="toolbar-menubar" class="chromeclass-menubar" customizable="true"
             mode="icons" iconsize="small"
             toolbarname="&menubarCmd.label;"
             accesskey="&menubarCmd.accesskey;"
             autohide="true"
             context="toolbar-context-menu">
      <toolbaritem id="menubar-items" align="center">

       <menubar id="main-menubar"
                onpopupshowing="if (event.target.parentNode.parentNode == this &amp;&amp;
                                    !('@mozilla.org/widget/nativemenuservice;1' in Cc))
                                  this.setAttribute('openedwithkey',
                                                    event.target.parentNode.openedWithKey);"
                style="border:0px;padding:0px;margin:0px;-moz-appearance:none">
            <menu id="file-menu" label="&fileMenu.label;"
                  accesskey="&fileMenu.accesskey;">
              <menupopup id="menu_FilePopup"
                         onpopupshowing="updateUserContextUIVisibility();">
                <menuitem id="menu_newNavigatorTab"
                          label="&tabCmd.label;"
                          command="cmd_newNavigatorTab"
                          key="key_newNavigatorTab"
                          accesskey="&tabCmd.accesskey;"/>
                <menu id="menu_newUserContext"
                      label="&newUserContext.label;"
                      accesskey="&newUserContext.accesskey;"
                      hidden="true">
                  <menupopup onpopupshowing="return createUserContextMenu(event);" />
                </menu>
                <menuitem id="menu_newNavigator"
                          label="&newNavigatorCmd.label;"
                          accesskey="&newNavigatorCmd.accesskey;"
                          key="key_newNavigator"
                          command="cmd_newNavigator"/>
                <menuitem id="menu_newPrivateWindow"
                          label="&newPrivateWindow.label;"
                          accesskey="&newPrivateWindow.accesskey;"
                          command="Tools:PrivateBrowsing"
                          key="key_privatebrowsing"/>
                <menuitem id="menu_openFile"
                          label="&openFileCmd.label;"
                          command="Browser:OpenFile"
                          key="openFileKb"
                          accesskey="&openFileCmd.accesskey;"/>
                <menuitem id="menu_close"
                          class="show-only-for-keyboard"
                          label="&closeCmd.label;"
                          key="key_close"
                          accesskey="&closeCmd.accesskey;"
                          command="cmd_close"/>
                <menuitem id="menu_closeWindow"
                          class="show-only-for-keyboard"
                          hidden="true"
                          command="cmd_closeWindow"
                          key="key_closeWindow"
                          label="&closeWindow.label;"
                          accesskey="&closeWindow.accesskey;"/>
                <menuseparator/>
                <menuitem id="menu_savePage"
                          label="&savePageCmd.label;"
                          accesskey="&savePageCmd.accesskey;"
                          key="key_savePage"
                          command="Browser:SavePage"/>
                <menuitem id="menu_sendLink"
                          label="&emailPageCmd.label;"
                          accesskey="&emailPageCmd.accesskey;"
                          command="Browser:SendLink"/>
                <menuseparator/>
                <menuitem id="menu_printPreview"
                          label="&printPreviewCmd.label;"
                          accesskey="&printPreviewCmd.accesskey;"
                          command="cmd_printPreview"/>
                <menuitem id="menu_print"
                          label="&printCmd.label;"
                          accesskey="&printCmd.accesskey;"
                          key="printKb"
                          command="cmd_print"/>
                <menuseparator/>
                <menuitem id="goOfflineMenuitem"
                          label="&goOfflineCmd.label;"
                          accesskey="&goOfflineCmd.accesskey;"
                          type="checkbox"
                          observes="workOfflineMenuitemState"
                          oncommand="BrowserOffline.toggleOfflineStatus();"/>
                <menuitem id="menu_FileQuitItem"
                          label="&quitApplicationCmd.label;"
                          accesskey="&quitApplicationCmd.accesskey;"
                          key="key_quitApplication"
                          command="cmd_quitApplication"/>
              </menupopup>
            </menu>

            <menu id="edit-menu" label="&editMenu.label;"
                  accesskey="&editMenu.accesskey;">
              <menupopup id="menu_EditPopup"
                         onpopupshowing="updateEditUIVisibility()"
                         onpopuphidden="updateEditUIVisibility()">
                <menuitem id="menu_undo"
                          label="&undoCmd.label;"
                          key="key_undo"
                          accesskey="&undoCmd.accesskey;"
                          command="cmd_undo"/>
                <menuitem id="menu_redo"
                          label="&redoCmd.label;"
                          key="key_redo"
                          accesskey="&redoCmd.accesskey;"
                          command="cmd_redo"/>
                <menuseparator/>
                <menuitem id="menu_cut"
                          label="&cutCmd.label;"
                          key="key_cut"
                          accesskey="&cutCmd.accesskey;"
                          command="cmd_cut"/>
                <menuitem id="menu_copy"
                          label="&copyCmd.label;"
                          key="key_copy"
                          accesskey="&copyCmd.accesskey;"
                          command="cmd_copy"/>
                <menuitem id="menu_paste"
                          label="&pasteCmd.label;"
                          key="key_paste"
                          accesskey="&pasteCmd.accesskey;"
                          command="cmd_paste"/>
                <menuitem id="menu_delete"
                          label="&deleteCmd.label;"
                          key="key_delete"
                          accesskey="&deleteCmd.accesskey;"
                          command="cmd_delete"/>
                <menuseparator/>
                <menuitem id="menu_selectAll"
                          label="&selectAllCmd.label;"
                          key="key_selectAll"
                          accesskey="&selectAllCmd.accesskey;"
                          command="cmd_selectAll"/>
                <menuseparator/>
                <menuitem id="menu_find"
                          label="&findOnCmd.label;"
                          accesskey="&findOnCmd.accesskey;"
                          key="key_find"
                          command="cmd_find"/>
                <menuitem id="menu_findAgain"
                          class="show-only-for-keyboard"
                          label="&findAgainCmd.label;"
                          accesskey="&findAgainCmd.accesskey;"
                          key="key_findAgain"
                          command="cmd_findAgain"/>
                <menuseparator hidden="true" id="textfieldDirection-separator"/>
                <menuitem id="textfieldDirection-swap"
                          command="cmd_switchTextDirection"
                          key="key_switchTextDirection"
                          label="&bidiSwitchTextDirectionItem.label;"
                          accesskey="&bidiSwitchTextDirectionItem.accesskey;"
                          hidden="true"/>
                <menuseparator/>
                <menuitem id="menu_preferences"
                          label="&preferencesCmdUnix.label;"
                          accesskey="&preferencesCmdUnix.accesskey;"
                          oncommand="openPreferences();"/>
              </menupopup>
            </menu>

            <menu id="view-menu" label="&viewMenu.label;"
                  accesskey="&viewMenu.accesskey;">
              <menupopup id="menu_viewPopup"
                         onpopupshowing="updateCharacterEncodingMenuState();">
                <menu id="viewToolbarsMenu"
                      label="&viewToolbarsMenu.label;"
                      accesskey="&viewToolbarsMenu.accesskey;">
                  <menupopup onpopupshowing="onViewToolbarsPopupShowing(event);">
                    <menuseparator/>
                    <menuitem id="menu_customizeToolbars"
                              label="&viewCustomizeToolbar.label;"
                              accesskey="&viewCustomizeToolbar.accesskey;"
                              command="cmd_CustomizeToolbars"/>
                  </menupopup>
                </menu>
                <menu id="viewSidebarMenuMenu"
                      label="&viewSidebarMenu.label;"
                      accesskey="&viewSidebarMenu.accesskey;">
                  <menupopup id="viewSidebarMenu">
                    <menuitem id="menu_bookmarksSidebar"
                              key="viewBookmarksSidebarKb"
                              observes="viewBookmarksSidebar"/>
                    <menuitem id="menu_historySidebar"
                              key="key_gotoHistory"
                              observes="viewHistorySidebar"
                              label="&historyButton.label;"/>
                    <menuitem id="menu_tabsSidebar"
                              observes="viewTabsSidebar"
                              label="&syncedTabs.sidebar.label;"/>
                  </menupopup>
                </menu>
                <menuseparator/>
                <menu id="viewFullZoomMenu" label="&fullZoom.label;"
                      accesskey="&fullZoom.accesskey;"
                      onpopupshowing="FullZoom.updateMenu();">
                  <menupopup>
                    <menuitem id="menu_zoomEnlarge"
                              key="key_fullZoomEnlarge"
                              label="&fullZoomEnlargeCmd.label;"
                              accesskey="&fullZoomEnlargeCmd.accesskey;"
                              command="cmd_fullZoomEnlarge"/>
                    <menuitem id="menu_zoomReduce"
                              key="key_fullZoomReduce"
                              label="&fullZoomReduceCmd.label;"
                              accesskey="&fullZoomReduceCmd.accesskey;"
                              command="cmd_fullZoomReduce"/>
                    <menuseparator/>
                    <menuitem id="menu_zoomReset"
                              key="key_fullZoomReset"
                              label="&fullZoomResetCmd.label;"
                              accesskey="&fullZoomResetCmd.accesskey;"
                              command="cmd_fullZoomReset"/>
                    <menuseparator/>
                    <menuitem id="toggle_zoom"
                              label="&fullZoomToggleCmd.label;"
                              accesskey="&fullZoomToggleCmd.accesskey;"
                              type="checkbox"
                              command="cmd_fullZoomToggle"
                              checked="false"/>
                  </menupopup>
                </menu>
                <menu id="pageStyleMenu" label="&pageStyleMenu.label;"
                      accesskey="&pageStyleMenu.accesskey;" observes="isImage">
                  <menupopup onpopupshowing="gPageStyleMenu.fillPopup(this);">
                    <menuitem id="menu_pageStyleNoStyle"
                              label="&pageStyleNoStyle.label;"
                              accesskey="&pageStyleNoStyle.accesskey;"
                              oncommand="gPageStyleMenu.disableStyle();"
                              type="radio"/>
                    <menuitem id="menu_pageStylePersistentOnly"
                              label="&pageStylePersistentOnly.label;"
                              accesskey="&pageStylePersistentOnly.accesskey;"
                              oncommand="gPageStyleMenu.switchStyleSheet('');"
                              type="radio"
                              checked="true"/>
                    <menuseparator/>
                  </menupopup>
                </menu>

<menu id="charsetMenu"
    label="&charsetMenu2.label;"
    accesskey="&charsetMenu2.accesskey;"
    oncommand="BrowserSetForcedCharacterSet(event.target.getAttribute('charset'));"
    onpopupshowing="CharsetMenu.build(event.target); UpdateCurrentCharset(this);">
  <menupopup>
  </menupopup>
</menu>
                <menuseparator/>
                <menuitem id="fullScreenItem"
                          accesskey="&fullScreenCmd.accesskey;"
                          label="&fullScreenCmd.label;"
                          key="key_fullScreen"
                          type="checkbox"
                          observes="View:FullScreen"/>
                <menuitem id="menu_readerModeItem"
                          observes="View:ReaderView"
                          hidden="true"/>
                <menuitem id="menu_showAllTabs"
                          hidden="true"
                          accesskey="&showAllTabsCmd.accesskey;"
                          label="&showAllTabsCmd.label;"
                          command="Browser:ShowAllTabs"
                          key="key_showAllTabs"/>
                <menuseparator hidden="true" id="documentDirection-separator"/>
                <menuitem id="documentDirection-swap"
                          hidden="true"
                          label="&bidiSwitchPageDirectionItem.label;"
                          accesskey="&bidiSwitchPageDirectionItem.accesskey;"
                          oncommand="gBrowser.selectedBrowser
                                             .messageManager
                                             .sendAsyncMessage('SwitchDocumentDirection');"/>
              </menupopup>
            </menu>

            <menu id="history-menu"
                  label="&historyMenu.label;"
                  accesskey="&historyMenu.accesskey;">
              <menupopup id="goPopup"
                         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="menu_showAllHistory"
                          label="&showAllHistoryCmd2.label;"
                          key="showAllHistoryKb"
                          command="Browser:ShowAllHistory"/>
                <menuitem id="sanitizeItem"
                          label="&clearRecentHistory.label;"
                          key="key_sanitize"
                          command="Tools:Sanitize"/>
                <menuseparator id="sanitizeSeparator"/>
                <menuitem id="sync-tabs-menuitem"
                          class="syncTabsMenuItem"
                          label="&syncTabsMenu3.label;"
                          oncommand="BrowserOpenSyncTabs();"
                          hidden="true"/>
                <menuitem id="historyRestoreLastSession"
                          label="&historyRestoreLastSession.label;"
                          command="Browser:RestoreLastSession"/>
                <menu id="historyUndoMenu"
                      class="recentlyClosedTabsMenu"
                      label="&historyUndoMenu.label;"
                      disabled="true">
                  <menupopup id="historyUndoPopup"
                             placespopup="true"
                             onpopupshowing="document.getElementById('history-menu')._placesView.populateUndoSubmenu();"/>
                </menu>
                <menu id="historyUndoWindowMenu"
                      class="recentlyClosedWindowsMenu"
                      label="&historyUndoWindowMenu.label;"
                      disabled="true">
                  <menupopup id="historyUndoWindowPopup"
                             placespopup="true"
                             onpopupshowing="document.getElementById('history-menu')._placesView.populateUndoWindowSubmenu();"/>
                </menu>
                <menuseparator id="startHistorySeparator"
                               class="hide-if-empty-places-result"/>
              </menupopup>
            </menu>

  <menu id="bookmarksMenu"
        label="&bookmarksMenu.label;"
        accesskey="&bookmarksMenu.accesskey;"
        ondragenter="PlacesMenuDNDHandler.onDragEnter(event);"
        ondragover="PlacesMenuDNDHandler.onDragOver(event);"
        ondrop="PlacesMenuDNDHandler.onDrop(event);">
    <menupopup id="bookmarksMenuPopup"
               placespopup="true"
               context="placesContext"
               openInTabs="children"
               oncommand="BookmarksEventHandler.onCommand(event, this.parentNode._placesView);"
               onclick="BookmarksEventHandler.onClick(event, this.parentNode._placesView);"
               onpopupshowing="BookmarkingUI.onMainMenuPopupShowing(event);
                               if (!this.parentNode._placesView)
                                 new PlacesMenu(event, 'place:folder=BOOKMARKS_MENU');"
               tooltip="bhTooltip" popupsinherittooltip="true">
      <menuitem id="bookmarksShowAll"
                label="&showAllBookmarks2.label;"
                command="Browser:ShowAllBookmarks"
                key="manBookmarkKb"/>
      <menuseparator id="organizeBookmarksSeparator"/>
      <menuitem id="menu_bookmarkThisPage"
                command="Browser:AddBookmarkAs"
                observes="bookmarkThisPageBroadcaster"
                key="addBookmarkAsKb"/>
      <menuitem id="subscribeToPageMenuitem"
                class="menuitem-iconic"
                label="&subscribeToPageMenuitem.label;"
                oncommand="return FeedHandler.subscribeToFeed(null, event);"
                onclick="checkForMiddleClick(this, event);"
                observes="singleFeedMenuitemState"/>
      <menu id="subscribeToPageMenupopup"
            class="menu-iconic"
            label="&subscribeToPageMenupopup.label;"
            observes="multipleFeedsMenuState">
        <menupopup id="subscribeToPageSubmenuMenupopup"
                   onpopupshowing="return FeedHandler.buildFeedList(event.target);"
                   oncommand="return FeedHandler.subscribeToFeed(null, event);"
                   onclick="checkForMiddleClick(this, event);"/>
      </menu>
      <menuitem id="menu_bookmarkAllTabs"
                label="&addCurPagesCmd.label;"
                class="show-only-for-keyboard"
                command="Browser:BookmarkAllTabs"
                key="bookmarkAllTabsKb"/>
      <menuseparator/>
      <menuitem label="&recentBookmarks.label;"
                id="menu_recentBookmarks"
                disabled="true"/>
      <menuseparator id="bookmarksToolbarSeparator"/>
      <menu id="bookmarksToolbarFolderMenu"
            class="menu-iconic bookmark-item"
            label="&personalbarCmd.label;"
            container="true">
        <menupopup id="bookmarksToolbarFolderPopup"
                   placespopup="true"
                   context="placesContext"
                   onpopupshowing="if (!this.parentNode._placesView)
                                     new PlacesMenu(event, 'place:folder=TOOLBAR');"/>
      </menu>
      <menu id="menu_unsortedBookmarks"
            class="menu-iconic bookmark-item"
            label="&otherBookmarksCmd.label;"
            container="true">
        <menupopup id="otherBookmarksFolderPopup"
                   placespopup="true"
                   context="placesContext"
                   onpopupshowing="if (!this.parentNode._placesView)
                                     new PlacesMenu(event, 'place:folder=UNFILED_BOOKMARKS');"/>
      </menu>
      <menuseparator id="bookmarksMenuItemsSeparator"/>
      <!-- Bookmarks menu items -->
    </menupopup>
  </menu>

            <menu id="tools-menu"
                  label="&toolsMenu.label;"
                  accesskey="&toolsMenu.accesskey;"
                  onpopupshowing="mirrorShow(this)">
              <menupopup id="menu_ToolsPopup"
                         onpopupshowing="setTimeout(() => gSyncUI.updateUI());"
                         >
              <menuitem id="menu_openDownloads"
                        label="&downloads.label;"
                        accesskey="&downloads.accesskey;"
                        key="key_openDownloads"
                        command="Tools:Downloads"/>
              <menuitem id="menu_openAddons"
                        label="&addons.label;"
                        accesskey="&addons.accesskey;"
                        key="key_openAddons"
                        command="Tools:Addons"/>

              <!-- only one of sync-setup, sync-syncnowitem or sync-reauthitem will be showing at once -->
              <menuitem id="sync-setup"
                        label="&syncSignIn.label;"
                        accesskey="&syncSignIn.accesskey;"
                        observes="sync-setup-state"
                        oncommand="gSyncUI.openSetup(null, 'menubar')"/>
              <menuitem id="sync-syncnowitem"
                        label="&syncSyncNowItem.label;"
                        accesskey="&syncSyncNowItem.accesskey;"
                        observes="sync-syncnow-state"
                        oncommand="gSyncUI.doSync(event);"/>
              <menuitem id="sync-reauthitem"
                        label="&syncReAuthItem.label;"
                        accesskey="&syncReAuthItem.accesskey;"
                        observes="sync-reauth-state"
                        oncommand="gSyncUI.openSignInAgainPage('menubar');"/>
              <menuseparator id="devToolsSeparator"/>
              <menu id="webDeveloperMenu"
                    label="&webDeveloperMenu.label;"
                    accesskey="&webDeveloperMenu.accesskey;">
                <menupopup id="menuWebDeveloperPopup">
                  <menuitem id="menu_pageSource"
                            observes="devtoolsMenuBroadcaster_PageSource"
                            accesskey="&pageSourceCmd.accesskey;"/>
                </menupopup>
              </menu>
              <menuitem id="menu_pageInfo"
                        accesskey="&pageInfoCmd.accesskey;"
                        label="&pageInfoCmd.label;"
                        key="key_viewInfo"
                        command="View:PageInfo"/>
              <menu id="menu_mirrorTabCmd"
                    hidden="true"
                    accesskey="&mirrorTabCmd.accesskey;"
                    label="&mirrorTabCmd.label;">
                <menupopup id="menu_mirrorTab-popup"
                           onpopupshowing="populateMirrorTabMenu(this)"/>
              </menu>
              </menupopup>
            </menu>

          <menu id="helpMenu" />
        </menubar>
      </toolbaritem>

    </toolbar>

    <toolbar id="TabsToolbar"
             fullscreentoolbar="true"
             customizable="true"
             mode="icons"
             iconsize="small"
             aria-label="&tabsToolbar.label;"
             context="toolbar-context-menu"
             collapsed="true">

      <hbox id="private-browsing-indicator"
            skipintoolbarset="true"/>

      <tabs id="tabbrowser-tabs"
            class="tabbrowser-tabs"
            tabbrowser="content"
            flex="1"
            setfocus="false"
            tooltip="tabbrowser-tab-tooltip"
            stopwatchid="FX_TAB_CLICK_MS">
        <tab class="tabbrowser-tab" selected="true" visuallyselected="true" fadein="true"/>
      </tabs>

      <toolbarbutton id="new-tab-button"
                     class="toolbarbutton-1 chromeclass-toolbar-additional"
                     label="&tabCmd.label;"
                     command="cmd_newNavigatorTab"
                     onclick="checkForMiddleClick(this, event);"
                     tooltip="dynamic-shortcut-tooltip"
                     ondrop="newTabButtonObserver.onDrop(event)"
                     ondragover="newTabButtonObserver.onDragOver(event)"
                     ondragenter="newTabButtonObserver.onDragOver(event)"
                     ondragexit="newTabButtonObserver.onDragExit(event)"
                     cui-areatype="toolbar"
                     removable="true"/>

      <toolbarbutton id="alltabs-button"
                     class="toolbarbutton-1 chromeclass-toolbar-additional tabs-alltabs-button"
                     type="menu"
                     label="&listAllTabs.label;"
                     tooltiptext="&listAllTabs.label;"
                     removable="false">
        <menupopup id="alltabs-popup"
                   position="after_end">
          <menuitem id="alltabs_undoCloseTab"
                    class="menuitem-iconic"
                    key="key_undoCloseTab"
                    label="&undoCloseTab.label;"
                    observes="History:UndoCloseTab"/>
          <menuseparator id="alltabs-popup-separator-1"/>
          <menu id="alltabs_containersTab"
                label="&newUserContext.label;">
            <menupopup id="alltabs_containersMenuTab" />
          </menu>
          <menuseparator id="alltabs-popup-separator-2"/>
        </menupopup>
      </toolbarbutton>

    </toolbar>

    <toolbar id="nav-bar"
             aria-label="&navbarCmd.label;"
             fullscreentoolbar="true" mode="icons" customizable="true"
             iconsize="small"
             customizationtarget="nav-bar-customization-target"
             overflowable="true"
             overflowbutton="nav-bar-overflow-button"
             overflowtarget="widget-overflow-list"
             overflowpanel="widget-overflow"
             context="toolbar-context-menu">

      <hbox id="nav-bar-customization-target" flex="1">
        <toolbaritem id="urlbar-container" flex="400" persist="width"
                     removable="false"
                     class="chromeclass-location" overflows="false">
          <toolbarbutton id="back-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
                         label="&backCmd.label;"
                         command="Browser:BackOrBackDuplicate"
                         onclick="checkForMiddleClick(this, event);"
                         tooltip="back-button-tooltip"
                         context="backForwardMenu"/>
          <hbox id="urlbar-wrapper" flex="1">
            <toolbarbutton id="forward-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
                           label="&forwardCmd.label;"
                           command="Browser:ForwardOrForwardDuplicate"
                           onclick="checkForMiddleClick(this, event);"
                           tooltip="forward-button-tooltip"
                           context="backForwardMenu"/>
            <textbox id="urlbar" flex="1"
                     placeholder="&urlbar.placeholder2;"
                     type="autocomplete"
                     autocompletesearch="unifiedcomplete"
                     autocompletesearchparam="enable-actions"
                     autocompletepopup="PopupAutoCompleteRichResult"
                     completeselectedindex="true"
                     shrinkdelay="250"
                     tabscrolling="true"
                     showcommentcolumn="true"
                     showimagecolumn="true"
                     enablehistory="true"
                     maxrows="10"
                     newlines="stripsurroundingwhitespace"
                     ontextentered="this.handleCommand(param);"
                     ontextreverted="return this.handleRevert();"
                     pageproxystate="invalid">
              <!-- Use onclick instead of normal popup= syntax since the popup
                   code fires onmousedown, and hence eats our favicon drag events. -->
              <box id="identity-box" role="button"
                   align="center"
                   aria-label="&urlbar.viewSiteInfo.label;"
                   onclick="gIdentityHandler.handleIdentityButtonEvent(event);"
                   onkeypress="gIdentityHandler.handleIdentityButtonEvent(event);"
                   ondragstart="gIdentityHandler.onDragStart(event);">
                <image id="identity-icon"
                       consumeanchor="identity-box"
                       onclick="PageProxyClickHandler(event);"/>
                <image id="sharing-icon" mousethrough="always"/>
                <box id="blocked-permissions-container" align="center">
                  <image data-permission-id="geo" class="blocked-permission-icon geo-icon" role="button"
                         tooltiptext="&urlbar.geolocationBlocked.tooltip;"/>
                  <image data-permission-id="desktop-notification" class="blocked-permission-icon desktop-notification-icon" role="button"
                         tooltiptext="&urlbar.webNotificationsBlocked.tooltip;"/>
                  <image data-permission-id="camera" class="blocked-permission-icon camera-icon" role="button"
                         tooltiptext="&urlbar.cameraBlocked.tooltip;"/>
                  <image data-permission-id="indexedDB" class="blocked-permission-icon indexedDB-icon" role="button"
                         tooltiptext="&urlbar.indexedDBBlocked.tooltip;"/>
                  <image data-permission-id="microphone" class="blocked-permission-icon microphone-icon" role="button"
                         tooltiptext="&urlbar.microphoneBlocked.tooltip;"/>
                  <image data-permission-id="screen" class="blocked-permission-icon screen-icon" role="button"
                         tooltiptext="&urlbar.screenBlocked.tooltip;"/>
                </box>
                <box id="notification-popup-box"
                     hidden="true"
                     onmouseover="document.getElementById('identity-icon').classList.add('no-hover');"
                     onmouseout="document.getElementById('identity-icon').classList.remove('no-hover');"
                     align="center">
                  <image id="default-notification-icon" class="notification-anchor-icon" role="button"
                         tooltiptext="&urlbar.defaultNotificationAnchor.tooltip;"/>
                  <image id="geo-notification-icon" class="notification-anchor-icon geo-icon" role="button"
                         tooltiptext="&urlbar.geolocationNotificationAnchor.tooltip;"/>
                  <image id="addons-notification-icon" class="notification-anchor-icon install-icon" role="button"
                         tooltiptext="&urlbar.addonsNotificationAnchor.tooltip;"/>
                  <image id="indexedDB-notification-icon" class="notification-anchor-icon indexedDB-icon" role="button"
                         tooltiptext="&urlbar.indexedDBNotificationAnchor.tooltip;"/>
                  <image id="password-notification-icon" class="notification-anchor-icon login-icon" role="button"
                         tooltiptext="&urlbar.passwordNotificationAnchor.tooltip;"/>
                  <image id="plugins-notification-icon" class="notification-anchor-icon plugin-icon" role="button"
                         tooltiptext="&urlbar.pluginsNotificationAnchor.tooltip;"/>
                  <image id="web-notifications-notification-icon" class="notification-anchor-icon desktop-notification-icon" role="button"
                         tooltiptext="&urlbar.webNotificationAnchor.tooltip;"/>
                  <image id="webRTC-shareDevices-notification-icon" class="notification-anchor-icon camera-icon" role="button"
                         tooltiptext="&urlbar.webRTCShareDevicesNotificationAnchor.tooltip;"/>
                  <image id="webRTC-shareMicrophone-notification-icon" class="notification-anchor-icon microphone-icon" role="button"
                         tooltiptext="&urlbar.webRTCShareMicrophoneNotificationAnchor.tooltip;"/>
                  <image id="webRTC-shareScreen-notification-icon" class="notification-anchor-icon screen-icon" role="button"
                         tooltiptext="&urlbar.webRTCShareScreenNotificationAnchor.tooltip;"/>
                  <image id="servicesInstall-notification-icon" class="notification-anchor-icon service-icon" role="button"
                         tooltiptext="&urlbar.servicesNotificationAnchor.tooltip;"/>
                  <image id="translate-notification-icon" class="notification-anchor-icon translation-icon" role="button"
                         tooltiptext="&urlbar.translateNotificationAnchor.tooltip;"/>
                  <image id="translated-notification-icon" class="notification-anchor-icon translation-icon in-use" role="button"
                         tooltiptext="&urlbar.translatedNotificationAnchor.tooltip;"/>
                  <image id="eme-notification-icon" class="notification-anchor-icon drm-icon" role="button"
                         tooltiptext="&urlbar.emeNotificationAnchor.tooltip;"/>
                </box>
                <image id="tracking-protection-icon"/>
                <image id="connection-icon"/>
                <hbox id="identity-icon-labels">
                  <label id="identity-icon-label" class="plain" flex="1"/>
                  <label id="identity-icon-country-label" class="plain"/>
                </hbox>
              </box>
              <box id="urlbar-display-box" align="center">
                <label id="switchtab" class="urlbar-display urlbar-display-switchtab" value="&urlbar.switchToTab.label;"/>
                <label id="extension" class="urlbar-display urlbar-display-extension" value="&urlbar.extension.label;"/>
              </box>
              <hbox id="urlbar-icons">
                <image id="page-report-button"
                       class="urlbar-icon"
                       hidden="true"
                       tooltiptext="&pageReportIcon.tooltip;"
                       onmousedown="gPopupBlockerObserver.onReportButtonMousedown(event);"/>
                <image id="reader-mode-button"
                       class="urlbar-icon"
                       hidden="true"
                       onclick="ReaderParent.buttonClick(event);"/>
                <toolbarbutton id="urlbar-zoom-button"
                       onclick="FullZoom.reset();"
                       tooltiptext="&urlbar.zoomReset.tooltip;"
                       hidden="true"/>
              </hbox>
              <hbox id="userContext-icons" hidden="true">
                <label id="userContext-label"/>
                <image id="userContext-indicator"/>
              </hbox>
              <toolbarbutton id="urlbar-go-button"
                             class="chromeclass-toolbar-additional"
                             onclick="gURLBar.handleCommand(event);"
                             tooltiptext="&goEndCap.tooltip;"/>
              <toolbarbutton id="urlbar-reload-button"
                             class="chromeclass-toolbar-additional"
                             command="Browser:ReloadOrDuplicate"
                             onclick="checkForMiddleClick(this, event);"
                             tooltiptext="&reloadButton.tooltip;"/>
              <toolbarbutton id="urlbar-stop-button"
                             class="chromeclass-toolbar-additional"
                             command="Browser:Stop"
                             tooltiptext="&stopButton.tooltip;"/>
            </textbox>
          </hbox>
        </toolbaritem>

        <toolbaritem id="search-container" title="&searchItem.title;"
                     align="center" class="chromeclass-toolbar-additional panel-wide-item"
                     cui-areatype="toolbar"
                     flex="100" persist="width" removable="true">
          <searchbar id="searchbar" flex="1"/>
        </toolbaritem>

        <toolbarbutton id="bookmarks-menu-button"
                       class="toolbarbutton-1 chromeclass-toolbar-additional"
                       removable="true"
                       type="menu-button"
                       label="&bookmarksMenuButton.label;"
                       tooltip="dynamic-shortcut-tooltip"
                       anchor="dropmarker"
                       ondragenter="PlacesMenuDNDHandler.onDragEnter(event);"
                       ondragover="PlacesMenuDNDHandler.onDragOver(event);"
                       ondragleave="PlacesMenuDNDHandler.onDragLeave(event);"
                       ondrop="PlacesMenuDNDHandler.onDrop(event);"
                       cui-areatype="toolbar"
                       oncommand="BookmarkingUI.onCommand(event);">
          <observes element="bookmarkThisPageBroadcaster" attribute="starred"/>
          <observes element="bookmarkThisPageBroadcaster" attribute="buttontooltiptext"/>
          <menupopup id="BMB_bookmarksPopup"
                     class="cui-widget-panel cui-widget-panelview cui-widget-panelWithFooter PanelUI-subView"
                     placespopup="true"
                     context="placesContext"
                     openInTabs="children"
                     oncommand="BookmarksEventHandler.onCommand(event, this.parentNode._placesView);"
                     onclick="BookmarksEventHandler.onClick(event, this.parentNode._placesView);"
                     onpopupshowing="BookmarkingUI.onPopupShowing(event);
                                     BookmarkingUI.attachPlacesView(event, this);"
                     tooltip="bhTooltip" popupsinherittooltip="true">
            <menuitem id="BMB_viewBookmarksSidebar"
                      class="subviewbutton"
                      label="&viewBookmarksSidebar2.label;"
                      type="checkbox"
                      oncommand="SidebarUI.toggle('viewBookmarksSidebar');">
              <observes element="viewBookmarksSidebar" attribute="checked"/>
            </menuitem>
            <!-- NB: temporary solution for bug 985024, this should go away soon. -->
            <menuitem id="BMB_bookmarksShowAllTop"
                      class="menuitem-iconic subviewbutton"
                      label="&showAllBookmarks2.label;"
                      command="Browser:ShowAllBookmarks"
                      key="manBookmarkKb"/>
            <menuseparator/>
            <menuitem label="&recentBookmarks.label;"
                      id="BMB_recentBookmarks"
                      disabled="true"
                      class="menuitem-iconic subviewbutton"/>
            <menuseparator/>
            <menu id="BMB_bookmarksToolbar"
                  class="menu-iconic bookmark-item subviewbutton"
                  label="&personalbarCmd.label;"
                  container="true">
              <menupopup id="BMB_bookmarksToolbarPopup"
                         placespopup="true"
                         context="placesContext"
                         onpopupshowing="if (!this.parentNode._placesView)
                                           new PlacesMenu(event, 'place:folder=TOOLBAR',
                                                          PlacesUIUtils.getViewForNode(this.parentNode.parentNode).options);">
                <menuitem id="BMB_viewBookmarksToolbar"
                          placesanonid="view-toolbar"
                          toolbarId="PersonalToolbar"
                          type="checkbox"
                          oncommand="onViewToolbarCommand(event)"
                          label="&viewBookmarksToolbar.label;"/>
                <menuseparator/>
                <!-- Bookmarks toolbar items -->
              </menupopup>
            </menu>
            <menu id="BMB_unsortedBookmarks"
                  class="menu-iconic bookmark-item subviewbutton"
                  label="&bookmarksMenuButton.other.label;"
                  container="true">
              <menupopup id="BMB_unsortedBookmarksPopup"
                         placespopup="true"
                         context="placesContext"
                         onpopupshowing="if (!this.parentNode._placesView)
                                           new PlacesMenu(event, 'place:folder=UNFILED_BOOKMARKS',
                                                          PlacesUIUtils.getViewForNode(this.parentNode.parentNode).options);"/>
            </menu>
            <menuseparator/>
            <!-- Bookmarks menu items will go here -->
            <menuitem id="BMB_bookmarksShowAll"
                      class="subviewbutton panel-subview-footer"
                      label="&showAllBookmarks2.label;"
                      command="Browser:ShowAllBookmarks"
                      key="manBookmarkKb"/>
          </menupopup>
        </toolbarbutton>

        <!-- This is a placeholder for the Downloads Indicator.  It is visible
             during the customization of the toolbar, in the palette, and before
             the Downloads Indicator overlay is loaded. -->
        <toolbarbutton id="downloads-button"
                       class="toolbarbutton-1 chromeclass-toolbar-additional badged-button"
                       key="key_openDownloads"
                       oncommand="DownloadsIndicatorView.onCommand(event);"
                       ondrop="DownloadsIndicatorView.onDrop(event);"
                       ondragover="DownloadsIndicatorView.onDragOver(event);"
                       ondragenter="DownloadsIndicatorView.onDragOver(event);"
                       label="&downloads.label;"
                       removable="true"
                       cui-areatype="toolbar"
                       tooltip="dynamic-shortcut-tooltip"/>

        <toolbarbutton id="home-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
                       removable="true"
                       label="&homeButton.label;"
                       ondragover="homeButtonObserver.onDragOver(event)"
                       ondragenter="homeButtonObserver.onDragOver(event)"
                       ondrop="homeButtonObserver.onDrop(event)"
                       ondragexit="homeButtonObserver.onDragExit(event)"
                       key="goHome"
                       onclick="BrowserGoHome(event);"
                       cui-areatype="toolbar"
                       aboutHomeOverrideTooltip="&abouthome.pageTitle;"/>
      </hbox>

      <toolbarbutton id="nav-bar-overflow-button"
                     class="toolbarbutton-1 chromeclass-toolbar-additional overflow-button"
                     skipintoolbarset="true"
                     tooltiptext="&navbarOverflow.label;"/>

      <toolbaritem id="PanelUI-button"
                   class="chromeclass-toolbar-additional"
                   removable="false">
        <toolbarbutton id="PanelUI-menu-button"
                       class="toolbarbutton-1 badged-button"
                       consumeanchor="PanelUI-button"
                       label="&brandShortName;"
                       tooltiptext="&appmenu.tooltip;"/>
      </toolbaritem>

      <hbox id="window-controls" hidden="true" pack="end" skipintoolbarset="true"
            ordinal="1000">
        <toolbarbutton id="minimize-button"
                       tooltiptext="&fullScreenMinimize.tooltip;"
                       oncommand="window.minimize();"/>

        <toolbarbutton id="restore-button"
                       tooltiptext="&fullScreenRestore.tooltip;"
                       oncommand="BrowserFullScreen();"/>

        <toolbarbutton id="close-button"
                       tooltiptext="&fullScreenClose.tooltip;"
                       oncommand="BrowserTryToCloseWindow();"/>
      </hbox>
    </toolbar>

    <toolbarset id="customToolbars" context="toolbar-context-menu"/>

    <toolbar id="PersonalToolbar"
             mode="icons" iconsize="small"
             class="chromeclass-directories"
             context="toolbar-context-menu"
             toolbarname="&personalbarCmd.label;" accesskey="&personalbarCmd.accesskey;"
             collapsed="true"
             customizable="true">
      <toolbaritem id="personal-bookmarks"
                   title="&bookmarksToolbarItem.label;"
                   cui-areatype="toolbar"
                   removable="true">
        <toolbarbutton id="bookmarks-toolbar-placeholder"
                       class="toolbarbutton-1"
                       mousethrough="never"
                       label="&bookmarksToolbarItem.label;"
                       oncommand="PlacesToolbarHelper.onPlaceholderCommand();"/>
        <hbox flex="1"
              id="PlacesToolbar"
              context="placesContext"
              onclick="BookmarksEventHandler.onClick(event, this._placesView);"
              oncommand="BookmarksEventHandler.onCommand(event, this._placesView);"
              tooltip="bhTooltip"
              popupsinherittooltip="true">
          <hbox flex="1">
            <hbox id="PlacesToolbarDropIndicatorHolder" align="center" collapsed="true">
              <image id="PlacesToolbarDropIndicator"
                     mousethrough="always"
                     collapsed="true"/>
            </hbox>
            <scrollbox orient="horizontal"
                       id="PlacesToolbarItems"
                       flex="1"/>
            <toolbarbutton type="menu"
                           id="PlacesChevron"
                           class="chevron"
                           mousethrough="never"
                           collapsed="true"
                           tooltiptext="&bookmarksToolbarChevron.tooltip;"
                           onpopupshowing="document.getElementById('PlacesToolbar')
                                                   ._placesView._onChevronPopupShowing(event);">
              <menupopup id="PlacesChevronPopup"
                         placespopup="true"
                         tooltip="bhTooltip" popupsinherittooltip="true"
                         context="placesContext"/>
            </toolbarbutton>
          </hbox>
        </hbox>
      </toolbaritem>
    </toolbar>

    <!-- This is a shim which will go away ASAP. See bug 749804 for details -->
    <toolbar id="addon-bar" toolbar-delegate="nav-bar" mode="icons" iconsize="small"
             customizable="true">
      <hbox id="addonbar-closebutton"/>
      <statusbar id="status-bar"/>
    </toolbar>

    <toolbarpalette id="BrowserToolbarPalette">


      <toolbarbutton id="print-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
                     command="cmd_printPreview"
                     tooltiptext="&printButton.tooltip;"
                     label="&printButton.label;"/>


      <toolbarbutton id="new-window-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
                     label="&newNavigatorCmd.label;"
                     command="key_newNavigator"
                     tooltip="dynamic-shortcut-tooltip"
                     ondrop="newWindowButtonObserver.onDrop(event)"
                     ondragover="newWindowButtonObserver.onDragOver(event)"
                     ondragenter="newWindowButtonObserver.onDragOver(event)"
                     ondragexit="newWindowButtonObserver.onDragExit(event)"/>

      <toolbarbutton id="fullscreen-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
                     observes="View:FullScreen"
                     type="checkbox"
                     label="&fullScreenCmd.label;"
                     tooltip="dynamic-shortcut-tooltip"/>
    </toolbarpalette>
  </toolbox>

  <hbox id="fullscr-toggler" hidden="true"/>

  <deck id="content-deck" flex="1">
    <hbox flex="1" id="browser">
      <vbox id="browser-border-start" hidden="true" layer="true"/>
      <vbox id="sidebar-box" hidden="true" class="chromeclass-extrachrome">
        <sidebarheader id="sidebar-header" align="center">
          <label id="sidebar-title" persist="value" flex="1" crop="end" control="sidebar"/>
          <image id="sidebar-throbber"/>
          <toolbarbutton class="close-icon tabbable" tooltiptext="&sidebarCloseButton.tooltip;" oncommand="SidebarUI.hide();"/>
        </sidebarheader>
        <browser id="sidebar" flex="1" autoscroll="false" disablehistory="true" disablefullscreen="true"
                  style="min-width: 14em; width: 18em; max-width: 36em;" tooltip="aHTMLTooltip"/>
      </vbox>

      <splitter id="sidebar-splitter" class="chromeclass-extrachrome sidebar-splitter" hidden="true"/>
      <vbox id="appcontent" flex="1">
        <notificationbox id="high-priority-global-notificationbox" notificationside="top"/>
        <tabbrowser id="content"
                    flex="1" contenttooltip="aHTMLTooltip"
                    tabcontainer="tabbrowser-tabs"
                    contentcontextmenu="contentAreaContextMenu"
                    autocompletepopup="PopupAutoComplete"
                    selectmenulist="ContentSelectDropdown"
                    datetimepicker="DateTimePickerPanel"/>
      </vbox>
      <vbox id="browser-border-end" hidden="true" layer="true"/>
    </hbox>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->

<hbox id="customization-container" flex="1" hidden="true">
  <vbox flex="1" id="customization-palette-container">
    <label id="customization-header">
      &customizeMode.menuAndToolbars.header2;
    </label>
    <hbox id="customization-empty" hidden="true">
      <label>&customizeMode.menuAndToolbars.empty;</label>
      <label onclick="BrowserOpenAddonsMgr('addons://discover/');"
             onkeypress="BrowserOpenAddonsMgr('addons://discover/');"
             id="customization-more-tools"
             class="text-link">
        &customizeMode.menuAndToolbars.emptyLink;
      </label>
    </hbox>
    <vbox id="customization-palette" class="customization-palette"/>
    <spacer id="customization-spacer"/>
    <hbox id="customization-footer">
      <button id="customization-toolbar-visibility-button" label="&customizeMode.toolbars;" class="customizationmode-button" type="menu">
        <menupopup id="customization-toolbar-menu" onpopupshowing="onViewToolbarsPopupShowing(event)"/>
      </button>
      <button id="customization-lwtheme-button" label="&customizeMode.lwthemes;" class="customizationmode-button" type="menu">
        <panel type="arrow" id="customization-lwtheme-menu"
               onpopupshowing="gCustomizeMode.onLWThemesMenuShowing(event);"
               position="topcenter bottomleft"
               flip="none"
               role="menu">
          <label id="customization-lwtheme-menu-header" value="&customizeMode.lwthemes.myThemes;"/>
          <label id="customization-lwtheme-menu-recommended" value="&customizeMode.lwthemes.recommended;"/>
          <hbox id="customization-lwtheme-menu-footer">
            <toolbarbutton class="customization-lwtheme-menu-footeritem"
                           label="&customizeMode.lwthemes.menuManage;"
                           accesskey="&customizeMode.lwthemes.menuManage.accessKey;"
                           tabindex="0"
                           oncommand="gCustomizeMode.openAddonsManagerThemes(event);"/>
            <toolbarbutton class="customization-lwtheme-menu-footeritem"
                           label="&customizeMode.lwthemes.menuGetMore;"
                           accesskey="&customizeMode.lwthemes.menuGetMore.accessKey;"
                           tabindex="0"
                           oncommand="gCustomizeMode.getMoreThemes(event);"/>
          </hbox>
        </panel>
      </button>

      <spacer id="customization-footer-spacer"/>
      <button id="customization-undo-reset-button"
              class="customizationmode-button"
              hidden="true"
              oncommand="gCustomizeMode.undoReset();"
              label="&undoCmd.label;"/>
      <button id="customization-reset-button"
              oncommand="gCustomizeMode.reset();"
              label="&customizeMode.restoreDefaults;"
              class="customizationmode-button"/>
    </hbox>
  </vbox>
  <vbox id="customization-panel-container">
    <vbox id="customization-panelWrapper">
      <html:style html:type="text/html" scoped="scoped">
        @import url(chrome://global/skin/popup.css);
      </html:style>
      <box class="panel-arrowbox">
        <box flex="1"/>
        <image class="panel-arrow" side="top"/>
      </box>
      <box class="panel-arrowcontent" side="top" flex="1">
        <hbox id="customization-panelHolder"/>
        <box class="panel-inner-arrowcontentfooter" hidden="true"/>
      </box>
    </vbox>
  </vbox>
</hbox>
  </deck>

  <html:div id="fullscreen-warning" class="pointerlockfswarning" hidden="true">
    <html:div class="pointerlockfswarning-domain-text">
      &fullscreenWarning.beforeDomain.label;
      <html:span class="pointerlockfswarning-domain"/>
      &fullscreenWarning.afterDomain.label;
    </html:div>
    <html:div class="pointerlockfswarning-generic-text">
      &fullscreenWarning.generic.label;
    </html:div>
    <html:button id="fullscreen-exit-button"
                 onclick="FullScreen.exitDomFullScreen();">
            &exitDOMFullscreen.button;
    </html:button>
  </html:div>

  <html:div id="pointerlock-warning" class="pointerlockfswarning" hidden="true">
    <html:div class="pointerlockfswarning-domain-text">
      &pointerlockWarning.beforeDomain.label;
      <html:span class="pointerlockfswarning-domain"/>
      &pointerlockWarning.afterDomain.label;
    </html:div>
    <html:div class="pointerlockfswarning-generic-text">
      &pointerlockWarning.generic.label;
    </html:div>
  </html:div>

  <vbox id="browser-bottombox" layer="true">
    <notificationbox id="global-notificationbox" notificationside="bottom"/>
  </vbox>

  <svg:svg height="0">
<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->

<svg:clipPath id="tab-curve-clip-path-start" clipPathUnits="objectBoundingBox">
  <svg:path d="m 1,0.0625 0.05,0 0,0.938 -1,0 0,-0.028 C 0.32082458,0.95840561 0.4353096,0.81970962 0.48499998,0.5625 0.51819998,0.3905 0.535,0.0659 1,0.0625 z"/>
</svg:clipPath>

<svg:clipPath id="tab-curve-clip-path-end" clipPathUnits="objectBoundingBox">
  <svg:path d="m 0,0.0625 -0.05,0 0,0.938 1,0 0,-0.028 C 0.67917542,0.95840561 0.56569036,0.81970962 0.51599998,0.5625 0.48279998,0.3905 0.465,0.0659 0,0.0625 z"/>
</svg:clipPath>
    <svg:clipPath id="urlbar-back-button-clip-path">
      <svg:path d="M -9,-4 l 0,1 a 15 15 0 0,1 0,30 l 0,1 l 10000,0 l 0,-32 l -10000,0 z" />
    </svg:clipPath>
  </svg:svg>

</vbox>
</deck>

</window>
