firefox-kde.patch
changeset 1088 84cdfb476431
parent 1085 87f893cf45b9
child 1089 eca1c1f2fe50
equal deleted inserted replaced
1074:4b99400f6d17 1088:84cdfb476431
     1 # HG changeset patch
     1 # HG changeset patch
     2 # Parent  fdf78810e83396d10418791fbe32bed6bfe1558b
     2 # Parent  693f0baece29cc958a7d91b89fd12e3b89a502e3
     3 
     3 
     4 diff --git a/browser/base/content/browser-kde.xul b/browser/base/content/browser-kde.xul
     4 diff --git a/browser/base/content/browser-kde.xul b/browser/base/content/browser-kde.xul
     5 new file mode 100644
     5 new file mode 100644
     6 --- /dev/null
     6 --- /dev/null
     7 +++ b/browser/base/content/browser-kde.xul
     7 +++ b/browser/base/content/browser-kde.xul
     8 @@ -0,0 +1,1317 @@
     8 @@ -0,0 +1,1395 @@
     9 +#filter substitution
     9 +#filter substitution
    10 +<?xml version="1.0"?>
    10 +<?xml version="1.0"?>
    11 +# -*- Mode: HTML -*-
    11 +# -*- Mode: HTML -*-
    12 +#
    12 +#
    13 +# This Source Code Form is subject to the terms of the Mozilla Public
    13 +# This Source Code Form is subject to the terms of the Mozilla Public
    16 +
    16 +
    17 +<!-- The "global.css" stylesheet is imported first to allow other stylesheets to
    17 +<!-- The "global.css" stylesheet is imported first to allow other stylesheets to
    18 +     override rules using selectors with the same specificity. This applies to
    18 +     override rules using selectors with the same specificity. This applies to
    19 +     both "content" and "skin" packages, which bug 1385444 will unify later. -->
    19 +     both "content" and "skin" packages, which bug 1385444 will unify later. -->
    20 +<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
    20 +<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
       
    21 +
       
    22 +<!-- While these stylesheets are defined in Toolkit, they are only used in the
       
    23 +     main browser window, so we can load them here. Bug 1474241 is on file to
       
    24 +     consider moving these widgets to the "browser" folder. -->
       
    25 +<?xml-stylesheet href="chrome://global/content/tabprompts.css" type="text/css"?>
       
    26 +<?xml-stylesheet href="chrome://global/skin/tabprompts.css" type="text/css"?>
    21 +
    27 +
    22 +<?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?>
    28 +<?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?>
    23 +<?xml-stylesheet href="chrome://browser/content/tabbrowser.css" type="text/css"?>
    29 +<?xml-stylesheet href="chrome://browser/content/tabbrowser.css" type="text/css"?>
    24 +<?xml-stylesheet href="chrome://browser/content/downloads/downloads.css" type="text/css"?>
    30 +<?xml-stylesheet href="chrome://browser/content/downloads/downloads.css" type="text/css"?>
    25 +<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
    31 +<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
    70 +        macanimationtype="document"
    76 +        macanimationtype="document"
    71 +        screenX="4" screenY="4"
    77 +        screenX="4" screenY="4"
    72 +        fullscreenbutton="true"
    78 +        fullscreenbutton="true"
    73 +        sizemode="normal"
    79 +        sizemode="normal"
    74 +        retargetdocumentfocus="urlbar"
    80 +        retargetdocumentfocus="urlbar"
    75 +        persist="screenX screenY width height sizemode">
    81 +        persist="screenX screenY width height sizemode"
       
    82 +#ifdef BROWSER_XHTML
       
    83 +        hidden="true"
       
    84 +        mozpersist=""
       
    85 +#endif
       
    86 +        >
    76 +
    87 +
    77 +# All JS files which are needed by browser.xul and other top level windows to
    88 +# All JS files which are needed by browser.xul and other top level windows to
    78 +# support MacOS specific features *must* go into the global-scripts.inc file so
    89 +# support MacOS specific features *must* go into the global-scripts.inc file so
    79 +# that they can be shared with macWindow.inc.xul.
    90 +# that they can be shared with macWindow.inc.xul.
    80 +#include global-scripts.inc
    91 +#include global-scripts.inc
    83 +#ifdef BROWSER_XHTML
    94 +#ifdef BROWSER_XHTML
    84 +xmlns="http://www.w3.org/1999/xhtml"
    95 +xmlns="http://www.w3.org/1999/xhtml"
    85 +#endif
    96 +#endif
    86 +>
    97 +>
    87 +  Services.scriptloader.loadSubScript("chrome://global/content/contentAreaUtils.js", this);
    98 +  Services.scriptloader.loadSubScript("chrome://global/content/contentAreaUtils.js", this);
       
    99 +  Services.scriptloader.loadSubScript("chrome://browser/content/browser-captivePortal.js", this);
       
   100 +  Services.scriptloader.loadSubScript("chrome://browser/content/browser-compacttheme.js", this);
       
   101 +  Services.scriptloader.loadSubScript("chrome://browser/content/browser-contentblocking.js", this);
       
   102 +#ifdef MOZ_DATA_REPORTING
       
   103 +  Services.scriptloader.loadSubScript("chrome://browser/content/browser-data-submission-info-bar.js", this);
       
   104 +#endif
       
   105 +#ifndef MOZILLA_OFFICIAL
       
   106 +  Services.scriptloader.loadSubScript("chrome://browser/content/browser-development-helpers.js", this);
       
   107 +#endif
       
   108 +  Services.scriptloader.loadSubScript("chrome://browser/content/browser-media.js", this);
       
   109 +  Services.scriptloader.loadSubScript("chrome://browser/content/browser-pageActions.js", this);
       
   110 +  Services.scriptloader.loadSubScript("chrome://browser/content/browser-plugins.js", this);
       
   111 +  Services.scriptloader.loadSubScript("chrome://browser/content/browser-sidebar.js", this);
       
   112 +  Services.scriptloader.loadSubScript("chrome://browser/content/browser-tabsintitlebar.js", this);
    88 +  Services.scriptloader.loadSubScript("chrome://browser/content/tabbrowser.js", this);
   113 +  Services.scriptloader.loadSubScript("chrome://browser/content/tabbrowser.js", this);
       
   114 +  Services.scriptloader.loadSubScript("chrome://browser/content/search/searchbar.js", this);
    89 +
   115 +
    90 +  window.onload = gBrowserInit.onLoad.bind(gBrowserInit);
   116 +  window.onload = gBrowserInit.onLoad.bind(gBrowserInit);
    91 +  window.onunload = gBrowserInit.onUnload.bind(gBrowserInit);
   117 +  window.onunload = gBrowserInit.onUnload.bind(gBrowserInit);
    92 +  window.onclose = WindowIsClosing;
   118 +  window.onclose = WindowIsClosing;
       
   119 +
    93 +#ifdef BROWSER_XHTML
   120 +#ifdef BROWSER_XHTML
    94 +  window.addEventListener("DOMContentLoaded",
   121 +  window.addEventListener("readystatechange", () => {
    95 +    gBrowserInit.onBeforeInitialXULLayout.bind(gBrowserInit), { once: true });
   122 +    // We initially hide the window to prevent layouts during parse. This lets us
       
   123 +    // avoid accidental XBL construction and better match browser.xul (see Bug 1497975).
       
   124 +    gBrowserInit.onBeforeInitialXULLayout();
       
   125 +    document.documentElement.removeAttribute("hidden");
       
   126 +  }, { once: true, capture: true });
    96 +#else
   127 +#else
    97 +  window.addEventListener("MozBeforeInitialXULLayout",
   128 +  window.addEventListener("MozBeforeInitialXULLayout",
    98 +    gBrowserInit.onBeforeInitialXULLayout.bind(gBrowserInit), { once: true });
   129 +    gBrowserInit.onBeforeInitialXULLayout.bind(gBrowserInit), { once: true });
    99 +#endif
   130 +#endif
   100 +  // The listener of DOMContentLoaded must be set on window, rather than
   131 +  // The listener of DOMContentLoaded must be set on window, rather than
   114 +    <menupopup id="tabContextMenu"
   145 +    <menupopup id="tabContextMenu"
   115 +               onpopupshowing="if (event.target == this) TabContextMenu.updateContextMenu(this);"
   146 +               onpopupshowing="if (event.target == this) TabContextMenu.updateContextMenu(this);"
   116 +               onpopuphidden="if (event.target == this) TabContextMenu.contextTab = null;">
   147 +               onpopuphidden="if (event.target == this) TabContextMenu.contextTab = null;">
   117 +      <menuitem id="context_reloadTab" label="&reloadTab.label;" accesskey="&reloadTab.accesskey;"
   148 +      <menuitem id="context_reloadTab" label="&reloadTab.label;" accesskey="&reloadTab.accesskey;"
   118 +                oncommand="gBrowser.reloadTab(TabContextMenu.contextTab);"/>
   149 +                oncommand="gBrowser.reloadTab(TabContextMenu.contextTab);"/>
   119 +      <menuitem id="context_reloadSelectedTabs" label="&reloadSelectedTabs.label;" hidden="true"
   150 +      <menuitem id="context_reloadSelectedTabs" label="&reloadTabs.label;" hidden="true"
   120 +                accesskey="&reloadSelectedTabs.accesskey;"
   151 +                accesskey="&reloadTabs.accesskey;"
   121 +                oncommand="gBrowser.reloadMultiSelectedTabs();"/>
   152 +                oncommand="gBrowser.reloadMultiSelectedTabs();"/>
   122 +      <menuitem id="context_toggleMuteTab" oncommand="TabContextMenu.contextTab.toggleMuteAudio();"/>
   153 +      <menuitem id="context_toggleMuteTab" oncommand="TabContextMenu.contextTab.toggleMuteAudio();"/>
   123 +      <menuitem id="context_toggleMuteSelectedTabs" hidden="true"
   154 +      <menuitem id="context_toggleMuteSelectedTabs" hidden="true"
   124 +                oncommand="gBrowser.toggleMuteAudioOnMultiSelectedTabs(TabContextMenu.contextTab);"/>
   155 +                oncommand="gBrowser.toggleMuteAudioOnMultiSelectedTabs(TabContextMenu.contextTab);"/>
   125 +      <menuseparator/>
       
   126 +      <menuitem id="context_pinTab" label="&pinTab.label;"
   156 +      <menuitem id="context_pinTab" label="&pinTab.label;"
   127 +                accesskey="&pinTab.accesskey;"
   157 +                accesskey="&pinTab.accesskey;"
   128 +                oncommand="gBrowser.pinTab(TabContextMenu.contextTab);"/>
   158 +                oncommand="gBrowser.pinTab(TabContextMenu.contextTab);"/>
   129 +      <menuitem id="context_unpinTab" label="&unpinTab.label;" hidden="true"
   159 +      <menuitem id="context_unpinTab" label="&unpinTab.label;" hidden="true"
   130 +                accesskey="&unpinTab.accesskey;"
   160 +                accesskey="&unpinTab.accesskey;"
   136 +                accesskey="&unpinSelectedTabs.accesskey;"
   166 +                accesskey="&unpinSelectedTabs.accesskey;"
   137 +                oncommand="gBrowser.unpinMultiSelectedTabs();"/>
   167 +                oncommand="gBrowser.unpinMultiSelectedTabs();"/>
   138 +      <menuitem id="context_duplicateTab" label="&duplicateTab.label;"
   168 +      <menuitem id="context_duplicateTab" label="&duplicateTab.label;"
   139 +                accesskey="&duplicateTab.accesskey;"
   169 +                accesskey="&duplicateTab.accesskey;"
   140 +                oncommand="duplicateTabIn(TabContextMenu.contextTab, 'tab');"/>
   170 +                oncommand="duplicateTabIn(TabContextMenu.contextTab, 'tab');"/>
       
   171 +      <menuitem id="context_duplicateTabs" label="&duplicateTabs.label;"
       
   172 +                accesskey="&duplicateTabs.accesskey;"
       
   173 +                oncommand="TabContextMenu.duplicateSelectedTabs();"/>
       
   174 +      <menuseparator/>
       
   175 +      <menuitem id="context_selectAllTabs" label="&selectAllTabs.label;" accesskey="&selectAllTabs.accesskey;"
       
   176 +                oncommand="gBrowser.selectAllTabs();"/>
       
   177 +      <menuitem id="context_bookmarkSelectedTabs"
       
   178 +                hidden="true"
       
   179 +                label="&bookmarkSelectedTabs.label;"
       
   180 +                accesskey="&bookmarkSelectedTabs.accesskey;"
       
   181 +                oncommand="PlacesCommandHook.bookmarkPages(PlacesCommandHook.uniqueSelectedPages);"/>
       
   182 +      <menuitem id="context_bookmarkTab"
       
   183 +                label="&bookmarkTab.label;"
       
   184 +                accesskey="&bookmarkTab.accesskey;"
       
   185 +                oncommand="PlacesCommandHook.bookmarkPages(PlacesCommandHook.getUniquePages([TabContextMenu.contextTab]));"/>
   141 +      <menu id="context_reopenInContainer"
   186 +      <menu id="context_reopenInContainer"
   142 +            label="&reopenInContainer.label;"
   187 +            label="&reopenInContainer.label;"
   143 +            accesskey="&reopenInContainer.accesskey;"
   188 +            accesskey="&reopenInContainer.accesskey;"
   144 +            hidden="true">
   189 +            hidden="true">
   145 +        <menupopup oncommand="TabContextMenu.reopenInContainer(event);"
   190 +        <menupopup oncommand="TabContextMenu.reopenInContainer(event);"
   146 +                   onpopupshowing="TabContextMenu.createReopenInContainerMenu(event);"/>
   191 +                   onpopupshowing="TabContextMenu.createReopenInContainerMenu(event);"/>
   147 +      </menu>
   192 +      </menu>
   148 +      <menuitem id="context_openTabInWindow" label="&moveToNewWindow.label;"
   193 +      <menu id="context_moveTabOptions"
   149 +                accesskey="&moveToNewWindow.accesskey;"
   194 +            multiselectcontextlabel="&moveSelectedTabOptions.label;"
   150 +                tbattr="tabbrowser-multiple"
   195 +            multiselectcontextaccesskey="&moveSelectedTabOptions.accesskey;"
   151 +                oncommand="gBrowser.replaceTabsWithWindow(TabContextMenu.contextTab);"/>
   196 +            nonmultiselectcontextlabel="&moveTabOptions.label;"
   152 +      <menuseparator id="context_sendTabToDevice_separator" class="sync-ui-item"/>
   197 +            nonmultiselectcontextaccesskey="&moveTabOptions.accesskey;">
   153 +      <menu id="context_sendTabToDevice" label="&sendTabToDevice.label;"
   198 +        <menupopup id="moveTabOptionsMenu">
   154 +            class="sync-ui-item"
   199 +          <menuitem id="context_moveToStart"
   155 +            accesskey="&sendTabToDevice.accesskey;">
   200 +                    label="&moveToStart.label;"
       
   201 +                    accesskey="&moveToStart.accesskey;"
       
   202 +                    tbattr="tabbrowser-multiple"
       
   203 +                    oncommand="gBrowser.moveTabsToStart(TabContextMenu.contextTab);"/>
       
   204 +          <menuitem id="context_moveToEnd"
       
   205 +                    label="&moveToEnd.label;"
       
   206 +                    accesskey="&moveToEnd.accesskey;"
       
   207 +                    tbattr="tabbrowser-multiple"
       
   208 +                    oncommand="gBrowser.moveTabsToEnd(TabContextMenu.contextTab);"/>
       
   209 +          <menuitem id="context_openTabInWindow" label="&moveToNewWindow.label;"
       
   210 +                    accesskey="&moveToNewWindow.accesskey;"
       
   211 +                    tbattr="tabbrowser-multiple"
       
   212 +                    oncommand="gBrowser.replaceTabsWithWindow(TabContextMenu.contextTab);"/>
       
   213 +        </menupopup>
       
   214 +      </menu>
       
   215 +      <menu id="context_sendTabToDevice"
       
   216 +            class="sync-ui-item">
   156 +        <menupopup id="context_sendTabToDevicePopupMenu"
   217 +        <menupopup id="context_sendTabToDevicePopupMenu"
   157 +                   onpopupshowing="gSync.populateSendTabToDevicesMenu(event.target, TabContextMenu.contextTab.linkedBrowser.currentURI.spec, TabContextMenu.contextTab.linkedBrowser.contentTitle);"/>
   218 +                   onpopupshowing="gSync.populateSendTabToDevicesMenu(event.target, TabContextMenu.contextTab.linkedBrowser.currentURI.spec, TabContextMenu.contextTab.linkedBrowser.contentTitle, TabContextMenu.contextTab.multiselected);"/>
   158 +      </menu>
   219 +      </menu>
   159 +      <menuseparator/>
   220 +      <menuseparator/>
   160 +      <menuitem id="context_reloadAllTabs" label="&reloadAllTabs.label;" accesskey="&reloadAllTabs.accesskey;"
       
   161 +                tbattr="tabbrowser-multiple-visible"
       
   162 +                oncommand="gBrowser.reloadAllTabs();"/>
       
   163 +       <menuitem id="context_bookmarkSelectedTabs"
       
   164 +                hidden="true"
       
   165 +                label="&bookmarkSelectedTabs.label;"
       
   166 +                accesskey="&bookmarkSelectedTabs.accesskey;"
       
   167 +                oncommand="PlacesCommandHook.bookmarkPages(PlacesCommandHook.uniqueSelectedPages);"/>
       
   168 +      <menuitem id="context_bookmarkAllTabs"
       
   169 +                label="&bookmarkAllTabs.label;"
       
   170 +                accesskey="&bookmarkAllTabs.accesskey;"
       
   171 +                command="Browser:BookmarkAllTabs"/>
       
   172 +      <menuitem id="context_closeTabsToTheEnd" label="&closeTabsToTheEnd.label;" accesskey="&closeTabsToTheEnd.accesskey;"
   221 +      <menuitem id="context_closeTabsToTheEnd" label="&closeTabsToTheEnd.label;" accesskey="&closeTabsToTheEnd.accesskey;"
   173 +                oncommand="gBrowser.removeTabsToTheEndFrom(TabContextMenu.contextTab, {animate: true});"/>
   222 +                oncommand="gBrowser.removeTabsToTheEndFrom(TabContextMenu.contextTab, {animate: true});"/>
   174 +      <menuitem id="context_closeOtherTabs" label="&closeOtherTabs.label;" accesskey="&closeOtherTabs.accesskey;"
   223 +      <menuitem id="context_closeOtherTabs" label="&closeOtherTabs.label;" accesskey="&closeOtherTabs.accesskey;"
   175 +                oncommand="gBrowser.removeAllTabsBut(TabContextMenu.contextTab);"/>
   224 +                oncommand="gBrowser.removeAllTabsBut(TabContextMenu.contextTab);"/>
   176 +      <menuseparator/>
       
   177 +      <menuitem id="context_undoCloseTab"
   225 +      <menuitem id="context_undoCloseTab"
   178 +                label="&undoCloseTab.label;"
   226 +                label="&undoCloseTab.label;"
   179 +                accesskey="&undoCloseTab.accesskey;"
   227 +                accesskey="&undoCloseTab.accesskey;"
   180 +                observes="History:UndoCloseTab"/>
   228 +                observes="History:UndoCloseTab"/>
   181 +      <menuitem id="context_closeTab" label="&closeTab.label;" accesskey="&closeTab.accesskey;"
   229 +      <menuitem id="context_closeTab" label="&closeTab.label;" accesskey="&closeTab.accesskey;"
   182 +                oncommand="gBrowser.removeTab(TabContextMenu.contextTab, { animate: true });"/>
   230 +                oncommand="gBrowser.removeTab(TabContextMenu.contextTab, { animate: true });"/>
   183 +      <menuitem id="context_closeSelectedTabs" label="&closeSelectedTabs.label;"
   231 +      <menuitem id="context_closeSelectedTabs" label="&closeTabs.label;"
   184 +                hidden="true" accesskey="&closeSelectedTabs.accesskey;"
   232 +                hidden="true" accesskey="&closeTabs.accesskey;"
   185 +                oncommand="gBrowser.removeMultiSelectedTabs();"/>
   233 +                oncommand="gBrowser.removeMultiSelectedTabs();"/>
   186 +    </menupopup>
   234 +    </menupopup>
   187 +
   235 +
   188 +    <!-- bug 415444/582485: event.stopPropagation is here for the cloned version
   236 +    <!-- bug 415444/582485: event.stopPropagation is here for the cloned version
   189 +         of this menupopup -->
   237 +         of this menupopup -->
   220 +           hidden="true"
   268 +           hidden="true"
   221 +           flip="none"
   269 +           flip="none"
   222 +           level="parent"
   270 +           level="parent"
   223 +           overflowpadding="15" />
   271 +           overflowpadding="15" />
   224 +
   272 +
   225 +   <!-- for date/time picker. consumeoutsideclicks is set to never, so that
   273 +    <!-- for url bar autocomplete -->
   226 +        clicks on the anchored input box are never consumed. -->
   274 +    <panel id="urlbar-results"
       
   275 +           role="group"
       
   276 +           noautofocus="true"
       
   277 +           hidden="true"
       
   278 +           flip="none"
       
   279 +           level="parent">
       
   280 +      <html:div class="urlbarView-body-outer">
       
   281 +        <html:div class="urlbarView-body-inner">
       
   282 +          <!-- TODO: add search suggestions notification -->
       
   283 +          <html:div class="urlbarView-results"/>
       
   284 +        </html:div>
       
   285 +      </html:div>
       
   286 +      <hbox class="search-one-offs"
       
   287 +            compact="true"
       
   288 +            includecurrentengine="true"
       
   289 +            disabletab="true"/>
       
   290 +    </panel>
       
   291 +
       
   292 +    <!-- for date/time picker. consumeoutsideclicks is set to never, so that
       
   293 +         clicks on the anchored input box are never consumed. -->
   227 +    <panel id="DateTimePickerPanel"
   294 +    <panel id="DateTimePickerPanel"
   228 +           type="arrow"
   295 +           type="arrow"
   229 +           hidden="true"
   296 +           hidden="true"
   230 +           orient="vertical"
   297 +           orient="vertical"
   231 +           noautofocus="true"
   298 +           noautofocus="true"
   275 +                  label="&editBookmark.showForNewBookmarks.label;"
   342 +                  label="&editBookmark.showForNewBookmarks.label;"
   276 +                  accesskey="&editBookmark.showForNewBookmarks.accesskey;"
   343 +                  accesskey="&editBookmark.showForNewBookmarks.accesskey;"
   277 +                  oncommand="StarUI.onShowForNewBookmarksCheckboxCommand();"/>
   344 +                  oncommand="StarUI.onShowForNewBookmarksCheckboxCommand();"/>
   278 +      </vbox>
   345 +      </vbox>
   279 +      <hbox id="editBookmarkPanelBottomButtons"
   346 +      <hbox id="editBookmarkPanelBottomButtons"
       
   347 +            class="panel-footer"
   280 +            style="min-width: &editBookmark.panel.width;;">
   348 +            style="min-width: &editBookmark.panel.width;;">
   281 +#ifdef XP_UNIX
   349 +#ifdef XP_UNIX
   282 +        <button id="editBookmarkPanelDoneButton"
   350 +        <button id="editBookmarkPanelDoneButton"
   283 +                class="editBookmarkPanelBottomButton"
   351 +                class="editBookmarkPanelBottomButton"
   284 +                label="&editBookmark.done.label;"
   352 +                label="&editBookmark.done.label;"
   372 +                     class="subviewbutton"
   440 +                     class="subviewbutton"
   373 +                     oncommand="SidebarUI.hide()"/>
   441 +                     oncommand="SidebarUI.hide()"/>
   374 +    </panel>
   442 +    </panel>
   375 +
   443 +
   376 +    <menupopup id="toolbar-context-menu"
   444 +    <menupopup id="toolbar-context-menu"
   377 +               onpopupshowing="onViewToolbarsPopupShowing(event, document.getElementById('viewToolbarsMenuSeparator')); UpdateDownloadsAutoHide(this); UpdateManageExtension(this)">
   445 +               onpopupshowing="onViewToolbarsPopupShowing(event, document.getElementById('viewToolbarsMenuSeparator')); ToolbarContextMenu.updateDownloadsAutoHide(this); ToolbarContextMenu.updateExtension(this)">
   378 +      <menuitem oncommand="openAboutAddonsForContextAction(this.parentElement)"
   446 +      <menuitem oncommand="ToolbarContextMenu.openAboutAddonsForContextAction(this.parentElement)"
   379 +                accesskey="&customizeMenu.manageExtension.accesskey;"
   447 +                accesskey="&customizeMenu.manageExtension.accesskey;"
   380 +                label="&customizeMenu.manageExtension.label;"
   448 +                label="&customizeMenu.manageExtension.label;"
   381 +                contexttype="toolbaritem"
   449 +                contexttype="toolbaritem"
   382 +                class="customize-context-manageExtension"/>
   450 +                class="customize-context-manageExtension"/>
       
   451 +      <menuitem oncommand="ToolbarContextMenu.removeExtensionForContextAction(this.parentElement)"
       
   452 +                accesskey="&customizeMenu.removeExtension.accesskey;"
       
   453 +                label="&customizeMenu.removeExtension.label;"
       
   454 +                contexttype="toolbaritem"
       
   455 +                class="customize-context-removeExtension"/>
   383 +      <menuseparator/>
   456 +      <menuseparator/>
   384 +      <menuitem oncommand="gCustomizeMode.addToPanel(document.popupNode)"
   457 +      <menuitem oncommand="gCustomizeMode.addToPanel(document.popupNode)"
   385 +                accesskey="&customizeMenu.pinToOverflowMenu.accesskey;"
   458 +                accesskey="&customizeMenu.pinToOverflowMenu.accesskey;"
   386 +                label="&customizeMenu.pinToOverflowMenu.label;"
   459 +                label="&customizeMenu.pinToOverflowMenu.label;"
   387 +                contexttype="toolbaritem"
   460 +                contexttype="toolbaritem"
   388 +                class="customize-context-moveToPanel"/>
   461 +                class="customize-context-moveToPanel"/>
   389 +      <menuitem oncommand="onDownloadsAutoHideChange(event)"
   462 +      <menuitem id="toolbar-context-autohide-downloads-button"
       
   463 +                oncommand="ToolbarContextMenu.onDownloadsAutoHideChange(event);"
   390 +                type="checkbox"
   464 +                type="checkbox"
   391 +                accesskey="&customizeMenu.autoHideDownloadsButton.accesskey;"
   465 +                accesskey="&customizeMenu.autoHideDownloadsButton.accesskey;"
   392 +                label="&customizeMenu.autoHideDownloadsButton.label;"
   466 +                label="&customizeMenu.autoHideDownloadsButton.label;"
   393 +                contexttype="toolbaritem"
   467 +                contexttype="toolbaritem"/>
   394 +                class="customize-context-autoHide"/>
       
   395 +      <menuitem oncommand="gCustomizeMode.removeFromArea(document.popupNode)"
   468 +      <menuitem oncommand="gCustomizeMode.removeFromArea(document.popupNode)"
   396 +                accesskey="&customizeMenu.removeFromToolbar.accesskey;"
   469 +                accesskey="&customizeMenu.removeFromToolbar.accesskey;"
   397 +                label="&customizeMenu.removeFromToolbar.label;"
   470 +                label="&customizeMenu.removeFromToolbar.label;"
   398 +                contexttype="toolbaritem"
   471 +                contexttype="toolbaritem"
   399 +                class="customize-context-removeFromToolbar"/>
   472 +                class="customize-context-removeFromToolbar"/>
   400 +      <menuitem id="toolbar-context-reloadAllTabs"
   473 +      <menuitem id="toolbar-context-reloadSelectedTab"
   401 +                class="toolbaritem-tabsmenu"
       
   402 +                contexttype="tabbar"
   474 +                contexttype="tabbar"
   403 +                oncommand="gBrowser.reloadAllTabs();"
   475 +                oncommand="gBrowser.reloadMultiSelectedTabs();"
   404 +                label="&toolbarContextMenu.reloadAllTabs.label;"
   476 +                label="&toolbarContextMenu.reloadSelectedTab.label;"
   405 +                accesskey="&toolbarContextMenu.reloadAllTabs.accesskey;"/>
   477 +                accesskey="&toolbarContextMenu.reloadSelectedTab.accesskey;"/>
   406 +      <menuitem id="toolbar-context-bookmarkAllTabs"
   478 +      <menuitem id="toolbar-context-reloadSelectedTabs"
   407 +                class="toolbaritem-tabsmenu"
       
   408 +                contexttype="tabbar"
   479 +                contexttype="tabbar"
   409 +                command="Browser:BookmarkAllTabs"
   480 +                oncommand="gBrowser.reloadMultiSelectedTabs();"
   410 +                label="&toolbarContextMenu.bookmarkAllTabs.label;"
   481 +                label="&toolbarContextMenu.reloadSelectedTabs.label;"
   411 +                accesskey="&toolbarContextMenu.bookmarkAllTabs.accesskey;"/>
   482 +                accesskey="&toolbarContextMenu.reloadSelectedTabs.accesskey;"/>
       
   483 +      <menuitem id="toolbar-context-bookmarkSelectedTab"
       
   484 +                contexttype="tabbar"
       
   485 +                oncommand="PlacesCommandHook.bookmarkPages(PlacesCommandHook.uniqueSelectedPages);"
       
   486 +                label="&toolbarContextMenu.bookmarkSelectedTab.label;"
       
   487 +                accesskey="&toolbarContextMenu.bookmarkSelectedTab.accesskey;"/>
       
   488 +      <menuitem id="toolbar-context-bookmarkSelectedTabs"
       
   489 +                contexttype="tabbar"
       
   490 +                oncommand="PlacesCommandHook.bookmarkPages(PlacesCommandHook.uniqueSelectedPages);"
       
   491 +                label="&toolbarContextMenu.bookmarkSelectedTabs.label;"
       
   492 +                accesskey="&toolbarContextMenu.bookmarkSelectedTabs.accesskey;"/>
       
   493 +      <menuitem id="toolbar-context-selectAllTabs"
       
   494 +                contexttype="tabbar"
       
   495 +                oncommand="gBrowser.selectAllTabs();"
       
   496 +                label="&toolbarContextMenu.selectAllTabs.label;"
       
   497 +                accesskey="&toolbarContextMenu.selectAllTabs.accesskey;"/>
   412 +      <menuitem id="toolbar-context-undoCloseTab"
   498 +      <menuitem id="toolbar-context-undoCloseTab"
   413 +                class="toolbaritem-tabsmenu"
       
   414 +                contexttype="tabbar"
   499 +                contexttype="tabbar"
   415 +                label="&toolbarContextMenu.undoCloseTab.label;"
   500 +                label="&toolbarContextMenu.undoCloseTab.label;"
   416 +                accesskey="&toolbarContextMenu.undoCloseTab.accesskey;"
   501 +                accesskey="&toolbarContextMenu.undoCloseTab.accesskey;"
   417 +                observes="History:UndoCloseTab"/>
   502 +                observes="History:UndoCloseTab"/>
   418 +      <menuseparator/>
   503 +      <menuseparator/>
   494 +           position="bottomcenter topright"
   579 +           position="bottomcenter topright"
   495 +           tabspecific="true"
   580 +           tabspecific="true"
   496 +           noautofocus="true"
   581 +           noautofocus="true"
   497 +           copyURL-title="&pageAction.copyLink.label;"
   582 +           copyURL-title="&pageAction.copyLink.label;"
   498 +           emailLink-title="&emailPageCmd.label;"
   583 +           emailLink-title="&emailPageCmd.label;"
   499 +           sendToDevice-title="&pageAction.sendTabToDevice.label;"
       
   500 +           sendToDevice-notReadyTitle="&sendToDevice.syncNotReady.label;"
   584 +           sendToDevice-notReadyTitle="&sendToDevice.syncNotReady.label;"
   501 +           shareURL-title="&pageAction.shareUrl.label;"
   585 +           shareURL-title="&pageAction.shareUrl.label;"
   502 +           shareMore-label="&pageAction.shareMore.label;">
   586 +           shareMore-label="&pageAction.shareMore.label;">
   503 +      <panelmultiview id="pageActionPanelMultiView"
   587 +      <panelmultiview id="pageActionPanelMultiView"
   504 +                      mainViewId="pageActionPanelMainView"
   588 +                      mainViewId="pageActionPanelMainView"
   532 +                oncommand="BrowserPageActions.togglePinningForContextAction();"/>
   616 +                oncommand="BrowserPageActions.togglePinningForContextAction();"/>
   533 +      <menuitem class="pageActionContextMenuItem builtInPinned"
   617 +      <menuitem class="pageActionContextMenuItem builtInPinned"
   534 +                label="&pageAction.removeFromUrlbar.label;"
   618 +                label="&pageAction.removeFromUrlbar.label;"
   535 +                oncommand="BrowserPageActions.togglePinningForContextAction();"/>
   619 +                oncommand="BrowserPageActions.togglePinningForContextAction();"/>
   536 +      <menuitem class="pageActionContextMenuItem extensionUnpinned"
   620 +      <menuitem class="pageActionContextMenuItem extensionUnpinned"
   537 +                label="&pageAction.allowInUrlbar.label;"
   621 +                label="&pageAction.addToUrlbar.label;"
   538 +                oncommand="BrowserPageActions.togglePinningForContextAction();"/>
   622 +                oncommand="BrowserPageActions.togglePinningForContextAction();"/>
   539 +      <menuitem class="pageActionContextMenuItem extensionPinned"
   623 +      <menuitem class="pageActionContextMenuItem extensionPinned"
   540 +                label="&pageAction.disallowInUrlbar.label;"
   624 +                label="&pageAction.removeFromUrlbar.label;"
   541 +                oncommand="BrowserPageActions.togglePinningForContextAction();"/>
   625 +                oncommand="BrowserPageActions.togglePinningForContextAction();"/>
   542 +      <menuseparator class="pageActionContextMenuItem extensionPinned extensionUnpinned"/>
   626 +      <menuseparator class="pageActionContextMenuItem extensionPinned extensionUnpinned"/>
   543 +      <menuitem class="pageActionContextMenuItem extensionPinned extensionUnpinned"
   627 +      <menuitem class="pageActionContextMenuItem extensionPinned extensionUnpinned"
   544 +                label="&pageAction.manageExtension.label;"
   628 +                label="&pageAction.manageExtension.label;"
   545 +                oncommand="BrowserPageActions.openAboutAddonsForContextAction();"/>
   629 +                oncommand="BrowserPageActions.openAboutAddonsForContextAction();"/>
   548 +#include ../../components/places/content/bookmarksHistoryTooltip.inc.xul
   632 +#include ../../components/places/content/bookmarksHistoryTooltip.inc.xul
   549 +
   633 +
   550 +    <tooltip id="tabbrowser-tab-tooltip" onpopupshowing="gBrowser.createTooltip(event);"/>
   634 +    <tooltip id="tabbrowser-tab-tooltip" onpopupshowing="gBrowser.createTooltip(event);"/>
   551 +
   635 +
   552 +    <tooltip id="back-button-tooltip">
   636 +    <tooltip id="back-button-tooltip">
   553 +      <label class="tooltip-label" value="&backButton.tooltip;"/>
   637 +      <description class="tooltip-label" value="&backButton.tooltip;"/>
   554 +#ifdef XP_MACOSX
   638 +#ifdef XP_MACOSX
   555 +      <label class="tooltip-label" value="&backForwardButtonMenuMac.tooltip;"/>
   639 +      <description class="tooltip-label" value="&backForwardButtonMenuMac.tooltip;"/>
   556 +#else
   640 +#else
   557 +      <label class="tooltip-label" value="&backForwardButtonMenu.tooltip;"/>
   641 +      <description class="tooltip-label" value="&backForwardButtonMenu.tooltip;"/>
   558 +#endif
   642 +#endif
   559 +    </tooltip>
   643 +    </tooltip>
   560 +
   644 +
   561 +    <tooltip id="forward-button-tooltip">
   645 +    <tooltip id="forward-button-tooltip">
   562 +      <label class="tooltip-label" value="&forwardButton.tooltip;"/>
   646 +      <description class="tooltip-label" value="&forwardButton.tooltip;"/>
   563 +#ifdef XP_MACOSX
   647 +#ifdef XP_MACOSX
   564 +      <label class="tooltip-label" value="&backForwardButtonMenuMac.tooltip;"/>
   648 +      <description class="tooltip-label" value="&backForwardButtonMenuMac.tooltip;"/>
   565 +#else
   649 +#else
   566 +      <label class="tooltip-label" value="&backForwardButtonMenu.tooltip;"/>
   650 +      <description class="tooltip-label" value="&backForwardButtonMenu.tooltip;"/>
   567 +#endif
   651 +#endif
   568 +    </tooltip>
   652 +    </tooltip>
   569 +
   653 +
   570 +#include popup-notifications.inc
   654 +#include popup-notifications.inc
   571 +
   655 +
   653 +      </hbox>
   737 +      </hbox>
   654 +    </hbox>
   738 +    </hbox>
   655 +  </popupset>
   739 +  </popupset>
   656 +  <box id="appMenu-viewCache" hidden="true"/>
   740 +  <box id="appMenu-viewCache" hidden="true"/>
   657 +
   741 +
   658 +<vbox id="titlebar">
   742 +  <toolbox id="navigator-toolbox">
   659 +  <hbox id="titlebar-content">
   743 +
   660 +    <spacer id="titlebar-spacer" flex="1"/>
   744 +    <vbox id="titlebar">
   661 +    <hbox id="titlebar-buttonbox-container">
   745 +      <!-- Menu -->
   662 +      <hbox id="titlebar-buttonbox" class="titlebar-color">
   746 +      <toolbar type="menubar" id="toolbar-menubar"
   663 +        <toolbarbutton class="titlebar-button" id="titlebar-min" oncommand="window.minimize();"/>
   747 +               class="browser-toolbar chromeclass-menubar titlebar-color"
   664 +        <toolbarbutton class="titlebar-button" id="titlebar-max" oncommand="onTitlebarMaxClick();"/>
   748 +               customizable="true"
   665 +        <toolbarbutton class="titlebar-button" id="titlebar-close" command="cmd_closeWindow"/>
   749 +               mode="icons"
   666 +      </hbox>
   750 +#ifdef MENUBAR_CAN_AUTOHIDE
   667 +    </hbox>
   751 +               toolbarname="&menubarCmd.label;"
   668 +#ifdef XP_MACOSX
   752 +               accesskey="&menubarCmd.accesskey;"
   669 +    <!-- OS X does not natively support RTL for its titlebar items, so we prevent this secondary
   753 +               autohide="true"
   670 +         buttonbox from reversing order in RTL by forcing an LTR direction. -->
       
   671 +    <hbox id="titlebar-secondary-buttonbox" dir="ltr">
       
   672 +      <button class="accessibility-indicator" tooltiptext="&accessibilityIndicator.tooltip;" aria-live="polite"/>
       
   673 +      <hbox class="private-browsing-indicator"/>
       
   674 +      <hbox id="titlebar-fullscreen-button"/>
       
   675 +    </hbox>
       
   676 +#endif
   754 +#endif
   677 +  </hbox>
   755 +               context="toolbar-context-menu">
   678 +</vbox>
   756 +        <toolbaritem id="menubar-items" align="center">
   679 +
       
   680 +  <toolbox id="navigator-toolbox">
       
   681 +    <!-- Menu -->
       
   682 +    <toolbar type="menubar" id="toolbar-menubar"
       
   683 +             class="browser-toolbar chromeclass-menubar titlebar-color"
       
   684 +             customizable="true"
       
   685 +             mode="icons"
       
   686 +#ifdef MENUBAR_CAN_AUTOHIDE
       
   687 +             toolbarname="&menubarCmd.label;"
       
   688 +             accesskey="&menubarCmd.accesskey;"
       
   689 +             autohide="true"
       
   690 +#endif
       
   691 +             context="toolbar-context-menu">
       
   692 +      <toolbaritem id="menubar-items" align="center">
       
   693 +# The entire main menubar is placed into browser-menubar.inc, so that it can be
   757 +# The entire main menubar is placed into browser-menubar.inc, so that it can be
   694 +# shared with other top level windows in macWindow.inc.xul.
   758 +# shared with other top level windows in macWindow.inc.xul.
   695 +#include browser-menubar.inc
   759 +#include browser-menubar.inc
   696 +      </toolbaritem>
   760 +        </toolbaritem>
       
   761 +        <spacer flex="1" skipintoolbarset="true" ordinal="1000"/>
       
   762 +#include titlebar-items.inc.xul
       
   763 +      </toolbar>
       
   764 +
       
   765 +      <toolbar id="TabsToolbar"
       
   766 +               class="browser-toolbar titlebar-color"
       
   767 +               fullscreentoolbar="true"
       
   768 +               customizable="true"
       
   769 +               customizationtarget="TabsToolbar-customization-target"
       
   770 +               mode="icons"
       
   771 +               aria-label="&tabsToolbar.label;"
       
   772 +               context="toolbar-context-menu"
       
   773 +               flex="1">
       
   774 +        <vbox flex="1" class="toolbar-items">
       
   775 +          <spacer flex="1000"/>
       
   776 +
       
   777 +          <hbox id="TabsToolbar-customization-target" flex="1">
       
   778 +            <hbox class="titlebar-spacer" type="pre-tabs"
       
   779 +                  skipintoolbarset="true"/>
       
   780 +
       
   781 +            <tabs id="tabbrowser-tabs"
       
   782 +                  flex="1"
       
   783 +                  setfocus="false"
       
   784 +                  tooltip="tabbrowser-tab-tooltip"
       
   785 +                  stopwatchid="FX_TAB_CLICK_MS">
       
   786 +              <tab class="tabbrowser-tab" selected="true" visuallyselected="true" fadein="true"/>
       
   787 +            </tabs>
       
   788 +
       
   789 +            <toolbarbutton id="new-tab-button"
       
   790 +                           class="toolbarbutton-1 chromeclass-toolbar-additional"
       
   791 +                           label="&tabCmd.label;"
       
   792 +                           command="cmd_newNavigatorTab"
       
   793 +                           onclick="checkForMiddleClick(this, event);"
       
   794 +                           tooltip="dynamic-shortcut-tooltip"
       
   795 +                           ondrop="newTabButtonObserver.onDrop(event)"
       
   796 +                           ondragover="newTabButtonObserver.onDragOver(event)"
       
   797 +                           ondragenter="newTabButtonObserver.onDragOver(event)"
       
   798 +                           ondragexit="newTabButtonObserver.onDragExit(event)"
       
   799 +                           cui-areatype="toolbar"
       
   800 +                           removable="true"/>
       
   801 +
       
   802 +            <toolbarbutton id="alltabs-button"
       
   803 +                           class="toolbarbutton-1 chromeclass-toolbar-additional tabs-alltabs-button badged-button"
       
   804 +                           oncommand="gTabsPanel.showAllTabsPanel();"
       
   805 +                           label="&listAllTabs.label;"
       
   806 +                           tooltiptext="&listAllTabs.label;"
       
   807 +                           removable="false"/>
       
   808 +
       
   809 +            <hbox class="titlebar-spacer" type="post-tabs"
       
   810 +                  ordinal="1000"
       
   811 +                  skipintoolbarset="true"/>
       
   812 +          </hbox>
       
   813 +        </vbox>
   697 +
   814 +
   698 +#ifndef XP_MACOSX
   815 +#ifndef XP_MACOSX
   699 +      <hbox class="titlebar-placeholder" type="caption-buttons" ordinal="1000"
   816 +        <button class="accessibility-indicator" tooltiptext="&accessibilityIndicator.tooltip;"
   700 +            skipintoolbarset="true"/>
   817 +                ordinal="1000"
       
   818 +                aria-live="polite" skipintoolbarset="true"/>
       
   819 +        <hbox class="private-browsing-indicator" skipintoolbarset="true"
       
   820 +              ordinal="1000"/>
   701 +#endif
   821 +#endif
   702 +    </toolbar>
   822 +
   703 +
   823 +#include titlebar-items.inc.xul
   704 +    <toolbar id="TabsToolbar"
   824 +
   705 +             class="browser-toolbar titlebar-color"
   825 +#ifdef XP_MACOSX
   706 +             fullscreentoolbar="true"
   826 +        <!-- OS X does not natively support RTL for its titlebar items, so we prevent this secondary
   707 +             customizable="true"
   827 +             buttonbox from reversing order in RTL by forcing an LTR direction. -->
   708 +             mode="icons"
   828 +        <hbox id="titlebar-secondary-buttonbox" dir="ltr">
   709 +             aria-label="&tabsToolbar.label;"
   829 +          <button class="accessibility-indicator" tooltiptext="&accessibilityIndicator.tooltip;" aria-live="polite"/>
   710 +             context="toolbar-context-menu">
   830 +          <hbox class="private-browsing-indicator"/>
   711 +      <hbox class="titlebar-placeholder" type="pre-tabs"
   831 +          <hbox id="titlebar-fullscreen-button"/>
   712 +            skipintoolbarset="true"/>
   832 +        </hbox>
   713 +
       
   714 +      <tabs id="tabbrowser-tabs"
       
   715 +            flex="1"
       
   716 +            setfocus="false"
       
   717 +            tooltip="tabbrowser-tab-tooltip"
       
   718 +            stopwatchid="FX_TAB_CLICK_MS">
       
   719 +        <tab class="tabbrowser-tab" selected="true" visuallyselected="true" fadein="true"/>
       
   720 +      </tabs>
       
   721 +
       
   722 +      <toolbarbutton id="new-tab-button"
       
   723 +                     class="toolbarbutton-1 chromeclass-toolbar-additional"
       
   724 +                     label="&tabCmd.label;"
       
   725 +                     command="cmd_newNavigatorTab"
       
   726 +                     onclick="checkForMiddleClick(this, event);"
       
   727 +                     tooltip="dynamic-shortcut-tooltip"
       
   728 +                     ondrop="newTabButtonObserver.onDrop(event)"
       
   729 +                     ondragover="newTabButtonObserver.onDragOver(event)"
       
   730 +                     ondragenter="newTabButtonObserver.onDragOver(event)"
       
   731 +                     ondragexit="newTabButtonObserver.onDragExit(event)"
       
   732 +                     cui-areatype="toolbar"
       
   733 +                     removable="true"/>
       
   734 +
       
   735 +      <toolbarbutton id="alltabs-button"
       
   736 +                     class="toolbarbutton-1 chromeclass-toolbar-additional tabs-alltabs-button badged-button"
       
   737 +                     oncommand="gTabsPanel.showAllTabsPanel();"
       
   738 +                     label="&listAllTabs.label;"
       
   739 +                     tooltiptext="&listAllTabs.label;"
       
   740 +                     removable="false"/>
       
   741 +
       
   742 +      <hbox class="titlebar-placeholder" type="post-tabs"
       
   743 +            ordinal="1000"
       
   744 +            skipintoolbarset="true"/>
       
   745 +
       
   746 +      <button class="accessibility-indicator" tooltiptext="&accessibilityIndicator.tooltip;"
       
   747 +              ordinal="1000"
       
   748 +              aria-live="polite" skipintoolbarset="true"/>
       
   749 +      <hbox class="private-browsing-indicator" skipintoolbarset="true"
       
   750 +            ordinal="1000"/>
       
   751 +      <hbox class="titlebar-placeholder" type="caption-buttons"
       
   752 +#ifndef XP_MACOSX
       
   753 +            ordinal="1000"
       
   754 +#endif
   833 +#endif
   755 +            skipintoolbarset="true"/>
   834 +      </toolbar>
   756 +
   835 +
   757 +#ifdef XP_MACOSX
   836 +    </vbox>
   758 +      <hbox class="titlebar-placeholder" type="fullscreen-button"
       
   759 +            skipintoolbarset="true"/>
       
   760 +#endif
       
   761 +    </toolbar>
       
   762 +
   837 +
   763 +    <toolbar id="nav-bar"
   838 +    <toolbar id="nav-bar"
   764 +             class="browser-toolbar"
   839 +             class="browser-toolbar"
   765 +             aria-label="&navbarCmd.label;"
   840 +             aria-label="&navbarCmd.label;"
   766 +             fullscreentoolbar="true" mode="icons" customizable="true"
   841 +             fullscreentoolbar="true" mode="icons" customizable="true"
   815 +                       ondragover="homeButtonObserver.onDragOver(event)"
   890 +                       ondragover="homeButtonObserver.onDragOver(event)"
   816 +                       ondragenter="homeButtonObserver.onDragOver(event)"
   891 +                       ondragenter="homeButtonObserver.onDragOver(event)"
   817 +                       ondrop="homeButtonObserver.onDrop(event)"
   892 +                       ondrop="homeButtonObserver.onDrop(event)"
   818 +                       ondragexit="homeButtonObserver.onDragExit(event)"
   893 +                       ondragexit="homeButtonObserver.onDragExit(event)"
   819 +                       key="goHome"
   894 +                       key="goHome"
   820 +                       onclick="BrowserGoHome(event);"
   895 +                       onclick="BrowserHome(event);"
   821 +                       cui-areatype="toolbar"
   896 +                       cui-areatype="toolbar"
   822 +                       tooltiptext="&homeButton.defaultPage.tooltip;"/>
   897 +                       tooltiptext="&homeButton.defaultPage.tooltip;"/>
   823 +        <toolbarspring cui-areatype="toolbar" class="chromeclass-toolbar-additional"/>
   898 +        <toolbarspring cui-areatype="toolbar" class="chromeclass-toolbar-additional"/>
   824 +        <toolbaritem id="urlbar-container" flex="400" persist="width"
   899 +        <toolbaritem id="urlbar-container" flex="400" persist="width"
   825 +                     removable="false"
   900 +                     removable="false"
   924 +                         tooltiptext="&urlbar.persistentStorageNotificationAnchor.tooltip;"/>
   999 +                         tooltiptext="&urlbar.persistentStorageNotificationAnchor.tooltip;"/>
   925 +                  <image id="midi-notification-icon" class="notification-anchor-icon midi-icon" role="button"
  1000 +                  <image id="midi-notification-icon" class="notification-anchor-icon midi-icon" role="button"
   926 +                         tooltiptext="&urlbar.midiNotificationAnchor.tooltip;"/>
  1001 +                         tooltiptext="&urlbar.midiNotificationAnchor.tooltip;"/>
   927 +                  <image id="webauthn-notification-icon" class="notification-anchor-icon" role="button"
  1002 +                  <image id="webauthn-notification-icon" class="notification-anchor-icon" role="button"
   928 +                         tooltiptext="&urlbar.webAuthnAnchor.tooltip;"/>
  1003 +                         tooltiptext="&urlbar.webAuthnAnchor.tooltip;"/>
       
  1004 +                  <image id="storage-access-notification-icon" class="notification-anchor-icon storage-access-icon" role="button"
       
  1005 +                         tooltiptext="&urlbar.storageAccessAnchor.tooltip;"/>
   929 +                </box>
  1006 +                </box>
   930 +                <image id="connection-icon"/>
  1007 +                <image id="connection-icon"/>
   931 +                <image id="extension-icon"/>
  1008 +                <image id="extension-icon"/>
   932 +                <image id="remote-control-icon"
  1009 +                <image id="remote-control-icon"
   933 +                       tooltiptext="&urlbar.remoteControlNotificationAnchor.tooltip;"/>
  1010 +                       tooltiptext="&urlbar.remoteControlNotificationAnchor.tooltip;"/>
  1062 +
  1139 +
  1063 +        <toolbarbutton id="close-button"
  1140 +        <toolbarbutton id="close-button"
  1064 +                       tooltiptext="&fullScreenClose.tooltip;"
  1141 +                       tooltiptext="&fullScreenClose.tooltip;"
  1065 +                       oncommand="BrowserTryToCloseWindow();"/>
  1142 +                       oncommand="BrowserTryToCloseWindow();"/>
  1066 +      </hbox>
  1143 +      </hbox>
       
  1144 +
       
  1145 +      <box id="library-animatable-box" class="toolbarbutton-animatable-box">
       
  1146 +        <image class="toolbarbutton-animatable-image"/>
       
  1147 +      </box>
  1067 +    </toolbar>
  1148 +    </toolbar>
  1068 +
  1149 +
  1069 +    <toolbar id="PersonalToolbar"
  1150 +    <toolbar id="PersonalToolbar"
  1070 +             mode="icons"
  1151 +             mode="icons"
  1071 +             class="browser-toolbar chromeclass-directories"
  1152 +             class="browser-toolbar chromeclass-directories"
  1243 +                   flex="100"
  1324 +                   flex="100"
  1244 +                   persist="width">
  1325 +                   persist="width">
  1245 +        <searchbar id="searchbar" flex="1"/>
  1326 +        <searchbar id="searchbar" flex="1"/>
  1246 +      </toolbaritem>
  1327 +      </toolbaritem>
  1247 +    </toolbarpalette>
  1328 +    </toolbarpalette>
  1248 +    <box id="library-animatable-box" class="toolbarbutton-animatable-box">
       
  1249 +      <image class="toolbarbutton-animatable-image"/>
       
  1250 +    </box>
       
  1251 +  </toolbox>
  1329 +  </toolbox>
  1252 +
  1330 +
  1253 +  <hbox id="fullscr-toggler" hidden="true"/>
  1331 +  <hbox id="fullscr-toggler" hidden="true"/>
  1254 +
  1332 +
  1255 +  <deck id="content-deck" flex="1">
  1333 +  <deck id="content-deck" flex="1">
  1274 +                  style="min-width: 14em; width: 18em; max-width: 36em;" tooltip="aHTMLTooltip"/>
  1352 +                  style="min-width: 14em; width: 18em; max-width: 36em;" tooltip="aHTMLTooltip"/>
  1275 +      </vbox>
  1353 +      </vbox>
  1276 +
  1354 +
  1277 +      <splitter id="sidebar-splitter" class="chromeclass-extrachrome sidebar-splitter" hidden="true"/>
  1355 +      <splitter id="sidebar-splitter" class="chromeclass-extrachrome sidebar-splitter" hidden="true"/>
  1278 +      <vbox id="appcontent" flex="1">
  1356 +      <vbox id="appcontent" flex="1">
  1279 +        <notificationbox id="high-priority-global-notificationbox" notificationside="top"/>
  1357 +        <!-- gHighPriorityNotificationBox will be added here lazily. -->
  1280 +        <tabbox id="tabbrowser-tabbox"
  1358 +        <tabbox id="tabbrowser-tabbox"
  1281 +                flex="1" tabcontainer="tabbrowser-tabs">
  1359 +                flex="1" tabcontainer="tabbrowser-tabs">
  1282 +          <tabpanels id="tabbrowser-tabpanels"
  1360 +          <tabpanels id="tabbrowser-tabpanels"
  1283 +                     flex="1" class="plain" selectedIndex="0"/>
  1361 +                     flex="1" class="plain" selectedIndex="0"/>
  1284 +        </tabbox>
  1362 +        </tabbox>
  1317 +      &pointerlockWarning.generic.label;
  1395 +      &pointerlockWarning.generic.label;
  1318 +    </html:div>
  1396 +    </html:div>
  1319 +  </html:div>
  1397 +  </html:div>
  1320 +
  1398 +
  1321 +  <vbox id="browser-bottombox" layer="true">
  1399 +  <vbox id="browser-bottombox" layer="true">
  1322 +    <notificationbox id="global-notificationbox" notificationside="bottom"/>
  1400 +    <!-- gNotificationBox will be added here lazily. -->
  1323 +  </vbox>
  1401 +  </vbox>
  1324 +
  1402 +
  1325 +</window>
  1403 +</window>
  1326 diff --git a/browser/base/jar.mn b/browser/base/jar.mn
  1404 diff --git a/browser/base/jar.mn b/browser/base/jar.mn
  1327 --- a/browser/base/jar.mn
  1405 --- a/browser/base/jar.mn
  1365  #include "nsMacAttribution.h"
  1443  #include "nsMacAttribution.h"
  1366  #endif
  1444  #endif
  1367  
  1445  
  1368  #if defined(XP_WIN)
  1446  #if defined(XP_WIN)
  1369  #include "nsIEHistoryEnumerator.h"
  1447  #include "nsIEHistoryEnumerator.h"
  1370 @@ -34,18 +34,16 @@ using namespace mozilla::browser;
  1448 @@ -33,18 +33,16 @@ using namespace mozilla::browser;
  1371  
  1449  
  1372  /////////////////////////////////////////////////////////////////////////////
  1450  /////////////////////////////////////////////////////////////////////////////
  1373  
  1451  
  1374  NS_GENERIC_FACTORY_CONSTRUCTOR(DirectoryProvider)
  1452  NS_GENERIC_FACTORY_CONSTRUCTOR(DirectoryProvider)
  1375  #if defined(XP_WIN)
  1453  #if defined(XP_WIN)
  1384  NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacAttributionService)
  1462  NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacAttributionService)
  1385  #endif
  1463  #endif
  1386  
  1464  
  1387  #if defined(XP_WIN)
  1465  #if defined(XP_WIN)
  1388  NS_GENERIC_FACTORY_CONSTRUCTOR(nsIEHistoryEnumerator)
  1466  NS_GENERIC_FACTORY_CONSTRUCTOR(nsIEHistoryEnumerator)
  1389 @@ -70,17 +68,17 @@ NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID)
  1467 @@ -67,17 +65,17 @@ NS_DEFINE_NAMED_CID(NS_MACATTRIBUTIONSER
  1390  NS_DEFINE_NAMED_CID(NS_MACATTRIBUTIONSERVICE_CID);
       
  1391  #endif
  1468  #endif
  1392  
  1469  
  1393  static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
  1470  static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
       
  1471      // clang-format off
  1394      { &kNS_BROWSERDIRECTORYPROVIDER_CID, false, nullptr, DirectoryProviderConstructor },
  1472      { &kNS_BROWSERDIRECTORYPROVIDER_CID, false, nullptr, DirectoryProviderConstructor },
  1395  #if defined(XP_WIN)
  1473  #if defined(XP_WIN)
  1396      { &kNS_SHELLSERVICE_CID, false, nullptr, nsWindowsShellServiceConstructor },
  1474      { &kNS_SHELLSERVICE_CID, false, nullptr, nsWindowsShellServiceConstructor },
  1397  #elif defined(MOZ_WIDGET_GTK)
  1475  #elif defined(MOZ_WIDGET_GTK)
  1398 -    { &kNS_SHELLSERVICE_CID, false, nullptr, nsGNOMEShellServiceConstructor },
  1476 -    { &kNS_SHELLSERVICE_CID, false, nullptr, nsGNOMEShellServiceConstructor },
  1399 +    { &kNS_SHELLSERVICE_CID, false, nullptr, nsUnixShellServiceConstructor },
  1477 +    { &kNS_SHELLSERVICE_CID, false, nullptr, nsUnixShellServiceConstructor },
  1400  #endif
  1478  #endif
  1401      { &kNS_FEEDSNIFFER_CID, false, nullptr, nsFeedSnifferConstructor },
       
  1402      { &kNS_BROWSER_ABOUT_REDIRECTOR_CID, false, nullptr, AboutRedirector::Create },
  1479      { &kNS_BROWSER_ABOUT_REDIRECTOR_CID, false, nullptr, AboutRedirector::Create },
  1403  #if defined(XP_WIN)
  1480  #if defined(XP_WIN)
  1404      { &kNS_WINIEHISTORYENUMERATOR_CID, false, nullptr, nsIEHistoryEnumeratorConstructor },
  1481      { &kNS_WINIEHISTORYENUMERATOR_CID, false, nullptr, nsIEHistoryEnumeratorConstructor },
  1405  #elif defined(XP_MACOSX)
  1482  #elif defined(XP_MACOSX)
  1406      { &kNS_SHELLSERVICE_CID, false, nullptr, nsMacShellServiceConstructor },
  1483      { &kNS_SHELLSERVICE_CID, false, nullptr, nsMacShellServiceConstructor },
  1407  #endif
  1484  #endif
       
  1485  #if defined(MOZ_WIDGET_COCOA)
  1408 diff --git a/browser/components/preferences/in-content/main.js b/browser/components/preferences/in-content/main.js
  1486 diff --git a/browser/components/preferences/in-content/main.js b/browser/components/preferences/in-content/main.js
  1409 --- a/browser/components/preferences/in-content/main.js
  1487 --- a/browser/components/preferences/in-content/main.js
  1410 +++ b/browser/components/preferences/in-content/main.js
  1488 +++ b/browser/components/preferences/in-content/main.js
  1411 @@ -327,16 +327,23 @@ var gMainPane = {
  1489 @@ -289,16 +289,23 @@ var gMainPane = {
  1412            this._backoffIndex++ : backoffTimes.length - 1]);
  1490            this._backoffIndex++ : backoffTimes.length - 1]);
  1413        };
  1491        };
  1414  
  1492  
  1415        window.setTimeout(() => {
  1493        window.setTimeout(() => {
  1416          window.requestIdleCallback(pollForDefaultBrowser);
  1494          window.requestIdleCallback(pollForDefaultBrowser);
  1430      let performanceSettingsLink = document.getElementById("performanceSettingsLearnMore");
  1508      let performanceSettingsLink = document.getElementById("performanceSettingsLearnMore");
  1431      let performanceSettingsUrl = Services.urlFormatter.formatURLPref("app.support.baseURL") + "performance";
  1509      let performanceSettingsUrl = Services.urlFormatter.formatURLPref("app.support.baseURL") + "performance";
  1432      performanceSettingsLink.setAttribute("href", performanceSettingsUrl);
  1510      performanceSettingsLink.setAttribute("href", performanceSettingsUrl);
  1433  
  1511  
  1434      this.updateDefaultPerformanceSettingsPref();
  1512      this.updateDefaultPerformanceSettingsPref();
  1435 @@ -962,16 +969,27 @@ var gMainPane = {
  1513 @@ -1012,16 +1019,27 @@ var gMainPane = {
  1436        // Reset exponential backoff delay time in order to do visual update in pollForDefaultBrowser.
  1514        // Reset exponential backoff delay time in order to do visual update in pollForDefaultBrowser.
  1437        this._backoffIndex = 0;
  1515        this._backoffIndex = 0;
  1438  
  1516  
  1439        let shellSvc = getShellService();
  1517        let shellSvc = getShellService();
  1440        if (!shellSvc)
  1518        if (!shellSvc)
  1484      'ShellService.jsm',
  1562      'ShellService.jsm',
  1485 diff --git a/browser/components/shell/nsKDEShellService.cpp b/browser/components/shell/nsKDEShellService.cpp
  1563 diff --git a/browser/components/shell/nsKDEShellService.cpp b/browser/components/shell/nsKDEShellService.cpp
  1486 new file mode 100644
  1564 new file mode 100644
  1487 --- /dev/null
  1565 --- /dev/null
  1488 +++ b/browser/components/shell/nsKDEShellService.cpp
  1566 +++ b/browser/components/shell/nsKDEShellService.cpp
  1489 @@ -0,0 +1,204 @@
  1567 @@ -0,0 +1,153 @@
  1490 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1568 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1491 +/* This Source Code Form is subject to the terms of the Mozilla Public
  1569 +/* This Source Code Form is subject to the terms of the Mozilla Public
  1492 + * License, v. 2.0. If a copy of the MPL was not distributed with this
  1570 + * License, v. 2.0. If a copy of the MPL was not distributed with this
  1493 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  1571 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  1494 +
  1572 +
  1638 +    uristr->SetData( aURI );
  1716 +    uristr->SetData( aURI );
  1639 +    command->AppendElement( uristr );
  1717 +    command->AppendElement( uristr );
  1640 +    return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
  1718 +    return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
  1641 +}
  1719 +}
  1642 +
  1720 +
  1643 +NS_IMETHODIMP
       
  1644 +nsKDEShellService::GetDefaultFeedReader(nsIFile** _retval)
       
  1645 +{
       
  1646 +    *_retval = nullptr;
       
  1647 +
       
  1648 +    nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID );
       
  1649 +    if( !command )
       
  1650 +        return NS_ERROR_FAILURE;
       
  1651 +
       
  1652 +    nsCOMPtr<nsISupportsCString> str = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
       
  1653 +    if( !str )
       
  1654 +        return NS_ERROR_FAILURE;
       
  1655 +
       
  1656 +    str->SetData( NS_LITERAL_CSTRING( "GETDEFAULTFEEDREADER" ));
       
  1657 +    command->AppendElement( str );
       
  1658 +
       
  1659 +    nsCOMPtr<nsIArray> output;
       
  1660 +    if( !nsKDEUtils::command( command, getter_AddRefs( output ) ) )
       
  1661 +        return NS_ERROR_FAILURE;
       
  1662 +
       
  1663 +    PRUint32 length;
       
  1664 +    output->GetLength( &length );
       
  1665 +    if( length != 1 )
       
  1666 +        return NS_ERROR_FAILURE;
       
  1667 +
       
  1668 +    nsCOMPtr<nsISupportsCString> resstr = do_QueryElementAt( output, 0 );
       
  1669 +    if( !resstr )
       
  1670 +        return NS_ERROR_FAILURE;
       
  1671 +
       
  1672 +    nsAutoCString path;
       
  1673 +    resstr->GetData( path );
       
  1674 +    if (path.IsEmpty())
       
  1675 +        return NS_ERROR_FAILURE;
       
  1676 +
       
  1677 +    nsresult rv;
       
  1678 +    nsCOMPtr<nsIFile> defaultReader =
       
  1679 +        do_CreateInstance("@mozilla.org/file/local;1", &rv);
       
  1680 +    NS_ENSURE_SUCCESS(rv, rv);
       
  1681 +
       
  1682 +    rv = defaultReader->InitWithNativePath(path);
       
  1683 +    NS_ENSURE_SUCCESS(rv, rv);
       
  1684 +
       
  1685 +    bool exists;
       
  1686 +    rv = defaultReader->Exists(&exists);
       
  1687 +    NS_ENSURE_SUCCESS(rv, rv);
       
  1688 +    if (!exists)
       
  1689 +        return NS_ERROR_FAILURE;
       
  1690 +
       
  1691 +    NS_ADDREF(*_retval = defaultReader);
       
  1692 +    return NS_OK;
       
  1693 +}
       
  1694 diff --git a/browser/components/shell/nsKDEShellService.h b/browser/components/shell/nsKDEShellService.h
  1721 diff --git a/browser/components/shell/nsKDEShellService.h b/browser/components/shell/nsKDEShellService.h
  1695 new file mode 100644
  1722 new file mode 100644
  1696 --- /dev/null
  1723 --- /dev/null
  1697 +++ b/browser/components/shell/nsKDEShellService.h
  1724 +++ b/browser/components/shell/nsKDEShellService.h
  1698 @@ -0,0 +1,30 @@
  1725 @@ -0,0 +1,30 @@
  1774 +
  1801 +
  1775 +#endif // nsunixshellservice_h____
  1802 +#endif // nsunixshellservice_h____
  1776 diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
  1803 diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
  1777 --- a/browser/installer/package-manifest.in
  1804 --- a/browser/installer/package-manifest.in
  1778 +++ b/browser/installer/package-manifest.in
  1805 +++ b/browser/installer/package-manifest.in
  1779 @@ -462,16 +462,18 @@
  1806 @@ -451,16 +451,18 @@
  1780  @RESPATH@/browser/defaults/settings/pinning
  1807  @RESPATH@/browser/defaults/settings/pinning
  1781  @RESPATH@/browser/defaults/settings/main
  1808  @RESPATH@/browser/defaults/settings/main
  1782  
  1809  
  1783  ; Warning: changing the path to channel-prefs.js can cause bugs (Bug 756325)
  1810  ; Warning: changing the path to channel-prefs.js can cause bugs (Bug 756325)
  1784  ; Technically this is an app pref file, but we are keeping it in the original
  1811  ; Technically this is an app pref file, but we are keeping it in the original