rebased default tip
authorWolfgang Rosenauer <wr@rosenauer.org>
Mon, 02 Apr 2018 11:26:04 +0200
changeset 1045 f645c886d36b
parent 1044 142a0c92607c
rebased
MozillaFirefox/MozillaFirefox.spec
MozillaFirefox/mozilla-bmo1005535.patch
firefox-kde.patch
mozilla-bmo1005535.patch
mozilla-i586-domPrefs.patch
mozilla-kde.patch
mozilla-reduce-files-per-UnifiedBindings.patch
series
--- a/MozillaFirefox/MozillaFirefox.spec	Sun Apr 01 23:51:44 2018 +0200
+++ b/MozillaFirefox/MozillaFirefox.spec	Mon Apr 02 11:26:04 2018 +0200
@@ -150,9 +150,8 @@
 Patch6:         mozilla-reduce-files-per-UnifiedBindings.patch
 Patch7:         mozilla-aarch64-startup-crash.patch
 Patch8:         mozilla-bmo256180.patch
-Patch9:         mozilla-bmo1005535.patch
-Patch10:        mozilla-i586-DecoderDoctorLogger.patch
-Patch11:        mozilla-i586-domPrefs.patch
+Patch9:        mozilla-i586-DecoderDoctorLogger.patch
+Patch10:        mozilla-i586-domPrefs.patch
 # Firefox/browser
 Patch101:       firefox-kde.patch
 Patch102:       firefox-branded-icons.patch
@@ -263,10 +262,9 @@
 %endif
 %patch7 -p1
 %patch8 -p1
+%ifarch %ix86
 %patch9 -p1
-%ifarch %ix86
 %patch10 -p1
-%patch11 -p1
 %endif
 # Firefox
 %patch101 -p1
--- a/MozillaFirefox/mozilla-bmo1005535.patch	Sun Apr 01 23:51:44 2018 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-../mozilla-bmo1005535.patch
\ No newline at end of file
--- a/firefox-kde.patch	Sun Apr 01 23:51:44 2018 +0200
+++ b/firefox-kde.patch	Mon Apr 02 11:26:04 2018 +0200
@@ -1,11 +1,11 @@
 # HG changeset patch
-# Parent  ffcd96e120857e207bd357b2005f0b5bc776e375
+# Parent  101316aee59978888744775edbde2ea8d7a2f189
 
 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,1238 @@
+@@ -0,0 +1,1282 @@
 +#filter substitution
 +<?xml version="1.0"?>
 +# -*- Mode: HTML -*-
@@ -15,14 +15,15 @@
 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
 +
 +<?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?>
++<?xml-stylesheet href="chrome://browser/content/downloads/downloads.css"?>
 +<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
 +<?xml-stylesheet href="chrome://browser/content/usercontext/usercontext.css" type="text/css"?>
 +<?xml-stylesheet href="chrome://browser/skin/controlcenter/panel.css" type="text/css"?>
 +<?xml-stylesheet href="chrome://browser/skin/customizableui/panelUI.css" type="text/css"?>
++<?xml-stylesheet href="chrome://browser/skin/downloads/downloads.css"?>
 +<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
++<?xml-stylesheet href="chrome://browser/content/tabbrowser.css" type="text/css"?>
 +
-+<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
-+<?xul-overlay href="chrome://browser/content/baseMenuOverlay.xul"?>
 +<?xul-overlay href="chrome://browser/content/places/placesOverlay.xul"?>
 +
 +# All DTD information is stored in a separate file so that it can be shared by
@@ -59,7 +60,6 @@
 +        tabsintitlebar="true"
 +#endif
 +        titlemenuseparator="&mainWindow.titlemodifiermenuseparator;"
-+        lightweightthemes="true"
 +        windowtype="navigator:browser"
 +        macanimationtype="document"
 +        screenX="4" screenY="4"
@@ -75,6 +75,7 @@
 +
 +<script type="application/javascript">
 +  Services.scriptloader.loadSubScript("chrome://global/content/contentAreaUtils.js", this);
++  Services.scriptloader.loadSubScript("chrome://browser/content/tabbrowser.js", this);
 +</script>
 +
 +# All sets except for popupsets (commands, keys, stringbundles and broadcasters) *must* go into the
@@ -104,8 +105,9 @@
 +                accesskey="&moveToNewWindow.accesskey;"
 +                tbattr="tabbrowser-multiple"
 +                oncommand="gBrowser.replaceTabWithWindow(TabContextMenu.contextTab);"/>
-+      <menuseparator id="context_sendTabToDevice_separator"/>
++      <menuseparator id="context_sendTabToDevice_separator" class="sync-ui-item"/>
 +      <menu id="context_sendTabToDevice" label="&sendTabToDevice.label;"
++            class="sync-ui-item"
 +            accesskey="&sendTabToDevice.accesskey;">
 +        <menupopup id="context_sendTabToDevicePopupMenu"
 +                   onpopupshowing="gSync.populateSendTabToDevicesMenu(event.target, TabContextMenu.contextTab.linkedBrowser.currentURI.spec, TabContextMenu.contextTab.linkedBrowser.contentTitle);"/>
@@ -144,6 +146,7 @@
 +
 +    <panel type="autocomplete-richlistbox"
 +           id="PopupAutoComplete"
++           role="group"
 +           noautofocus="true"
 +           hidden="true"
 +           overflowpadding="4"
@@ -151,11 +154,16 @@
 +           nomaxresults="true" />
 +
 +    <!-- for search with one-off buttons -->
-+    <panel type="autocomplete" id="PopupSearchAutoComplete" noautofocus="true" hidden="true"/>
++    <panel type="autocomplete-richlistbox"
++           id="PopupSearchAutoComplete"
++           role="group"
++           noautofocus="true"
++           hidden="true" />
 +
 +    <!-- for url bar autocomplete -->
 +    <panel type="autocomplete-richlistbox"
 +           id="PopupAutoCompleteRichResult"
++           role="group"
 +           noautofocus="true"
 +           hidden="true"
 +           flip="none"
@@ -298,7 +306,7 @@
 +      </toolbarbutton>
 +      <toolbarbutton id="sidebar-switcher-tabs"
 +                     label="&syncedTabs.sidebar.label;"
-+                     class="subviewbutton subviewbutton-iconic"
++                     class="subviewbutton subviewbutton-iconic sync-ui-item"
 +                     observes="viewTabsSidebar"
 +                     oncommand="SidebarUI.show('viewTabsSidebar');">
 +        <observes element="viewTabsSidebar" attribute="checked"/>
@@ -499,6 +507,7 @@
 +
 +#include ../../components/customizableui/content/panelUI.inc.xul
 +#include ../../components/controlcenter/content/panel.inc.xul
++#include ../../components/downloads/content/downloadsPanel.inc.xul
 +
 +    <hbox id="downloads-animation-container" mousethrough="always">
 +      <vbox id="downloads-notification-anchor" hidden="true">
@@ -585,7 +594,7 @@
 +  <hbox id="titlebar-content">
 +    <spacer id="titlebar-spacer" flex="1"/>
 +    <hbox id="titlebar-buttonbox-container">
-+      <hbox id="titlebar-buttonbox">
++      <hbox id="titlebar-buttonbox" class="titlebar-color">
 +        <toolbarbutton class="titlebar-button" id="titlebar-min" oncommand="window.minimize();"/>
 +        <toolbarbutton class="titlebar-button" id="titlebar-max" oncommand="onTitlebarMaxClick();"/>
 +        <toolbarbutton class="titlebar-button" id="titlebar-close" command="cmd_closeWindow"/>
@@ -606,7 +615,9 @@
 +
 +  <toolbox id="navigator-toolbox">
 +    <!-- Menu -->
-+    <toolbar type="menubar" id="toolbar-menubar" class="chromeclass-menubar" customizable="true"
++    <toolbar type="menubar" id="toolbar-menubar"
++             class="chromeclass-menubar titlebar-color"
++             customizable="true"
 +             mode="icons"
 +#ifdef MENUBAR_CAN_AUTOHIDE
 +             toolbarname="&menubarCmd.label;"
@@ -623,13 +634,13 @@
 +#ifdef CAN_DRAW_IN_TITLEBAR
 +#ifndef XP_MACOSX
 +      <hbox class="titlebar-placeholder" type="caption-buttons" ordinal="1000"
-+            persist="width"
 +            skipintoolbarset="true"/>
 +#endif
 +#endif
 +    </toolbar>
 +
 +    <toolbar id="TabsToolbar"
++             class="titlebar-color"
 +             fullscreentoolbar="true"
 +             customizable="true"
 +             mode="icons"
@@ -643,7 +654,6 @@
 +#endif
 +
 +      <tabs id="tabbrowser-tabs"
-+            tabbrowser="content"
 +            flex="1"
 +            setfocus="false"
 +            tooltip="tabbrowser-tab-tooltip"
@@ -698,7 +708,6 @@
 +            ordinal="1000"/>
 +#ifdef CAN_DRAW_IN_TITLEBAR
 +      <hbox class="titlebar-placeholder" type="caption-buttons"
-+            persist="width"
 +#ifndef XP_MACOSX
 +            ordinal="1000"
 +#endif
@@ -706,7 +715,6 @@
 +
 +#ifdef XP_MACOSX
 +      <hbox class="titlebar-placeholder" type="fullscreen-button"
-+            persist="width"
 +            skipintoolbarset="true"/>
 +#endif
 +#endif
@@ -777,6 +785,7 @@
 +                     class="chromeclass-location" overflows="false">
 +            <textbox id="urlbar" flex="1"
 +                     placeholder="&urlbar.placeholder2;"
++                     focused="true"
 +                     type="autocomplete"
 +                     autocompletesearch="unifiedcomplete"
 +                     autocompletesearchparam="enable-actions"
@@ -784,8 +793,6 @@
 +                     completeselectedindex="true"
 +                     shrinkdelay="250"
 +                     tabscrolling="true"
-+                     showcommentcolumn="true"
-+                     showimagecolumn="true"
 +                     newlines="stripsurroundingwhitespace"
 +                     ontextentered="this.handleCommand(param);"
 +                     ontextreverted="return this.handleRevert();"
@@ -820,6 +827,10 @@
 +                         tooltiptext="&urlbar.popupBlocked.tooltip;"/>
 +                  <image data-permission-id="canvas" class="blocked-permission-icon canvas-icon" role="button"
 +                         tooltiptext="&urlbar.canvasBlocked.tooltip;"/>
++                  <image data-permission-id="plugin:flash" class="blocked-permission-icon plugin-icon" role="button"
++                         tooltiptext="&urlbar.flashPluginBlocked.tooltip;"/>
++                  <image data-permission-id="midi" class="blocked-permission-icon midi-icon" role="button"
++                         tooltiptext="&urlbar.midiBlocked.tooltip;"/>
 +                </box>
 +                <box id="notification-popup-box"
 +                     hidden="true"
@@ -861,6 +872,10 @@
 +                         tooltiptext="&urlbar.emeNotificationAnchor.tooltip;"/>
 +                  <image id="persistent-storage-notification-icon" class="notification-anchor-icon persistent-storage-icon" role="button"
 +                         tooltiptext="&urlbar.persistentStorageNotificationAnchor.tooltip;"/>
++                  <image id="midi-notification-icon" class="notification-anchor-icon midi-icon" role="button"
++                         tooltiptext="&urlbar.midiNotificationAnchor.tooltip;"/>
++                  <image id="webauthn-notification-icon" class="notification-anchor-icon" role="button"
++                         tooltiptext="&urlbar.defaultNotificationAnchor.tooltip;"/>
 +                </box>
 +                <image id="connection-icon"/>
 +                <image id="extension-icon"/>
@@ -882,6 +897,7 @@
 +                </hbox>
 +                <image id="reader-mode-button"
 +                       class="urlbar-icon urlbar-page-action"
++                       tooltip="dynamic-shortcut-tooltip"
 +                       role="button"
 +                       hidden="true"
 +                       onclick="ReaderParent.buttonClick(event);"/>
@@ -930,7 +946,20 @@
 +                       overflows="false"
 +                       cui-areatype="toolbar"
 +                       hidden="true"
-+                       tooltip="dynamic-shortcut-tooltip"/>
++                       tooltip="dynamic-shortcut-tooltip"
++                       indicator="true">
++            <!-- The panel's anchor area is smaller than the outer button, but must
++                 always be visible and must not move or resize when the indicator
++                 state changes, otherwise the panel could change its position or lose
++                 its arrow unexpectedly. -->
++            <stack id="downloads-indicator-anchor"
++                   consumeanchor="downloads-button">
++              <box id="downloads-indicator-icon"/>
++              <stack id="downloads-indicator-progress-outer">
++                <box id="downloads-indicator-progress-inner"/>
++              </stack>
++            </stack>
++          </toolbarbutton>
 +
 +        <toolbarbutton id="library-button" class="toolbarbutton-1 chromeclass-toolbar-additional subviewbutton-nav"
 +                       removable="true"
@@ -1196,13 +1225,28 @@
 +      <splitter id="sidebar-splitter" class="chromeclass-extrachrome sidebar-splitter" hidden="true"/>
 +      <vbox id="appcontent" flex="1">
 +        <notificationbox id="high-priority-global-notificationbox" notificationside="top"/>
-+        <tabbrowser id="content"
-+                    flex="1" contenttooltip="aHTMLTooltip"
-+                    tabcontainer="tabbrowser-tabs"
-+                    contentcontextmenu="contentAreaContextMenu"
-+                    autocompletepopup="PopupAutoComplete"
-+                    selectmenulist="ContentSelectDropdown"
-+                    datetimepicker="DateTimePickerPanel"/>
++        <tabbox id="tabbrowser-tabbox"
++                    flex="1" eventnode="document" tabcontainer="tabbrowser-tabs"
++                    onselect="if (event.target.localName == 'tabpanels') gBrowser.updateCurrentBrowser();">
++          <tabpanels flex="1" class="plain" selectedIndex="0" id="tabbrowser-tabpanels">
++            <notificationbox flex="1" notificationside="top">
++              <hbox flex="1" class="browserSidebarContainer">
++                <vbox flex="1" class="browserContainer">
++                  <stack flex="1" class="browserStack">
++                    <browser id="tabbrowser-initialBrowser" type="content"
++                             message="true" messagemanagergroup="browsers"
++                             primary="true" blank="true"
++                             tooltip="aHTMLTooltip"
++                             contextmenu="contentAreaContextMenu"
++                             autocompletepopup="PopupAutoComplete"
++                             selectmenulist="ContentSelectDropdown"
++                             datetimepicker="DateTimePickerPanel"/>
++                  </stack>
++                </vbox>
++              </hbox>
++            </notificationbox>
++          </tabpanels>
++        </tabbox>
 +      </vbox>
 +      <vbox id="browser-border-end" hidden="true" layer="true"/>
 +    </hbox>
@@ -1247,7 +1291,7 @@
 diff --git a/browser/base/jar.mn b/browser/base/jar.mn
 --- a/browser/base/jar.mn
 +++ b/browser/base/jar.mn
-@@ -45,16 +45,18 @@ browser.jar:
+@@ -42,16 +42,18 @@ browser.jar:
          content/browser/aboutRobots-icon.png          (content/aboutRobots-icon.png)
          content/browser/aboutRobots-widget-left.png   (content/aboutRobots-widget-left.png)
          content/browser/aboutTabCrashed.css           (content/aboutTabCrashed.css)
@@ -1329,7 +1373,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
-@@ -330,16 +330,23 @@ var gMainPane = {
+@@ -333,16 +333,23 @@ var gMainPane = {
            this._backoffIndex++ : backoffTimes.length - 1]);
        };
  
@@ -1353,7 +1397,7 @@
      performanceSettingsLink.setAttribute("href", performanceSettingsUrl);
  
      this.updateDefaultPerformanceSettingsPref();
-@@ -1035,16 +1042,27 @@ var gMainPane = {
+@@ -1060,16 +1067,27 @@ var gMainPane = {
        // Reset exponential backoff delay time in order to do visual update in pollForDefaultBrowser.
        this._backoffIndex = 0;
  
@@ -1697,7 +1741,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
-@@ -649,16 +649,18 @@
+@@ -646,16 +646,18 @@
  @RESPATH@/browser/defaults/blocklists
  @RESPATH@/browser/defaults/pinning
  
--- a/mozilla-bmo1005535.patch	Sun Apr 01 23:51:44 2018 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,123 +0,0 @@
-# HG changeset patch
-# Parent 376f185a0a757fe128be665adbb705f4a56461bc
-# User Steve Singer <steve@ssinger.info>
-# Parent  371f01835b6fe4cb6b7095a6c29f7bb54f6d6257
-Bug 1005535 - Get skia GPU building on big endian.
-
-diff --git a/gfx/skia/skia/include/core/SkColorPriv.h b/gfx/skia/skia/include/core/SkColorPriv.h
---- a/gfx/skia/skia/include/core/SkColorPriv.h
-+++ b/gfx/skia/skia/include/core/SkColorPriv.h
-@@ -27,37 +27,27 @@
-  *  For easier compatibility with Skia's GPU backend, we further restrict these
-  *  to either (in memory-byte-order) RGBA or BGRA. Note that this "order" does
-  *  not directly correspond to the same shift-order, since we have to take endianess
-  *  into account.
-  *
-  *  Here we enforce this constraint.
-  */
- 
--#ifdef SK_CPU_BENDIAN
--    #define SK_RGBA_R32_SHIFT   24
--    #define SK_RGBA_G32_SHIFT   16
--    #define SK_RGBA_B32_SHIFT   8
--    #define SK_RGBA_A32_SHIFT   0
- 
--    #define SK_BGRA_B32_SHIFT   24
--    #define SK_BGRA_G32_SHIFT   16
--    #define SK_BGRA_R32_SHIFT   8
--    #define SK_BGRA_A32_SHIFT   0
--#else
-     #define SK_RGBA_R32_SHIFT   0
-     #define SK_RGBA_G32_SHIFT   8
-     #define SK_RGBA_B32_SHIFT   16
-     #define SK_RGBA_A32_SHIFT   24
- 
-     #define SK_BGRA_B32_SHIFT   0
-     #define SK_BGRA_G32_SHIFT   8
-     #define SK_BGRA_R32_SHIFT   16
-     #define SK_BGRA_A32_SHIFT   24
--#endif
-+
- 
- #if defined(SK_PMCOLOR_IS_RGBA) && defined(SK_PMCOLOR_IS_BGRA)
-     #error "can't define PMCOLOR to be RGBA and BGRA"
- #endif
- 
- #define LOCAL_PMCOLOR_SHIFTS_EQUIVALENT_TO_RGBA  \
-     (SK_A32_SHIFT == SK_RGBA_A32_SHIFT &&    \
-      SK_R32_SHIFT == SK_RGBA_R32_SHIFT &&    \
-diff --git a/gfx/skia/skia/include/core/SkImageInfo.h b/gfx/skia/skia/include/core/SkImageInfo.h
---- a/gfx/skia/skia/include/core/SkImageInfo.h
-+++ b/gfx/skia/skia/include/core/SkImageInfo.h
-@@ -78,17 +78,17 @@ enum SkColorType {
- 
-     kLastEnum_SkColorType = kRGBA_F16_SkColorType,
- 
- #if SK_PMCOLOR_BYTE_ORDER(B,G,R,A)
-     kN32_SkColorType = kBGRA_8888_SkColorType,
- #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A)
-     kN32_SkColorType = kRGBA_8888_SkColorType,
- #else
--    #error "SK_*32_SHFIT values must correspond to BGRA or RGBA byte order"
-+    kN32_SkColorType = kBGRA_8888_SkColorType
- #endif
- };
- 
- static int SkColorTypeBytesPerPixel(SkColorType ct) {
-     static const uint8_t gSize[] = {
-         0,  // Unknown
-         1,  // Alpha_8
-         2,  // RGB_565
-diff --git a/gfx/skia/skia/include/gpu/GrColor.h b/gfx/skia/skia/include/gpu/GrColor.h
---- a/gfx/skia/skia/include/gpu/GrColor.h
-+++ b/gfx/skia/skia/include/gpu/GrColor.h
-@@ -69,17 +69,17 @@ static inline GrColor GrColorPackA4(unsi
- #define GrColorUnpackG(color)   (((color) >> GrColor_SHIFT_G) & 0xFF)
- #define GrColorUnpackB(color)   (((color) >> GrColor_SHIFT_B) & 0xFF)
- #define GrColorUnpackA(color)   (((color) >> GrColor_SHIFT_A) & 0xFF)
- 
- /**
-  *  Since premultiplied means that alpha >= color, we construct a color with
-  *  each component==255 and alpha == 0 to be "illegal"
-  */
--#define GrColor_ILLEGAL     (~(0xFF << GrColor_SHIFT_A))
-+#define GrColor_ILLEGAL     ((uint32_t)(~(0xFF << GrColor_SHIFT_A)))
- 
- #define GrColor_WHITE 0xFFFFFFFF
- #define GrColor_TRANSPARENT_BLACK 0x0
- 
- /**
-  * Assert in debug builds that a GrColor is premultiplied.
-  */
- static inline void GrColorIsPMAssert(GrColor SkDEBUGCODE(c)) {
-diff --git a/gfx/skia/skia/include/gpu/GrTypes.h b/gfx/skia/skia/include/gpu/GrTypes.h
---- a/gfx/skia/skia/include/gpu/GrTypes.h
-+++ b/gfx/skia/skia/include/gpu/GrTypes.h
-@@ -321,25 +321,23 @@ enum GrPixelConfig {
-     */
-     kRGBA_half_GrPixelConfig,
- 
-     kLast_GrPixelConfig = kRGBA_half_GrPixelConfig
- };
- static const int kGrPixelConfigCnt = kLast_GrPixelConfig + 1;
- 
- // Aliases for pixel configs that match skia's byte order.
--#ifndef SK_CPU_LENDIAN
--    #error "Skia gpu currently assumes little endian"
--#endif
-+
- #if SK_PMCOLOR_BYTE_ORDER(B,G,R,A)
-     static const GrPixelConfig kSkia8888_GrPixelConfig = kBGRA_8888_GrPixelConfig;
- #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A)
-     static const GrPixelConfig kSkia8888_GrPixelConfig = kRGBA_8888_GrPixelConfig;
- #else
--    #error "SK_*32_SHIFT values must correspond to GL_BGRA or GL_RGBA format."
-+    static const GrPixelConfig kSkia8888_GrPixelConfig = kBGRA_8888_GrPixelConfig;
- #endif
- 
- // Returns true if the pixel config is a GPU-specific compressed format
- // representation.
- static inline bool GrPixelConfigIsCompressed(GrPixelConfig config) {
-     switch (config) {
-         case kETC1_GrPixelConfig:
-             return true;
--- a/mozilla-i586-domPrefs.patch	Sun Apr 01 23:51:44 2018 +0200
+++ b/mozilla-i586-domPrefs.patch	Mon Apr 02 11:26:04 2018 +0200
@@ -1,6 +1,6 @@
 # HG changeset patch
 # User Andrea Marchesini <amarchesini@mozilla.com>
-# Parent  bb4eb640e7303ea68be982d824aa100caacce240
+# Parent  fab938f4757d8487a87fbf911200ff0317612746
 Mozilla Bug#1447409 - DOMPrefs.h must be included in WorkerScope, r=qdot
                       To fix 32bit build error for i586 target.
 
@@ -14,7 +14,7 @@
  #ifndef mozilla_dom_workerscope_h__
  #define mozilla_dom_workerscope_h__
  
- #include "Workers.h"
+ #include "mozilla/dom/WorkerCommon.h"
  #include "mozilla/DOMEventTargetHelper.h"
 +#include "mozilla/dom/DOMPrefs.h"
  #include "mozilla/dom/Headers.h"
@@ -22,6 +22,6 @@
  #include "nsWeakReference.h"
  #include "mozilla/dom/ImageBitmapSource.h"
  
- namespace mozilla {
- namespace dom {
- 
+ #ifdef XP_WIN
+ #undef PostMessage
+ #endif
--- a/mozilla-kde.patch	Sun Apr 01 23:51:44 2018 +0200
+++ b/mozilla-kde.patch	Mon Apr 02 11:26:04 2018 +0200
@@ -1,5 +1,5 @@
 # HG changeset patch
-# Parent  97234138e3aafe66fc7f17c8f530e7c534af2fc2
+# Parent  9cc0c990890e64f69ed068cf1a4534535bcc50a7
 Description: Add KDE integration to Firefox (toolkit parts)
 Author: Wolfgang Rosenauer <wolfgang@rosenauer.org>
 Author: Lubos Lunak <lunak@suse.com>
@@ -27,7 +27,7 @@
  using namespace mozilla;
  
  #ifdef DEBUG
-@@ -4235,25 +4236,37 @@ Preferences::InitInitialObjects()
+@@ -3868,25 +3869,37 @@ Preferences::InitInitialObjects()
    // application pref files for backwards compatibility.
    static const char* specialFiles[] = {
  #if defined(XP_MACOSX)
@@ -65,7 +65,7 @@
  
    // Load jar:$app/omni.jar!/defaults/preferences/*.js
    // or jar:$gre/omni.jar!/defaults/preferences/*.js.
-@@ -4302,17 +4315,17 @@ Preferences::InitInitialObjects()
+@@ -3935,17 +3948,17 @@ Preferences::InitInitialObjects()
        }
  
        nsCOMPtr<nsIFile> path = do_QueryInterface(elem);
@@ -153,12 +153,12 @@
 diff --git a/toolkit/components/downloads/moz.build b/toolkit/components/downloads/moz.build
 --- a/toolkit/components/downloads/moz.build
 +++ b/toolkit/components/downloads/moz.build
-@@ -17,9 +17,13 @@ XPIDL_SOURCES += [
- XPIDL_MODULE = 'downloads'
+@@ -41,10 +41,14 @@ EXTRA_JS_MODULES += [
  
- UNIFIED_SOURCES += [
-     'nsDownloadManager.cpp'
- ]
+ if CONFIG['MOZ_PLACES']:
+     EXTRA_JS_MODULES += [
+         'DownloadHistory.jsm',
+     ]
  
  FINAL_LIBRARY = 'xul'
  
@@ -166,11 +166,12 @@
 +    '/toolkit/xre'
 +]
 +
- CXXFLAGS += CONFIG['TK_CFLAGS']
+ with Files('**'):
+     BUG_COMPONENT = ('Toolkit', 'Download Manager')
 diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn
 --- a/toolkit/content/jar.mn
 +++ b/toolkit/content/jar.mn
-@@ -67,16 +67,18 @@ toolkit.jar:
+@@ -69,16 +69,18 @@ toolkit.jar:
     content/global/bindings/checkbox.xml        (widgets/checkbox.xml)
     content/global/bindings/colorpicker.xml     (widgets/colorpicker.xml)
     content/global/bindings/datekeeper.js       (widgets/datekeeper.js)
@@ -193,7 +194,7 @@
 new file mode 100644
 --- /dev/null
 +++ b/toolkit/content/widgets/dialog-kde.xml
-@@ -0,0 +1,477 @@
+@@ -0,0 +1,478 @@
 +<?xml version="1.0"?>
 +<!-- This Source Code Form is subject to the terms of the Mozilla Public
 +   - License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -209,7 +210,7 @@
 +          xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
 +          xmlns:xbl="http://www.mozilla.org/xbl">
 +
-+  <binding id="dialog" extends="chrome://global/content/bindings/general.xml#root-element">
++  <binding id="dialog">
 +    <resources>
 +      <stylesheet src="chrome://global/skin/dialog.css"/>
 +    </resources>
@@ -448,9 +449,9 @@
 +          if (!this._mStrBundle) {
 +            // need to create string bundle manually instead of using <xul:stringbundle/>
 +            // see bug 63370 for details
-+            this._mStrBundle = Components.classes["@mozilla.org/intl/stringbundle;1"]
-+                                         .getService(Components.interfaces.nsIStringBundleService)
-+                                         .createBundle("chrome://global/locale/dialog.properties");
++            this._mStrBundle = Cc["@mozilla.org/intl/stringbundle;1"]
++                                 .getService(Ci.nsIStringBundleService)
++                                 .createBundle("chrome://global/locale/dialog.properties");
 +          }
 +          return this._mStrBundle;
 +        ]]></getter>
@@ -625,6 +626,7 @@
 +          if (handler != "") {
 +            var fn = new Function("event", handler);
 +            var returned = fn(event);
++            // eslint-disable-next-line mozilla/no-compare-against-boolean-literals
 +            if (returned == false)
 +              noCancel = false;
 +          }
@@ -663,7 +665,7 @@
 +      <handler event="focus" phase="capturing">
 +        var btn = this.getButton(this.defaultButton);
 +        if (btn)
-+          btn.setAttribute("default", event.originalTarget == btn || !(event.originalTarget instanceof Components.interfaces.nsIDOMXULButtonElement));
++          btn.setAttribute("default", event.originalTarget == btn || !(event.originalTarget instanceof Ci.nsIDOMXULButtonElement));
 +      </handler>
 +#endif
 +    </handlers>
@@ -674,7 +676,7 @@
 diff --git a/toolkit/mozapps/downloads/nsHelperAppDlg.js b/toolkit/mozapps/downloads/nsHelperAppDlg.js
 --- a/toolkit/mozapps/downloads/nsHelperAppDlg.js
 +++ b/toolkit/mozapps/downloads/nsHelperAppDlg.js
-@@ -626,17 +626,17 @@ nsUnknownContentTypeDialog.prototype = {
+@@ -627,17 +627,17 @@ nsUnknownContentTypeDialog.prototype = {
        else
          typeString = mimeInfo.MIMEType;
      }
@@ -693,7 +695,7 @@
    },
  
    // Returns true if opening the default application makes sense.
-@@ -800,17 +800,17 @@ nsUnknownContentTypeDialog.prototype = {
+@@ -801,17 +801,17 @@ nsUnknownContentTypeDialog.prototype = {
        switch (this.dialogElement("openHandler").selectedIndex) {
        case 0:
          // No app need be specified in this case.
@@ -712,7 +714,7 @@
      this.mDialog.document.documentElement.getButton("accept").disabled = !ok;
    },
  
-@@ -1065,30 +1065,57 @@ nsUnknownContentTypeDialog.prototype = {
+@@ -1066,30 +1066,57 @@ nsUnknownContentTypeDialog.prototype = {
  
        if (params.handlerApp &&
            params.handlerApp.executable &&
@@ -720,15 +722,15 @@
          // Remember the file they chose to run.
          this.chosenApp = params.handlerApp;
        }
-     } else if ("@mozilla.org/applicationchooser;1" in Components.classes) {
--      var nsIApplicationChooser = Components.interfaces.nsIApplicationChooser;
--      var appChooser = Components.classes["@mozilla.org/applicationchooser;1"]
--                                 .createInstance(nsIApplicationChooser);
+     } else if ("@mozilla.org/applicationchooser;1" in Cc) {
+-      var nsIApplicationChooser = Ci.nsIApplicationChooser;
+-      var appChooser = Cc["@mozilla.org/applicationchooser;1"]
+-                         .createInstance(nsIApplicationChooser);
 -      appChooser.init(this.mDialog, this.dialogElement("strings").getString("chooseAppFilePickerTitle"));
 -      var contentTypeDialogObj = this;
 -      let appChooserCallback = function appChooserCallback_done(aResult) {
 -        if (aResult) {
--           contentTypeDialogObj.chosenApp = aResult.QueryInterface(Components.interfaces.nsILocalHandlerApp);
+-           contentTypeDialogObj.chosenApp = aResult.QueryInterface(Ci.nsILocalHandlerApp);
 +      // handle the KDE case which is implemented in the filepicker
 +      // therefore falling back to Gtk2 like behaviour if KDE is running
 +      // FIXME this should be better handled in the nsIApplicationChooser
@@ -750,7 +752,7 @@
 +          // Remember the file they chose to run.
 +          var localHandlerApp =
 +            Components.classes["@mozilla.org/uriloader/local-handler-app;1"].
-+                       createInstance(Components.interfaces.nsILocalHandlerApp);
++                      createInstance(Components.interfaces.nsILocalHandlerApp);
 +          localHandlerApp.executable = fp.file;
 +          this.chosenApp = localHandlerApp;
          }
@@ -760,14 +762,14 @@
 -      // The finishChooseApp is called from appChooserCallback
 -      return;
 +      } else {
-+        var nsIApplicationChooser = Components.interfaces.nsIApplicationChooser;
-+        var appChooser = Components.classes["@mozilla.org/applicationchooser;1"]
-+                                   .createInstance(nsIApplicationChooser);
++        var nsIApplicationChooser = Ci.nsIApplicationChooser;
++        var appChooser = Cc["@mozilla.org/applicationchooser;1"]
++                           .createInstance(nsIApplicationChooser);
 +        appChooser.init(this.mDialog, this.dialogElement("strings").getString("chooseAppFilePickerTitle"));
 +        var contentTypeDialogObj = this;
 +        let appChooserCallback = function appChooserCallback_done(aResult) {
 +          if (aResult) {
-+             contentTypeDialogObj.chosenApp = aResult.QueryInterface(Components.interfaces.nsILocalHandlerApp);
++             contentTypeDialogObj.chosenApp = aResult.QueryInterface(Ci.nsILocalHandlerApp);
 +          }
 +          contentTypeDialogObj.finishChooseApp();
 +        };
@@ -776,9 +778,9 @@
 +        return;
 +      }
      } else {
-       var nsIFilePicker = Components.interfaces.nsIFilePicker;
-       var fp = Components.classes["@mozilla.org/filepicker;1"]
-                          .createInstance(nsIFilePicker);
+       var nsIFilePicker = Ci.nsIFilePicker;
+       var fp = Cc["@mozilla.org/filepicker;1"]
+                  .createInstance(nsIFilePicker);
        fp.init(this.mDialog,
                this.dialogElement("strings").getString("chooseAppFilePickerTitle"),
                nsIFilePicker.modeOpen);
@@ -880,7 +882,7 @@
 diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build
 --- a/toolkit/xre/moz.build
 +++ b/toolkit/xre/moz.build
-@@ -61,17 +61,19 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'co
+@@ -65,17 +65,19 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'co
          '../components/printingui',
      ]
  elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'uikit':
@@ -1879,7 +1881,7 @@
  
    GtkFileChooserAction action = GetGtkFileChooserAction(mMode);
  
-@@ -603,8 +630,233 @@ nsFilePicker::Done(GtkWidget* file_choos
+@@ -608,8 +635,233 @@ nsFilePicker::Done(GtkWidget* file_choos
    if (mCallback) {
      mCallback->Done(result);
      mCallback = nullptr;
@@ -2158,7 +2160,7 @@
    const char* directive;
    int argc;
  
-@@ -466,16 +467,17 @@ ParseManifest(NSLocationType aType, File
+@@ -444,16 +445,17 @@ ParseManifest(NSLocationType aType, File
    NS_NAMED_LITERAL_STRING(kRemoteEnabled, "remoteenabled");
    NS_NAMED_LITERAL_STRING(kRemoteRequired, "remoterequired");
    NS_NAMED_LITERAL_STRING(kApplication, "application");
@@ -2176,7 +2178,7 @@
    NS_NAMED_LITERAL_STRING(kMain, "main");
    NS_NAMED_LITERAL_STRING(kContent, "content");
  
-@@ -526,44 +528,49 @@ ParseManifest(NSLocationType aType, File
+@@ -499,44 +501,49 @@ ParseManifest(NSLocationType aType, File
          CopyUTF8toUTF16(s, abi);
          abi.Insert(char16_t('_'), 0);
          abi.Insert(osTarget, 0);
@@ -2226,7 +2228,7 @@
      process = kMain;
    }
  
-@@ -666,25 +673,27 @@ ParseManifest(NSLocationType aType, File
+@@ -638,25 +645,27 @@ ParseManifest(NSLocationType aType, File
      TriState stOsVersion = eUnspecified;
      TriState stOs = eUnspecified;
      TriState stABI = eUnspecified;
@@ -2254,7 +2256,7 @@
        }
  
  #if defined(MOZ_WIDGET_ANDROID)
-@@ -729,16 +738,17 @@ ParseManifest(NSLocationType aType, File
+@@ -701,16 +710,17 @@ ParseManifest(NSLocationType aType, File
      }
  
      if (!ok ||
@@ -2292,7 +2294,7 @@
 diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
 --- a/xpcom/io/nsLocalFileUnix.cpp
 +++ b/xpcom/io/nsLocalFileUnix.cpp
-@@ -45,16 +45,17 @@
+@@ -46,16 +46,17 @@
  #include "prproces.h"
  #include "nsIDirectoryEnumerator.h"
  #include "nsISimpleEnumerator.h"
@@ -2310,7 +2312,7 @@
  #include "prmem.h"
  #include "plbase64.h"
  
-@@ -1934,59 +1935,74 @@ nsLocalFile::SetPersistentDescriptor(con
+@@ -1955,59 +1956,74 @@ nsLocalFile::SetPersistentDescriptor(con
    return InitWithNativePath(aPersistentDescriptor);
  #endif
  }
--- a/mozilla-reduce-files-per-UnifiedBindings.patch	Sun Apr 01 23:51:44 2018 +0200
+++ b/mozilla-reduce-files-per-UnifiedBindings.patch	Mon Apr 02 11:26:04 2018 +0200
@@ -13,25 +13,25 @@
 [ 1636s] c++: internal compiler error: Killed (program cc1plus)
 [ 1636s] Please submit a full bug report,
 
-diff --git a/python/mozbuild/mozbuild/backend/common.py b/python/mozbuild/mozbuild/backend/common.py
---- a/python/mozbuild/mozbuild/backend/common.py
-+++ b/python/mozbuild/mozbuild/backend/common.py
-@@ -386,17 +386,17 @@ class CommonBackend(BuildBackend):
-         )
-         self._handle_generated_sources(manager.expected_build_output_files())
+diff --git a/python/mozbuild/mozbuild/frontend/data.py b/python/mozbuild/mozbuild/frontend/data.py
+--- a/python/mozbuild/mozbuild/frontend/data.py
++++ b/python/mozbuild/mozbuild/frontend/data.py
+@@ -310,17 +310,17 @@ class WebIDLCollection(ContextDerived):
+     @property
+     def unified_source_mapping(self):
          # Bindings are compiled in unified mode to speed up compilation and
          # to reduce linker memory size. Note that test bindings are separated
          # from regular ones so tests bindings aren't shipped.
-         unified_source_mapping = list(group_unified_files(webidls.all_regular_cpp_basenames(),
-                                                           unified_prefix='UnifiedBindings',
-                                                           unified_suffix='cpp',
--                                                          files_per_unified_file=32))
-+                                                          files_per_unified_file=16))
-         self._write_unified_files(unified_source_mapping, bindings_dir,
-                                   poison_windows_h=True)
-         self._handle_webidl_build(bindings_dir, unified_source_mapping,
-                                   webidls,
-                                   manager.expected_build_output_files(),
-                                   manager.GLOBAL_DEFINE_FILES)
+         return list(group_unified_files(self.all_regular_cpp_basenames(),
+                                         unified_prefix='UnifiedBindings',
+                                         unified_suffix='cpp',
+-                                        files_per_unified_file=32))
++                                        files_per_unified_file=16))
  
-     def _write_unified_file(self, unified_file, source_filenames,
+     def all_source_files(self):
+         from mozwebidlcodegen import WebIDLCodegenManager
+         return (sorted(list(WebIDLCodegenManager.GLOBAL_DEFINE_FILES)) +
+                 sorted(set(p for p, _ in self.unified_source_mapping)))
+ 
+ 
+ class IPDLCollection(ContextDerived):
--- a/series	Sun Apr 01 23:51:44 2018 +0200
+++ b/series	Mon Apr 02 11:26:04 2018 +0200
@@ -7,7 +7,6 @@
 mozilla-reduce-files-per-UnifiedBindings.patch
 mozilla-aarch64-startup-crash.patch
 mozilla-bmo256180.patch
-mozilla-bmo1005535.patch
 mozilla-i586-DecoderDoctorLogger.patch
 mozilla-i586-domPrefs.patch