firefox-kde.patch
changeset 994 9fc447b00040
parent 986 74bc4d049531
child 1005 6d716caa6abe
--- a/firefox-kde.patch	Sun Sep 17 10:06:24 2017 +0200
+++ b/firefox-kde.patch	Wed Sep 20 21:52:01 2017 +0200
@@ -1,11 +1,11 @@
 # HG changeset patch
-# Parent  9ccba8e6b5fad738ce924ff40b4c5aa6f4bc12dd
+# Parent  05209af7fdfec897f5f574c691184ba27049b0ff
 
 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,1306 @@
+@@ -0,0 +1,1320 @@
 +#filter substitution
 +<?xml version="1.0"?>
 +# -*- Mode: HTML -*-
@@ -72,14 +72,9 @@
 +# wishes to include *must* go into the global-scripts.inc file
 +# so that they can be shared by macBrowserOverlay.xul.
 +#include global-scripts.inc
-+<script type="application/javascript" src="chrome://browser/content/nsContextMenu.js"/>
 +
 +<script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
 +
-+<script type="application/javascript" src="chrome://browser/content/downloads/downloads.js"/>
-+<script type="application/javascript" src="chrome://browser/content/downloads/indicator.js"/>
-+<script type="application/javascript" src="chrome://browser/content/places/editBookmarkOverlay.js"/>
-+
 +# All sets except for popupsets (commands, keys, stringbundles and broadcasters) *must* go into the
 +# browser-sets.inc file for sharing with hiddenWindow.xul.
 +#define FULL_BROWSER_WINDOW
@@ -110,9 +105,9 @@
 +                hidden="true"
 +                oncommand="gBrowser.openNonRemoteWindow(TabContextMenu.contextTab);"/>
 +#endif
-+      <menuseparator id="context_sendTabToDevice_separator" hidden="true"/>
++      <menuseparator id="context_sendTabToDevice_separator"/>
 +      <menu id="context_sendTabToDevice" label="&sendTabToDevice.label;"
-+            accesskey="&sendTabToDevice.accesskey;" hidden="true">
++            accesskey="&sendTabToDevice.accesskey;">
 +        <menupopup id="context_sendTabToDevicePopupMenu"
 +                   onpopupshowing="gSync.populateSendTabToDevicesMenu(event.target, TabContextMenu.contextTab.linkedBrowser.currentURI.spec, TabContextMenu.contextTab.linkedBrowser.contentTitle);"/>
 +      </menu>
@@ -455,58 +450,42 @@
 +      </hbox>
 +    </panel>
 +
-+    <panel id="page-action-panel"
++#ifdef MOZ_PHOTON_THEME
++    <panel id="pageActionPanel"
 +           class="cui-widget-panel"
 +           role="group"
 +           type="arrow"
 +           hidden="true"
 +           flip="slide"
 +           position="bottomcenter topright"
-+           noautofocus="true">
-+      <photonpanelmultiview id="page-action-multiView"
-+                            mainViewId="page-action-mainView">
-+        <panelview id="page-action-mainView"
++           tabspecific="true"
++           noautofocus="true"
++           context="pageActionPanelContextMenu"
++           oncontextmenu="BrowserPageActions.onContextMenu(event);"
++           copyURL-title="&copyURLCmd.label;"
++           emailLink-title="&emailPageCmd.label;"
++           sendToDevice-title="&sendToDevice.label2;"
++           sendToDevice-notReadyTitle="&sendToDevice.syncNotReady.label;">
++      <photonpanelmultiview id="pageActionPanelMultiView"
++                            mainViewId="pageActionPanelMainView"
++                            viewCacheId="appMenu-viewCache">
++        <panelview id="pageActionPanelMainView"
 +                   class="PanelUI-subView">
-+          <vbox class="panel-subview-body">
-+            <toolbarbutton id="page-action-bookmark-button"
-+                           class="subviewbutton subviewbutton-iconic"
-+                           observes="bookmarkThisPageBroadcaster"
-+                           command="Browser:AddBookmarkAs"
-+                           onclick="gPageActionButton.panel.hidePopup();"/>
-+            <toolbarseparator/>
-+            <toolbarbutton id="page-action-copy-url-button"
-+                           class="subviewbutton subviewbutton-iconic"
-+                           label="&copyURLCmd.label;"
-+                           command="PageAction:copyURL"/>
-+            <toolbarbutton id="page-action-email-link-button"
-+                           class="subviewbutton subviewbutton-iconic"
-+                           label="&emailPageCmd.label;"
-+                           command="PageAction:emailLink"/>
-+            <toolbarbutton id="page-action-send-to-device-button"
-+                           class="subviewbutton subviewbutton-iconic subviewbutton-nav"
-+                           label="&sendToDevice.label;"
-+                           closemenu="none"
-+                           oncommand="gPageActionButton.showSendToDeviceView(this);"/>
-+          </vbox>
-+        </panelview>
-+        <panelview id="page-action-sendToDeviceView"
-+                   class="PanelUI-subView"
-+                   title="&sendToDevice.viewTitle;">
-+          <vbox id="page-action-sendToDeviceView-body" class="panel-subview-body">
-+            <toolbarbutton id="page-action-sendToDevice-fxa-button"
-+                           class="subviewbutton subviewbutton-iconic"
-+                           label="&syncBrand.fxAccount.label;"
-+                           shortcut="&sendToDevice.fxaRequired.label;"
-+                           oncommand="gPageActionButton.fxaButtonClicked();"/>
-+            <toolbarbutton id="page-action-no-devices-button"
-+                           class="subviewbutton"
-+                           label="&sendToDevice.noDevices.label;"
-+                           disabled="true"/>
-+          </vbox>
++          <vbox class="panel-subview-body"/>
 +        </panelview>
 +      </photonpanelmultiview>
 +    </panel>
 +
++    <menupopup id="pageActionPanelContextMenu"
++               onpopupshowing="BrowserPageActions.onContextMenuShowing(event, this);">
++      <menuitem id="pageActionPanelContextMenu-toggleUrlbar"
++                add-label="&pageAction.addToUrlbar.label;"
++                remove-label="&pageAction.removeFromUrlbar.label;"
++                label="&pageAction.addToUrlbar.label;"
++                oncommand="BrowserPageActions.toggleShownInUrlbarForContextAction();"/>
++    </menupopup>
++#endif
++
 +    <!-- Bookmarks and history tooltip -->
 +    <tooltip id="bhTooltip"/>
 +
@@ -790,11 +769,19 @@
 +                           class="toolbarbutton-1"
 +                           command="Browser:ReloadOrDuplicate"
 +                           onclick="checkForMiddleClick(this, event);"
-+                           tooltip="dynamic-shortcut-tooltip"/>
++                           tooltip="dynamic-shortcut-tooltip">
++              <box class="toolbarbutton-animatable-box">
++                <image class="toolbarbutton-animatable-image"/>
++              </box>
++            </toolbarbutton>
 +            <toolbarbutton id="stop-button"
 +                           class="toolbarbutton-1"
 +                           command="Browser:Stop"
-+                           tooltip="dynamic-shortcut-tooltip"/>
++                           tooltip="dynamic-shortcut-tooltip">
++              <box class="toolbarbutton-animatable-box">
++                <image class="toolbarbutton-animatable-image"/>
++              </box>
++            </toolbarbutton>
 +          </toolbaritem>
 +#endif
 +          <hbox id="urlbar-wrapper" flex="1">
@@ -818,7 +805,6 @@
 +                     showcommentcolumn="true"
 +                     showimagecolumn="true"
 +                     enablehistory="true"
-+                     maxrows="10"
 +                     newlines="stripsurroundingwhitespace"
 +                     ontextentered="this.handleCommand(param);"
 +                     ontextreverted="return this.handleRevert();"
@@ -854,8 +840,8 @@
 +                </box>
 +                <box id="notification-popup-box"
 +                     hidden="true"
-+                     onmouseover="document.getElementById('identity-icon').classList.add('no-hover');"
-+                     onmouseout="document.getElementById('identity-icon').classList.remove('no-hover');"
++                     onmouseover="document.getElementById('identity-box').classList.add('no-hover');"
++                     onmouseout="document.getElementById('identity-box').classList.remove('no-hover');"
 +                     align="center">
 +                  <image id="default-notification-icon" class="notification-anchor-icon" role="button"
 +                         tooltiptext="&urlbar.defaultNotificationAnchor.tooltip;"/>
@@ -918,6 +904,24 @@
 +                       onclick="FullZoom.reset();"
 +                       tooltip="dynamic-shortcut-tooltip"
 +                       hidden="true"/>
++#ifdef MOZ_PHOTON_THEME
++                <image id="pageActionButton"
++                       class="urlbar-icon"
++                       tooltiptext="&pageActionButton.tooltip;"
++                       onclick="BrowserPageActions.mainButtonClicked(event);"/>
++                <hbox id="star-button-box" hidden="true">
++                  <image id="star-button"
++                         class="urlbar-icon"
++                         onclick="BookmarkingUI.onStarCommand(event);">
++                    <observes element="bookmarkThisPageBroadcaster" attribute="starred"/>
++                    <observes element="bookmarkThisPageBroadcaster" attribute="tooltiptext"/>
++                  </image>
++                  <hbox id="star-button-animatable-box">
++                    <image id="star-button-animatable-image"
++                           onclick="BookmarkingUI.onStarCommand(event);"/>
++                  </hbox>
++                </hbox>
++#endif
 +              </hbox>
 +              <hbox id="userContext-icons" hidden="true">
 +                <label id="userContext-label"/>
@@ -937,11 +941,6 @@
 +                             class="chromeclass-toolbar-additional"
 +                             command="Browser:Stop"
 +                             tooltip="dynamic-shortcut-tooltip"/>
-+#else
-+              <toolbarbutton id="urlbar-page-action-button"
-+                             class="chromeclass-toolbar-additional"
-+                             tooltiptext="&pageActionButton.tooltip;"
-+                             onclick="gPageActionButton.onEvent(event);"/>
 +#endif
 +            </textbox>
 +          </hbox>
@@ -957,7 +956,11 @@
 +        <toolbarbutton id="bookmarks-menu-button"
 +                       class="toolbarbutton-1 chromeclass-toolbar-additional"
 +                       removable="true"
++#ifdef MOZ_PHOTON_THEME
++                       type="menu"
++#else
 +                       type="menu-button"
++#endif
 +                       label="&bookmarksMenuButton.label;"
 +                       tooltip="dynamic-shortcut-tooltip"
 +                       anchor="dropmarker"
@@ -974,7 +977,7 @@
 +                     placespopup="true"
 +                     context="placesContext"
 +                     openInTabs="children"
-+                     oncommand="BookmarksEventHandler.onCommand(event, this.parentNode._placesView);"
++                     oncommand="BookmarksEventHandler.onCommand(event);"
 +                     onclick="BookmarksEventHandler.onClick(event, this.parentNode._placesView);"
 +                     onpopupshowing="BookmarkingUI.onPopupShowing(event);
 +                                     BookmarkingUI.attachPlacesView(event, this);"
@@ -1083,7 +1086,13 @@
 +      <toolbarbutton id="nav-bar-overflow-button"
 +                     class="toolbarbutton-1 chromeclass-toolbar-additional overflow-button"
 +                     skipintoolbarset="true"
-+                     tooltiptext="&navbarOverflow.label;"/>
++                     tooltiptext="&navbarOverflow.label;">
++#ifdef MOZ_PHOTON_ANIMATIONS
++        <box class="toolbarbutton-animatable-box">
++          <image class="toolbarbutton-animatable-image"/>
++        </box>
++#endif
++      </toolbarbutton>
 +
 +      <toolbaritem id="PanelUI-button"
 +                   class="chromeclass-toolbar-additional"
@@ -1138,7 +1147,7 @@
 +              id="PlacesToolbar"
 +              context="placesContext"
 +              onclick="BookmarksEventHandler.onClick(event, this._placesView);"
-+              oncommand="BookmarksEventHandler.onCommand(event, this._placesView);"
++              oncommand="BookmarksEventHandler.onCommand(event);"
 +              tooltip="bhTooltip"
 +              popupsinherittooltip="true">
 +          <hbox flex="1">
@@ -1207,8 +1216,13 @@
 +                     tooltip="dynamic-shortcut-tooltip"/>
 +#ifdef MOZ_PHOTON_THEME
 +      <toolbarbutton id="library-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
-+                     oncommand="PanelUI.showSubView('appMenu-libraryView', this, null, true);"
-+                     label="&places.library.title;"/>
++                     oncommand="PanelUI.showSubView('appMenu-libraryView', this, null, event);"
++                     closemenu="none"
++                     label="&places.library.title;">
++        <box class="toolbarbutton-animatable-box">
++          <image class="toolbarbutton-animatable-image"/>
++        </box>
++      </toolbarbutton>
 +#endif
 +    </toolbarpalette>
 +  </toolbox>
@@ -1397,7 +1411,7 @@
 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
-@@ -39,16 +39,23 @@ var gMainPane = {
+@@ -41,16 +41,23 @@ var gMainPane = {
          // way to get all file type association prefs. So we don't know
          // when the user will select the default.  We refresh here periodically
          // in case the default changes. On other Windows OS's defaults can also
@@ -1421,7 +1435,7 @@
      defaultPerformancePref.addEventListener("change", () => {
        this.updatePerformanceSettingsBox({duringChangeEvent: true});
      });
-@@ -780,16 +787,27 @@ var gMainPane = {
+@@ -875,16 +882,27 @@ var gMainPane = {
        let alwaysCheckPref = document.getElementById("browser.shell.checkDefaultBrowser");
        alwaysCheckPref.value = true;
  
@@ -1452,7 +1466,7 @@
 diff --git a/browser/components/shell/moz.build b/browser/components/shell/moz.build
 --- a/browser/components/shell/moz.build
 +++ b/browser/components/shell/moz.build
-@@ -37,16 +37,18 @@ if CONFIG['OS_ARCH'] == 'WINNT':
+@@ -38,16 +38,18 @@ if CONFIG['OS_ARCH'] == 'WINNT':
      ]
  elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
      SOURCES += [
@@ -1764,7 +1778,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
-@@ -662,16 +662,18 @@
+@@ -664,16 +664,18 @@
  @RESPATH@/browser/defaults/blocklists
  @RESPATH@/browser/defaults/pinning