Firefox 46.0 firefox46
authorWolfgang Rosenauer <wr@rosenauer.org>
Thu, 28 Apr 2016 17:08:03 +0200
branchfirefox46
changeset 909 c6717354928b
parent 901 eb9ebe3e2e6a (diff)
parent 908 b29b47737173 (current diff)
child 910 a3615665211f
Firefox 46.0
MozillaFirefox/MozillaFirefox.changes
MozillaFirefox/MozillaFirefox.spec
MozillaFirefox/create-tar.sh
MozillaFirefox/l10n_changesets.txt
MozillaFirefox/mozilla-check_return.patch
firefox-branded-icons.patch
firefox-kde.patch
firefox-no-default-ualocale.patch
mozilla-check_return.patch
mozilla-gtk3_20.patch
mozilla-idldir.patch
mozilla-kde.patch
mozilla-repo.patch
series
--- a/MozillaFirefox/MozillaFirefox.changes	Sun Apr 24 08:20:10 2016 +0200
+++ b/MozillaFirefox/MozillaFirefox.changes	Thu Apr 28 17:08:03 2016 +0200
@@ -1,4 +1,47 @@
 -------------------------------------------------------------------
+Wed Apr 27 08:39:28 UTC 2016 - badshah400@gmail.com
+
+- Update mozilla-gtk3_20.patch for Firefox 46.0 (sync to latest
+  version from Fedora).
+
+-------------------------------------------------------------------
+Wed Apr 27 06:09:30 UTC 2016 - wr@rosenauer.org
+
+- update to Firefox 46.0 (boo#977333)
+  * Improved security of the JavaScript Just In Time (JIT) Compiler
+  * WebRTC fixes to improve performance and stability
+  * Added support for document.elementsFromPoint
+  * Added HKDF support for Web Crypto API
+  * requires NSPR 4.12 and NSS 3.22.3
+  * added patch to fix unchecked return value
+    mozilla-check_return.patch
+  * Gtk3 builds not supported at the moment
+  security fixes:
+  * MFSA 2016-39/CVE-2016-2804/CVE-2016-2806/CVE-2016-2807
+    Miscellaneous memory safety hazards
+  * MFSA 2016-40/CVE-2016-2809 (bmo#1212939)
+    Privilege escalation through file deletion by Maintenance Service updater
+    (Windows only)
+  * MFSA 2016-41/CVE-2016-2810 (bmo#1229681)
+    Content provider permission bypass allows malicious application
+    to access data (Android only)
+  * MFSA 2016-42/CVE-2016-2811/CVE-2016-2812 (bmo#1252330, bmo#1261776)
+    Use-after-free and buffer overflow in Service Workers
+  * MFSA 2016-43/CVE-2016-2813 (bmo#1197901, bmo#2714650)
+    Disclosure of user actions through JavaScript with motion and
+    orientation sensors (only affects mobile variants)
+  * MFSA 2016-44/CVE-2016-2814 (bmo#1254721)
+    Buffer overflow in libstagefright with CENC offsets
+  * MFSA 2016-45/CVE-2016-2816 (bmo#1223743)
+    CSP not applied to pages sent with multipart/x-mixed-replace
+  * MFSA 2016-46/CVE-2016-2817 (bmo#1227462)
+    Elevation of privilege with chrome.tabs.update API in web extensions
+  * MFSA 2016-47/CVE-2016-2808 (bmo#1246061)
+    Write to invalid HashMap entry through JavaScript.watch()
+  * MFSA 2016-48/CVE-2016-2820 (bmo#870870)
+    Firefox Health Reports could accept events from untrusted domains
+
+-------------------------------------------------------------------
 Thu Apr 21 12:00:28 UTC 2016 - badshah400@gmail.com
 
 - Update mozilla-gtk3_20.patch to fix scrollbar appearance under
--- a/MozillaFirefox/MozillaFirefox.spec	Sun Apr 24 08:20:10 2016 +0200
+++ b/MozillaFirefox/MozillaFirefox.spec	Thu Apr 28 17:08:03 2016 +0200
@@ -18,10 +18,10 @@
 
 
 # changed with every update
-%define major 45
-%define mainver %major.0.2
+%define major 46
+%define mainver %major.0
 %define update_channel release
-%define releasedate 2016041100
+%define releasedate 2016042500
 
 # general build definitions
 %if "%{update_channel}" != "aurora"
@@ -78,7 +78,7 @@
 BuildRequires:  libproxy-devel
 BuildRequires:  makeinfo
 BuildRequires:  mozilla-nspr-devel >= 4.12
-BuildRequires:  mozilla-nss-devel >= 3.21.1
+BuildRequires:  mozilla-nss-devel >= 3.22.3
 BuildRequires:  nss-shared-helper-devel
 BuildRequires:  python-devel
 BuildRequires:  startup-notification-devel
@@ -154,6 +154,7 @@
 Source14:       create-tar.sh
 Source15:       firefox-appdata.xml
 Source16:       MozillaFirefox.changes
+Source17:       l10n_changesets.txt
 # Gecko/Toolkit
 Patch1:         mozilla-nongnome-proxies.patch
 Patch2:         mozilla-shared-nss-db.patch
@@ -167,6 +168,7 @@
 Patch11:        mozilla-libproxy.patch
 Patch12:        mozilla-reduce-files-per-UnifiedBindings.patch
 Patch13:        mozilla-gtk3_20.patch
+Patch14:        mozilla-check_return.patch
 # Firefox/browser
 Patch101:       firefox-kde.patch
 Patch102:       firefox-no-default-ualocale.patch
@@ -280,6 +282,7 @@
 %if 0%{?firefox_use_gtk3}
 %patch13 -p1
 %endif
+%patch14 -p1
 # Firefox
 %patch101 -p1
 %patch102 -p1
@@ -334,6 +337,8 @@
 ac_add_options --enable-release
 %if 0%{?firefox_use_gtk3}
 ac_add_options --enable-default-toolkit=cairo-gtk3
+%else
+ac_add_options --enable-default-toolkit=cairo-gtk2
 %endif
 %ifarch %ix86 %arm
 %if 0%{?suse_version} > 1230
--- a/MozillaFirefox/create-tar.sh	Sun Apr 24 08:20:10 2016 +0200
+++ b/MozillaFirefox/create-tar.sh	Thu Apr 28 17:08:03 2016 +0200
@@ -1,9 +1,14 @@
 #!/bin/bash
 
+# TODO
+# http://ftp.mozilla.org/pub/firefox/candidates/46.0-candidates/build5/linux-x86_64/en-US/firefox-46.0.json
+# "moz_source_stamp": "078baf501b55eaa47f3b189fda4dd28dae1fa257"
+# http://ftp.mozilla.org/pub/firefox/candidates/46.0-candidates/build5/l10n_changesets.txt
+
 CHANNEL="release"
 BRANCH="releases/mozilla-$CHANNEL"
-RELEASE_TAG="FIREFOX_45_0_2_RELEASE"
-VERSION="45.0.2"
+RELEASE_TAG="078baf501b55eaa47f3b189fda4dd28dae1fa257"
+VERSION="46.0"
 
 # mozilla
 if [ -d mozilla ]; then
@@ -46,9 +51,11 @@
     ja-JP-mac|en-US)
       ;;
     *)
-      echo "fetching $locale ..."
+      echo "reading changeset information for $locale"
+      _changeset=$(grep ^$locale l10n_changesets.txt | awk '{ print $2; }')
+      echo "fetching $locale changeset $_changeset ..."
       hg clone http://hg.mozilla.org/releases/l10n/mozilla-$CHANNEL/$locale l10n/$locale
-      [ "$RELEASE_TAG" == "default" ] || hg -R l10n/$locale up -C -r $RELEASE_TAG
+      [ "$RELEASE_TAG" == "default" ] || hg -R l10n/$locale up -C -r $_changeset
       ;;
   esac
 done
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MozillaFirefox/l10n_changesets.txt	Thu Apr 28 17:08:03 2016 +0200
@@ -0,0 +1,90 @@
+ach 658769a76613
+af 431e02c10881
+an fe436c75f71d
+ar bbcf06888dc5
+as 8313f975ae77
+ast 0300b60cd340
+az fd96727d2a26
+be b72077740aac
+bg 9f7507dd2b92
+bn-BD fe0a6bb82a2d
+bn-IN a2ea6b87d80d
+br 95b028350e29
+bs cfee6f5b1e50
+ca e8ca2d46b4a8
+cs ed6004b91b51
+cy 5bbcbba9b054
+da 324fe068c0b9
+de 217ff3f0054a
+dsb 7cdfb5d9dc5d
+el 22b959c9a739
+en-GB 36012ab486ad
+en-ZA 1c91f05aae5a
+eo 049c1b065f4c
+es-AR b3647b1d5927
+es-CL e45186f983b9
+es-ES 6fe131a8b07f
+es-MX 4cd511663283
+et ecae9df9c92a
+eu 1a65e2c03dda
+fa e5993d9fb76e
+ff 8373353b43c4
+fi b743718650bc
+fr 7d0bb8edc149
+fy-NL 02ee99ad3f83
+ga-IE 713ecb614f77
+gd e5b86736a5f9
+gl c869caff337a
+gn 65b2894520b6
+gu-IN 6245b4309461
+he ee92b661d299
+hi-IN bba2a926e4f8
+hr 8502beb4ee68
+hsb c91a11523487
+hu 09bbddfef7ee
+hy-AM 3d7a9324fb25
+id cb8f841d30d2
+is 46c99105eb3b
+it 6063a6d94e13
+ja 590a31fbf396
+ja-JP-mac 260664b702c5
+kk 5a7bd05bf942
+km 339790840ac1
+kn b23d8fbcf41a
+ko 5f303ed16778
+lij e9113fac3a93
+lt 628e96e62e44
+lv 063998fdecf8
+mai ce010a305377
+mk ffdf2a789185
+ml 1b85d75836cd
+mr 553ff31f4edd
+ms 41bbf86ac0d9
+nb-NO 5e6e5710fac9
+nl ac486141ab40
+nn-NO be9e3eeb75fb
+or febd1b04dbfc
+pa-IN 6c5ed1be55fb
+pl 49e141118acb
+pt-BR cd1aef7b5045
+pt-PT 2e4fd2a1f98f
+rm 0a52db6a6117
+ro c6ac34be77b1
+ru 3f0b3c8e19a4
+si 03a3b09a2203
+sk 3505a5f99bff
+sl 1e098ab8c27a
+son 3ae9a4ff0453
+sq c24e570a4207
+sr 896d72a0fa21
+sv-SE ea1de38fe731
+ta f9dbc2cca1fb
+te 286ff9885ea2
+th d630f05d665f
+tr b751d2d9b6ee
+uk c5cdb9068667
+uz dc28cf99c5cf
+vi 68ce305343a3
+xh f3eb8f92afe8
+zh-CN d73d448f89d6
+zh-TW 44c9950bb3e6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MozillaFirefox/mozilla-check_return.patch	Thu Apr 28 17:08:03 2016 +0200
@@ -0,0 +1,1 @@
+../mozilla-check_return.patch
\ No newline at end of file
--- a/firefox-branded-icons.patch	Sun Apr 24 08:20:10 2016 +0200
+++ b/firefox-branded-icons.patch	Thu Apr 28 17:08:03 2016 +0200
@@ -1,6 +1,6 @@
 # HG changeset patch
 # Parent e0751ad74e835e80041a61ea00c2a63bf6fbe2de
-# Parent  e3d8efdd7eea96ff7b8a7f6489a082cad72a98d8
+# Parent  a5764b0a088418fdbf4b774a8ff2745cc99f6706
 
 diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in
 --- a/browser/app/Makefile.in
@@ -30,26 +30,26 @@
 diff --git a/browser/branding/branding-common.mozbuild b/browser/branding/branding-common.mozbuild
 --- a/browser/branding/branding-common.mozbuild
 +++ b/browser/branding/branding-common.mozbuild
-@@ -32,12 +32,15 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'co
-         'disk.icns',
-         'document.icns',
-         'dsstore',
-         'firefox.icns',
-     ]
- elif CONFIG['MOZ_WIDGET_GTK']:
-     BRANDING_FILES += [
-         'default16.png',
-+	'default22.png',
-+	'default24.png',
-+	'default256.png',
-         'default32.png',
-         'default48.png',
-         'mozicon128.png',
-     ]
+@@ -34,12 +34,15 @@ def FirefoxBranding():
+             'disk.icns',
+             'document.icns',
+             'dsstore',
+             'firefox.icns',
+         ]
+     elif CONFIG['MOZ_WIDGET_GTK']:
+         BRANDING_FILES += [
+             'default16.png',
++            'default22.png',
++            'default24.png',
++            'default256.png',
+             'default32.png',
+             'default48.png',
+             'mozicon128.png',
+         ]
 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
-@@ -665,18 +665,21 @@
+@@ -664,18 +664,21 @@
  @RESPATH@/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/icon.png
  @RESPATH@/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf
  @RESPATH@/chrome/toolkit@JAREXT@
--- a/firefox-kde.patch	Sun Apr 24 08:20:10 2016 +0200
+++ b/firefox-kde.patch	Thu Apr 28 17:08:03 2016 +0200
@@ -1,11 +1,11 @@
 # HG changeset patch
-# Parent  25d63ce139ad6e957d2565e3b83d01dfa36ea314
+# Parent  f8b7b01caa34a2b2dbea6d47993ad7bbb7346a64
 
 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,1181 @@
+@@ -0,0 +1,1175 @@
 +#filter substitution
 +<?xml version="1.0"?>
 +# -*- Mode: HTML -*-
@@ -16,7 +16,7 @@
 +
 +<?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?>
 +<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
-+<?xml-stylesheet href="chrome://devtools/skin/common.css" type="text/css"?>
++<?xml-stylesheet href="chrome://devtools/skin/devtools-browser.css" type="text/css"?>
 +<?xml-stylesheet href="chrome://browser/skin/controlcenter/panel.css" type="text/css"?>
 +<?xml-stylesheet href="chrome://browser/skin/customizableui/panelUIOverlay.css" type="text/css"?>
 +<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
@@ -617,9 +617,9 @@
 +             fullscreentoolbar="true" mode="icons" customizable="true"
 +             iconsize="small"
 +#ifdef MOZ_DEV_EDITION
-+             defaultset="urlbar-container,search-container,developer-button,bookmarks-menu-button,pocket-button,downloads-button,home-button,loop-button"
++             defaultset="urlbar-container,search-container,developer-button,bookmarks-menu-button,downloads-button,home-button,loop-button"
 +#else
-+             defaultset="urlbar-container,search-container,bookmarks-menu-button,pocket-button,downloads-button,home-button,loop-button"
++             defaultset="urlbar-container,search-container,bookmarks-menu-button,downloads-button,home-button,loop-button"
 +#endif
 +             customizationtarget="nav-bar-customization-target"
 +             overflowable="true"
@@ -795,7 +795,6 @@
 +                     oncommand="BookmarksEventHandler.onCommand(event, this.parentNode._placesView);"
 +                     onclick="BookmarksEventHandler.onClick(event, this.parentNode._placesView);"
 +                     onpopupshowing="BookmarkingUI.onPopupShowing(event);
-+                                     BookmarkingUI.updatePocketItemVisibility('BMB_');
 +                                     BookmarkingUI.attachPlacesView(event, this);"
 +                     tooltip="bhTooltip" popupsinherittooltip="true">
 +            <menuitem id="BMB_viewBookmarksSidebar"
@@ -812,11 +811,6 @@
 +                      command="Browser:ShowAllBookmarks"
 +                      key="manBookmarkKb"/>
 +            <menuseparator/>
-+            <menuitem id="BMB_pocket"
-+                      class="menuitem-iconic bookmark-item subviewbutton"
-+                      label="&pocketMenuitem.label;"
-+                      oncommand="openUILink(Pocket.listURL, event);"/>
-+            <menuseparator id="BMB_pocketSeparator"/>
 +            <menuitem id="BMB_subscribeToPageMenuitem"
 +#ifndef XP_MACOSX
 +                      class="menuitem-iconic subviewbutton"
@@ -1272,7 +1266,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
-@@ -18,16 +18,22 @@ var gMainPane = {
+@@ -19,16 +19,22 @@ var gMainPane = {
    init: function ()
    {
      function setEventListener(aId, aEventType, aCallback)
@@ -1295,7 +1289,7 @@
      // when the user will select the default.  We refresh here periodically
      // in case the default changes.  On other Windows OS's defaults can also
      // be set while the prefs are open.
-@@ -720,16 +726,27 @@ var gMainPane = {
+@@ -704,16 +710,27 @@ var gMainPane = {
     */
    setDefaultBrowser: function()
    {
@@ -1326,7 +1320,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
-@@ -30,16 +30,18 @@ if CONFIG['OS_ARCH'] == 'WINNT':
+@@ -34,16 +34,18 @@ if CONFIG['OS_ARCH'] == 'WINNT':
      ]
  elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
      SOURCES += [
@@ -1349,7 +1343,7 @@
 new file mode 100644
 --- /dev/null
 +++ b/browser/components/shell/nsKDEShellService.cpp
-@@ -0,0 +1,251 @@
+@@ -0,0 +1,196 @@
 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 +/* 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
@@ -1430,61 +1424,6 @@
 +}
 +
 +NS_IMETHODIMP
-+nsKDEShellService::GetShouldCheckDefaultBrowser(bool* aResult)
-+{
-+  // If we've already checked, the browser has been started and this is a
-+  // new window open, and we don't want to check again.
-+  if (mCheckedThisSession) {
-+    *aResult = false;
-+    return NS_OK;
-+  }
-+
-+  nsresult rv;
-+#ifndef RELEASE_BUILD
-+  bool skipDefaultBrowserCheck;
-+  rv = GetShouldSkipCheckDefaultBrowser(&skipDefaultBrowserCheck);
-+  if (NS_FAILED(rv)) {
-+    return rv;
-+  }
-+  if (skipDefaultBrowserCheck) {
-+    *aResult = false;
-+    return rv;
-+  }
-+#endif
-+
-+  nsCOMPtr<nsIPrefBranch> prefs;
-+  nsCOMPtr<nsIPrefService> pserve(do_GetService(NS_PREFSERVICE_CONTRACTID));
-+  if (pserve)
-+    pserve->GetBranch("", getter_AddRefs(prefs));
-+
-+  if (prefs)
-+    prefs->GetBoolPref(PREF_CHECKDEFAULTBROWSER, aResult);
-+
-+  return NS_OK;
-+}
-+
-+NS_IMETHODIMP
-+nsKDEShellService::SetShouldCheckDefaultBrowser(bool aShouldCheck)
-+{
-+  nsCOMPtr<nsIPrefBranch> prefs;
-+  nsCOMPtr<nsIPrefService> pserve(do_GetService(NS_PREFSERVICE_CONTRACTID));
-+  if (pserve)
-+    pserve->GetBranch("", getter_AddRefs(prefs));
-+
-+  if (prefs)
-+    prefs->SetBoolPref(PREF_CHECKDEFAULTBROWSER, aShouldCheck);
-+
-+  return NS_OK;
-+}
-+
-+NS_IMETHODIMP
-+nsKDEShellService::GetCanSetDesktopBackground(bool* aResult)
-+{
-+  *aResult = true;
-+  return NS_OK;
-+}
-+
-+NS_IMETHODIMP
 +nsKDEShellService::SetDesktopBackground(nsIDOMElement* aElement,
 +                                          PRInt32 aPosition)
 +{
@@ -1685,9 +1624,9 @@
 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
-@@ -705,16 +705,17 @@
+@@ -703,16 +703,17 @@
+ @RESPATH@/greprefs.js
  @RESPATH@/defaults/autoconfig/prefcalls.js
- @RESPATH@/browser/defaults/profile/prefs.js
  @RESPATH@/browser/defaults/permissions
  
  ; Warning: changing the path to channel-prefs.js can cause bugs (Bug 756325)
--- a/firefox-no-default-ualocale.patch	Sun Apr 24 08:20:10 2016 +0200
+++ b/firefox-no-default-ualocale.patch	Thu Apr 28 17:08:03 2016 +0200
@@ -1,14 +1,14 @@
 # HG changeset patch
 # User Wolfgang Rosenauer <wr@rosenauer.org>
 # Parent 099312626f5f7c9cb5573a61d0230574ee12a660
-# Parent  ab1135c098843a4a4c5153bd361b964986fccefa
+# Parent  8015dc2ad5992bfc7d33091fc92edf18ea220a89
 Do not overwrite the locale dynamic pref from xulrunner's all.js with a wrong default value
 
 diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
 --- a/browser/app/profile/firefox.js
 +++ b/browser/app/profile/firefox.js
-@@ -254,17 +254,17 @@ pref("browser.uitour.url", "https://www.
- pref("browser.uitour.readerViewTrigger", "^https:\\/\\/www\\.mozilla\\.org\\/[^\\/]+\\/firefox\\/reading\\/start");
+@@ -216,17 +216,17 @@ pref("browser.uitour.readerViewTrigger",
+ pref("browser.uitour.surveyDuration", 7200);
  
  pref("browser.customizemode.tip0.shown", false);
  pref("browser.customizemode.tip0.learnMoreUrl", "https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/customize");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mozilla-check_return.patch	Thu Apr 28 17:08:03 2016 +0200
@@ -0,0 +1,79 @@
+# HG changeset patch
+# User Wolfgang Rosenauer <wr@rosenauer.org>
+# Parent  5f8b5e8163ece92dc819896dd52b9dbf5f524fe3
+
+diff --git a/media/libstagefright/binding/include/mp4_demuxer/ByteWriter.h b/media/libstagefright/binding/include/mp4_demuxer/ByteWriter.h
+--- a/media/libstagefright/binding/include/mp4_demuxer/ByteWriter.h
++++ b/media/libstagefright/binding/include/mp4_demuxer/ByteWriter.h
+@@ -19,57 +19,64 @@ public:
+   {
+   }
+   ~ByteWriter()
+   {
+   }
+ 
+   void WriteU8(uint8_t aByte)
+   {
+-    mPtr.append(aByte);
++    bool rv;
++    rv = mPtr.append(aByte);
+   }
+ 
+   void WriteU16(uint16_t aShort)
+   {
+     uint8_t c[2];
++    bool rv;
+     mozilla::BigEndian::writeUint16(&c[0], aShort);
+-    mPtr.append(&c[0], 2);
++    rv = mPtr.append(&c[0], 2);
+   }
+ 
+   void WriteU32(uint32_t aLong)
+   {
+     uint8_t c[4];
++    bool rv;
+     mozilla::BigEndian::writeUint32(&c[0], aLong);
+-    mPtr.append(&c[0], 4);
++    rv = mPtr.append(&c[0], 4);
+   }
+ 
+   void Write32(int32_t aLong)
+   {
+     uint8_t c[4];
++    bool rv;
+     mozilla::BigEndian::writeInt32(&c[0], aLong);
+-    mPtr.append(&c[0], 4);
++    rv = mPtr.append(&c[0], 4);
+   }
+ 
+   void WriteU64(uint64_t aLongLong)
+   {
+     uint8_t c[8];
++    bool rv;
+     mozilla::BigEndian::writeUint64(&c[0], aLongLong);
+-    mPtr.append(&c[0], 8);
++    rv = mPtr.append(&c[0], 8);
+   }
+ 
+   void Write64(int64_t aLongLong)
+   {
+     uint8_t c[8];
++    bool rv;
+     mozilla::BigEndian::writeInt64(&c[0], aLongLong);
+-    mPtr.append(&c[0], 8);
++    rv = mPtr.append(&c[0], 8);
+   }
+ 
+   void Write(const uint8_t* aSrc, size_t aCount)
+   {
+-    mPtr.append(aSrc, aCount);
++    bool rv;
++    rv = mPtr.append(aSrc, aCount);
+   }
+ 
+ private:
+   mozilla::Vector<uint8_t>& mPtr;
+ };
+ }
+ 
+ #endif
--- a/mozilla-gtk3_20.patch	Sun Apr 24 08:20:10 2016 +0200
+++ b/mozilla-gtk3_20.patch	Thu Apr 28 17:08:03 2016 +0200
@@ -1,6 +1,6 @@
-diff -up firefox-45.0.2/widget/gtk/gtk3drawing.c.gtk3-20 firefox-45.0.2/widget/gtk/gtk3drawing.c
---- firefox-45.0.2/widget/gtk/gtk3drawing.c.gtk3-20	2016-04-08 01:55:04.000000000 +0200
-+++ firefox-45.0.2/widget/gtk/gtk3drawing.c	2016-04-20 18:49:52.897795872 +0200
+diff -up firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20 firefox-46.0/widget/gtk/gtk3drawing.c
+--- firefox-46.0/widget/gtk/gtk3drawing.c.gtk3-20	2016-04-22 02:37:27.000000000 +0200
++++ firefox-46.0/widget/gtk/gtk3drawing.c	2016-04-25 14:56:19.006992927 +0200
 @@ -17,32 +17,79 @@
  
  #include <math.h>
@@ -372,7 +372,7 @@
      }
  
      if (gComboBoxEntryButtonWidget) {
-@@ -528,9 +719,21 @@ ensure_tab_widget()
+@@ -530,9 +721,21 @@ ensure_tab_widget()
  static gint
  ensure_progress_widget()
  {
@@ -397,7 +397,7 @@
      }
      return MOZ_GTK_SUCCESS;
  }
-@@ -636,6 +839,11 @@ static gint
+@@ -638,6 +841,11 @@ static gint
  ensure_check_menu_item_widget()
  {
      if (!gCheckMenuItemWidget) {
@@ -409,7 +409,7 @@
          ensure_menu_popup_widget();
          gCheckMenuItemWidget = gtk_check_menu_item_new_with_label("M");
          gtk_menu_shell_append(GTK_MENU_SHELL(gMenuPopupWidget),
-@@ -757,7 +965,7 @@ moz_gtk_checkbox_get_metrics(gint* indic
+@@ -752,7 +960,7 @@ moz_gtk_checkbox_get_metrics(gint* indic
  {
      ensure_checkbox_widget();
  
@@ -418,7 +418,7 @@
                            "indicator_size", indicator_size,
                            "indicator_spacing", indicator_spacing,
                            NULL);
-@@ -770,7 +978,7 @@ moz_gtk_radio_get_metrics(gint* indicato
+@@ -765,7 +973,7 @@ moz_gtk_radio_get_metrics(gint* indicato
  {
      ensure_radiobutton_widget();
  
@@ -427,7 +427,7 @@
                            "indicator_size", indicator_size,
                            "indicator_spacing", indicator_spacing,
                            NULL);
-@@ -783,13 +991,12 @@ moz_gtk_get_focus_outline_size(gint* foc
+@@ -778,13 +986,12 @@ moz_gtk_get_focus_outline_size(gint* foc
  {
      GtkBorder border;
      GtkBorder padding;
@@ -444,7 +444,7 @@
      *focus_h_width = border.left + padding.left;
      *focus_v_width = border.top + padding.top;
      return MOZ_GTK_SUCCESS;
-@@ -826,7 +1033,7 @@ moz_gtk_button_get_default_overflow(gint
+@@ -821,7 +1028,7 @@ moz_gtk_button_get_default_overflow(gint
      GtkBorder* default_outside_border;
  
      ensure_button_widget();
@@ -453,7 +453,7 @@
                           "default-outside-border", &default_outside_border,
                           NULL);
  
-@@ -849,7 +1056,7 @@ moz_gtk_button_get_default_border(gint*
+@@ -844,7 +1051,7 @@ moz_gtk_button_get_default_border(gint*
      GtkBorder* default_border;
  
      ensure_button_widget();
@@ -462,7 +462,7 @@
                           "default-border", &default_border,
                           NULL);
  
-@@ -940,7 +1147,7 @@ moz_gtk_button_paint(cairo_t *cr, GdkRec
+@@ -935,7 +1142,7 @@ moz_gtk_button_paint(cairo_t *cr, GdkRec
  
      if (state->focused) {
          GtkBorder border;
@@ -471,7 +471,7 @@
          x += border.left;
          y += border.top;
          width -= (border.left + border.right);
-@@ -961,15 +1168,14 @@ moz_gtk_toggle_paint(cairo_t *cr, GdkRec
+@@ -956,15 +1163,14 @@ moz_gtk_toggle_paint(cairo_t *cr, GdkRec
      gint indicator_size, indicator_spacing;
      gint x, y, width, height;
      gint focus_x, focus_y, focus_width, focus_height;
@@ -490,7 +490,7 @@
      }
  
      // XXX we should assert rect->height >= indicator_size too
-@@ -988,11 +1194,9 @@ moz_gtk_toggle_paint(cairo_t *cr, GdkRec
+@@ -983,11 +1189,9 @@ moz_gtk_toggle_paint(cairo_t *cr, GdkRec
      focus_width = width + 2 * indicator_spacing;
      focus_height = height + 2 * indicator_spacing;
    
@@ -505,7 +505,7 @@
  
      if (selected)
          state_flags |= checkbox_check_state;
-@@ -1000,13 +1204,15 @@ moz_gtk_toggle_paint(cairo_t *cr, GdkRec
+@@ -995,13 +1199,15 @@ moz_gtk_toggle_paint(cairo_t *cr, GdkRec
      if (inconsistent)
          state_flags |= GTK_STATE_FLAG_INCONSISTENT;
  
@@ -525,7 +525,7 @@
                              focus_width, focus_height);
          }
      }
-@@ -1015,15 +1221,14 @@ moz_gtk_toggle_paint(cairo_t *cr, GdkRec
+@@ -1010,15 +1216,14 @@ moz_gtk_toggle_paint(cairo_t *cr, GdkRec
          * 'indeterminate' type on checkboxes. In GTK, the shadow type
          * must also be changed for the state to be drawn.
          */        
@@ -545,7 +545,7 @@
  
      return MOZ_GTK_SUCCESS;
  }
-@@ -1040,8 +1245,8 @@ calculate_button_inner_rect(GtkWidget* b
+@@ -1035,8 +1240,8 @@ calculate_button_inner_rect(GtkWidget* b
      style = gtk_widget_get_style_context(button);
  
      /* This mirrors gtkbutton's child positioning */
@@ -556,7 +556,7 @@
  
      inner_rect->x = rect->x + border.left + padding.left;
      inner_rect->y = rect->y + padding.top + border.top;
-@@ -1107,9 +1312,9 @@ moz_gtk_scrollbar_button_paint(cairo_t *
+@@ -1099,9 +1304,9 @@ moz_gtk_scrollbar_button_paint(cairo_t *
      ensure_scrollbar_widget();
  
      if (flags & MOZ_GTK_STEPPER_VERTICAL)
@@ -568,7 +568,7 @@
  
      gtk_widget_set_direction(scrollbar, direction);
  
-@@ -1175,26 +1380,23 @@ moz_gtk_scrollbar_trough_paint(GtkThemeW
+@@ -1181,25 +1386,22 @@ moz_gtk_scrollbar_trough_paint(GtkThemeW
                                 GtkTextDirection direction)
  {
      GtkStyleContext* style;
@@ -576,21 +576,13 @@
  
      ensure_scrollbar_widget();
  
--    if (widget ==  MOZ_GTK_SCROLLBAR_TRACK_HORIZONTAL)
+-    if (widget ==  MOZ_GTK_SCROLLBAR_HORIZONTAL)
 -        scrollbar = GTK_SCROLLBAR(gHorizScrollbarWidget);
 -    else
 -        scrollbar = GTK_SCROLLBAR(gVertScrollbarWidget);
 -
 -    gtk_widget_set_direction(GTK_WIDGET(scrollbar), direction);
-+    if (widget == MOZ_GTK_SCROLLBAR_TRACK_HORIZONTAL) {
-+        gtk_widget_set_direction(GTK_WIDGET(gHorizScrollbar.widget), direction);
-+        style = gHorizScrollbar.scroll.style;
-+    } 
-+    else {
-+        gtk_widget_set_direction(GTK_WIDGET(gVertScrollbar.widget), direction);
-+        style = gVertScrollbar.scroll.style;
-+    }
-     
+-    
      if (flags & MOZ_GTK_TRACK_OPAQUE) {
          style = gtk_widget_get_style_context(GTK_WIDGET(gProtoWindow));
          gtk_render_background(style, cr, rect->x, rect->y, rect->width, rect->height);
@@ -599,11 +591,18 @@
 -    style = gtk_widget_get_style_context(GTK_WIDGET(scrollbar));
 -    gtk_style_context_save(style);
 -    gtk_style_context_add_class(style, GTK_STYLE_CLASS_TROUGH);
--
++     if (widget == MOZ_GTK_SCROLLBAR_HORIZONTAL) {
++        gtk_widget_set_direction(GTK_WIDGET(gHorizScrollbar.widget), direction);
++        style = gHorizScrollbar.scroll.style;
++    }
++    else {
++        gtk_widget_set_direction(GTK_WIDGET(gVertScrollbar.widget), direction);
++        style = gVertScrollbar.scroll.style;
++    }
+ 
      gtk_render_background(style, cr, rect->x, rect->y, rect->width, rect->height);
      gtk_render_frame(style, cr, rect->x, rect->y, rect->width, rect->height);
- 
-@@ -1202,7 +1404,6 @@ moz_gtk_scrollbar_trough_paint(GtkThemeW
+@@ -1208,7 +1410,6 @@ moz_gtk_scrollbar_trough_paint(GtkThemeW
          gtk_render_focus(style, cr,
                           rect->x, rect->y, rect->width, rect->height);
      }
@@ -611,12 +610,11 @@
      return MOZ_GTK_SUCCESS;
  }
  
-@@ -1214,25 +1415,21 @@ moz_gtk_scrollbar_thumb_paint(GtkThemeWi
+@@ -1220,24 +1421,20 @@ moz_gtk_scrollbar_thumb_paint(GtkThemeWi
  {
      GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state);
      GtkStyleContext* style;
 -    GtkScrollbar *scrollbar;
-     GtkAdjustment *adj;
      GtkBorder margin;
  
      ensure_scrollbar_widget();
@@ -635,7 +633,7 @@
 +        gtk_widget_set_direction(GTK_WIDGET(gHorizScrollbar.widget), direction);
 +    }
 +    else {
-+        style = gVertScrollbar.scroll.styleSlider;
++        style = gVertScrollbar.scroll.styleSlider; 
 +        gtk_widget_set_direction(GTK_WIDGET(gVertScrollbar.widget), direction);
 +    }
  
@@ -645,7 +643,7 @@
      gtk_style_context_get_margin (style, state_flags, &margin);
  
      gtk_render_slider(style, cr,
-@@ -1243,8 +1440,6 @@ moz_gtk_scrollbar_thumb_paint(GtkThemeWi
+@@ -1248,8 +1445,6 @@ moz_gtk_scrollbar_thumb_paint(GtkThemeWi
                       (widget == MOZ_GTK_SCROLLBAR_THUMB_HORIZONTAL) ?
                       GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL);
  
@@ -654,7 +652,7 @@
      return MOZ_GTK_SUCCESS;
  }
  
-@@ -1255,8 +1450,8 @@ moz_gtk_spin_paint(cairo_t *cr, GdkRecta
+@@ -1260,8 +1455,8 @@ moz_gtk_spin_paint(cairo_t *cr, GdkRecta
      GtkStyleContext* style;
  
      ensure_spin_widget();
@@ -665,7 +663,7 @@
      gtk_style_context_save(style);
      gtk_style_context_add_class(style, GTK_STYLE_CLASS_SPINBUTTON);
      gtk_render_background(style, cr, rect->x, rect->y, rect->width, rect->height);
-@@ -1275,11 +1470,10 @@ moz_gtk_spin_updown_paint(cairo_t *cr, G
+@@ -1280,11 +1475,10 @@ moz_gtk_spin_updown_paint(cairo_t *cr, G
      GtkStyleContext* style;
  
      ensure_spin_widget();
@@ -679,7 +677,7 @@
  
      gtk_render_background(style, cr, rect->x, rect->y, rect->width, rect->height);
      gtk_render_frame(style, cr, rect->x, rect->y, rect->width, rect->height);
-@@ -1445,15 +1639,13 @@ moz_gtk_vpaned_paint(cairo_t *cr, GdkRec
+@@ -1450,15 +1644,13 @@ moz_gtk_vpaned_paint(cairo_t *cr, GdkRec
  static gint
  moz_gtk_entry_paint(cairo_t *cr, GdkRectangle* rect,
                      GtkWidgetState* state,
@@ -698,7 +696,7 @@
  
      if (draw_focus_outline_only) {
          // Inflate the given 'rect' with the focus outline size.
-@@ -1473,10 +1665,9 @@ moz_gtk_entry_paint(cairo_t *cr, GdkRect
+@@ -1478,10 +1670,9 @@ moz_gtk_entry_paint(cairo_t *cr, GdkRect
       * textarea window uses gtk_paint_flat_box when exposed */
  
      /* This gets us a lovely greyish disabledish look */
@@ -710,7 +708,7 @@
    
      /* Now paint the shadow and focus border.
       * We do like in gtk_entry_draw_frame, we first draw the shadow, a tad
-@@ -1526,7 +1717,7 @@ moz_gtk_treeview_paint(cairo_t *cr, GdkR
+@@ -1531,7 +1722,7 @@ moz_gtk_treeview_paint(cairo_t *cr, GdkR
      style = gtk_widget_get_style_context(gScrolledWindowWidget);
      gtk_style_context_save(style);
      gtk_style_context_add_class(style, GTK_STYLE_CLASS_FRAME);    
@@ -719,7 +717,7 @@
      xthickness = border.left;
      ythickness = border.top;    
  
-@@ -1697,7 +1888,7 @@ moz_gtk_combo_box_paint(cairo_t *cr, Gdk
+@@ -1702,7 +1893,7 @@ moz_gtk_combo_box_paint(cairo_t *cr, Gdk
          if (direction == GTK_TEXT_DIR_LTR) {
              GtkBorder padding;
              GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state);
@@ -728,7 +726,7 @@
              arrow_rect.x -= padding.left;
          }
          else
-@@ -1799,29 +1990,27 @@ moz_gtk_container_paint(cairo_t *cr, Gdk
+@@ -1804,29 +1995,27 @@ moz_gtk_container_paint(cairo_t *cr, Gdk
                          gboolean isradio, GtkTextDirection direction)
  {
      GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state);
@@ -766,7 +764,7 @@
    
      return MOZ_GTK_SUCCESS;
  }
-@@ -1831,32 +2020,26 @@ moz_gtk_toggle_label_paint(cairo_t *cr,
+@@ -1836,32 +2025,26 @@ moz_gtk_toggle_label_paint(cairo_t *cr,
                             GtkWidgetState* state, 
                             gboolean isradio, GtkTextDirection direction)
  {
@@ -808,7 +806,7 @@
  
      return MOZ_GTK_SUCCESS;
  }
-@@ -1917,7 +2100,7 @@ moz_gtk_toolbar_separator_paint(cairo_t
+@@ -1922,7 +2105,7 @@ moz_gtk_toolbar_separator_paint(cairo_t
                            rect->height * (end_fraction - start_fraction));
      } else {
          GtkBorder padding;
@@ -817,7 +815,7 @@
      
          paint_width = padding.left;
          if (paint_width > rect->width)
-@@ -2004,18 +2187,13 @@ static gint
+@@ -2006,18 +2189,13 @@ static gint
  moz_gtk_progressbar_paint(cairo_t *cr, GdkRectangle* rect,
                            GtkTextDirection direction)
  {
@@ -841,7 +839,7 @@
  
      return MOZ_GTK_SUCCESS;
  }
-@@ -2025,15 +2203,8 @@ moz_gtk_progress_chunk_paint(cairo_t *cr
+@@ -2027,15 +2205,8 @@ moz_gtk_progress_chunk_paint(cairo_t *cr
                               GtkTextDirection direction,
                               GtkThemeWidgetType widget)
  {
@@ -858,7 +856,7 @@
  
      if (widget == MOZ_GTK_PROGRESS_CHUNK_INDETERMINATE ||
          widget == MOZ_GTK_PROGRESS_CHUNK_VERTICAL_INDETERMINATE) {
-@@ -2072,12 +2243,14 @@ moz_gtk_progress_chunk_paint(cairo_t *cr
+@@ -2074,12 +2245,14 @@ moz_gtk_progress_chunk_paint(cairo_t *cr
      // gtk_render_activity was used to render progress chunks on GTK versions
      // before 3.13.7, see bug 1173907.
      if (!gtk_check_version(3, 13, 7)) {
@@ -877,7 +875,7 @@
  
      return MOZ_GTK_SUCCESS;
  }
-@@ -2094,7 +2267,7 @@ moz_gtk_get_tab_thickness(void)
+@@ -2096,7 +2269,7 @@ moz_gtk_get_tab_thickness(void)
  
      style = gtk_widget_get_style_context(gTabWidget);
      gtk_style_context_add_class(style, GTK_STYLE_CLASS_NOTEBOOK);
@@ -886,7 +884,7 @@
  
      if (border.top < 2)
          return 2; /* some themes don't set ythickness correctly */
-@@ -2290,7 +2463,7 @@ moz_gtk_tab_paint(cairo_t *cr, GdkRectan
+@@ -2292,7 +2465,7 @@ moz_gtk_tab_paint(cairo_t *cr, GdkRectan
        gtk_style_context_save(style);
        moz_gtk_tab_prepare_style_context(style, flags);
  
@@ -895,7 +893,7 @@
  
        focusRect.x += padding.left;
        focusRect.width -= (padding.left + padding.right);
-@@ -2406,7 +2579,7 @@ moz_gtk_tab_scroll_arrow_paint(cairo_t *
+@@ -2408,7 +2581,7 @@ moz_gtk_tab_scroll_arrow_paint(cairo_t *
  }
  
  static gint
@@ -904,7 +902,7 @@
                         GtkTextDirection direction)
  {
      GtkStyleContext* style;
-@@ -2467,7 +2640,7 @@ moz_gtk_menu_separator_paint(cairo_t *cr
+@@ -2468,7 +2641,7 @@ moz_gtk_menu_separator_paint(cairo_t *cr
      border_width = gtk_container_get_border_width(GTK_CONTAINER(gMenuSeparatorWidget));
  
      style = gtk_widget_get_style_context(gMenuSeparatorWidget);
@@ -1137,7 +1135,7 @@
  moz_gtk_get_tab_scroll_arrow_size(gint* width, gint* height)
  {
      gint arrow_size;
-@@ -3022,7 +3240,7 @@ moz_gtk_get_toolbar_separator_width(gint
+@@ -3030,7 +3248,7 @@ moz_gtk_get_toolbar_separator_width(gint
                           "separator-width", &separator_width,
                           NULL);
      /* Just in case... */
@@ -1146,7 +1144,7 @@
      *size = MAX(*size, (wide_separators ? separator_width : border.left));
      return MOZ_GTK_SUCCESS;
  }
-@@ -3064,7 +3282,7 @@ moz_gtk_get_menu_separator_height(gint *
+@@ -3072,7 +3290,7 @@ moz_gtk_get_menu_separator_height(gint *
      border_width = gtk_container_get_border_width(GTK_CONTAINER(gMenuSeparatorWidget));
  
      style = gtk_widget_get_style_context(gMenuSeparatorWidget);
@@ -1155,7 +1153,7 @@
  
      gtk_style_context_save(style);
      gtk_style_context_add_class(style, GTK_STYLE_CLASS_SEPARATOR);
-@@ -3122,15 +3340,21 @@ moz_gtk_get_scrollbar_metrics(MozGtkScro
+@@ -3130,15 +3348,21 @@ moz_gtk_get_scrollbar_metrics(MozGtkScro
  {
      ensure_scrollbar_widget();
  
@@ -1180,7 +1178,7 @@
  
      return MOZ_GTK_SUCCESS;
  }
-@@ -3155,7 +3379,7 @@ moz_gtk_images_in_buttons()
+@@ -3163,7 +3387,7 @@ moz_gtk_images_in_buttons()
      GtkSettings* settings;
  
      ensure_button_widget();
@@ -1189,7 +1187,7 @@
  
      g_object_get(settings, "gtk-button-images", &result, NULL);
      return result;
-@@ -3183,7 +3407,7 @@ moz_gtk_widget_paint(GtkThemeWidgetType
+@@ -3191,7 +3415,7 @@ moz_gtk_widget_paint(GtkThemeWidgetType
          }
          ensure_button_widget();
          return moz_gtk_button_paint(cr, rect, state,
@@ -1198,7 +1196,7 @@
                                      direction);
          break;
      case MOZ_GTK_CHECKBUTTON:
-@@ -3233,7 +3457,7 @@ moz_gtk_widget_paint(GtkThemeWidgetType
+@@ -3241,7 +3465,7 @@ moz_gtk_widget_paint(GtkThemeWidgetType
      case MOZ_GTK_SPINBUTTON_ENTRY:
          ensure_spin_widget();
          return moz_gtk_entry_paint(cr, rect, state,
@@ -1207,7 +1205,7 @@
          break;
      case MOZ_GTK_GRIPPER:
          return moz_gtk_gripper_paint(cr, rect, state,
-@@ -3260,7 +3484,7 @@ moz_gtk_widget_paint(GtkThemeWidgetType
+@@ -3268,7 +3492,7 @@ moz_gtk_widget_paint(GtkThemeWidgetType
      case MOZ_GTK_ENTRY:
          ensure_entry_widget();
          return moz_gtk_entry_paint(cr, rect, state,
@@ -1216,7 +1214,7 @@
          break;
      case MOZ_GTK_DROPDOWN:
          return moz_gtk_combo_box_paint(cr, rect, state, direction);
-@@ -3272,7 +3496,7 @@ moz_gtk_widget_paint(GtkThemeWidgetType
+@@ -3280,7 +3504,7 @@ moz_gtk_widget_paint(GtkThemeWidgetType
      case MOZ_GTK_DROPDOWN_ENTRY:
          ensure_combo_box_entry_widgets();
          return moz_gtk_entry_paint(cr, rect, state,
@@ -1225,7 +1223,7 @@
          break;
      case MOZ_GTK_CHECKBUTTON_CONTAINER:
      case MOZ_GTK_RADIOBUTTON_CONTAINER:
-@@ -3324,7 +3548,7 @@ moz_gtk_widget_paint(GtkThemeWidgetType
+@@ -3332,7 +3556,7 @@ moz_gtk_widget_paint(GtkThemeWidgetType
                                                (GtkArrowType) flags, direction);
          break;
      case MOZ_GTK_MENUBAR:
@@ -1234,7 +1232,7 @@
          break;
      case MOZ_GTK_MENUPOPUP:
          return moz_gtk_menu_popup_paint(cr, rect, direction);
-@@ -3375,7 +3599,7 @@ GtkWidget* moz_gtk_get_scrollbar_widget(
+@@ -3383,7 +3607,7 @@ GtkWidget* moz_gtk_get_scrollbar_widget(
  {
      MOZ_ASSERT(is_initialized, "Forgot to call moz_gtk_init()");
      ensure_scrollbar_widget();
@@ -1243,7 +1241,7 @@
  }
  
  gboolean moz_gtk_has_scrollbar_buttons(void)
-@@ -3383,7 +3607,7 @@ gboolean moz_gtk_has_scrollbar_buttons(v
+@@ -3391,7 +3615,7 @@ gboolean moz_gtk_has_scrollbar_buttons(v
      gboolean backward, forward, secondary_backward, secondary_forward;
      MOZ_ASSERT(is_initialized, "Forgot to call moz_gtk_init()");
      ensure_scrollbar_widget();
@@ -1252,7 +1250,7 @@
                            "has-backward-stepper", &backward,
                            "has-forward-stepper", &forward,
                            "has-secondary-backward-stepper", &secondary_backward,
-@@ -3409,17 +3633,19 @@ moz_gtk_shutdown()
+@@ -3415,17 +3639,19 @@ moz_gtk_shutdown()
  
      gProtoWindow = NULL;
      gProtoLayout = NULL;
@@ -1279,7 +1277,7 @@
      gComboBoxWidget = NULL;
      gComboBoxButtonWidget = NULL;
      gComboBoxSeparatorWidget = NULL;
-@@ -3427,12 +3653,12 @@ moz_gtk_shutdown()
+@@ -3433,12 +3659,12 @@ moz_gtk_shutdown()
      gComboBoxEntryWidget = NULL;
      gComboBoxEntryButtonWidget = NULL;
      gComboBoxEntryArrowWidget = NULL;
@@ -1294,9 +1292,9 @@
      gTabWidget = NULL;
      gTooltipWidget = NULL;
      gMenuBarWidget = NULL;
-diff -up firefox-45.0.2/widget/gtk/gtkdrawing.h.gtk3-20 firefox-45.0.2/widget/gtk/gtkdrawing.h
---- firefox-45.0.2/widget/gtk/gtkdrawing.h.gtk3-20	2016-04-08 01:55:04.000000000 +0200
-+++ firefox-45.0.2/widget/gtk/gtkdrawing.h	2016-04-20 15:00:29.468048948 +0200
+diff -up firefox-46.0/widget/gtk/gtkdrawing.h.gtk3-20 firefox-46.0/widget/gtk/gtkdrawing.h
+--- firefox-46.0/widget/gtk/gtkdrawing.h.gtk3-20	2016-04-22 02:37:27.000000000 +0200
++++ firefox-46.0/widget/gtk/gtkdrawing.h	2016-04-25 14:42:42.000000000 +0200
 @@ -67,6 +67,13 @@ typedef enum {
    MOZ_GTK_TAB_SELECTED        = 1 << 10
  } GtkTabFlags;
@@ -1311,18 +1309,17 @@
  /** flags for menuitems **/
  typedef enum {
    /* menuitem is part of the menubar */
-@@ -394,6 +401,10 @@ gint moz_gtk_get_tab_scroll_arrow_size(g
-  */
- gint moz_gtk_get_arrow_size(gint* width, gint* height);
+@@ -396,6 +403,9 @@ void
+ moz_gtk_get_arrow_size(GtkThemeWidgetType widgetType,
+                        gint* width, gint* height);
  
 +gint moz_gtk_get_entry_height(gint* height);
-+
 +gint moz_gtk_get_button_height(gint* height);
 +
  /**
   * Get the desired size of a toolbar separator
   * size:    [OUT] the desired width
-@@ -464,6 +475,12 @@ gboolean moz_gtk_images_in_buttons(void)
+@@ -466,6 +476,12 @@ gboolean moz_gtk_images_in_buttons(void)
   */
  gboolean moz_gtk_has_scrollbar_buttons(void);
  
@@ -1335,10 +1332,10 @@
  #ifdef __cplusplus
  }
  #endif /* __cplusplus */
-diff -up firefox-45.0.2/widget/gtk/mozgtk/mozgtk.c.gtk3-20 firefox-45.0.2/widget/gtk/mozgtk/mozgtk.c
---- firefox-45.0.2/widget/gtk/mozgtk/mozgtk.c.gtk3-20	2016-04-20 15:00:29.443048846 +0200
-+++ firefox-45.0.2/widget/gtk/mozgtk/mozgtk.c	2016-04-20 15:00:29.469048952 +0200
-@@ -503,6 +503,11 @@ STUB(gtk_window_set_type_hint)
+diff -up firefox-46.0/widget/gtk/mozgtk/mozgtk.c.gtk3-20 firefox-46.0/widget/gtk/mozgtk/mozgtk.c
+--- firefox-46.0/widget/gtk/mozgtk/mozgtk.c.gtk3-20	2016-04-22 02:37:27.000000000 +0200
++++ firefox-46.0/widget/gtk/mozgtk/mozgtk.c	2016-04-25 14:46:15.299592716 +0200
+@@ -504,6 +504,11 @@ STUB(gtk_window_set_type_hint)
  STUB(gtk_window_set_wmclass)
  STUB(gtk_window_unfullscreen)
  STUB(gtk_window_unmaximize)
@@ -1350,15 +1347,7 @@
  #endif
  
  #ifdef GTK3_SYMBOLS
-@@ -550,6 +555,7 @@ STUB(gtk_style_context_get_border_color)
- STUB(gtk_style_context_get_color)
- STUB(gtk_style_context_get_margin)
- STUB(gtk_style_context_get_padding)
-+STUB(gtk_style_context_get_state)
- STUB(gtk_style_context_has_class)
- STUB(gtk_style_context_new)
- STUB(gtk_style_context_remove_class)
-@@ -577,6 +583,13 @@ STUB(gtk_color_chooser_get_type)
+@@ -581,6 +586,13 @@ STUB(gtk_color_chooser_get_type)
  STUB(gtk_color_chooser_set_rgba)
  STUB(gtk_color_chooser_get_rgba)
  STUB(gtk_color_chooser_set_use_alpha)
@@ -1372,10 +1361,10 @@
  #endif
  
  #ifdef GTK2_SYMBOLS
-diff -up firefox-45.0.2/widget/gtk/nsLookAndFeel.cpp.gtk3-20 firefox-45.0.2/widget/gtk/nsLookAndFeel.cpp
---- firefox-45.0.2/widget/gtk/nsLookAndFeel.cpp.gtk3-20	2016-04-08 01:55:04.000000000 +0200
-+++ firefox-45.0.2/widget/gtk/nsLookAndFeel.cpp	2016-04-20 15:00:29.469048952 +0200
-@@ -232,14 +232,18 @@ nsLookAndFeel::NativeGetColor(ColorID aI
+diff -up firefox-46.0/widget/gtk/nsLookAndFeel.cpp.gtk3-20 firefox-46.0/widget/gtk/nsLookAndFeel.cpp
+--- firefox-46.0/widget/gtk/nsLookAndFeel.cpp.gtk3-20	2016-04-22 02:37:27.000000000 +0200
++++ firefox-46.0/widget/gtk/nsLookAndFeel.cpp	2016-04-25 14:18:25.000000000 +0200
+@@ -353,14 +353,18 @@ nsLookAndFeel::NativeGetColor(ColorID aI
      case eColorID_activeborder:
          // active window border
          gtk_style_context_get_border_color(mBackgroundStyle, 
@@ -1396,7 +1385,7 @@
          aColor = GDK_RGBA_TO_NS_RGBA(gdk_color);
          break;
      case eColorID_graytext: // disabled text in windows, menus, etc.
-@@ -248,9 +252,12 @@ nsLookAndFeel::NativeGetColor(ColorID aI
+@@ -369,9 +373,12 @@ nsLookAndFeel::NativeGetColor(ColorID aI
          break;
      case eColorID_inactivecaption:
          // inactive window caption
@@ -1410,7 +1399,7 @@
          aColor = GDK_RGBA_TO_NS_RGBA(gdk_color);
          break;
  #endif
-@@ -376,13 +383,17 @@ nsLookAndFeel::NativeGetColor(ColorID aI
+@@ -497,13 +504,17 @@ nsLookAndFeel::NativeGetColor(ColorID aI
      case eColorID__moz_buttondefault:
        // default button border color
          gtk_style_context_get_border_color(mButtonStyle, 
@@ -1430,7 +1419,7 @@
          aColor = GDK_RGBA_TO_NS_RGBA(gdk_color);
          break;
      case eColorID__moz_buttonhovertext:
-@@ -989,7 +1000,7 @@ nsLookAndFeel::Init()
+@@ -1110,7 +1121,7 @@ nsLookAndFeel::Init()
      style = create_context(path);
      gtk_style_context_add_class(style, GTK_STYLE_CLASS_SCROLLBAR);
      gtk_style_context_add_class(style, GTK_STYLE_CLASS_TROUGH);
@@ -1439,7 +1428,7 @@
      sMozScrollbar = GDK_RGBA_TO_NS_RGBA(color);
      g_object_unref(style);
  
-@@ -997,18 +1008,18 @@ nsLookAndFeel::Init()
+@@ -1118,18 +1129,18 @@ nsLookAndFeel::Init()
      style = create_context(path);
      gtk_style_context_save(style);
      gtk_style_context_add_class(style, GTK_STYLE_CLASS_BACKGROUND);
@@ -1462,7 +1451,7 @@
      sInfoText = GDK_RGBA_TO_NS_RGBA(color);
      g_object_unref(style);
  
-@@ -1023,20 +1034,26 @@ nsLookAndFeel::Init()
+@@ -1144,20 +1155,26 @@ nsLookAndFeel::Init()
      gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
  
      style = gtk_widget_get_style_context(accel_label);
@@ -1494,7 +1483,7 @@
  
      g_object_unref(menu);
  #endif
-@@ -1145,44 +1162,54 @@ nsLookAndFeel::Init()
+@@ -1266,44 +1283,54 @@ nsLookAndFeel::Init()
              GDK_COLOR_TO_NS_RGB(style->dark[GTK_STATE_NORMAL]);
      }
  #else
@@ -1566,7 +1555,7 @@
  
      // GTK's guide to fancy odd row background colors:
      // 1) Check if a theme explicitly defines an odd row color
-@@ -1195,7 +1222,7 @@ nsLookAndFeel::Init()
+@@ -1316,7 +1343,7 @@ nsLookAndFeel::Init()
      // Get odd row background color
      gtk_style_context_save(style);
      gtk_style_context_add_region(style, GTK_STYLE_REGION_ROW, GTK_REGION_ODD);
@@ -1575,16 +1564,7 @@
      sOddCellBackground = GDK_RGBA_TO_NS_RGBA(color);
      gtk_style_context_restore(style);
  
-@@ -1205,7 +1232,7 @@ nsLookAndFeel::Init()
-     // TODO GTK3 - update sFrameOuterLightBorder 
-     // for GTK_BORDER_STYLE_INSET/OUTSET/GROVE/RIDGE border styles (Bug 978172).
-     style = gtk_widget_get_style_context(frame);
--    gtk_style_context_get_border_color(style, GTK_STATE_FLAG_NORMAL, &color);
-+    gtk_style_context_get_border_color(style, gtk_style_context_get_state(style), &color);
-     sFrameInnerDarkBorder = sFrameOuterLightBorder = GDK_RGBA_TO_NS_RGBA(color);
- 
-     gtk_widget_path_free(path);
-@@ -1217,9 +1244,11 @@ nsLookAndFeel::Init()
+@@ -1334,9 +1361,11 @@ nsLookAndFeel::Init()
      gtk_container_add(GTK_CONTAINER(parent), infoBar);
      gtk_container_add(GTK_CONTAINER(infoBarContent), infoBarLabel);
      style = gtk_widget_get_style_context(infoBarLabel);
@@ -1597,10 +1577,10 @@
  #endif
      // Some themes have a unified menu bar, and support window dragging on it
      gboolean supports_menubar_drag = FALSE;
-diff -up firefox-45.0.2/widget/gtk/nsNativeThemeGTK.cpp.gtk3-20 firefox-45.0.2/widget/gtk/nsNativeThemeGTK.cpp
---- firefox-45.0.2/widget/gtk/nsNativeThemeGTK.cpp.gtk3-20	2016-04-08 01:55:04.000000000 +0200
-+++ firefox-45.0.2/widget/gtk/nsNativeThemeGTK.cpp	2016-04-20 15:00:29.469048952 +0200
-@@ -1548,9 +1548,6 @@ nsNativeThemeGTK::GetMinimumWidgetSize(n
+diff -up firefox-46.0/widget/gtk/nsNativeThemeGTK.cpp.gtk3-20 firefox-46.0/widget/gtk/nsNativeThemeGTK.cpp
+--- firefox-46.0/widget/gtk/nsNativeThemeGTK.cpp.gtk3-20	2016-04-25 14:46:15.300592722 +0200
++++ firefox-46.0/widget/gtk/nsNativeThemeGTK.cpp	2016-04-25 14:40:42.000000000 +0200
+@@ -1567,9 +1567,6 @@ nsNativeThemeGTK::GetMinimumWidgetSize(n
    case NS_THEME_RADIO_CONTAINER:
    case NS_THEME_CHECKBOX_LABEL:
    case NS_THEME_RADIO_LABEL:
@@ -1609,12 +1589,11 @@
 -  case NS_THEME_TOOLBAR_BUTTON:
    case NS_THEME_TREEVIEW_HEADER_CELL:
      {
-       // Just include our border, and let the box code augment the size.
-@@ -1560,6 +1557,21 @@ nsNativeThemeGTK::GetMinimumWidgetSize(n
-       aResult->width = border.left + border.right;
-       aResult->height = border.top + border.bottom;
+       if (aWidgetType == NS_THEME_DROPDOWN) {
+@@ -1588,6 +1585,21 @@ nsNativeThemeGTK::GetMinimumWidgetSize(n
+       aResult->height += border.top + border.bottom;
      }
-+    break; 
+     break;
 +  case NS_THEME_BUTTON:
 +  case NS_THEME_DROPDOWN:
 +  case NS_THEME_TOOLBAR_BUTTON:
@@ -1629,7 +1608,8 @@
 +    {
 +        moz_gtk_get_entry_height(&aResult->height);
 +    } 
-     break;
++    break;
    case NS_THEME_TOOLBAR_SEPARATOR:
      {
+       gint separator_width;
 
--- a/mozilla-idldir.patch	Sun Apr 24 08:20:10 2016 +0200
+++ b/mozilla-idldir.patch	Thu Apr 28 17:08:03 2016 +0200
@@ -1,7 +1,7 @@
 # HG changeset patch
 # Parent 1cd1e78dfe63c1a7bcfc0707697bb99bcfea19c4
 # User Wolfgang Rosenauer <wr@rosenauer.org>
-# Parent  44c668a2ae429a5c0b8ad3a8a32738453c75af74
+# Parent  b0fb5e009b6af361b8781a923daa65170a2fdedb
 Install IDL files to includedir instead of /usr/share/idl
 
 diff --git a/config/baseconfig.mk b/config/baseconfig.mk
@@ -22,4 +22,4 @@
  else
  DIST = $(DEPTH)/dist
  endif
- 
+ ABS_DIST = $(topobjdir)/dist
--- a/mozilla-kde.patch	Sun Apr 24 08:20:10 2016 +0200
+++ b/mozilla-kde.patch	Thu Apr 28 17:08:03 2016 +0200
@@ -1,5 +1,5 @@
 # HG changeset patch
-# Parent  797d5f17b080f54439602f107ecaf6b09a0ef5c1
+# Parent  61cdc9af8ceaf75083e751e0d6497feddc26f7ba
 Description: Add KDE integration to Firefox (toolkit parts)
 Author: Wolfgang Rosenauer <wolfgang@rosenauer.org>
 Author: Lubos Lunak <lunak@suse.com>
@@ -9,7 +9,7 @@
 diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp
 --- a/modules/libpref/Preferences.cpp
 +++ b/modules/libpref/Preferences.cpp
-@@ -30,16 +30,17 @@
+@@ -31,16 +31,17 @@
  #include "nsIZipReader.h"
  #include "nsPrefBranch.h"
  #include "nsXPIDLString.h"
@@ -27,7 +27,7 @@
  #include "prefread.h"
  #include "prefapi_private_data.h"
  
-@@ -1136,16 +1137,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char 
+@@ -1135,16 +1136,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char 
  
  static nsresult pref_LoadPrefsInDirList(const char *listId)
  {
@@ -62,7 +62,7 @@
      return NS_OK;
  
    bool hasMore;
-@@ -1161,17 +1180,17 @@ static nsresult pref_LoadPrefsInDirList(
+@@ -1160,17 +1179,17 @@ static nsresult pref_LoadPrefsInDirList(
  
      nsAutoCString leaf;
      path->GetNativeLeafName(leaf);
@@ -81,7 +81,7 @@
  {
    nsZipItemPtr<char> manifest(jarReader, name, true);
    NS_ENSURE_TRUE(manifest.Buffer(), NS_ERROR_NOT_AVAILABLE);
-@@ -1265,26 +1284,38 @@ static nsresult pref_InitInitialObjects(
+@@ -1264,24 +1283,36 @@ static nsresult pref_InitInitialObjects(
    /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */
    static const char* specialFiles[] = {
  #if defined(XP_MACOSX)
@@ -91,9 +91,7 @@
  #elif defined(XP_UNIX)
      "unix.js"
 +    , "" // placeholder for KDE  (empty is otherwise harmless)
- #if defined(VMS)
-     , "openvms.js"
- #elif defined(_AIX)
+ #if defined(_AIX)
      , "aix.js"
  #endif
  #elif defined(XP_BEOS)
@@ -189,7 +187,7 @@
 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
-@@ -65,15 +65,16 @@ if not CONFIG['MOZ_SUITE']:
+@@ -64,15 +64,16 @@ if not CONFIG['MOZ_SUITE']:
          'nsDownloadManagerUI.js',
          'nsDownloadManagerUI.manifest',
      ]
@@ -278,31 +276,31 @@
 diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn
 --- a/toolkit/content/jar.mn
 +++ b/toolkit/content/jar.mn
-@@ -64,29 +64,33 @@ toolkit.jar:
+@@ -72,29 +72,33 @@ toolkit.jar:
     content/global/viewZoomOverlay.js
- *+ content/global/bindings/autocomplete.xml    (widgets/autocomplete.xml)
+    content/global/bindings/autocomplete.xml    (widgets/autocomplete.xml)
     content/global/bindings/browser.xml         (widgets/browser.xml)
     content/global/bindings/button.xml          (widgets/button.xml)
     content/global/bindings/checkbox.xml        (widgets/checkbox.xml)
     content/global/bindings/colorpicker.xml     (widgets/colorpicker.xml)
     content/global/bindings/datetimepicker.xml  (widgets/datetimepicker.xml)
- *+ content/global/bindings/dialog.xml          (widgets/dialog.xml)
-+*+ content/global/bindings/dialog-kde.xml      (widgets/dialog-kde.xml)
+ *  content/global/bindings/dialog.xml          (widgets/dialog.xml)
++*  content/global/bindings/dialog-kde.xml      (widgets/dialog-kde.xml)
 +% override chrome://global/content/bindings/dialog.xml chrome://global/content/bindings/dialog-kde.xml desktop=kde
     content/global/bindings/editor.xml          (widgets/editor.xml)
     content/global/bindings/expander.xml        (widgets/expander.xml)
- *  content/global/bindings/filefield.xml       (widgets/filefield.xml)
- *+ content/global/bindings/findbar.xml         (widgets/findbar.xml)
+    content/global/bindings/filefield.xml       (widgets/filefield.xml)
+ *  content/global/bindings/findbar.xml         (widgets/findbar.xml)
     content/global/bindings/general.xml         (widgets/general.xml)
     content/global/bindings/groupbox.xml        (widgets/groupbox.xml)
- *+ content/global/bindings/listbox.xml         (widgets/listbox.xml)
+    content/global/bindings/listbox.xml         (widgets/listbox.xml)
     content/global/bindings/menu.xml            (widgets/menu.xml)
     content/global/bindings/menulist.xml        (widgets/menulist.xml)
     content/global/bindings/notification.xml    (widgets/notification.xml)
     content/global/bindings/numberbox.xml       (widgets/numberbox.xml)
     content/global/bindings/popup.xml           (widgets/popup.xml)
- *+ content/global/bindings/preferences.xml     (widgets/preferences.xml)
-+*+ content/global/bindings/preferences-kde.xml (widgets/preferences-kde.xml)
+ *  content/global/bindings/preferences.xml     (widgets/preferences.xml)
++*  content/global/bindings/preferences-kde.xml (widgets/preferences-kde.xml)
 +% override chrome://global/content/bindings/preferences.xml chrome://global/content/bindings/preferences-kde.xml desktop=kde
     content/global/bindings/progressmeter.xml   (widgets/progressmeter.xml)
     content/global/bindings/radio.xml           (widgets/radio.xml)
@@ -316,7 +314,7 @@
 new file mode 100644
 --- /dev/null
 +++ b/toolkit/content/widgets/dialog-kde.xml
-@@ -0,0 +1,460 @@
+@@ -0,0 +1,463 @@
 +<?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
@@ -350,7 +348,7 @@
 +        <xul:button dlgtype="accept" class="dialog-button" xbl:inherits="disabled=buttondisabledaccept"/>
 +#elif XP_UNIX
 +                >
-+	<xul:button dlgtype="help" class="dialog-button" hidden="true"/>
++        <xul:button dlgtype="help" class="dialog-button" hidden="true"/>
 +	<xul:button dlgtype="extra2" class="dialog-button" hidden="true"/>
 +	<xul:spacer anonid="spacer" flex="1"/>
 +	<xul:button dlgtype="accept" class="dialog-button" xbl:inherits="disabled=buttondisabledaccept"/>
@@ -491,6 +489,9 @@
 +        <parameter name="aEvent"/>
 +        <body>
 +        <![CDATA[
++          let { AppConstants } =
++              Components.utils.import("resource://gre/modules/AppConstants.jsm", {});
++
 +          function focusInit() {
 +            const dialog = document.documentElement;
 +            const defaultButton = dialog.getButton(dialog.defaultButton);
@@ -516,11 +517,10 @@
 +                    initialFocusedElt.focus();
 +                  }
 +                }
-+#ifndef XP_MACOSX
-+                else if (focusedElt.hasAttribute("dlgtype") && focusedElt != defaultButton) {
++                else if (AppConstants.platform != "macosx" &&
++                         focusedElt.hasAttribute("dlgtype") && focusedElt != defaultButton) {
 +                  defaultButton.focus();
 +                }
-+#endif
 +              }
 +            }
 +
@@ -637,13 +637,14 @@
 +            for (dlgtype in buttons) 
 +              buttons[dlgtype].hidden = !shown[dlgtype];
 +
-+#ifdef XP_WIN
-+#           show the spacer on Windows only when the extra2 button is present
-+            var spacer = document.getAnonymousElementByAttribute(this, "anonid", "spacer");
-+            spacer.removeAttribute("hidden");
-+            spacer.setAttribute("flex", shown["extra2"]?"1":"0");
-+#endif
-+
++            let { AppConstants } =
++                Components.utils.import("resource://gre/modules/AppConstants.jsm", {});
++            // show the spacer on Windows only when the extra2 button is present
++            if (AppConstants.platform == "win") {
++              var spacer = document.getAnonymousElementByAttribute(this, "anonid", "spacer");
++              spacer.removeAttribute("hidden");
++              spacer.setAttribute("flex", shown["extra2"]?"1":"0");
++            }
 +          }
 +        ]]>
 +        </body>
@@ -781,7 +782,7 @@
 new file mode 100644
 --- /dev/null
 +++ b/toolkit/content/widgets/preferences-kde.xml
-@@ -0,0 +1,1403 @@
+@@ -0,0 +1,1406 @@
 +<?xml version="1.0"?>
 +
 +<!DOCTYPE bindings [
@@ -1415,19 +1416,22 @@
 +            var acceptButton = docElt.getButton("accept");
 +            acceptButton.hidden = true;
 +            var cancelButton  = docElt.getButton("cancel");
-+#ifdef XP_MACOSX
-+            // no buttons on Mac except Help
-+            cancelButton.hidden = true;
-+            // Move Help button to the end
-+            document.getAnonymousElementByAttribute(this, "anonid", "spacer").hidden = true;         
-+            // Also, don't fire onDialogAccept on enter
-+            acceptButton.disabled = true;
-+#else
-+            // morph the Cancel button into the Close button
-+            cancelButton.setAttribute ("icon", "close");
-+            cancelButton.label = docElt.getAttribute("closebuttonlabel");
-+            cancelButton.accesskey = docElt.getAttribute("closebuttonaccesskey");
-+#endif
++
++            let { AppConstants } =
++                Components.utils.import("resource://gre/modules/AppConstants.jsm", {});
++            if (AppConstants.platform == "macosx") {
++              // no buttons on Mac except Help
++              cancelButton.hidden = true;
++              // Move Help button to the end
++              document.getAnonymousElementByAttribute(this, "anonid", "spacer").hidden = true;         
++              // Also, don't fire onDialogAccept on enter
++              acceptButton.disabled = true;
++            } else {
++              // morph the Cancel button into the Close button
++              cancelButton.setAttribute ("icon", "close");
++              cancelButton.label = docElt.getAttribute("closebuttonlabel");
++              cancelButton.accesskey = docElt.getAttribute("closebuttonaccesskey");
++            }
 +          }
 +        }
 +        this.setAttribute("animated", this._shouldAnimate ? "true" : "false");
@@ -1597,11 +1601,13 @@
 +        <parameter name="aPaneElement"/>
 +        <body>
 +        <![CDATA[
-+#ifdef XP_MACOSX
-+          var paneTitle = aPaneElement.label;
-+          if (paneTitle != "")
-+            document.title = paneTitle;
-+#endif
++          let { AppConstants } =
++              Components.utils.import("resource://gre/modules/AppConstants.jsm", {});
++          if (AppConstants.platform == "macosx") {
++            var paneTitle = aPaneElement.label;
++            if (paneTitle != "")
++              document.title = paneTitle;
++          }
 +          var helpButton = document.documentElement.getButton("help");
 +          if (aPaneElement.helpTopic)
 +            helpButton.hidden = false;
@@ -1671,13 +1677,11 @@
 +      <property name="_shouldAnimate">
 +        <getter>
 +        <![CDATA[
++          let { AppConstants } =
++              Components.utils.import("resource://gre/modules/AppConstants.jsm", {});
 +          var psvc = Components.classes["@mozilla.org/preferences-service;1"]
 +                               .getService(Components.interfaces.nsIPrefBranch);
-+#ifdef XP_MACOSX
-+          var animate = true;
-+#else
-+          var animate = false;
-+#endif
++          var animate = AppConstants.platform == "macosx";
 +          try {
 +            animate = psvc.getBoolPref("browser.preferences.animateFadeIn");
 +          }
@@ -3683,7 +3687,7 @@
 diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
 --- a/xpcom/io/nsLocalFileUnix.cpp
 +++ b/xpcom/io/nsLocalFileUnix.cpp
-@@ -47,16 +47,17 @@
+@@ -44,16 +44,17 @@
  #include "prproces.h"
  #include "nsIDirectoryEnumerator.h"
  #include "nsISimpleEnumerator.h"
@@ -3701,7 +3705,7 @@
  #include "prmem.h"
  #include "plbase64.h"
  
-@@ -1963,42 +1964,52 @@ nsLocalFile::SetPersistentDescriptor(con
+@@ -1948,42 +1949,52 @@ nsLocalFile::SetPersistentDescriptor(con
    return InitWithNativePath(aPersistentDescriptor);
  #endif
  }
@@ -3760,7 +3764,7 @@
      return rv;
    }
    return NS_ERROR_FAILURE;
-@@ -2006,16 +2017,22 @@ nsLocalFile::Reveal()
+@@ -1991,16 +2002,22 @@ nsLocalFile::Reveal()
    return NS_ERROR_FAILURE;
  #endif
  }
--- a/mozilla-repo.patch	Sun Apr 24 08:20:10 2016 +0200
+++ b/mozilla-repo.patch	Thu Apr 28 17:08:03 2016 +0200
@@ -1,6 +1,6 @@
 # HG changeset patch
 # Parent 80b6464bd883864fce57e8748010869af1be69e9
-# Parent  4799226b419aaf1fcdbbf44c2edb9491d99eb6cb
+# Parent  808d61f33afa6fb9921d3a7f994a71cf2dd9331a
 
 diff --git a/toolkit/mozapps/installer/package-name.mk b/toolkit/mozapps/installer/package-name.mk
 --- a/toolkit/mozapps/installer/package-name.mk
@@ -28,7 +28,7 @@
  
  MOZ_SOURCESTAMP_FILE = $(DIST)/$(PKG_PATH)/$(MOZ_INFO_BASENAME).txt
  MOZ_BUILDINFO_FILE = $(DIST)/$(PKG_PATH)/$(MOZ_INFO_BASENAME).json
+ MOZ_BUILDID_INFO_TXT_FILE = $(DIST)/$(PKG_PATH)/$(MOZ_INFO_BASENAME)_info.txt
  MOZ_MOZINFO_FILE = $(DIST)/$(PKG_PATH)/$(MOZ_INFO_BASENAME).mozinfo.json
  MOZ_TEST_PACKAGES_FILE = $(DIST)/$(PKG_PATH)/test_packages.json
  MOZ_TEST_PACKAGES_FILE_TC = $(DIST)/$(PKG_PATH)/test_packages_tc.json
- 
--- a/series	Sun Apr 24 08:20:10 2016 +0200
+++ b/series	Thu Apr 28 17:08:03 2016 +0200
@@ -9,11 +9,11 @@
 mozilla-repo.patch
 mozilla-idldir.patch
 mozilla-openaes-decl.patch
-#mozilla-bmo1005535.patch
 mozilla-no-stdcxx-check.patch
 mozilla-libproxy.patch
 mozilla-reduce-files-per-UnifiedBindings.patch
-mozilla-gtk3_20.patch
+mozilla-check_return.patch
+#mozilla-gtk3_20.patch
 
 # Firefox patches
 firefox-kde.patch