firefox-kde.patch
branchfirefox67
changeset 1093 3942c205588b
parent 1089 eca1c1f2fe50
--- a/firefox-kde.patch	Tue May 14 12:12:16 2019 +0200
+++ b/firefox-kde.patch	Wed May 15 19:43:42 2019 +0200
@@ -1,11 +1,11 @@
 # HG changeset patch
-# Parent  87262204aa945e6fce864193d103a93659bf76f6
+# Parent  18632e53d0b0c4c03f254ca2dbbeac8f48ec6f5c
 
 diff --git a/browser/base/content/browser-kde.xul b/browser/base/content/browser-kde.xul
 new file mode 100644
 --- /dev/null
 +++ b/browser/base/content/browser-kde.xul
-@@ -0,0 +1,1408 @@
+@@ -0,0 +1,1404 @@
 +#filter substitution
 +<?xml version="1.0"?>
 +# -*- Mode: HTML -*-
@@ -80,7 +80,6 @@
 +        retargetdocumentfocus="urlbar"
 +        persist="screenX screenY width height sizemode"
 +#ifdef BROWSER_XHTML
-+        hidden="true"
 +        mozpersist=""
 +#endif
 +        >
@@ -90,11 +89,7 @@
 +# that they can be shared with macWindow.inc.xul.
 +#include global-scripts.inc
 +
-+<script type="application/javascript"
-+#ifdef BROWSER_XHTML
-+xmlns="http://www.w3.org/1999/xhtml"
-+#endif
-+>
++<script type="application/javascript">
 +  Services.scriptloader.loadSubScript("chrome://global/content/contentAreaUtils.js", this);
 +  Services.scriptloader.loadSubScript("chrome://browser/content/browser-captivePortal.js", this);
 +  Services.scriptloader.loadSubScript("chrome://browser/content/browser-compacttheme.js", this);
@@ -111,23 +106,16 @@
 +  Services.scriptloader.loadSubScript("chrome://browser/content/browser-sidebar.js", this);
 +  Services.scriptloader.loadSubScript("chrome://browser/content/browser-tabsintitlebar.js", this);
 +  Services.scriptloader.loadSubScript("chrome://browser/content/tabbrowser.js", this);
++  Services.scriptloader.loadSubScript("chrome://browser/content/search/autocomplete-popup.js", this);
 +  Services.scriptloader.loadSubScript("chrome://browser/content/search/searchbar.js", this);
 +
 +  window.onload = gBrowserInit.onLoad.bind(gBrowserInit);
 +  window.onunload = gBrowserInit.onUnload.bind(gBrowserInit);
 +  window.onclose = WindowIsClosing;
 +
-+#ifdef BROWSER_XHTML
-+  window.addEventListener("readystatechange", () => {
-+    // We initially hide the window to prevent layouts during parse. This lets us
-+    // avoid accidental XBL construction and better match browser.xul (see Bug 1497975).
-+    gBrowserInit.onBeforeInitialXULLayout();
-+    document.documentElement.removeAttribute("hidden");
-+  }, { once: true, capture: true });
-+#else
 +  window.addEventListener("MozBeforeInitialXULLayout",
 +    gBrowserInit.onBeforeInitialXULLayout.bind(gBrowserInit), { once: true });
-+#endif
++
 +  // The listener of DOMContentLoaded must be set on window, rather than
 +  // document, because the window can go away before the event is fired.
 +  // In that case, we don't want to initialize anything, otherwise we
@@ -244,7 +232,8 @@
 +
 +    <!-- for search and content formfill/pw manager -->
 +
-+    <panel type="autocomplete-richlistbox"
++    <panel is="autocomplete-richlistbox-popup"
++           type="autocomplete-richlistbox"
 +           id="PopupAutoComplete"
 +           role="group"
 +           noautofocus="true"
@@ -254,7 +243,8 @@
 +           nomaxresults="true" />
 +
 +    <!-- for search with one-off buttons -->
-+    <panel type="autocomplete-richlistbox"
++    <panel is="search-autocomplete-richlistbox-popup"
++           type="autocomplete-richlistbox"
 +           id="PopupSearchAutoComplete"
 +           role="group"
 +           noautofocus="true"
@@ -270,27 +260,6 @@
 +           level="parent"
 +           overflowpadding="15" />
 +
-+    <!-- for url bar autocomplete -->
-+    <panel id="urlbar-results"
-+           role="group"
-+           noautofocus="true"
-+           hidden="true"
-+           flip="none"
-+           consumeoutsideclicks="never"
-+           norolluponanchor="true"
-+           level="parent">
-+      <html:div class="urlbarView-body-outer">
-+        <html:div class="urlbarView-body-inner">
-+          <!-- TODO: add search suggestions notification -->
-+          <html:div class="urlbarView-results"/>
-+        </html:div>
-+      </html:div>
-+      <hbox class="search-one-offs"
-+            compact="true"
-+            includecurrentengine="true"
-+            disabletab="true"/>
-+    </panel>
-+
 +    <!-- for date/time picker. consumeoutsideclicks is set to never, so that
 +         clicks on the anchored input box are never consumed. -->
 +    <panel id="DateTimePickerPanel"
@@ -581,6 +550,8 @@
 +           position="bottomcenter topright"
 +           tabspecific="true"
 +           noautofocus="true"
++           pinTab-title="&pinTab.label;"
++           unpinTab-title="&unpinTab.label;"
 +           pocket-title="&saveToPocketCmd.label;"
 +           copyURL-title="&pageAction.copyLink.label;"
 +           emailLink-title="&emailPageCmd.label;"
@@ -607,9 +578,12 @@
 +           tabspecific="true"
 +           noautofocus="true">
 +      <hbox id="confirmation-hint-checkmark-animation-container">
-+        <image id="confirmation-hint-checkmark-image"/>
++       <image id="confirmation-hint-checkmark-image"/>
 +      </hbox>
-+      <label id="confirmation-hint-message"/>
++      <vbox id="confirmation-hint-message-container">
++       <label id="confirmation-hint-message"/>
++       <label id="confirmation-hint-description"/>
++      </vbox>
 +    </panel>
 +
 +    <menupopup id="pageActionContextMenu"
@@ -843,6 +817,7 @@
 +             overflowpanel="widget-overflow"
 +             context="toolbar-context-menu">
 +
++      <toolbartabstop/>
 +      <hbox id="nav-bar-customization-target" flex="1">
 +        <toolbarbutton id="back-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
 +                       label="&backCmd.label;"
@@ -896,11 +871,13 @@
 +        <toolbaritem id="urlbar-container" flex="400" persist="width"
 +                     removable="false"
 +                     class="chromeclass-location" overflows="false">
++            <toolbartabstop/>
 +            <textbox id="urlbar" flex="1"
 +                     placeholder="&urlbar.placeholder2;"
 +                     defaultPlaceholder="&urlbar.placeholder2;"
 +                     focused="true"
 +                     type="autocomplete"
++                     quantumbar="false"
 +                     autocompletesearch="unifiedcomplete"
 +                     autocompletesearchparam="enable-actions"
 +                     autocompletepopup="PopupAutoCompleteRichResult"
@@ -1015,6 +992,7 @@
 +                <label id="extension" class="urlbar-display urlbar-display-extension" value="&urlbar.extension.label;"/>
 +              </box>
 +              <hbox id="page-action-buttons" context="pageActionContextMenu">
++                <toolbartabstop/>
 +                <hbox id="contextual-feature-recommendation" role="button" hidden="true">
 +                  <hbox id="cfr-label-container">
 +                    <label id="cfr-label"/>
@@ -1072,6 +1050,7 @@
 +                </hbox>
 +              </hbox>
 +            </textbox>
++            <toolbartabstop/>
 +        </toolbaritem>
 +
 +        <toolbarspring cui-areatype="toolbar" class="chromeclass-toolbar-additional"/>
@@ -1083,6 +1062,7 @@
 +                       class="toolbarbutton-1 chromeclass-toolbar-additional badged-button"
 +                       key="key_openDownloads"
 +                       onmousedown="DownloadsIndicatorView.onCommand(event);"
++                       onkeypress="DownloadsIndicatorView.onCommand(event);"
 +                       ondrop="DownloadsIndicatorView.onDrop(event);"
 +                       ondragover="DownloadsIndicatorView.onDragOver(event);"
 +                       ondragenter="DownloadsIndicatorView.onDragOver(event);"
@@ -1115,6 +1095,19 @@
 +                       tooltiptext="&libraryButton.tooltip;"
 +                       label="&places.library.title;"/>
 +
++        <toolbarbutton id="fxa-toolbar-menu-button" class="toolbarbutton-1 badged-button chromeclass-toolbar-additional subviewbutton-nav"
++                       onmousedown="gSync.toggleAccountPanel('PanelUI-fxa', event)"
++                       onkeypress="gSync.toggleAccountPanel('PanelUI-fxa', event)"
++                       consumeanchor="fxa-toolbar-menu-button"
++                       closemenu="none"
++                       label="&fxa.menu.firefoxAccount;"
++                       tooltiptext="&fxa.menu.firefoxAccount;"
++                       cui-areatype="toolbar"
++                       removable="true">
++                       <vbox>
++                        <image id="fxa-avatar-image"/>
++                       </vbox>
++        </toolbarbutton>
 +      </hbox>
 +
 +      <toolbarbutton id="nav-bar-overflow-button"
@@ -1167,6 +1160,7 @@
 +             toolbarname="&personalbarCmd.label;" accesskey="&personalbarCmd.accesskey;"
 +             collapsed="true"
 +             customizable="true">
++      <toolbartabstop skipintoolbarset="true"/>
 +      <toolbaritem id="personal-bookmarks"
 +                   title="&bookmarksToolbarItem.label;"
 +                   cui-areatype="toolbar"
@@ -1336,7 +1330,9 @@
 +                   align="center"
 +                   flex="100"
 +                   persist="width">
++        <toolbartabstop/>
 +        <searchbar id="searchbar" flex="1"/>
++        <toolbartabstop/>
 +      </toolbaritem>
 +    </toolbarpalette>
 +  </toolbox>
@@ -1436,70 +1432,10 @@
          content/browser/browser-data-submission-info-bar.js (content/browser-data-submission-info-bar.js)
          content/browser/browser-compacttheme.js       (content/browser-compacttheme.js)
          content/browser/browser-contentblocking.js    (content/browser-contentblocking.js)
-diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/nsModule.cpp
---- a/browser/components/build/nsModule.cpp
-+++ b/browser/components/build/nsModule.cpp
-@@ -8,17 +8,17 @@
- #include "nsBrowserCompsCID.h"
- #include "DirectoryProvider.h"
- 
- #if defined(XP_WIN)
- #  include "nsWindowsShellService.h"
- #elif defined(XP_MACOSX)
- #  include "nsMacShellService.h"
- #elif defined(MOZ_WIDGET_GTK)
--#  include "nsGNOMEShellService.h"
-+#  include "nsUnixShellService.h"
- #endif
- #include "nsIToolkitShellService.h"
- 
- #if defined(MOZ_WIDGET_COCOA)
- #  include "nsMacAttribution.h"
- #endif
- 
- #if defined(XP_WIN)
-@@ -34,18 +34,16 @@ using namespace mozilla::browser;
- 
- /////////////////////////////////////////////////////////////////////////////
- 
- NS_GENERIC_FACTORY_CONSTRUCTOR(DirectoryProvider)
- #if defined(XP_WIN)
- NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindowsShellService)
- #elif defined(XP_MACOSX)
- NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacShellService)
--#elif defined(MOZ_WIDGET_GTK)
--NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init)
- #endif
- 
- #if defined(MOZ_WIDGET_COCOA)
- NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacAttributionService)
- #endif
- 
- #if defined(XP_WIN)
- NS_GENERIC_FACTORY_CONSTRUCTOR(nsIEHistoryEnumerator)
-@@ -64,17 +62,17 @@ NS_DEFINE_NAMED_CID(NS_MACATTRIBUTIONSER
- #endif
- 
- static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
-     // clang-format off
-     { &kNS_BROWSERDIRECTORYPROVIDER_CID, false, nullptr, DirectoryProviderConstructor },
- #if defined(XP_WIN)
-     { &kNS_SHELLSERVICE_CID, false, nullptr, nsWindowsShellServiceConstructor },
- #elif defined(MOZ_WIDGET_GTK)
--    { &kNS_SHELLSERVICE_CID, false, nullptr, nsGNOMEShellServiceConstructor },
-+    { &kNS_SHELLSERVICE_CID, false, nullptr, nsUnixShellServiceConstructor },
- #elif defined(XP_MACOSX)
-     { &kNS_SHELLSERVICE_CID, false, nullptr, nsMacShellServiceConstructor },
- #endif
-     { &kNS_BROWSER_ABOUT_REDIRECTOR_CID, false, nullptr, AboutRedirector::Create },
- #if defined(XP_WIN)
-     { &kNS_WINIEHISTORYENUMERATOR_CID, false, nullptr, nsIEHistoryEnumeratorConstructor },
- #endif
- #if defined(MOZ_WIDGET_COCOA)
 diff --git a/browser/components/preferences/in-content/main.js b/browser/components/preferences/in-content/main.js
 --- a/browser/components/preferences/in-content/main.js
 +++ b/browser/components/preferences/in-content/main.js
-@@ -289,16 +289,23 @@ var gMainPane = {
+@@ -288,16 +288,23 @@ var gMainPane = {
            this._backoffIndex++ : backoffTimes.length - 1]);
        };
  
@@ -1523,7 +1459,7 @@
      performanceSettingsLink.setAttribute("href", performanceSettingsUrl);
  
      this.updateDefaultPerformanceSettingsPref();
-@@ -1021,16 +1028,27 @@ var gMainPane = {
+@@ -1025,16 +1032,27 @@ var gMainPane = {
        // Reset exponential backoff delay time in order to do visual update in pollForDefaultBrowser.
        this._backoffIndex = 0;
  
@@ -1815,7 +1751,7 @@
 diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
 --- a/browser/installer/package-manifest.in
 +++ b/browser/installer/package-manifest.in
-@@ -452,16 +452,18 @@
+@@ -286,16 +286,18 @@
  @RESPATH@/browser/defaults/settings/pinning
  @RESPATH@/browser/defaults/settings/main