firefox-kde.patch
branchfirefox64
changeset 1082 821cfbe8efcc
parent 1074 4b99400f6d17
child 1085 87f893cf45b9
equal deleted inserted replaced
1081:9fec29d2ead2 1082:821cfbe8efcc
     1 # HG changeset patch
     1 # HG changeset patch
     2 # Parent  fdf78810e83396d10418791fbe32bed6bfe1558b
     2 # Parent  f2429084f187d5758508ae547c411943cba60fcf
     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,1384 @@
     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 +#endif
       
    85 +        >
    76 +
    86 +
    77 +# All JS files which are needed by browser.xul and other top level windows to
    87 +# 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
    88 +# support MacOS specific features *must* go into the global-scripts.inc file so
    79 +# that they can be shared with macWindow.inc.xul.
    89 +# that they can be shared with macWindow.inc.xul.
    80 +#include global-scripts.inc
    90 +#include global-scripts.inc
    88 +  Services.scriptloader.loadSubScript("chrome://browser/content/tabbrowser.js", this);
    98 +  Services.scriptloader.loadSubScript("chrome://browser/content/tabbrowser.js", this);
    89 +
    99 +
    90 +  window.onload = gBrowserInit.onLoad.bind(gBrowserInit);
   100 +  window.onload = gBrowserInit.onLoad.bind(gBrowserInit);
    91 +  window.onunload = gBrowserInit.onUnload.bind(gBrowserInit);
   101 +  window.onunload = gBrowserInit.onUnload.bind(gBrowserInit);
    92 +  window.onclose = WindowIsClosing;
   102 +  window.onclose = WindowIsClosing;
       
   103 +
    93 +#ifdef BROWSER_XHTML
   104 +#ifdef BROWSER_XHTML
    94 +  window.addEventListener("DOMContentLoaded",
   105 +  window.addEventListener("readystatechange", () => {
    95 +    gBrowserInit.onBeforeInitialXULLayout.bind(gBrowserInit), { once: true });
   106 +    // We initially hide the window to prevent layouts during parse. This lets us
       
   107 +    // avoid accidental XBL construction and better match browser.xul (see Bug 1497975).
       
   108 +    gBrowserInit.onBeforeInitialXULLayout();
       
   109 +    document.documentElement.removeAttribute("hidden");
       
   110 +  }, { once: true, capture: true });
    96 +#else
   111 +#else
    97 +  window.addEventListener("MozBeforeInitialXULLayout",
   112 +  window.addEventListener("MozBeforeInitialXULLayout",
    98 +    gBrowserInit.onBeforeInitialXULLayout.bind(gBrowserInit), { once: true });
   113 +    gBrowserInit.onBeforeInitialXULLayout.bind(gBrowserInit), { once: true });
    99 +#endif
   114 +#endif
   100 +  // The listener of DOMContentLoaded must be set on window, rather than
   115 +  // The listener of DOMContentLoaded must be set on window, rather than
   114 +    <menupopup id="tabContextMenu"
   129 +    <menupopup id="tabContextMenu"
   115 +               onpopupshowing="if (event.target == this) TabContextMenu.updateContextMenu(this);"
   130 +               onpopupshowing="if (event.target == this) TabContextMenu.updateContextMenu(this);"
   116 +               onpopuphidden="if (event.target == this) TabContextMenu.contextTab = null;">
   131 +               onpopuphidden="if (event.target == this) TabContextMenu.contextTab = null;">
   117 +      <menuitem id="context_reloadTab" label="&reloadTab.label;" accesskey="&reloadTab.accesskey;"
   132 +      <menuitem id="context_reloadTab" label="&reloadTab.label;" accesskey="&reloadTab.accesskey;"
   118 +                oncommand="gBrowser.reloadTab(TabContextMenu.contextTab);"/>
   133 +                oncommand="gBrowser.reloadTab(TabContextMenu.contextTab);"/>
   119 +      <menuitem id="context_reloadSelectedTabs" label="&reloadSelectedTabs.label;" hidden="true"
   134 +      <menuitem id="context_reloadSelectedTabs" label="&reloadTabs.label;" hidden="true"
   120 +                accesskey="&reloadSelectedTabs.accesskey;"
   135 +                accesskey="&reloadTabs.accesskey;"
   121 +                oncommand="gBrowser.reloadMultiSelectedTabs();"/>
   136 +                oncommand="gBrowser.reloadMultiSelectedTabs();"/>
   122 +      <menuitem id="context_toggleMuteTab" oncommand="TabContextMenu.contextTab.toggleMuteAudio();"/>
   137 +      <menuitem id="context_toggleMuteTab" oncommand="TabContextMenu.contextTab.toggleMuteAudio();"/>
   123 +      <menuitem id="context_toggleMuteSelectedTabs" hidden="true"
   138 +      <menuitem id="context_toggleMuteSelectedTabs" hidden="true"
   124 +                oncommand="gBrowser.toggleMuteAudioOnMultiSelectedTabs(TabContextMenu.contextTab);"/>
   139 +                oncommand="gBrowser.toggleMuteAudioOnMultiSelectedTabs(TabContextMenu.contextTab);"/>
   125 +      <menuseparator/>
       
   126 +      <menuitem id="context_pinTab" label="&pinTab.label;"
   140 +      <menuitem id="context_pinTab" label="&pinTab.label;"
   127 +                accesskey="&pinTab.accesskey;"
   141 +                accesskey="&pinTab.accesskey;"
   128 +                oncommand="gBrowser.pinTab(TabContextMenu.contextTab);"/>
   142 +                oncommand="gBrowser.pinTab(TabContextMenu.contextTab);"/>
   129 +      <menuitem id="context_unpinTab" label="&unpinTab.label;" hidden="true"
   143 +      <menuitem id="context_unpinTab" label="&unpinTab.label;" hidden="true"
   130 +                accesskey="&unpinTab.accesskey;"
   144 +                accesskey="&unpinTab.accesskey;"
   136 +                accesskey="&unpinSelectedTabs.accesskey;"
   150 +                accesskey="&unpinSelectedTabs.accesskey;"
   137 +                oncommand="gBrowser.unpinMultiSelectedTabs();"/>
   151 +                oncommand="gBrowser.unpinMultiSelectedTabs();"/>
   138 +      <menuitem id="context_duplicateTab" label="&duplicateTab.label;"
   152 +      <menuitem id="context_duplicateTab" label="&duplicateTab.label;"
   139 +                accesskey="&duplicateTab.accesskey;"
   153 +                accesskey="&duplicateTab.accesskey;"
   140 +                oncommand="duplicateTabIn(TabContextMenu.contextTab, 'tab');"/>
   154 +                oncommand="duplicateTabIn(TabContextMenu.contextTab, 'tab');"/>
       
   155 +      <menuseparator/>
       
   156 +      <menuitem id="context_selectAllTabs" label="&selectAllTabs.label;" accesskey="&selectAllTabs.accesskey;"
       
   157 +                oncommand="gBrowser.selectAllTabs();"/>
       
   158 +      <menuitem id="context_bookmarkSelectedTabs"
       
   159 +                hidden="true"
       
   160 +                label="&bookmarkSelectedTabs.label;"
       
   161 +                accesskey="&bookmarkSelectedTabs.accesskey;"
       
   162 +                oncommand="PlacesCommandHook.bookmarkPages(PlacesCommandHook.uniqueSelectedPages);"/>
       
   163 +      <menuitem id="context_bookmarkTab"
       
   164 +                label="&bookmarkTab.label;"
       
   165 +                accesskey="&bookmarkTab.accesskey;"
       
   166 +                oncommand="PlacesCommandHook.bookmarkPages(PlacesCommandHook.getUniquePages([TabContextMenu.contextTab]));"/>
   141 +      <menu id="context_reopenInContainer"
   167 +      <menu id="context_reopenInContainer"
   142 +            label="&reopenInContainer.label;"
   168 +            label="&reopenInContainer.label;"
   143 +            accesskey="&reopenInContainer.accesskey;"
   169 +            accesskey="&reopenInContainer.accesskey;"
   144 +            hidden="true">
   170 +            hidden="true">
   145 +        <menupopup oncommand="TabContextMenu.reopenInContainer(event);"
   171 +        <menupopup oncommand="TabContextMenu.reopenInContainer(event);"
   146 +                   onpopupshowing="TabContextMenu.createReopenInContainerMenu(event);"/>
   172 +                   onpopupshowing="TabContextMenu.createReopenInContainerMenu(event);"/>
   147 +      </menu>
   173 +      </menu>
   148 +      <menuitem id="context_openTabInWindow" label="&moveToNewWindow.label;"
   174 +      <menu id="context_moveTabOptions"
   149 +                accesskey="&moveToNewWindow.accesskey;"
   175 +            multiselectcontextlabel="&moveSelectedTabOptions.label;"
   150 +                tbattr="tabbrowser-multiple"
   176 +            multiselectcontextaccesskey="&moveSelectedTabOptions.accesskey;"
   151 +                oncommand="gBrowser.replaceTabsWithWindow(TabContextMenu.contextTab);"/>
   177 +            nonmultiselectcontextlabel="&moveTabOptions.label;"
   152 +      <menuseparator id="context_sendTabToDevice_separator" class="sync-ui-item"/>
   178 +            nonmultiselectcontextaccesskey="&moveTabOptions.accesskey;">
   153 +      <menu id="context_sendTabToDevice" label="&sendTabToDevice.label;"
   179 +        <menupopup id="moveTabOptionsMenu">
   154 +            class="sync-ui-item"
   180 +          <menuitem id="context_moveToStart"
   155 +            accesskey="&sendTabToDevice.accesskey;">
   181 +                    label="&moveToStart.label;"
       
   182 +                    accesskey="&moveToStart.accesskey;"
       
   183 +                    tbattr="tabbrowser-multiple"
       
   184 +                    oncommand="gBrowser.moveTabsToStart(TabContextMenu.contextTab);"/>
       
   185 +          <menuitem id="context_moveToEnd"
       
   186 +                    label="&moveToEnd.label;"
       
   187 +                    accesskey="&moveToEnd.accesskey;"
       
   188 +                    tbattr="tabbrowser-multiple"
       
   189 +                    oncommand="gBrowser.moveTabsToEnd(TabContextMenu.contextTab);"/>
       
   190 +          <menuitem id="context_openTabInWindow" label="&moveToNewWindow.label;"
       
   191 +                    accesskey="&moveToNewWindow.accesskey;"
       
   192 +                    tbattr="tabbrowser-multiple"
       
   193 +                    oncommand="gBrowser.replaceTabsWithWindow(TabContextMenu.contextTab);"/>
       
   194 +        </menupopup>
       
   195 +      </menu>
       
   196 +      <menu id="context_sendTabToDevice"
       
   197 +            class="sync-ui-item">
   156 +        <menupopup id="context_sendTabToDevicePopupMenu"
   198 +        <menupopup id="context_sendTabToDevicePopupMenu"
   157 +                   onpopupshowing="gSync.populateSendTabToDevicesMenu(event.target, TabContextMenu.contextTab.linkedBrowser.currentURI.spec, TabContextMenu.contextTab.linkedBrowser.contentTitle);"/>
   199 +                   onpopupshowing="gSync.populateSendTabToDevicesMenu(event.target, TabContextMenu.contextTab.linkedBrowser.currentURI.spec, TabContextMenu.contextTab.linkedBrowser.contentTitle, TabContextMenu.contextTab.multiselected);"/>
   158 +      </menu>
   200 +      </menu>
   159 +      <menuseparator/>
   201 +      <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;"
   202 +      <menuitem id="context_closeTabsToTheEnd" label="&closeTabsToTheEnd.label;" accesskey="&closeTabsToTheEnd.accesskey;"
   173 +                oncommand="gBrowser.removeTabsToTheEndFrom(TabContextMenu.contextTab, {animate: true});"/>
   203 +                oncommand="gBrowser.removeTabsToTheEndFrom(TabContextMenu.contextTab, {animate: true});"/>
   174 +      <menuitem id="context_closeOtherTabs" label="&closeOtherTabs.label;" accesskey="&closeOtherTabs.accesskey;"
   204 +      <menuitem id="context_closeOtherTabs" label="&closeOtherTabs.label;" accesskey="&closeOtherTabs.accesskey;"
   175 +                oncommand="gBrowser.removeAllTabsBut(TabContextMenu.contextTab);"/>
   205 +                oncommand="gBrowser.removeAllTabsBut(TabContextMenu.contextTab);"/>
   176 +      <menuseparator/>
       
   177 +      <menuitem id="context_undoCloseTab"
   206 +      <menuitem id="context_undoCloseTab"
   178 +                label="&undoCloseTab.label;"
   207 +                label="&undoCloseTab.label;"
   179 +                accesskey="&undoCloseTab.accesskey;"
   208 +                accesskey="&undoCloseTab.accesskey;"
   180 +                observes="History:UndoCloseTab"/>
   209 +                observes="History:UndoCloseTab"/>
   181 +      <menuitem id="context_closeTab" label="&closeTab.label;" accesskey="&closeTab.accesskey;"
   210 +      <menuitem id="context_closeTab" label="&closeTab.label;" accesskey="&closeTab.accesskey;"
   182 +                oncommand="gBrowser.removeTab(TabContextMenu.contextTab, { animate: true });"/>
   211 +                oncommand="gBrowser.removeTab(TabContextMenu.contextTab, { animate: true });"/>
   183 +      <menuitem id="context_closeSelectedTabs" label="&closeSelectedTabs.label;"
   212 +      <menuitem id="context_closeSelectedTabs" label="&closeTabs.label;"
   184 +                hidden="true" accesskey="&closeSelectedTabs.accesskey;"
   213 +                hidden="true" accesskey="&closeTabs.accesskey;"
   185 +                oncommand="gBrowser.removeMultiSelectedTabs();"/>
   214 +                oncommand="gBrowser.removeMultiSelectedTabs();"/>
   186 +    </menupopup>
   215 +    </menupopup>
   187 +
   216 +
   188 +    <!-- bug 415444/582485: event.stopPropagation is here for the cloned version
   217 +    <!-- bug 415444/582485: event.stopPropagation is here for the cloned version
   189 +         of this menupopup -->
   218 +         of this menupopup -->
   219 +           noautofocus="true"
   248 +           noautofocus="true"
   220 +           hidden="true"
   249 +           hidden="true"
   221 +           flip="none"
   250 +           flip="none"
   222 +           level="parent"
   251 +           level="parent"
   223 +           overflowpadding="15" />
   252 +           overflowpadding="15" />
       
   253 +
       
   254 +    <!-- for url bar autocomplete -->
       
   255 +    <panel id="urlbar-results"
       
   256 +           role="group"
       
   257 +           noautofocus="true"
       
   258 +           hidden="true"
       
   259 +           flip="none"
       
   260 +           level="parent">
       
   261 +      <html:div class="urlbarView-body-outer">
       
   262 +        <html:div class="urlbarView-body-inner">
       
   263 +          <!-- TODO: add search suggestions notification -->
       
   264 +          <html:div class="urlbarView-results"/>
       
   265 +          <!-- TODO: add footer -->
       
   266 +        </html:div>
       
   267 +      </html:div>
       
   268 +    </panel>
   224 +
   269 +
   225 +   <!-- for date/time picker. consumeoutsideclicks is set to never, so that
   270 +   <!-- for date/time picker. consumeoutsideclicks is set to never, so that
   226 +        clicks on the anchored input box are never consumed. -->
   271 +        clicks on the anchored input box are never consumed. -->
   227 +    <panel id="DateTimePickerPanel"
   272 +    <panel id="DateTimePickerPanel"
   228 +           type="arrow"
   273 +           type="arrow"
   372 +                     class="subviewbutton"
   417 +                     class="subviewbutton"
   373 +                     oncommand="SidebarUI.hide()"/>
   418 +                     oncommand="SidebarUI.hide()"/>
   374 +    </panel>
   419 +    </panel>
   375 +
   420 +
   376 +    <menupopup id="toolbar-context-menu"
   421 +    <menupopup id="toolbar-context-menu"
   377 +               onpopupshowing="onViewToolbarsPopupShowing(event, document.getElementById('viewToolbarsMenuSeparator')); UpdateDownloadsAutoHide(this); UpdateManageExtension(this)">
   422 +               onpopupshowing="onViewToolbarsPopupShowing(event, document.getElementById('viewToolbarsMenuSeparator')); ToolbarContextMenu.updateDownloadsAutoHide(this); ToolbarContextMenu.updateExtension(this)">
   378 +      <menuitem oncommand="openAboutAddonsForContextAction(this.parentElement)"
   423 +      <menuitem oncommand="ToolbarContextMenu.openAboutAddonsForContextAction(this.parentElement)"
   379 +                accesskey="&customizeMenu.manageExtension.accesskey;"
   424 +                accesskey="&customizeMenu.manageExtension.accesskey;"
   380 +                label="&customizeMenu.manageExtension.label;"
   425 +                label="&customizeMenu.manageExtension.label;"
   381 +                contexttype="toolbaritem"
   426 +                contexttype="toolbaritem"
   382 +                class="customize-context-manageExtension"/>
   427 +                class="customize-context-manageExtension"/>
       
   428 +      <menuitem oncommand="ToolbarContextMenu.removeExtensionForContextAction(this.parentElement)"
       
   429 +                accesskey="&customizeMenu.removeExtension.accesskey;"
       
   430 +                label="&customizeMenu.removeExtension.label;"
       
   431 +                contexttype="toolbaritem"
       
   432 +                class="customize-context-removeExtension"/>
   383 +      <menuseparator/>
   433 +      <menuseparator/>
   384 +      <menuitem oncommand="gCustomizeMode.addToPanel(document.popupNode)"
   434 +      <menuitem oncommand="gCustomizeMode.addToPanel(document.popupNode)"
   385 +                accesskey="&customizeMenu.pinToOverflowMenu.accesskey;"
   435 +                accesskey="&customizeMenu.pinToOverflowMenu.accesskey;"
   386 +                label="&customizeMenu.pinToOverflowMenu.label;"
   436 +                label="&customizeMenu.pinToOverflowMenu.label;"
   387 +                contexttype="toolbaritem"
   437 +                contexttype="toolbaritem"
   388 +                class="customize-context-moveToPanel"/>
   438 +                class="customize-context-moveToPanel"/>
   389 +      <menuitem oncommand="onDownloadsAutoHideChange(event)"
   439 +      <menuitem oncommand="ToolbarContextMenu.onDownloadsAutoHideChange(event)"
   390 +                type="checkbox"
   440 +                type="checkbox"
   391 +                accesskey="&customizeMenu.autoHideDownloadsButton.accesskey;"
   441 +                accesskey="&customizeMenu.autoHideDownloadsButton.accesskey;"
   392 +                label="&customizeMenu.autoHideDownloadsButton.label;"
   442 +                label="&customizeMenu.autoHideDownloadsButton.label;"
   393 +                contexttype="toolbaritem"
   443 +                contexttype="toolbaritem"
   394 +                class="customize-context-autoHide"/>
   444 +                class="customize-context-autoHide"/>
   395 +      <menuitem oncommand="gCustomizeMode.removeFromArea(document.popupNode)"
   445 +      <menuitem oncommand="gCustomizeMode.removeFromArea(document.popupNode)"
   396 +                accesskey="&customizeMenu.removeFromToolbar.accesskey;"
   446 +                accesskey="&customizeMenu.removeFromToolbar.accesskey;"
   397 +                label="&customizeMenu.removeFromToolbar.label;"
   447 +                label="&customizeMenu.removeFromToolbar.label;"
   398 +                contexttype="toolbaritem"
   448 +                contexttype="toolbaritem"
   399 +                class="customize-context-removeFromToolbar"/>
   449 +                class="customize-context-removeFromToolbar"/>
   400 +      <menuitem id="toolbar-context-reloadAllTabs"
   450 +      <menuitem id="toolbar-context-reloadSelectedTab"
   401 +                class="toolbaritem-tabsmenu"
   451 +                class="toolbaritem-tabsmenu"
   402 +                contexttype="tabbar"
   452 +                contexttype="tabbar"
   403 +                oncommand="gBrowser.reloadAllTabs();"
   453 +                oncommand="gBrowser.reloadMultiSelectedTabs();"
   404 +                label="&toolbarContextMenu.reloadAllTabs.label;"
   454 +                label="&toolbarContextMenu.reloadSelectedTab.label;"
   405 +                accesskey="&toolbarContextMenu.reloadAllTabs.accesskey;"/>
   455 +                accesskey="&toolbarContextMenu.reloadSelectedTab.accesskey;"/>
   406 +      <menuitem id="toolbar-context-bookmarkAllTabs"
   456 +      <menuitem id="toolbar-context-reloadSelectedTabs"
   407 +                class="toolbaritem-tabsmenu"
   457 +                class="toolbaritem-tabsmenu"
   408 +                contexttype="tabbar"
   458 +                contexttype="tabbar"
   409 +                command="Browser:BookmarkAllTabs"
   459 +                oncommand="gBrowser.reloadMultiSelectedTabs();"
   410 +                label="&toolbarContextMenu.bookmarkAllTabs.label;"
   460 +                label="&toolbarContextMenu.reloadSelectedTabs.label;"
   411 +                accesskey="&toolbarContextMenu.bookmarkAllTabs.accesskey;"/>
   461 +                accesskey="&toolbarContextMenu.reloadSelectedTabs.accesskey;"/>
       
   462 +      <menuitem id="toolbar-context-bookmarkSelectedTab"
       
   463 +                class="toolbaritem-tabsmenu"
       
   464 +                contexttype="tabbar"
       
   465 +                oncommand="PlacesCommandHook.bookmarkPages(PlacesCommandHook.uniqueSelectedPages);"
       
   466 +                label="&toolbarContextMenu.bookmarkSelectedTab.label;"
       
   467 +                accesskey="&toolbarContextMenu.bookmarkSelectedTab.accesskey;"/>
       
   468 +      <menuitem id="toolbar-context-bookmarkSelectedTabs"
       
   469 +                class="toolbaritem-tabsmenu"
       
   470 +                contexttype="tabbar"
       
   471 +                oncommand="PlacesCommandHook.bookmarkPages(PlacesCommandHook.uniqueSelectedPages);"
       
   472 +                label="&toolbarContextMenu.bookmarkSelectedTabs.label;"
       
   473 +                accesskey="&toolbarContextMenu.bookmarkSelectedTabs.accesskey;"/>
       
   474 +      <menuitem id="toolbar-context-selectAllTabs"
       
   475 +                class="toolbaritem-tabsmenu"
       
   476 +                contexttype="tabbar"
       
   477 +                oncommand="gBrowser.selectAllTabs();"
       
   478 +                label="&toolbarContextMenu.selectAllTabs.label;"
       
   479 +                accesskey="&toolbarContextMenu.selectAllTabs.accesskey;"/>
   412 +      <menuitem id="toolbar-context-undoCloseTab"
   480 +      <menuitem id="toolbar-context-undoCloseTab"
   413 +                class="toolbaritem-tabsmenu"
   481 +                class="toolbaritem-tabsmenu"
   414 +                contexttype="tabbar"
   482 +                contexttype="tabbar"
   415 +                label="&toolbarContextMenu.undoCloseTab.label;"
   483 +                label="&toolbarContextMenu.undoCloseTab.label;"
   416 +                accesskey="&toolbarContextMenu.undoCloseTab.accesskey;"
   484 +                accesskey="&toolbarContextMenu.undoCloseTab.accesskey;"
   494 +           position="bottomcenter topright"
   562 +           position="bottomcenter topright"
   495 +           tabspecific="true"
   563 +           tabspecific="true"
   496 +           noautofocus="true"
   564 +           noautofocus="true"
   497 +           copyURL-title="&pageAction.copyLink.label;"
   565 +           copyURL-title="&pageAction.copyLink.label;"
   498 +           emailLink-title="&emailPageCmd.label;"
   566 +           emailLink-title="&emailPageCmd.label;"
   499 +           sendToDevice-title="&pageAction.sendTabToDevice.label;"
       
   500 +           sendToDevice-notReadyTitle="&sendToDevice.syncNotReady.label;"
   567 +           sendToDevice-notReadyTitle="&sendToDevice.syncNotReady.label;"
   501 +           shareURL-title="&pageAction.shareUrl.label;"
   568 +           shareURL-title="&pageAction.shareUrl.label;"
   502 +           shareMore-label="&pageAction.shareMore.label;">
   569 +           shareMore-label="&pageAction.shareMore.label;">
   503 +      <panelmultiview id="pageActionPanelMultiView"
   570 +      <panelmultiview id="pageActionPanelMultiView"
   504 +                      mainViewId="pageActionPanelMainView"
   571 +                      mainViewId="pageActionPanelMainView"
   532 +                oncommand="BrowserPageActions.togglePinningForContextAction();"/>
   599 +                oncommand="BrowserPageActions.togglePinningForContextAction();"/>
   533 +      <menuitem class="pageActionContextMenuItem builtInPinned"
   600 +      <menuitem class="pageActionContextMenuItem builtInPinned"
   534 +                label="&pageAction.removeFromUrlbar.label;"
   601 +                label="&pageAction.removeFromUrlbar.label;"
   535 +                oncommand="BrowserPageActions.togglePinningForContextAction();"/>
   602 +                oncommand="BrowserPageActions.togglePinningForContextAction();"/>
   536 +      <menuitem class="pageActionContextMenuItem extensionUnpinned"
   603 +      <menuitem class="pageActionContextMenuItem extensionUnpinned"
   537 +                label="&pageAction.allowInUrlbar.label;"
   604 +                label="&pageAction.addToUrlbar.label;"
   538 +                oncommand="BrowserPageActions.togglePinningForContextAction();"/>
   605 +                oncommand="BrowserPageActions.togglePinningForContextAction();"/>
   539 +      <menuitem class="pageActionContextMenuItem extensionPinned"
   606 +      <menuitem class="pageActionContextMenuItem extensionPinned"
   540 +                label="&pageAction.disallowInUrlbar.label;"
   607 +                label="&pageAction.removeFromUrlbar.label;"
   541 +                oncommand="BrowserPageActions.togglePinningForContextAction();"/>
   608 +                oncommand="BrowserPageActions.togglePinningForContextAction();"/>
   542 +      <menuseparator class="pageActionContextMenuItem extensionPinned extensionUnpinned"/>
   609 +      <menuseparator class="pageActionContextMenuItem extensionPinned extensionUnpinned"/>
   543 +      <menuitem class="pageActionContextMenuItem extensionPinned extensionUnpinned"
   610 +      <menuitem class="pageActionContextMenuItem extensionPinned extensionUnpinned"
   544 +                label="&pageAction.manageExtension.label;"
   611 +                label="&pageAction.manageExtension.label;"
   545 +                oncommand="BrowserPageActions.openAboutAddonsForContextAction();"/>
   612 +                oncommand="BrowserPageActions.openAboutAddonsForContextAction();"/>
   548 +#include ../../components/places/content/bookmarksHistoryTooltip.inc.xul
   615 +#include ../../components/places/content/bookmarksHistoryTooltip.inc.xul
   549 +
   616 +
   550 +    <tooltip id="tabbrowser-tab-tooltip" onpopupshowing="gBrowser.createTooltip(event);"/>
   617 +    <tooltip id="tabbrowser-tab-tooltip" onpopupshowing="gBrowser.createTooltip(event);"/>
   551 +
   618 +
   552 +    <tooltip id="back-button-tooltip">
   619 +    <tooltip id="back-button-tooltip">
   553 +      <label class="tooltip-label" value="&backButton.tooltip;"/>
   620 +      <description class="tooltip-label" value="&backButton.tooltip;"/>
   554 +#ifdef XP_MACOSX
   621 +#ifdef XP_MACOSX
   555 +      <label class="tooltip-label" value="&backForwardButtonMenuMac.tooltip;"/>
   622 +      <description class="tooltip-label" value="&backForwardButtonMenuMac.tooltip;"/>
   556 +#else
   623 +#else
   557 +      <label class="tooltip-label" value="&backForwardButtonMenu.tooltip;"/>
   624 +      <description class="tooltip-label" value="&backForwardButtonMenu.tooltip;"/>
   558 +#endif
   625 +#endif
   559 +    </tooltip>
   626 +    </tooltip>
   560 +
   627 +
   561 +    <tooltip id="forward-button-tooltip">
   628 +    <tooltip id="forward-button-tooltip">
   562 +      <label class="tooltip-label" value="&forwardButton.tooltip;"/>
   629 +      <description class="tooltip-label" value="&forwardButton.tooltip;"/>
   563 +#ifdef XP_MACOSX
   630 +#ifdef XP_MACOSX
   564 +      <label class="tooltip-label" value="&backForwardButtonMenuMac.tooltip;"/>
   631 +      <description class="tooltip-label" value="&backForwardButtonMenuMac.tooltip;"/>
   565 +#else
   632 +#else
   566 +      <label class="tooltip-label" value="&backForwardButtonMenu.tooltip;"/>
   633 +      <description class="tooltip-label" value="&backForwardButtonMenu.tooltip;"/>
   567 +#endif
   634 +#endif
   568 +    </tooltip>
   635 +    </tooltip>
   569 +
   636 +
   570 +#include popup-notifications.inc
   637 +#include popup-notifications.inc
   571 +
   638 +
   815 +                       ondragover="homeButtonObserver.onDragOver(event)"
   882 +                       ondragover="homeButtonObserver.onDragOver(event)"
   816 +                       ondragenter="homeButtonObserver.onDragOver(event)"
   883 +                       ondragenter="homeButtonObserver.onDragOver(event)"
   817 +                       ondrop="homeButtonObserver.onDrop(event)"
   884 +                       ondrop="homeButtonObserver.onDrop(event)"
   818 +                       ondragexit="homeButtonObserver.onDragExit(event)"
   885 +                       ondragexit="homeButtonObserver.onDragExit(event)"
   819 +                       key="goHome"
   886 +                       key="goHome"
   820 +                       onclick="BrowserGoHome(event);"
   887 +                       onclick="BrowserHome(event);"
   821 +                       cui-areatype="toolbar"
   888 +                       cui-areatype="toolbar"
   822 +                       tooltiptext="&homeButton.defaultPage.tooltip;"/>
   889 +                       tooltiptext="&homeButton.defaultPage.tooltip;"/>
   823 +        <toolbarspring cui-areatype="toolbar" class="chromeclass-toolbar-additional"/>
   890 +        <toolbarspring cui-areatype="toolbar" class="chromeclass-toolbar-additional"/>
   824 +        <toolbaritem id="urlbar-container" flex="400" persist="width"
   891 +        <toolbaritem id="urlbar-container" flex="400" persist="width"
   825 +                     removable="false"
   892 +                     removable="false"
  1365  #include "nsMacAttribution.h"
  1432  #include "nsMacAttribution.h"
  1366  #endif
  1433  #endif
  1367  
  1434  
  1368  #if defined(XP_WIN)
  1435  #if defined(XP_WIN)
  1369  #include "nsIEHistoryEnumerator.h"
  1436  #include "nsIEHistoryEnumerator.h"
  1370 @@ -34,18 +34,16 @@ using namespace mozilla::browser;
  1437 @@ -33,18 +33,16 @@ using namespace mozilla::browser;
  1371  
  1438  
  1372  /////////////////////////////////////////////////////////////////////////////
  1439  /////////////////////////////////////////////////////////////////////////////
  1373  
  1440  
  1374  NS_GENERIC_FACTORY_CONSTRUCTOR(DirectoryProvider)
  1441  NS_GENERIC_FACTORY_CONSTRUCTOR(DirectoryProvider)
  1375  #if defined(XP_WIN)
  1442  #if defined(XP_WIN)
  1384  NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacAttributionService)
  1451  NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacAttributionService)
  1385  #endif
  1452  #endif
  1386  
  1453  
  1387  #if defined(XP_WIN)
  1454  #if defined(XP_WIN)
  1388  NS_GENERIC_FACTORY_CONSTRUCTOR(nsIEHistoryEnumerator)
  1455  NS_GENERIC_FACTORY_CONSTRUCTOR(nsIEHistoryEnumerator)
  1389 @@ -70,17 +68,17 @@ NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID)
  1456 @@ -67,17 +65,17 @@ NS_DEFINE_NAMED_CID(NS_MACATTRIBUTIONSER
  1390  NS_DEFINE_NAMED_CID(NS_MACATTRIBUTIONSERVICE_CID);
       
  1391  #endif
  1457  #endif
  1392  
  1458  
  1393  static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
  1459  static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
       
  1460      // clang-format off
  1394      { &kNS_BROWSERDIRECTORYPROVIDER_CID, false, nullptr, DirectoryProviderConstructor },
  1461      { &kNS_BROWSERDIRECTORYPROVIDER_CID, false, nullptr, DirectoryProviderConstructor },
  1395  #if defined(XP_WIN)
  1462  #if defined(XP_WIN)
  1396      { &kNS_SHELLSERVICE_CID, false, nullptr, nsWindowsShellServiceConstructor },
  1463      { &kNS_SHELLSERVICE_CID, false, nullptr, nsWindowsShellServiceConstructor },
  1397  #elif defined(MOZ_WIDGET_GTK)
  1464  #elif defined(MOZ_WIDGET_GTK)
  1398 -    { &kNS_SHELLSERVICE_CID, false, nullptr, nsGNOMEShellServiceConstructor },
  1465 -    { &kNS_SHELLSERVICE_CID, false, nullptr, nsGNOMEShellServiceConstructor },
  1399 +    { &kNS_SHELLSERVICE_CID, false, nullptr, nsUnixShellServiceConstructor },
  1466 +    { &kNS_SHELLSERVICE_CID, false, nullptr, nsUnixShellServiceConstructor },
  1400  #endif
  1467  #endif
  1401      { &kNS_FEEDSNIFFER_CID, false, nullptr, nsFeedSnifferConstructor },
       
  1402      { &kNS_BROWSER_ABOUT_REDIRECTOR_CID, false, nullptr, AboutRedirector::Create },
  1468      { &kNS_BROWSER_ABOUT_REDIRECTOR_CID, false, nullptr, AboutRedirector::Create },
  1403  #if defined(XP_WIN)
  1469  #if defined(XP_WIN)
  1404      { &kNS_WINIEHISTORYENUMERATOR_CID, false, nullptr, nsIEHistoryEnumeratorConstructor },
  1470      { &kNS_WINIEHISTORYENUMERATOR_CID, false, nullptr, nsIEHistoryEnumeratorConstructor },
  1405  #elif defined(XP_MACOSX)
  1471  #elif defined(XP_MACOSX)
  1406      { &kNS_SHELLSERVICE_CID, false, nullptr, nsMacShellServiceConstructor },
  1472      { &kNS_SHELLSERVICE_CID, false, nullptr, nsMacShellServiceConstructor },
  1407  #endif
  1473  #endif
       
  1474  #if defined(MOZ_WIDGET_COCOA)
  1408 diff --git a/browser/components/preferences/in-content/main.js b/browser/components/preferences/in-content/main.js
  1475 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
  1476 --- a/browser/components/preferences/in-content/main.js
  1410 +++ b/browser/components/preferences/in-content/main.js
  1477 +++ b/browser/components/preferences/in-content/main.js
  1411 @@ -327,16 +327,23 @@ var gMainPane = {
  1478 @@ -283,16 +283,23 @@ var gMainPane = {
  1412            this._backoffIndex++ : backoffTimes.length - 1]);
  1479            this._backoffIndex++ : backoffTimes.length - 1]);
  1413        };
  1480        };
  1414  
  1481  
  1415        window.setTimeout(() => {
  1482        window.setTimeout(() => {
  1416          window.requestIdleCallback(pollForDefaultBrowser);
  1483          window.requestIdleCallback(pollForDefaultBrowser);
  1430      let performanceSettingsLink = document.getElementById("performanceSettingsLearnMore");
  1497      let performanceSettingsLink = document.getElementById("performanceSettingsLearnMore");
  1431      let performanceSettingsUrl = Services.urlFormatter.formatURLPref("app.support.baseURL") + "performance";
  1498      let performanceSettingsUrl = Services.urlFormatter.formatURLPref("app.support.baseURL") + "performance";
  1432      performanceSettingsLink.setAttribute("href", performanceSettingsUrl);
  1499      performanceSettingsLink.setAttribute("href", performanceSettingsUrl);
  1433  
  1500  
  1434      this.updateDefaultPerformanceSettingsPref();
  1501      this.updateDefaultPerformanceSettingsPref();
  1435 @@ -962,16 +969,27 @@ var gMainPane = {
  1502 @@ -938,16 +945,27 @@ var gMainPane = {
  1436        // Reset exponential backoff delay time in order to do visual update in pollForDefaultBrowser.
  1503        // Reset exponential backoff delay time in order to do visual update in pollForDefaultBrowser.
  1437        this._backoffIndex = 0;
  1504        this._backoffIndex = 0;
  1438  
  1505  
  1439        let shellSvc = getShellService();
  1506        let shellSvc = getShellService();
  1440        if (!shellSvc)
  1507        if (!shellSvc)
  1484      'ShellService.jsm',
  1551      'ShellService.jsm',
  1485 diff --git a/browser/components/shell/nsKDEShellService.cpp b/browser/components/shell/nsKDEShellService.cpp
  1552 diff --git a/browser/components/shell/nsKDEShellService.cpp b/browser/components/shell/nsKDEShellService.cpp
  1486 new file mode 100644
  1553 new file mode 100644
  1487 --- /dev/null
  1554 --- /dev/null
  1488 +++ b/browser/components/shell/nsKDEShellService.cpp
  1555 +++ b/browser/components/shell/nsKDEShellService.cpp
  1489 @@ -0,0 +1,204 @@
  1556 @@ -0,0 +1,153 @@
  1490 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1557 +/* -*- 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
  1558 +/* 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
  1559 + * 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/. */
  1560 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  1494 +
  1561 +
  1638 +    uristr->SetData( aURI );
  1705 +    uristr->SetData( aURI );
  1639 +    command->AppendElement( uristr );
  1706 +    command->AppendElement( uristr );
  1640 +    return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
  1707 +    return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
  1641 +}
  1708 +}
  1642 +
  1709 +
  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
  1710 diff --git a/browser/components/shell/nsKDEShellService.h b/browser/components/shell/nsKDEShellService.h
  1695 new file mode 100644
  1711 new file mode 100644
  1696 --- /dev/null
  1712 --- /dev/null
  1697 +++ b/browser/components/shell/nsKDEShellService.h
  1713 +++ b/browser/components/shell/nsKDEShellService.h
  1698 @@ -0,0 +1,30 @@
  1714 @@ -0,0 +1,30 @@
  1774 +
  1790 +
  1775 +#endif // nsunixshellservice_h____
  1791 +#endif // nsunixshellservice_h____
  1776 diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
  1792 diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
  1777 --- a/browser/installer/package-manifest.in
  1793 --- a/browser/installer/package-manifest.in
  1778 +++ b/browser/installer/package-manifest.in
  1794 +++ b/browser/installer/package-manifest.in
  1779 @@ -462,16 +462,18 @@
  1795 @@ -458,16 +458,18 @@
  1780  @RESPATH@/browser/defaults/settings/pinning
  1796  @RESPATH@/browser/defaults/settings/pinning
  1781  @RESPATH@/browser/defaults/settings/main
  1797  @RESPATH@/browser/defaults/settings/main
  1782  
  1798  
  1783  ; Warning: changing the path to channel-prefs.js can cause bugs (Bug 756325)
  1799  ; 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
  1800  ; Technically this is an app pref file, but we are keeping it in the original