summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO38
-rw-r--r--0001-Bug-1360278-Add-preference-to-trigger-context-menu-o.patch203
-rw-r--r--PKGBUILD48
-rw-r--r--be1ce4548b2e.diff49
-rw-r--r--rhbz-966424.patch23
-rw-r--r--unity-menubar.patch391
-rw-r--r--wifi-disentangle.patch245
-rw-r--r--wifi-fix-interface.patch26
8 files changed, 378 insertions, 645 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7e4252662d01..e7686740e904 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
# Generated by mksrcinfo v8
-# Thu Jan 11 23:59:54 UTC 2018
+# Thu Jan 25 05:03:14 UTC 2018
pkgbase = firefox-kde-opensuse
pkgdesc = Standalone web browser from mozilla.org with OpenSUSE patch, integrate better with KDE
- pkgver = 57.0.4
+ pkgver = 58.0
pkgrel = 1
url = https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox
arch = i686
@@ -46,34 +46,29 @@ pkgbase = firefox-kde-opensuse
depends = gtk3
optdepends = networkmanager: Location detection via available WiFi networks
optdepends = speech-dispatcher: Text-to-Speech
- provides = firefox=57.0.4
+ provides = firefox=58.0
conflicts = firefox
options = !emptydirs
options = strip
- source = hg+https://hg.mozilla.org/mozilla-unified#tag=FIREFOX_57_0_4_RELEASE
+ source = hg+https://hg.mozilla.org/mozilla-unified#tag=FIREFOX_58_0_RELEASE
source = mozconfig
source = firefox.desktop
source = firefox-install-dir.patch
source = vendor.js
source = kde.js
source = firefox-fixed-loading-icon.png
- source = firefox-branded-icons-963651ec972e.patch::http://www.rosenauer.org/hg/mozilla/raw-file/963651ec972e/firefox-branded-icons.patch
- source = firefox-kde-963651ec972e.patch::http://www.rosenauer.org/hg/mozilla/raw-file/963651ec972e/firefox-kde.patch
- source = firefox-no-default-ualocale-963651ec972e.patch::http://www.rosenauer.org/hg/mozilla/raw-file/963651ec972e/firefox-no-default-ualocale.patch
- source = mozilla-kde-963651ec972e.patch::http://www.rosenauer.org/hg/mozilla/raw-file/963651ec972e/mozilla-kde.patch
- source = mozilla-nongnome-proxies-963651ec972e.patch::http://www.rosenauer.org/hg/mozilla/raw-file/963651ec972e/mozilla-nongnome-proxies.patch
- source = mozilla-bindgen-systemlibs-963651ec972e.patch::http://www.rosenauer.org/hg/mozilla/raw-file/963651ec972e/mozilla-bindgen-systemlibs.patch
+ source = firefox-branded-icons-d14085eee2b2.patch::http://www.rosenauer.org/hg/mozilla/raw-file/d14085eee2b2/firefox-branded-icons.patch
+ source = firefox-kde-d14085eee2b2.patch::http://www.rosenauer.org/hg/mozilla/raw-file/d14085eee2b2/firefox-kde.patch
+ source = firefox-no-default-ualocale-d14085eee2b2.patch::http://www.rosenauer.org/hg/mozilla/raw-file/d14085eee2b2/firefox-no-default-ualocale.patch
+ source = mozilla-kde-d14085eee2b2.patch::http://www.rosenauer.org/hg/mozilla/raw-file/d14085eee2b2/mozilla-kde.patch
+ source = mozilla-nongnome-proxies-d14085eee2b2.patch::http://www.rosenauer.org/hg/mozilla/raw-file/d14085eee2b2/mozilla-nongnome-proxies.patch
source = unity-menubar.patch
source = add_missing_pgo_rule.patch
source = pgo_fix_missing_kdejs.patch
source = fix_pgo_bug1389436_explicitly_instantiate_gfxFont.patch
- source = wifi-disentangle.patch
- source = wifi-fix-interface.patch
source = firefox-install-dir.patch
source = no-crmf.diff
- source = 0001-Bug-1360278-Add-preference-to-trigger-context-menu-o.patch
- source = 0002-Bug-1419426-Implement-browserSettings.contextMenuSho.patch
- source = no-plt.diff
+ source = be1ce4548b2e.diff
md5sums = SKIP
md5sums = 6e7ef23754f23c32adaf686a760d369a
md5sums = 14e0f6237a79b85e60256f4808163160
@@ -82,22 +77,17 @@ pkgbase = firefox-kde-opensuse
md5sums = 05bb69d25fb3572c618e3adf1ee7b670
md5sums = 6e335a517c68488941340ee1c23f97b0
md5sums = af659b0f4f5b904480bf97843fa3502b
- md5sums = fb5bb43056a4f509a8aa844c2a9d4e95
+ md5sums = fa564c666987df18683c1cb53a3834a9
md5sums = 82f7f100d4b01677ed748679565d8b1a
- md5sums = 8eae53a34fdd6e1664ff08173fec465e
+ md5sums = 1975dde6770233eb17a16beea317d947
md5sums = 0661e259fe57df87fca791f4aeb78da0
- md5sums = 51c36935c00f62efd493a9d37742a5a2
- md5sums = c7e2592c49f5846857e7a84e0788099d
+ md5sums = 38b6df4dbce5df03e46eefe41202d74b
md5sums = fe24f5ea463013bb7f1c12d12dce41b2
md5sums = 3fa8bd22d97248de529780f5797178af
md5sums = b358b5ed3726ecd4ed054bdc09901982
- md5sums = c6ebac35e9e9c3b031f2cf9ee3e6ed96
- md5sums = a819433292665a6f06a223a0a718e67a
md5sums = dbf14588e85812ee769bd735823a0146
md5sums = 196edf030efc516e3de5ae3aa01e9851
- md5sums = 408d5191d5083ca852d90a1bb858b158
- md5sums = 099fe738095e4da2df8fb662f17d4aa3
- md5sums = cf3409120d3f05190e5197f48c2b2343
+ md5sums = 480a3e3899c9ba9ec4b699d45cfe36fa
pkgname = firefox-kde-opensuse
diff --git a/0001-Bug-1360278-Add-preference-to-trigger-context-menu-o.patch b/0001-Bug-1360278-Add-preference-to-trigger-context-menu-o.patch
deleted file mode 100644
index 4316680bf92b..000000000000
--- a/0001-Bug-1360278-Add-preference-to-trigger-context-menu-o.patch
+++ /dev/null
@@ -1,203 +0,0 @@
-From 05ec1aa0d5e8806dd0c5c6d08c82846a1389b599 Mon Sep 17 00:00:00 2001
-Message-Id: <05ec1aa0d5e8806dd0c5c6d08c82846a1389b599.1512038840.git.jan.steffens@gmail.com>
-From: Robin Grenet <robin.grenet@wanadoo.fr>
-Date: Thu, 16 Nov 2017 13:35:58 +0100
-Subject: [PATCH 1/2] Bug 1360278 - Add preference to trigger context menu on
- mouse up for GTK+ and macOS, r=mstange,smaug
-
-MozReview-Commit-ID: Bg60bD8jIg6
-
---HG--
-extra : rebase_source : cc8bd5796096f49ad4fdab81885a426afd6117e4
----
- modules/libpref/init/all.js | 4 ++++
- widget/cocoa/nsChildView.mm | 23 +++++++++++++++++++++--
- widget/gtk/nsWindow.cpp | 27 ++++++++++++++++++++-------
- widget/gtk/nsWindow.h | 2 ++
- widget/nsBaseWidget.cpp | 16 ++++++++++++++++
- widget/nsBaseWidget.h | 6 ++++++
- 6 files changed, 69 insertions(+), 9 deletions(-)
-
-diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
-index 9febead1d363d792..7a6e6a20f3cc3fd6 100644
---- a/modules/libpref/init/all.js
-+++ b/modules/libpref/init/all.js
-@@ -231,6 +231,10 @@ pref("browser.sessionhistory.max_total_viewers", -1);
-
- pref("ui.use_native_colors", true);
- pref("ui.click_hold_context_menus", false);
-+
-+// Pop up context menu on mouseup instead of mousedown, if that's the OS default.
-+// Note: ignored on Windows (context menus always use mouseup)
-+pref("ui.context_menus.after_mouseup", false);
- // Duration of timeout of incremental search in menus (ms). 0 means infinite.
- pref("ui.menu.incremental_search.timeout", 1000);
- // If true, all popups won't hide automatically on blur
-diff --git a/widget/cocoa/nsChildView.mm b/widget/cocoa/nsChildView.mm
-index 25b4c1ba7a2d1207..2affd1ef386cbfd0 100644
---- a/widget/cocoa/nsChildView.mm
-+++ b/widget/cocoa/nsChildView.mm
-@@ -4719,30 +4719,49 @@ NSEvent* gLastDragMouseDownEvent = nil;
- if (!mGeckoChild)
- return;
-
-- // Let the superclass do the context menu stuff.
-- [super rightMouseDown:theEvent];
-+ if (!nsBaseWidget::ShowContextMenuAfterMouseUp()) {
-+ // Let the superclass do the context menu stuff.
-+ [super rightMouseDown:theEvent];
-+ }
-
- NS_OBJC_END_TRY_ABORT_BLOCK;
- }
-
- - (void)rightMouseUp:(NSEvent *)theEvent
- {
- NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
-
- if (!mGeckoChild)
- return;
- if (mTextInputHandler->OnHandleEvent(theEvent)) {
- return;
- }
-
- WidgetMouseEvent geckoEvent(true, eMouseUp, mGeckoChild,
- WidgetMouseEvent::eReal);
- [self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
- geckoEvent.button = WidgetMouseEvent::eRightButton;
- geckoEvent.mClickCount = [theEvent clickCount];
-
- nsAutoRetainCocoaObject kungFuDeathGrip(self);
- mGeckoChild->DispatchInputEvent(&geckoEvent);
-+ if (!mGeckoChild)
-+ return;
-+
-+ if (nsBaseWidget::ShowContextMenuAfterMouseUp()) {
-+ // Let the superclass do the context menu stuff, but pretend it's rightMouseDown.
-+ NSEvent *dupeEvent = [NSEvent mouseEventWithType:NSRightMouseDown
-+ location:theEvent.locationInWindow
-+ modifierFlags:theEvent.modifierFlags
-+ timestamp:theEvent.timestamp
-+ windowNumber:theEvent.windowNumber
-+ context:theEvent.context
-+ eventNumber:theEvent.eventNumber
-+ clickCount:theEvent.clickCount
-+ pressure:theEvent.pressure];
-+
-+ [super rightMouseDown:dupeEvent];
-+ }
-
- NS_OBJC_END_TRY_ABORT_BLOCK;
- }
-diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
-index 37b6aae4c3d0b4e7..2b80124538c20ed6 100644
---- a/widget/gtk/nsWindow.cpp
-+++ b/widget/gtk/nsWindow.cpp
-@@ -2727,6 +2727,19 @@ static guint ButtonMaskFromGDKButton(guint button)
- return GDK_BUTTON1_MASK << (button - 1);
- }
-
-+void
-+nsWindow::DispatchContextMenuEventFromMouseEvent(uint16_t domButton,
-+ GdkEventButton *aEvent)
-+{
-+ if (domButton == WidgetMouseEvent::eRightButton && MOZ_LIKELY(!mIsDestroyed)) {
-+ WidgetMouseEvent contextMenuEvent(true, eContextMenu, this,
-+ WidgetMouseEvent::eReal);
-+ InitButtonEvent(contextMenuEvent, aEvent);
-+ contextMenuEvent.pressure = mLastMotionPressure;
-+ DispatchInputEvent(&contextMenuEvent);
-+ }
-+}
-+
- void
- nsWindow::OnButtonPressEvent(GdkEventButton *aEvent)
- {
-@@ -2796,13 +2809,8 @@ nsWindow::OnButtonPressEvent(GdkEventButton *aEvent)
- DispatchInputEvent(&event);
-
- // right menu click on linux should also pop up a context menu
-- if (domButton == WidgetMouseEvent::eRightButton &&
-- MOZ_LIKELY(!mIsDestroyed)) {
-- WidgetMouseEvent contextMenuEvent(true, eContextMenu, this,
-- WidgetMouseEvent::eReal);
-- InitButtonEvent(contextMenuEvent, aEvent);
-- contextMenuEvent.pressure = mLastMotionPressure;
-- DispatchInputEvent(&contextMenuEvent);
-+ if (!nsBaseWidget::ShowContextMenuAfterMouseUp()) {
-+ DispatchContextMenuEventFromMouseEvent(domButton, aEvent);
- }
- }
-
-@@ -2838,6 +2846,11 @@ nsWindow::OnButtonReleaseEvent(GdkEventButton *aEvent)
-
- DispatchInputEvent(&event);
- mLastMotionPressure = pressure;
-+
-+ // right menu click on linux should also pop up a context menu
-+ if (nsBaseWidget::ShowContextMenuAfterMouseUp()) {
-+ DispatchContextMenuEventFromMouseEvent(domButton, aEvent);
-+ }
- }
-
- void
-diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h
-index f7c07d57491b0b83..b969c9db4306ba6a 100644
---- a/widget/gtk/nsWindow.h
-+++ b/widget/gtk/nsWindow.h
-@@ -245,6 +245,8 @@ private:
-
- void UpdateClientOffset();
-
-+ void DispatchContextMenuEventFromMouseEvent(uint16_t domButton,
-+ GdkEventButton *aEvent);
- public:
- void ThemeChanged(void);
- void OnDPIChanged(void);
-diff --git a/widget/nsBaseWidget.cpp b/widget/nsBaseWidget.cpp
-index 996409f45db11cc7..de73fe36d27955cd 100644
---- a/widget/nsBaseWidget.cpp
-+++ b/widget/nsBaseWidget.cpp
-@@ -1222,6 +1222,22 @@ nsBaseWidget::DispatchEventToAPZOnly(mozilla::WidgetInputEvent* aEvent)
- }
- }
-
-+// static
-+bool
-+nsBaseWidget::ShowContextMenuAfterMouseUp()
-+{
-+ static bool gContextMenuAfterMouseUp = false;
-+ static bool gContextMenuAfterMouseUpCached = false;
-+ if (!gContextMenuAfterMouseUpCached) {
-+ Preferences::AddBoolVarCache(&gContextMenuAfterMouseUp,
-+ "ui.context_menus.after_mouseup",
-+ false);
-+
-+ gContextMenuAfterMouseUpCached = true;
-+ }
-+ return gContextMenuAfterMouseUp;
-+}
-+
- nsIDocument*
- nsBaseWidget::GetDocument() const
- {
-diff --git a/widget/nsBaseWidget.h b/widget/nsBaseWidget.h
-index 6d6b93ea73d64b38..cdc6aa0c87279832 100644
---- a/widget/nsBaseWidget.h
-+++ b/widget/nsBaseWidget.h
-@@ -418,6 +418,12 @@ public:
- void RecvScreenPixels(mozilla::ipc::Shmem&& aMem, const ScreenIntSize& aSize) override {};
- #endif
-
-+ /**
-+ * Whether context menus should only appear on mouseup instead of mousedown,
-+ * on OSes where they normally appear on mousedown (macOS, *nix).
-+ */
-+ static bool ShowContextMenuAfterMouseUp();
-+
- protected:
- // These are methods for CompositorWidgetWrapper, and should only be
- // accessed from that class. Derived widgets can choose which methods to
---
-2.15.1
-
diff --git a/PKGBUILD b/PKGBUILD
index f4c2fe4ca784..8e3409fdd701 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -20,7 +20,7 @@ _pgo=true
_pkgname=firefox
pkgname=$_pkgname-kde-opensuse
-pkgver=57.0.4
+pkgver=58.0
pkgrel=1
pkgdesc="Standalone web browser from mozilla.org with OpenSUSE patch, integrate better with KDE"
arch=('i686' 'x86_64')
@@ -41,7 +41,7 @@ optdepends=('networkmanager: Location detection via available WiFi networks'
'speech-dispatcher: Text-to-Speech')
provides=("firefox=${pkgver}")
conflicts=('firefox')
-_patchrev=963651ec972e
+_patchrev=d14085eee2b2
options=('!emptydirs' 'strip')
_patchurl=http://www.rosenauer.org/hg/mozilla/raw-file/$_patchrev
_repo=https://hg.mozilla.org/mozilla-unified
@@ -54,16 +54,12 @@ source=("hg+$_repo#tag=FIREFOX_${pkgver//./_}_RELEASE"
# Gecko/toolkit patchset
mozilla-kde-$_patchrev.patch::$_patchurl/mozilla-kde.patch
mozilla-nongnome-proxies-$_patchrev.patch::$_patchurl/mozilla-nongnome-proxies.patch
- mozilla-bindgen-systemlibs-$_patchrev.patch::$_patchurl/mozilla-bindgen-systemlibs.patch
unity-menubar.patch
add_missing_pgo_rule.patch
pgo_fix_missing_kdejs.patch
fix_pgo_bug1389436_explicitly_instantiate_gfxFont.patch
- wifi-disentangle.patch wifi-fix-interface.patch
firefox-install-dir.patch no-crmf.diff
- 0001-Bug-1360278-Add-preference-to-trigger-context-menu-o.patch
- 0002-Bug-1419426-Implement-browserSettings.contextMenuSho.patch
- no-plt.diff
+ be1ce4548b2e.diff
)
@@ -103,7 +99,6 @@ prepare() {
msg "Patching for KDE"
patch -Np1 -i "$srcdir/mozilla-nongnome-proxies-$_patchrev.patch"
patch -Np1 -i "$srcdir/mozilla-kde-$_patchrev.patch"
- patch -Np1 -i "$srcdir/mozilla-bindgen-systemlibs-$_patchrev.patch"
patch -Np1 -i "$srcdir/firefox-kde-$_patchrev.patch"
patch -Np1 -i "$srcdir/firefox-no-default-ualocale-$_patchrev.patch"
@@ -115,6 +110,9 @@ prepare() {
# add missing rule for pgo builds
patch -Np1 -i "$srcdir"/add_missing_pgo_rule.patch
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1431342
+ patch -Np1 -i "$srcdir"/be1ce4548b2e.diff
+
# add missing file Makefile for pgo builds
patch -Np1 -i "$srcdir"/pgo_fix_missing_kdejs.patch
@@ -122,22 +120,10 @@ prepare() {
# https://bugs.archlinux.org/task/34644
# sed -i '/ac_cpp=/s/$CPPFLAGS/& -O2/' configure
- # https://bugzilla.mozilla.org/show_bug.cgi?id=1382942
- patch -Np1 -i ../no-plt.diff
# https://bugzilla.mozilla.org/show_bug.cgi?id=1371991
patch -Np1 -i ../no-crmf.diff
- # https://bugzilla.mozilla.org/show_bug.cgi?id=1360278
- patch -Np1 -i ../0001-Bug-1360278-Add-preference-to-trigger-context-menu-o.patch
-
- # https://bugzilla.mozilla.org/show_bug.cgi?id=1419426
- patch -Np1 -i ../0002-Bug-1419426-Implement-browserSettings.contextMenuSho.patch
-
- # https://bugzilla.mozilla.org/show_bug.cgi?id=1314968
- patch -Np1 -i ../wifi-disentangle.patch
- patch -Np1 -i ../wifi-fix-interface.patch
-
# WebRTC build tries to execute "python" and expects Python 2
mkdir -p "$srcdir/path"
ln -sf /usr/bin/python2 "$srcdir/path/python"
@@ -171,11 +157,12 @@ build() {
if [[ -n $_pgo ]]; then
# Do PGO
- xvfb-run -a -s "-extension GLX -screen 0 1280x1024x24" \
- make -f client.mk build MOZ_PGO=1
+ DISPLAY=:99 MOZ_PGO=1 xvfb-run -a -s "-extension GLX -screen 0 1280x1024x24" \
+ ./mach build
else
- make -f client.mk build
+ ./mach build
fi
+ ./mach buildsymbols
}
package() {
@@ -184,7 +171,7 @@ package() {
[[ "$CARCH" == "i686" ]] && cp "$srcdir/kde.js" obj-i686-pc-linux-gnu/dist/bin/defaults/pref
[[ "$CARCH" == "x86_64" ]] && cp "$srcdir/kde.js" obj-x86_64-pc-linux-gnu/dist/bin/defaults/pref
- make -f client.mk DESTDIR="$pkgdir" INSTALL_SDK= install
+ DESTDIR="$pkgdir" ./mach install
install -Dm644 "$srcdir/vendor.js" "$pkgdir/usr/lib/firefox/browser/defaults/preferences/vendor.js"
install -Dm644 "$srcdir/kde.js" "$pkgdir/usr/lib/firefox/browser/defaults/preferences/kde.js"
@@ -239,19 +226,14 @@ md5sums=('SKIP'
'05bb69d25fb3572c618e3adf1ee7b670'
'6e335a517c68488941340ee1c23f97b0'
'af659b0f4f5b904480bf97843fa3502b'
- 'fb5bb43056a4f509a8aa844c2a9d4e95'
+ 'fa564c666987df18683c1cb53a3834a9'
'82f7f100d4b01677ed748679565d8b1a'
- '8eae53a34fdd6e1664ff08173fec465e'
+ '1975dde6770233eb17a16beea317d947'
'0661e259fe57df87fca791f4aeb78da0'
- '51c36935c00f62efd493a9d37742a5a2'
- 'c7e2592c49f5846857e7a84e0788099d'
+ '38b6df4dbce5df03e46eefe41202d74b'
'fe24f5ea463013bb7f1c12d12dce41b2'
'3fa8bd22d97248de529780f5797178af'
'b358b5ed3726ecd4ed054bdc09901982'
- 'c6ebac35e9e9c3b031f2cf9ee3e6ed96'
- 'a819433292665a6f06a223a0a718e67a'
'dbf14588e85812ee769bd735823a0146'
'196edf030efc516e3de5ae3aa01e9851'
- '408d5191d5083ca852d90a1bb858b158'
- '099fe738095e4da2df8fb662f17d4aa3'
- 'cf3409120d3f05190e5197f48c2b2343')
+ '480a3e3899c9ba9ec4b699d45cfe36fa')
diff --git a/be1ce4548b2e.diff b/be1ce4548b2e.diff
new file mode 100644
index 000000000000..df5965017141
--- /dev/null
+++ b/be1ce4548b2e.diff
@@ -0,0 +1,49 @@
+# HG changeset patch
+# User Chris Manchester <cmanchester@mozilla.com>
+# Date 1516312802 28800
+# Thu Jan 18 14:00:02 2018 -0800
+# Node ID be1ce4548b2e1fcb34e91fc7b514394de5eb9ddf
+# Parent 2c2e56a87ad10a77faf799adf4c2ec55882128dd
+Bug 1431342 - Move channel-prefs.js processing back to Makefile.in to avoid changing its content. r=rstrong
+
+MozReview-Commit-ID: A7kR8WPB4TQ
+
+diff -r 2c2e56a87ad1 -r be1ce4548b2e browser/app/Makefile.in
+--- a/browser/app/Makefile.in Fri Jan 12 18:02:14 2018 +0100
++++ b/browser/app/Makefile.in Thu Jan 18 14:00:02 2018 -0800
+@@ -53,6 +53,13 @@
+
+ endif
+
++# channel-prefs.js is handled separate from other prefs due to bug 756325
++# DO NOT change the content of channel-prefs.js without taking the appropriate
++# steps. See bug 1431342.
++libs:: $(srcdir)/profile/channel-prefs.js
++ $(NSINSTALL) -D $(DIST)/bin/defaults/pref
++ $(call py_action,preprocessor,-Fsubstitution $(PREF_PPFLAGS) $(ACDEFINES) $^ -o $(DIST)/bin/defaults/pref/channel-prefs.js)
++
+ ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
+
+ MAC_APP_NAME = $(MOZ_APP_DISPLAYNAME)
+diff -r 2c2e56a87ad1 -r be1ce4548b2e browser/app/moz.build
+--- a/browser/app/moz.build Fri Jan 12 18:02:14 2018 +0100
++++ b/browser/app/moz.build Thu Jan 18 14:00:02 2018 -0800
+@@ -43,9 +43,6 @@
+ # Neither channel-prefs.js nor firefox.exe want to end up in dist/bin/browser.
+ DIST_SUBDIR = ""
+
+-# channel-prefs.js is handled separate from other prefs due to bug 756325
+-JS_PREFERENCE_PP_FILES += ['profile/channel-prefs.js']
+-
+ LOCAL_INCLUDES += [
+ '!/build',
+ '/toolkit/xre',
+diff -r 2c2e56a87ad1 -r be1ce4548b2e browser/app/profile/channel-prefs.js
+--- a/browser/app/profile/channel-prefs.js Fri Jan 12 18:02:14 2018 +0100
++++ b/browser/app/profile/channel-prefs.js Thu Jan 18 14:00:02 2018 -0800
+@@ -2,5 +2,4 @@
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+-#filter substitution
+ pref("app.update.channel", "@MOZ_UPDATE_CHANNEL@");
diff --git a/rhbz-966424.patch b/rhbz-966424.patch
deleted file mode 100644
index c4c332e9e7ae..000000000000
--- a/rhbz-966424.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/toolkit/modules/CertUtils.jsm
-+++ b/toolkit/modules/CertUtils.jsm
-@@ -170,17 +170,19 @@ this.checkCert =
- issuerCert = issuerCert.QueryInterface(Ci.nsIX509Cert3);
- var tokenNames = issuerCert.getAllTokenNames({});
-
- if (!tokenNames || !tokenNames.some(isBuiltinToken))
- throw new Ce(certNotBuiltInErr, Cr.NS_ERROR_ABORT);
- }
-
- function isBuiltinToken(tokenName) {
-- return tokenName == "Builtin Object Token";
-+ return tokenName == "Builtin Object Token" ||
-+ tokenName == "Default Trust" ||
-+ tokenName == "System Trust";
- }
-
- /**
- * This class implements nsIBadCertListener. Its job is to prevent "bad cert"
- * security dialogs from being shown to the user. It is better to simply fail
- * if the certificate is bad. See bug 304286.
- *
- * @param aAllowNonBuiltInCerts (optional)
diff --git a/unity-menubar.patch b/unity-menubar.patch
index e4e7019745a5..51c3cbd8f646 100644
--- a/unity-menubar.patch
+++ b/unity-menubar.patch
@@ -1,7 +1,11 @@
diff --git a/browser/base/content/browser-menubar.inc b/browser/base/content/browser-menubar.inc
--- a/browser/base/content/browser-menubar.inc
+++ b/browser/base/content/browser-menubar.inc
-@@ -5,7 +5,11 @@
+@@ -1,16 +1,20 @@
+ # -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ # 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
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
<menubar id="main-menubar"
onpopupshowing="if (event.target.parentNode.parentNode == this &amp;&amp;
@@ -13,10 +17,20 @@ diff --git a/browser/base/content/browser-menubar.inc b/browser/base/content/bro
this.setAttribute('openedwithkey',
event.target.parentNode.openedWithKey);"
style="border:0px;padding:0px;margin:0px;-moz-appearance:none">
+ <menu id="file-menu" label="&fileMenu.label;"
+ accesskey="&fileMenu.accesskey;">
+ <menupopup id="menu_FilePopup"
+ onpopupshowing="updateUserContextUIVisibility();">
+ <menuitem id="menu_newNavigatorTab"
diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
-@@ -5401,6 +5401,8 @@ function getTogglableToolbars() {
+@@ -5373,16 +5373,18 @@ nsBrowserAccess.prototype = {
+ return CanCloseWindow();
+ },
+ };
+
+ function getTogglableToolbars() {
let toolbarNodes = Array.slice(gNavToolbox.childNodes);
toolbarNodes = toolbarNodes.concat(gNavToolbox.externalToolbars);
toolbarNodes = toolbarNodes.filter(node => node.getAttribute("toolbarname"));
@@ -25,10 +39,20 @@ diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
return toolbarNodes;
}
+ function onViewToolbarsPopupShowing(aEvent, aInsertPoint) {
+ var popup = aEvent.target;
+ if (popup != aEvent.currentTarget)
+ return;
+
diff --git a/browser/components/places/content/places.xul b/browser/components/places/content/places.xul
--- a/browser/components/places/content/places.xul
+++ b/browser/components/places/content/places.xul
-@@ -155,7 +155,7 @@
+@@ -153,17 +153,17 @@
+ command="OrganizerCommand:Forward"
+ tooltiptext="&forwardButton.tooltip;"
+ disabled="true"/>
+
+ #ifdef XP_MACOSX
<toolbarbutton type="menu" class="tabbable"
onpopupshowing="document.getElementById('placeContent').focus()"
#else
@@ -37,10 +61,20 @@ diff --git a/browser/components/places/content/places.xul b/browser/components/p
<menu accesskey="&organize.accesskey;" class="menu-iconic"
#endif
id="organizeButton" label="&organize.label;"
+ tooltiptext="&organize.tooltip;">
+ <menupopup id="organizeButtonPopup">
+ <menuitem id="newbookmark"
+ command="placesCmd_new:bookmark"
+ label="&cmd.new_bookmark.label;"
diff --git a/layout/build/moz.build b/layout/build/moz.build
--- a/layout/build/moz.build
+++ b/layout/build/moz.build
-@@ -74,6 +74,10 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'an
+@@ -69,16 +69,20 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'co
+ LOCAL_INCLUDES += [
+ '/dom/system/mac',
+ ]
+ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
+ LOCAL_INCLUDES += [
'/dom/system',
'/dom/system/android',
]
@@ -51,12 +85,22 @@ diff --git a/layout/build/moz.build b/layout/build/moz.build
if CONFIG['MOZ_WEBSPEECH']:
LOCAL_INCLUDES += [
+ '/dom/media/webspeech/recognition',
+ '/dom/media/webspeech/synth',
+ ]
+
+ if CONFIG['MOZ_SECUREELEMENT']:
diff --git a/layout/build/nsLayoutStatics.cpp b/layout/build/nsLayoutStatics.cpp
--- a/layout/build/nsLayoutStatics.cpp
+++ b/layout/build/nsLayoutStatics.cpp
-@@ -126,6 +126,10 @@
+@@ -121,16 +121,20 @@
+ #include "mozilla/ServoBindings.h"
+ #include "mozilla/StaticPresData.h"
+ #include "mozilla/StylePrefs.h"
+ #include "mozilla/dom/WebIDLGlobalNameHash.h"
#include "mozilla/dom/ipc/IPCBlobInputStreamStorage.h"
#include "mozilla/dom/U2FTokenManager.h"
+ #include "mozilla/dom/PointerEventHandler.h"
+#ifdef MOZ_WIDGET_GTK
+#include "nsNativeMenuAtoms.h"
@@ -65,8 +109,18 @@ diff --git a/layout/build/nsLayoutStatics.cpp b/layout/build/nsLayoutStatics.cpp
using namespace mozilla;
using namespace mozilla::net;
using namespace mozilla::dom;
-@@ -158,6 +162,9 @@ nsLayoutStatics::Initialize()
- nsTextServicesDocument::RegisterAtoms();
+ using namespace mozilla::dom::ipc;
+
+ nsrefcnt nsLayoutStatics::sLayoutStaticRefcnt = 0;
+
+ nsresult
+@@ -152,16 +156,19 @@ nsLayoutStatics::Initialize()
+ nsCSSPseudoClasses::AddRefAtoms();
+ nsCSSPseudoElements::AddRefAtoms();
+ nsCSSKeywords::AddRefTable();
+ nsCSSProps::AddRefTable();
+ nsColorNames::AddRefTable();
+ nsGkAtoms::AddRefAtoms();
nsHTMLTags::RegisterAtoms();
nsRDFAtoms::RegisterAtoms();
+#ifdef MOZ_WIDGET_GTK
@@ -75,10 +129,20 @@ diff --git a/layout/build/nsLayoutStatics.cpp b/layout/build/nsLayoutStatics.cpp
NS_SealStaticAtomTable();
+ StartupJSEnvironment();
+ rv = nsRegion::InitStatic();
+ if (NS_FAILED(rv)) {
+ NS_ERROR("Could not initialize nsRegion");
+ return rv;
diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
-@@ -242,6 +242,9 @@ pref("dom.script_loader.bytecode_cache.s
+@@ -228,16 +228,19 @@ pref("dom.script_loader.bytecode_cache.e
+ // look at: ScriptLoader::ShouldCacheBytecode function.
+ pref("dom.script_loader.bytecode_cache.strategy", 0);
+
+ // Fastback caching - if this pref is negative, then we calculate the number
+ // of content viewers to cache based on the amount of available memory.
pref("browser.sessionhistory.max_total_viewers", -1);
pref("ui.use_native_colors", true);
@@ -86,12 +150,22 @@ diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
+pref("ui.use_unity_menubar", true);
+#endif
pref("ui.click_hold_context_menus", false);
+
+ // Pop up context menu on mouseup instead of mousedown, if that's the OS default.
+ // Note: ignored on Windows (context menus always use mouseup)
+ pref("ui.context_menus.after_mouseup", false);
// Duration of timeout of incremental search in menus (ms). 0 means infinite.
pref("ui.menu.incremental_search.timeout", 1000);
+ // If true, all popups won't hide automatically on blur
diff --git a/toolkit/content/widgets/popup.xml b/toolkit/content/widgets/popup.xml
--- a/toolkit/content/widgets/popup.xml
+++ b/toolkit/content/widgets/popup.xml
-@@ -27,8 +27,14 @@
+@@ -22,18 +22,24 @@
+ <property name="position" onget="return this.getAttribute('position');"
+ onset="this.setAttribute('position', val); return val;"/>
+ <property name="popupBoxObject">
+ <getter>
+ return this.boxObject;
</getter>
</property>
@@ -108,10 +182,20 @@ diff --git a/toolkit/content/widgets/popup.xml b/toolkit/content/widgets/popup.x
<property name="triggerNode" readonly="true"
onget="return this.popupBoxObject.triggerNode"/>
+
+ <property name="anchorNode" readonly="true"
+ onget="return this.popupBoxObject.anchorNode"/>
+
+ <method name="openPopup">
diff --git a/toolkit/content/xul.css b/toolkit/content/xul.css
--- a/toolkit/content/xul.css
+++ b/toolkit/content/xul.css
-@@ -319,6 +319,18 @@ toolbar[type="menubar"][autohide="true"]
+@@ -309,16 +309,28 @@ toolbar[type="menubar"][autohide="true"]
+ toolbar[type="menubar"][autohide="true"][inactive="true"]:not([customizing="true"]) {
+ min-height: 0 !important;
+ height: 0 !important;
+ -moz-appearance: none !important;
+ border-style: none !important;
}
%endif
@@ -130,10 +214,15 @@ diff --git a/toolkit/content/xul.css b/toolkit/content/xul.css
toolbarseparator {
-moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbardecoration");
}
+
+ toolbarspacer {
+ -moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbardecoration");
+ }
+
diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build
--- a/widget/gtk/moz.build
+++ b/widget/gtk/moz.build
-@@ -33,10 +33,18 @@ UNIFIED_SOURCES += [
+@@ -33,10 +33,18 @@
'nsAppShell.cpp',
'nsBidiKeyboard.cpp',
'nsColorPicker.cpp',
@@ -152,7 +241,7 @@ diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build
'nsNativeThemeGTK.cpp',
'nsSound.cpp',
'nsToolkit.cpp',
-@@ -48,6 +56,8 @@ UNIFIED_SOURCES += [
+@@ -48,6 +56,8 @@
]
SOURCES += [
@@ -161,14 +250,15 @@ diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build
'nsWindow.cpp', # conflicts with X11 headers
]
-@@ -112,6 +122,7 @@ FINAL_LIBRARY = 'xul'
+@@ -112,6 +122,7 @@
LOCAL_INCLUDES += [
'/layout/generic',
+ '/layout/style',
'/layout/xul',
'/other-licenses/atk-1.0',
- '/widget',
+ '/toolkit/xre',
+
diff --git a/widget/gtk/nsDbusmenu.cpp b/widget/gtk/nsDbusmenu.cpp
new file mode 100644
--- /dev/null
@@ -347,7 +437,7 @@ diff --git a/widget/gtk/nsMenu.cpp b/widget/gtk/nsMenu.cpp
new file mode 100644
--- /dev/null
+++ b/widget/gtk/nsMenu.cpp
-@@ -0,0 +1,858 @@
+@@ -0,0 +1,852 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* vim:expandtab:shiftwidth=4:tabstop=4:
+ */
@@ -365,8 +455,8 @@ new file mode 100644
+#include "mozilla/MouseEvents.h"
+#include "mozilla/Move.h"
+#include "mozilla/ServoStyleContext.h"
-+#include "mozilla/ServoStyleSet.h"
+#include "mozilla/ServoTypes.h"
++#include "mozilla/StyleSetHandle.h"
+#include "mozilla/StyleSetHandleInlines.h"
+#include "nsAutoPtr.h"
+#include "nsBindingManager.h"
@@ -375,7 +465,7 @@ new file mode 100644
+#include "nsCSSValue.h"
+#include "nsGkAtoms.h"
+#include "nsGtkUtils.h"
-+#include "nsIAtom.h"
++#include "nsAtom.h"
+#include "nsIContent.h"
+#include "nsIDocument.h"
+#include "nsIPresShell.h"
@@ -384,7 +474,6 @@ new file mode 100644
+#include "nsString.h"
+#include "nsStyleContext.h"
+#include "nsStyleContextInlines.h"
-+#include "nsStyleSet.h"
+#include "nsStyleStruct.h"
+#include "nsThreadUtils.h"
+#include "nsXBLBinding.h"
@@ -481,15 +570,10 @@ new file mode 100644
+ return;
+ }
+
-+ RefPtr<nsStyleContext> sc;
-+ if (shell->StyleSet()->IsGecko()) {
-+ sc = shell->StyleSet()->AsGecko()->ResolveStyleFor(aContent->AsElement(),
-+ nullptr);
-+ } else {
-+ sc = shell->StyleSet()->AsServo()->ResolveStyleFor(aContent->AsElement(),
-+ nullptr,
-+ LazyComputeBehavior::Allow);
-+ }
++ RefPtr<nsStyleContext> sc =
++ shell->StyleSet()->ResolveStyleFor(aContent->AsElement(),
++ nullptr,
++ LazyComputeBehavior::Allow);
+
+ if (!sc) {
+ return;
@@ -705,7 +789,7 @@ new file mode 100644
+ nsIContent *child = ContentNode()->GetChildAt(i);
+
+ int32_t dummy;
-+ nsCOMPtr<nsIAtom> tag = child->OwnerDoc()->BindingManager()->ResolveTag(child, &dummy);
++ nsAtom* tag = child->OwnerDoc()->BindingManager()->ResolveTag(child, &dummy);
+ if (tag == nsGkAtoms::menupopup) {
+ mPopupContent = child;
+ break;
@@ -885,7 +969,7 @@ new file mode 100644
+}
+
+void
-+nsMenu::OnAttributeChanged(nsIContent *aContent, nsIAtom *aAttribute)
++nsMenu::OnAttributeChanged(nsIContent *aContent, nsAtom *aAttribute)
+{
+ MOZ_ASSERT(aContent == ContentNode() || aContent == mPopupContent,
+ "Received an event that wasn't meant for us!");
@@ -1231,7 +1315,7 @@ new file mode 100644
+
+#include <glib.h>
+
-+class nsIAtom;
++class nsAtom;
+class nsIContent;
+class nsITimer;
+class nsStyleContext;
@@ -1307,7 +1391,7 @@ new file mode 100644
+ void Update(nsStyleContext *aStyleContext) override;
+ nsMenuObject::PropertyFlags SupportedProperties() const override;
+
-+ void OnAttributeChanged(nsIContent *aContent, nsIAtom *aAttribute) override;
++ void OnAttributeChanged(nsIContent *aContent, nsAtom *aAttribute) override;
+ void OnContentInserted(nsIContent *aContainer, nsIContent *aChild,
+ nsIContent *aPrevSibling) override;
+ void OnContentRemoved(nsIContent *aContainer, nsIContent *aChild) override;
@@ -1920,7 +2004,7 @@ diff --git a/widget/gtk/nsMenuBar.h b/widget/gtk/nsMenuBar.h
new file mode 100644
--- /dev/null
+++ b/widget/gtk/nsMenuBar.h
-@@ -0,0 +1,107 @@
+@@ -0,0 +1,106 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* vim:expandtab:shiftwidth=4:tabstop=4:
+ */
@@ -1942,7 +2026,6 @@ new file mode 100644
+
+#include <gtk/gtk.h>
+
-+class nsIAtom;
+class nsIContent;
+class nsIDOMEvent;
+class nsIDOMKeyEvent;
@@ -2032,7 +2115,7 @@ diff --git a/widget/gtk/nsMenuContainer.cpp b/widget/gtk/nsMenuContainer.cpp
new file mode 100644
--- /dev/null
+++ b/widget/gtk/nsMenuContainer.cpp
-@@ -0,0 +1,172 @@
+@@ -0,0 +1,171 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* vim:expandtab:shiftwidth=4:tabstop=4:
+ */
@@ -2043,7 +2126,6 @@ new file mode 100644
+#include "mozilla/DebugOnly.h"
+#include "mozilla/Move.h"
+#include "nsGkAtoms.h"
-+#include "nsIAtom.h"
+#include "nsIContent.h"
+
+#include "nsDbusmenu.h"
@@ -2667,7 +2749,7 @@ new file mode 100644
+}
+
+void
-+nsMenuItem::CopyAttrFromNodeIfExists(nsIContent *aContent, nsIAtom *aAttribute)
++nsMenuItem::CopyAttrFromNodeIfExists(nsIContent *aContent, nsAtom *aAttribute)
+{
+ nsAutoString value;
+ if (aContent->GetAttr(kNameSpaceID_None, aAttribute, value)) {
@@ -2943,7 +3025,7 @@ new file mode 100644
+}
+
+void
-+nsMenuItem::OnAttributeChanged(nsIContent *aContent, nsIAtom *aAttribute)
++nsMenuItem::OnAttributeChanged(nsIContent *aContent, nsAtom *aAttribute)
+{
+ MOZ_ASSERT(aContent == ContentNode() || aContent == mKeyContent,
+ "Received an event that wasn't meant for us!");
@@ -3045,7 +3127,7 @@ new file mode 100644
+
+#include <glib.h>
+
-+class nsIAtom;
++class nsAtom;
+class nsIContent;
+class nsStyleContext;
+class nsMenuBar;
@@ -3083,7 +3165,7 @@ new file mode 100644
+ gpointer user_data);
+ void Activate(uint32_t aTimestamp);
+
-+ void CopyAttrFromNodeIfExists(nsIContent *aContent, nsIAtom *aAtom);
++ void CopyAttrFromNodeIfExists(nsIContent *aContent, nsAtom *aAtom);
+ void UpdateState();
+ void UpdateTypeAndState();
+ void UpdateAccel();
@@ -3096,7 +3178,7 @@ new file mode 100644
+ bool IsCompatibleWithNativeData(DbusmenuMenuitem *aNativeData) const override;
+ nsMenuObject::PropertyFlags SupportedProperties() const override;
+
-+ void OnAttributeChanged(nsIContent *aContent, nsIAtom *aAttribute) override;
++ void OnAttributeChanged(nsIContent *aContent, nsAtom *aAttribute) override;
+
+ EMenuItemType mType;
+
@@ -3356,7 +3438,7 @@ new file mode 100644
+ }
+
+ loader->LoadImage(uri, nullptr, nullptr, mozilla::net::RP_Unset,
-+ nullptr, loadGroup, this, nullptr, nullptr,
++ nullptr, 0, loadGroup, this, nullptr, nullptr,
+ nsIRequest::LOAD_NORMAL, nullptr,
+ nsIContentPolicy::TYPE_IMAGE, EmptyString(),
+ false, getter_AddRefs(mImageRequest));
@@ -3783,7 +3865,7 @@ diff --git a/widget/gtk/nsMenuObject.h b/widget/gtk/nsMenuObject.h
new file mode 100644
--- /dev/null
+++ b/widget/gtk/nsMenuObject.h
-@@ -0,0 +1,170 @@
+@@ -0,0 +1,169 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* vim:expandtab:shiftwidth=4:tabstop=4:
+ */
@@ -3800,7 +3882,6 @@ new file mode 100644
+#include "nsDbusmenu.h"
+#include "nsNativeMenuDocListener.h"
+
-+class nsIAtom;
+class nsIContent;
+class nsStyleContext;
+class nsMenuContainer;
@@ -4012,7 +4093,7 @@ new file mode 100644
+}
+
+void
-+nsMenuSeparator::OnAttributeChanged(nsIContent *aContent, nsIAtom *aAttribute)
++nsMenuSeparator::OnAttributeChanged(nsIContent *aContent, nsAtom *aAttribute)
+{
+ MOZ_ASSERT(aContent == ContentNode(), "Received an event that wasn't meant for us!");
+
@@ -4064,7 +4145,7 @@ new file mode 100644
+#include "nsMenuObject.h"
+
+class nsIContent;
-+class nsIAtom;
++class nsAtom;
+class nsMenuContainer;
+
+// Menu separator class
@@ -4082,7 +4163,7 @@ new file mode 100644
+ bool IsCompatibleWithNativeData(DbusmenuMenuitem *aNativeData) const override;
+ nsMenuObject::PropertyFlags SupportedProperties() const override;
+
-+ void OnAttributeChanged(nsIContent *aContent, nsIAtom *aAttribute) override;
++ void OnAttributeChanged(nsIContent *aContent, nsAtom *aAttribute) override;
+};
+
+#endif /* __nsMenuSeparator_h__ */
@@ -4115,37 +4196,37 @@ new file mode 100644
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
-+#include "nsIAtom.h"
++#include "nsAtom.h"
+#include "nsStaticAtom.h"
+
+#include "nsNativeMenuAtoms.h"
+
+using namespace mozilla;
+
-+#define WIDGET_ATOM(_name) nsIAtom* nsNativeMenuAtoms::_name;
-+#define WIDGET_ATOM2(_name, _value) nsIAtom* nsNativeMenuAtoms::_name;
++#define WIDGET_ATOM(name_) NS_STATIC_ATOM_DEFN(nsNativeMenuAtoms, name_)
++#define WIDGET_ATOM2(name_, value_) NS_STATIC_ATOM_DEFN(nsNativeMenuAtoms, name_)
+#include "nsNativeMenuAtomList.h"
+#undef WIDGET_ATOM
+#undef WIDGET_ATOM2
+
-+#define WIDGET_ATOM(name_) NS_STATIC_ATOM_BUFFER(name_##_buffer, #name_)
-+#define WIDGET_ATOM2(name_, value_) NS_STATIC_ATOM_BUFFER(name_##_buffer, value_)
++#define WIDGET_ATOM(name_) NS_STATIC_ATOM_BUFFER(name_, #name_)
++#define WIDGET_ATOM2(name_, value_) NS_STATIC_ATOM_BUFFER(name_, value_)
+#include "nsNativeMenuAtomList.h"
+#undef WIDGET_ATOM
+#undef WIDGET_ATOM2
+
-+static const nsStaticAtom gAtoms[] = {
-+#define WIDGET_ATOM(name_) NS_STATIC_ATOM(name_##_buffer, &nsNativeMenuAtoms::name_),
-+#define WIDGET_ATOM2(name_, value_) NS_STATIC_ATOM(name_##_buffer, &nsNativeMenuAtoms::name_),
-+#include "nsNativeMenuAtomList.h"
-+#undef WIDGET_ATOM
-+#undef WIDGET_ATOM2
++static const nsStaticAtomSetup sAtomSetup[] = {
++ #define WIDGET_ATOM(name_) NS_STATIC_ATOM_SETUP(nsNativeMenuAtoms, name_)
++ #define WIDGET_ATOM2(name_, value_) NS_STATIC_ATOM_SETUP(nsNativeMenuAtoms, name_)
++ #include "nsNativeMenuAtomList.h"
++ #undef WIDGET_ATOM
++ #undef WIDGET_ATOM2
+};
+
+/* static */ void
+nsNativeMenuAtoms::RegisterAtoms()
+{
-+ NS_RegisterStaticAtoms(gAtoms);
++ NS_RegisterStaticAtoms(sAtomSetup);
+}
diff --git a/widget/gtk/nsNativeMenuAtoms.h b/widget/gtk/nsNativeMenuAtoms.h
new file mode 100644
@@ -4162,7 +4243,7 @@ new file mode 100644
+#ifndef __nsNativeMenuAtoms_h__
+#define __nsNativeMenuAtoms_h__
+
-+class nsIAtom;
++class nsAtom;
+
+class nsNativeMenuAtoms
+{
@@ -4171,8 +4252,8 @@ new file mode 100644
+
+ static void RegisterAtoms();
+
-+#define WIDGET_ATOM(_name) static nsIAtom* _name;
-+#define WIDGET_ATOM2(_name, _value) static nsIAtom* _name;
++#define WIDGET_ATOM(name_) NS_STATIC_ATOM_DECL(name_)
++#define WIDGET_ATOM2(name_, value_) NS_STATIC_ATOM_DECL(name_)
+#include "nsNativeMenuAtomList.h"
+#undef WIDGET_ATOM
+#undef WIDGET_ATOM2
@@ -4183,7 +4264,7 @@ diff --git a/widget/gtk/nsNativeMenuDocListener.cpp b/widget/gtk/nsNativeMenuDoc
new file mode 100644
--- /dev/null
+++ b/widget/gtk/nsNativeMenuDocListener.cpp
-@@ -0,0 +1,350 @@
+@@ -0,0 +1,347 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* vim:expandtab:shiftwidth=4:tabstop=4:
+ */
@@ -4195,7 +4276,7 @@ new file mode 100644
+#include "mozilla/DebugOnly.h"
+#include "mozilla/dom/Element.h"
+#include "nsContentUtils.h"
-+#include "nsIAtom.h"
++#include "nsAtom.h"
+#include "nsIContent.h"
+#include "nsIDocument.h"
+
@@ -4257,7 +4338,7 @@ new file mode 100644
+nsNativeMenuDocListener::AttributeChanged(nsIDocument *aDocument,
+ mozilla::dom::Element *aElement,
+ int32_t aNameSpaceID,
-+ nsIAtom *aAttribute,
++ nsAtom *aAttribute,
+ int32_t aModType,
+ const nsAttrValue* aOldValue)
+{
@@ -4277,19 +4358,17 @@ new file mode 100644
+void
+nsNativeMenuDocListener::ContentAppended(nsIDocument *aDocument,
+ nsIContent *aContainer,
-+ nsIContent *aFirstNewContent,
-+ int32_t aNewIndexInContainer)
++ nsIContent *aFirstNewContent)
+{
+ for (nsIContent *c = aFirstNewContent; c; c = c->GetNextSibling()) {
-+ ContentInserted(aDocument, aContainer, c, 0);
++ ContentInserted(aDocument, aContainer, c);
+ }
+}
+
+void
+nsNativeMenuDocListener::ContentInserted(nsIDocument *aDocument,
+ nsIContent *aContainer,
-+ nsIContent *aChild,
-+ int32_t aIndexInContainer)
++ nsIContent *aChild)
+{
+ nsIContent *prevSibling = nsMenuContainer::GetPreviousSupportedSibling(aChild);
+
@@ -4311,7 +4390,6 @@ new file mode 100644
+nsNativeMenuDocListener::ContentRemoved(nsIDocument *aDocument,
+ nsIContent *aContainer,
+ nsIContent *aChild,
-+ int32_t aIndexInContainer,
+ nsIContent *aPreviousSibling)
+{
+ if (sUpdateBlockersCount == 0) {
@@ -4335,7 +4413,7 @@ new file mode 100644
+
+void
+nsNativeMenuDocListener::DoAttributeChanged(nsIContent *aContent,
-+ nsIAtom *aAttribute)
++ nsAtom *aAttribute)
+{
+ DispatchHelper h(this, aContent);
+ if (h.HasObserver()) {
@@ -4557,7 +4635,7 @@ new file mode 100644
+#include "nsStubMutationObserver.h"
+#include "nsTArray.h"
+
-+class nsIAtom;
++class nsAtom;
+class nsIContent;
+class nsIDocument;
+class nsNativeMenuChangeObserver;
@@ -4628,7 +4706,7 @@ new file mode 100644
+ nsCOMPtr<nsIContent> mTarget;
+ nsCOMPtr<nsIContent> mChild;
+ nsCOMPtr<nsIContent> mPrevSibling;
-+ nsCOMPtr<nsIAtom> mAttribute;
++ RefPtr<nsAtom> mAttribute;
+ };
+
+ ~nsNativeMenuDocListener();
@@ -4639,7 +4717,7 @@ new file mode 100644
+ NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED
+ NS_DECL_NSIMUTATIONOBSERVER_NODEWILLBEDESTROYED
+
-+ void DoAttributeChanged(nsIContent *aContent, nsIAtom *aAttribute);
++ void DoAttributeChanged(nsIContent *aContent, nsAtom *aAttribute);
+ void DoContentInserted(nsIContent *aContainer,
+ nsIContent *aChild,
+ nsIContent *aPrevSibling);
@@ -4673,7 +4751,7 @@ new file mode 100644
+class nsNativeMenuChangeObserver
+{
+public:
-+ virtual void OnAttributeChanged(nsIContent *aContent, nsIAtom *aAttribute) {}
++ virtual void OnAttributeChanged(nsIContent *aContent, nsAtom *aAttribute) {}
+
+ virtual void OnContentInserted(nsIContent *aContainer,
+ nsIContent *aChild,
@@ -5296,7 +5374,12 @@ new file mode 100644
diff --git a/widget/gtk/nsNativeThemeGTK.cpp b/widget/gtk/nsNativeThemeGTK.cpp
--- a/widget/gtk/nsNativeThemeGTK.cpp
+++ b/widget/gtk/nsNativeThemeGTK.cpp
-@@ -51,6 +51,7 @@
+@@ -46,16 +46,17 @@
+ # endif
+ #endif
+
+ #include <algorithm>
+ #include <dlfcn.h>
using namespace mozilla;
using namespace mozilla::gfx;
@@ -5304,19 +5387,39 @@ diff --git a/widget/gtk/nsNativeThemeGTK.cpp b/widget/gtk/nsNativeThemeGTK.cpp
NS_IMPL_ISUPPORTS_INHERITED(nsNativeThemeGTK, nsNativeTheme, nsITheme,
nsIObserver)
+
+ static int gLastGdkError;
+
+ nsNativeThemeGTK::nsNativeThemeGTK()
+ {
diff --git a/widget/gtk/nsWidgetFactory.cpp b/widget/gtk/nsWidgetFactory.cpp
--- a/widget/gtk/nsWidgetFactory.cpp
+++ b/widget/gtk/nsWidgetFactory.cpp
-@@ -48,6 +48,8 @@
+@@ -44,16 +44,18 @@
+ #include "nsImageToPixbuf.h"
+ #include "nsPrintDialogGTK.h"
+
+ #if defined(MOZ_X11)
+ #include "nsIdleServiceGTK.h"
#include "GfxInfoX11.h"
#endif
+#include "nsNativeMenuService.h"
+
#include "nsNativeThemeGTK.h"
+ #include "HeadlessThemeGTK.h"
#include "nsIComponentRegistrar.h"
-@@ -123,6 +125,9 @@ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(GfxI
+ #include "nsComponentManagerUtils.h"
+ #include "mozilla/gfx/2D.h"
+ #include "mozilla/widget/ScreenManager.h"
+ #include <gtk/gtk.h>
+@@ -117,16 +119,19 @@ nsNativeThemeGTKConstructor(nsISupports
+ namespace mozilla {
+ namespace widget {
+ // This constructor should really be shared with all platforms.
+ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(GfxInfo, Init)
+ }
}
#endif
@@ -5326,7 +5429,17 @@ diff --git a/widget/gtk/nsWidgetFactory.cpp b/widget/gtk/nsWidgetFactory.cpp
#ifdef NS_PRINTING
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceContextSpecGTK)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintOptionsGTK, Init)
-@@ -225,6 +230,7 @@ NS_DEFINE_NAMED_CID(NS_IMAGE_TO_PIXBUF_C
+ NS_GENERIC_FACTORY_CONSTRUCTOR(nsPrinterEnumeratorGTK)
+ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintSession, Init)
+ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintDialogServiceGTK, Init)
+ #endif
+
+@@ -241,16 +246,17 @@ NS_DEFINE_NAMED_CID(NS_PRINTSESSION_CID)
+ NS_DEFINE_NAMED_CID(NS_DEVICE_CONTEXT_SPEC_CID);
+ NS_DEFINE_NAMED_CID(NS_PRINTDIALOGSERVICE_CID);
+ #endif
+ NS_DEFINE_NAMED_CID(NS_IMAGE_TO_PIXBUF_CID);
+ #if defined(MOZ_X11)
NS_DEFINE_NAMED_CID(NS_IDLE_SERVICE_CID);
NS_DEFINE_NAMED_CID(NS_GFXINFO_CID);
#endif
@@ -5334,7 +5447,17 @@ diff --git a/widget/gtk/nsWidgetFactory.cpp b/widget/gtk/nsWidgetFactory.cpp
static const mozilla::Module::CIDEntry kWidgetCIDs[] = {
-@@ -260,6 +266,7 @@ static const mozilla::Module::CIDEntry k
+ { &kNS_WINDOW_CID, false, nullptr, nsWindowConstructor },
+ { &kNS_CHILD_CID, false, nullptr, nsWindowConstructor },
+ { &kNS_APPSHELL_CID, false, nullptr, nsAppShellConstructor, Module::ALLOW_IN_GPU_PROCESS },
+ { &kNS_COLORPICKER_CID, false, nullptr, nsColorPickerConstructor, Module::MAIN_PROCESS_ONLY },
+ { &kNS_FILEPICKER_CID, false, nullptr, nsFilePickerConstructor, Module::MAIN_PROCESS_ONLY },
+@@ -276,16 +282,17 @@ static const mozilla::Module::CIDEntry k
+ { &kNS_DEVICE_CONTEXT_SPEC_CID, false, nullptr, nsDeviceContextSpecGTKConstructor },
+ { &kNS_PRINTDIALOGSERVICE_CID, false, nullptr, nsPrintDialogServiceGTKConstructor },
+ #endif
+ { &kNS_IMAGE_TO_PIXBUF_CID, false, nullptr, nsImageToPixbufConstructor },
+ #if defined(MOZ_X11)
{ &kNS_IDLE_SERVICE_CID, false, nullptr, nsIdleServiceGTKConstructor },
{ &kNS_GFXINFO_CID, false, nullptr, mozilla::widget::GfxInfoConstructor },
#endif
@@ -5342,7 +5465,17 @@ diff --git a/widget/gtk/nsWidgetFactory.cpp b/widget/gtk/nsWidgetFactory.cpp
{ nullptr }
};
-@@ -297,6 +304,7 @@ static const mozilla::Module::ContractID
+ static const mozilla::Module::ContractIDEntry kWidgetContracts[] = {
+ { "@mozilla.org/widget/window/gtk;1", &kNS_WINDOW_CID },
+ { "@mozilla.org/widgets/child_window/gtk;1", &kNS_CHILD_CID },
+ { "@mozilla.org/widget/appshell/gtk;1", &kNS_APPSHELL_CID, Module::ALLOW_IN_GPU_PROCESS },
+ { "@mozilla.org/colorpicker;1", &kNS_COLORPICKER_CID, Module::MAIN_PROCESS_ONLY },
+@@ -313,16 +320,17 @@ static const mozilla::Module::ContractID
+ { "@mozilla.org/gfx/devicecontextspec;1", &kNS_DEVICE_CONTEXT_SPEC_CID },
+ { NS_PRINTDIALOGSERVICE_CONTRACTID, &kNS_PRINTDIALOGSERVICE_CID },
+ #endif
+ { "@mozilla.org/widget/image-to-gdk-pixbuf;1", &kNS_IMAGE_TO_PIXBUF_CID },
+ #if defined(MOZ_X11)
{ "@mozilla.org/widget/idleservice;1", &kNS_IDLE_SERVICE_CID },
{ "@mozilla.org/gfx/info;1", &kNS_GFXINFO_CID },
#endif
@@ -5350,10 +5483,20 @@ diff --git a/widget/gtk/nsWidgetFactory.cpp b/widget/gtk/nsWidgetFactory.cpp
{ nullptr }
};
+ static void
+ nsWidgetGtk2ModuleDtor()
+ {
+ // Shutdown all XP level widget classes.
+ WidgetUtils::Shutdown();
diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
-@@ -72,6 +72,7 @@
+@@ -68,16 +68,17 @@
+
+ #ifdef MOZ_ENABLE_STARTUP_NOTIFICATION
+ #define SN_API_NOT_YET_FROZEN
+ #include <startup-notification-1.0/libsn/sn.h>
+ #endif
#include "mozilla/Assertions.h"
#include "mozilla/Likely.h"
@@ -5361,7 +5504,17 @@ diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
#include "mozilla/Preferences.h"
#include "nsIPrefService.h"
#include "nsIGConfService.h"
-@@ -5092,6 +5093,11 @@ nsWindow::HideWindowChrome(bool aShouldH
+ #include "nsIServiceManager.h"
+ #include "nsGfxCIID.h"
+ #include "nsGtkUtils.h"
+ #include "nsIObserverService.h"
+ #include "mozilla/layers/LayersTypes.h"
+@@ -5123,16 +5124,21 @@ nsWindow::HideWindowChrome(bool aShouldH
+ // and GetWindowPos is called)
+ #ifdef MOZ_X11
+ XSync(GDK_DISPLAY_XDISPLAY(gdk_display_get_default()) , False);
+ #else
+ gdk_flush ();
#endif /* MOZ_X11 */
}
@@ -5373,10 +5526,20 @@ diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
bool
nsWindow::CheckForRollup(gdouble aMouseX, gdouble aMouseY,
bool aIsWheel, bool aAlwaysRollup)
+ {
+ nsIRollupListener* rollupListener = GetActiveRollupListener();
+ nsCOMPtr<nsIWidget> rollupWidget;
+ if (rollupListener) {
+ rollupWidget = rollupListener->GetRollupWidget();
diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h
--- a/widget/gtk/nsWindow.h
+++ b/widget/gtk/nsWindow.h
-@@ -35,6 +35,8 @@
+@@ -31,16 +31,18 @@
+ #ifdef ACCESSIBILITY
+ #include "mozilla/a11y/Accessible.h"
+ #endif
+ #include "mozilla/EventForwards.h"
+ #include "mozilla/TouchEvents.h"
#include "IMContextWrapper.h"
@@ -5385,7 +5548,17 @@ diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h
#undef LOG
#ifdef MOZ_LOGGING
-@@ -157,6 +159,8 @@ public:
+ #include "mozilla/Logging.h"
+ #include "nsTArray.h"
+ #include "Units.h"
+
+ extern mozilla::LazyLogModule gWidgetLog;
+@@ -154,16 +156,18 @@ public:
+ uint16_t aDuration,
+ nsISupports* aData,
+ nsIRunnable* aCallback) override;
+ virtual already_AddRefed<nsIScreen> GetWidgetScreen() override;
+ virtual nsresult MakeFullScreen(bool aFullScreen,
nsIScreen* aTargetScreen = nullptr) override;
virtual void HideWindowChrome(bool aShouldHide) override;
@@ -5394,19 +5567,40 @@ diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h
/**
* GetLastUserInputTime returns a timestamp for the most recent user input
* event. This is intended for pointer grab requests (including drags).
-@@ -561,6 +565,8 @@ private:
+ */
+ static guint32 GetLastUserInputTime();
+
+ // utility method, -1 if no change should be made, otherwise returns a
+ // value that can be passed to gdk_window_set_decorations
+@@ -573,16 +577,19 @@ private:
+ * ancestor widget's instance. So, one set of IM contexts is created for
+ * all windows in a hierarchy. If the children are released after the top
+ * level window is released, the children still have a valid pointer,
+ * however, IME doesn't work at that time.
+ */
RefPtr<mozilla::widget::IMContextWrapper> mIMContext;
mozilla::UniquePtr<mozilla::CurrentX11TimeGetter> mCurrentTimeGetter;
+
+ mozilla::UniquePtr<nsMenuBar> mMenuBar;
- };
-
- #endif /* __nsWindow_h__ */
++
+ typedef enum { CSD_SUPPORT_FULL, // CSD including shadows
+ CSD_SUPPORT_FLAT, // CSD without shadows
+ CSD_SUPPORT_NONE, // WM does not support CSD at all
+ CSD_SUPPORT_UNKNOWN
+ } CSDSupportLevel;
+ /**
+ * Get the support of Client Side Decoration by checking
+ * the XDG_CURRENT_DESKTOP environment variable.
diff --git a/widget/moz.build b/widget/moz.build
--- a/widget/moz.build
+++ b/widget/moz.build
-@@ -63,9 +63,9 @@ elif toolkit == 'cocoa':
+@@ -59,19 +59,19 @@ if toolkit == 'windows':
+ elif toolkit == 'cocoa':
+ XPIDL_SOURCES += [
+ 'nsIMacDockSupport.idl',
+ 'nsIMacWebAppUtils.idl',
+ 'nsIStandaloneNativeMenu.idl',
'nsISystemStatusBar.idl',
'nsITaskbarProgress.idl',
]
@@ -5419,10 +5613,20 @@ diff --git a/widget/moz.build b/widget/moz.build
TEST_DIRS += ['tests']
+ DIRS += ['headless']
+
+ # Don't build the DSO under the 'build' directory as windows does.
+ #
+ # The DSOs get built in the toolkit dir itself. Do this so that
diff --git a/xpfe/appshell/nsWebShellWindow.cpp b/xpfe/appshell/nsWebShellWindow.cpp
--- a/xpfe/appshell/nsWebShellWindow.cpp
+++ b/xpfe/appshell/nsWebShellWindow.cpp
-@@ -74,7 +74,7 @@
+@@ -70,17 +70,17 @@
+ #include "mozilla/DebugOnly.h"
+ #include "mozilla/EventDispatcher.h"
+ #include "mozilla/MouseEvents.h"
+
+ #include "nsPIWindowRoot.h"
#include "gfxPlatform.h"
@@ -5431,3 +5635,8 @@ diff --git a/xpfe/appshell/nsWebShellWindow.cpp b/xpfe/appshell/nsWebShellWindow
#include "nsINativeMenuService.h"
#define USE_NATIVE_MENUS
#endif
+
+ using namespace mozilla;
+ using namespace mozilla::dom;
+
+ /* Define Class IDs */
diff --git a/wifi-disentangle.patch b/wifi-disentangle.patch
deleted file mode 100644
index 8f474b9c0fec..000000000000
--- a/wifi-disentangle.patch
+++ /dev/null
@@ -1,245 +0,0 @@
-# HG changeset patch
-# Parent 2edd69b245fbc493c3a1cf17c40c63b0280ead12
-Bug 1314968 - Disentangle nsWifiScannerDBus::SendMessage. r?kanru
-
-Make a copy of the function and specialize it for each message sent.
-Avoids the mess of comparing the method name to figure out what to do.
-
-diff --git a/netwerk/wifi/nsWifiScannerDBus.cpp b/netwerk/wifi/nsWifiScannerDBus.cpp
---- a/netwerk/wifi/nsWifiScannerDBus.cpp
-+++ b/netwerk/wifi/nsWifiScannerDBus.cpp
-@@ -34,19 +34,47 @@ nsWifiScannerDBus::Scan()
- if (!mConnection) {
- return NS_ERROR_NOT_AVAILABLE;
- }
-- return SendMessage("org.freedesktop.NetworkManager",
-- "/org/freedesktop/NetworkManager",
-- "GetDevices");
-+ return SendGetDevices();
- }
-
-+// http://dbus.freedesktop.org/doc/api/html/group__DBusConnection.html
-+// Refer to function dbus_connection_send_with_reply_and_block.
-+static const uint32_t DBUS_DEFAULT_TIMEOUT = -1;
-+
- nsresult
--nsWifiScannerDBus::SendMessage(const char* aInterface,
-- const char* aPath,
-- const char* aFuncCall)
--{
-- RefPtr<DBusMessage> msg = already_AddRefed<DBusMessage>(
-- dbus_message_new_method_call("org.freedesktop.NetworkManager",
-- aPath, aInterface, aFuncCall));
-+nsWifiScannerDBus::SendGetDevices()
-+{
-+ RefPtr<DBusMessage> msg = already_AddRefed<DBusMessage>(
-+ dbus_message_new_method_call("org.freedesktop.NetworkManager",
-+ "/org/freedesktop/NetworkManager",
-+ "org.freedesktop.NetworkManager",
-+ "GetDevices"));
-+ if (!msg) {
-+ return NS_ERROR_FAILURE;
-+ }
-+
-+ DBusError err;
-+ dbus_error_init(&err);
-+
-+ RefPtr<DBusMessage> reply = already_AddRefed<DBusMessage>(
-+ dbus_connection_send_with_reply_and_block(mConnection, msg,
-+ DBUS_DEFAULT_TIMEOUT, &err));
-+ if (dbus_error_is_set(&err)) {
-+ dbus_error_free(&err);
-+ return NS_ERROR_FAILURE;
-+ }
-+
-+ return IdentifyDevices(reply);
-+}
-+
-+nsresult
-+nsWifiScannerDBus::SendGetDeviceType(const char* aPath)
-+{
-+ RefPtr<DBusMessage> msg = already_AddRefed<DBusMessage>(
-+ dbus_message_new_method_call("org.freedesktop.NetworkManager",
-+ aPath,
-+ "org.freedesktop.DBus.Properties",
-+ "Get"));
- if (!msg) {
- return NS_ERROR_FAILURE;
- }
-@@ -54,58 +82,92 @@ nsWifiScannerDBus::SendMessage(const cha
- DBusMessageIter argsIter;
- dbus_message_iter_init_append(msg, &argsIter);
-
-- if (!strcmp(aFuncCall, "Get")) {
-- const char* paramInterface = "org.freedesktop.NetworkManager.Device";
-- if (!dbus_message_iter_append_basic(&argsIter, DBUS_TYPE_STRING,
-- &paramInterface)) {
-- return NS_ERROR_FAILURE;
-- }
--
-- const char* paramDeviceType = "DeviceType";
-- if (!dbus_message_iter_append_basic(&argsIter, DBUS_TYPE_STRING,
-- &paramDeviceType)) {
-- return NS_ERROR_FAILURE;
-- }
-- } else if (!strcmp(aFuncCall, "GetAll")) {
-- const char* param = "";
-- if (!dbus_message_iter_append_basic(&argsIter, DBUS_TYPE_STRING, &param)) {
-- return NS_ERROR_FAILURE;
-- }
-- }
-+ const char* paramInterface = "org.freedesktop.NetworkManager.Device";
-+ if (!dbus_message_iter_append_basic(&argsIter, DBUS_TYPE_STRING,
-+ &paramInterface)) {
-+ return NS_ERROR_FAILURE;
-+ }
-+
-+ const char* paramDeviceType = "DeviceType";
-+ if (!dbus_message_iter_append_basic(&argsIter, DBUS_TYPE_STRING,
-+ &paramDeviceType)) {
-+ return NS_ERROR_FAILURE;
-+ }
-+
-+ DBusError err;
-+ dbus_error_init(&err);
-+
-+ RefPtr<DBusMessage> reply = already_AddRefed<DBusMessage>(
-+ dbus_connection_send_with_reply_and_block(mConnection, msg,
-+ DBUS_DEFAULT_TIMEOUT, &err));
-+ if (dbus_error_is_set(&err)) {
-+ dbus_error_free(&err);
-+ return NS_ERROR_FAILURE;
-+ }
-+
-+ return IdentifyDeviceType(reply, aPath);
-+}
-+
-+nsresult
-+nsWifiScannerDBus::SendGetAccessPoints(const char* aPath)
-+{
-+ RefPtr<DBusMessage> msg = already_AddRefed<DBusMessage>(
-+ dbus_message_new_method_call("org.freedesktop.NetworkManager",
-+ aPath,
-+ "org.freedesktop.NetworkManager.Device.Wireless",
-+ "GetAccessPoints"));
-+ if (!msg) {
-+ return NS_ERROR_FAILURE;
-+ }
-
- DBusError err;
- dbus_error_init(&err);
-
-- // http://dbus.freedesktop.org/doc/api/html/group__DBusConnection.html
-- // Refer to function dbus_connection_send_with_reply_and_block.
-- const uint32_t DBUS_DEFAULT_TIMEOUT = -1;
- RefPtr<DBusMessage> reply = already_AddRefed<DBusMessage>(
- dbus_connection_send_with_reply_and_block(mConnection, msg,
- DBUS_DEFAULT_TIMEOUT, &err));
- if (dbus_error_is_set(&err)) {
- dbus_error_free(&err);
--
- // In the GetAccessPoints case, if there are no access points, error is set.
- // We don't want to error out here.
-- if (!strcmp(aFuncCall, "GetAccessPoints")) {
-- return NS_OK;
-- }
-- return NS_ERROR_FAILURE;
-+ return NS_OK;
- }
-
-- nsresult rv;
-- if (!strcmp(aFuncCall, "GetDevices")) {
-- rv = IdentifyDevices(reply);
-- } else if (!strcmp(aFuncCall, "Get")) {
-- rv = IdentifyDeviceType(reply, aPath);
-- } else if (!strcmp(aFuncCall, "GetAccessPoints")) {
-- rv = IdentifyAccessPoints(reply);
-- } else if (!strcmp(aFuncCall, "GetAll")) {
-- rv = IdentifyAPProperties(reply);
-- } else {
-- rv = NS_ERROR_FAILURE;
-- }
-- return rv;
-+ return IdentifyAccessPoints(reply);
-+}
-+
-+nsresult
-+nsWifiScannerDBus::SendGetAPProperties(const char* aPath)
-+{
-+ RefPtr<DBusMessage> msg = already_AddRefed<DBusMessage>(
-+ dbus_message_new_method_call("org.freedesktop.NetworkManager",
-+ aPath,
-+ "org.freedesktop.DBus.Properties",
-+ "GetAll"));
-+ if (!msg) {
-+ return NS_ERROR_FAILURE;
-+ }
-+
-+ DBusMessageIter argsIter;
-+ dbus_message_iter_init_append(msg, &argsIter);
-+
-+ const char* param = "";
-+ if (!dbus_message_iter_append_basic(&argsIter, DBUS_TYPE_STRING, &param)) {
-+ return NS_ERROR_FAILURE;
-+ }
-+
-+ DBusError err;
-+ dbus_error_init(&err);
-+
-+ RefPtr<DBusMessage> reply = already_AddRefed<DBusMessage>(
-+ dbus_connection_send_with_reply_and_block(mConnection, msg,
-+ DBUS_DEFAULT_TIMEOUT, &err));
-+ if (dbus_error_is_set(&err)) {
-+ dbus_error_free(&err);
-+ return NS_ERROR_FAILURE;
-+ }
-+
-+ return IdentifyAPProperties(reply);
- }
-
- nsresult
-@@ -126,7 +188,7 @@ nsWifiScannerDBus::IdentifyDevices(DBusM
- return NS_ERROR_FAILURE;
- }
-
-- rv = SendMessage("org.freedesktop.DBus.Properties", devicePath, "Get");
-+ rv = SendGetDeviceType(devicePath);
- NS_ENSURE_SUCCESS(rv, rv);
- } while (dbus_message_iter_next(&iter));
-
-@@ -159,8 +221,7 @@ nsWifiScannerDBus::IdentifyDeviceType(DB
- const uint32_t NM_DEVICE_TYPE_WIFI = 2;
- nsresult rv = NS_OK;
- if (deviceType == NM_DEVICE_TYPE_WIFI) {
-- rv = SendMessage("org.freedesktop.NetworkManager.Device.Wireless",
-- aDevicePath, "GetAccessPoints");
-+ rv = SendGetAccessPoints(aDevicePath);
- }
-
- return rv;
-@@ -183,7 +244,7 @@ nsWifiScannerDBus::IdentifyAccessPoints(
- return NS_ERROR_FAILURE;
- }
-
-- rv = SendMessage("org.freedesktop.DBus.Properties", path, "GetAll");
-+ rv = SendGetAPProperties(path);
- NS_ENSURE_SUCCESS(rv, rv);
- } while (dbus_message_iter_next(&iter));
-
-diff --git a/netwerk/wifi/nsWifiScannerDBus.h b/netwerk/wifi/nsWifiScannerDBus.h
---- a/netwerk/wifi/nsWifiScannerDBus.h
-+++ b/netwerk/wifi/nsWifiScannerDBus.h
-@@ -25,9 +25,10 @@ public:
- nsresult Scan();
-
- private:
-- nsresult SendMessage(const char* aInterface,
-- const char* aPath,
-- const char* aFuncCall);
-+ nsresult SendGetDevices();
-+ nsresult SendGetDeviceType(const char* aPath);
-+ nsresult SendGetAccessPoints(const char* aPath);
-+ nsresult SendGetAPProperties(const char* aPath);
- nsresult IdentifyDevices(DBusMessage* aMsg);
- nsresult IdentifyDeviceType(DBusMessage* aMsg, const char* aDevicePath);
- nsresult IdentifyAccessPoints(DBusMessage* aMsg);
diff --git a/wifi-fix-interface.patch b/wifi-fix-interface.patch
deleted file mode 100644
index 1980db1837e7..000000000000
--- a/wifi-fix-interface.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-# HG changeset patch
-# Parent 7a6d836b62779aa61988981c6ca646495574a505
-Bug 1314968 - Explicitly specify the AccessPoint interface name. r?kanru
-
-The DBus specification allows passing an empty string as the interface to the
-org.freedesktop.DBus.Properties.GetAll call to get all properties, throwing away the namespace
-(interface) information.
-
-However, GDBus does not allow this. When NetworkManager moved to using GDBus, Firefox lost the
-ability to retrieve access points from NetworkManager.
-
-Since we're only interested in properties from the org.freedesktop.NetworkManager.AccessPoint
-interface, name it explicitly. This works with both the old and the new NetworkManager.
-
-diff --git a/netwerk/wifi/nsWifiScannerDBus.cpp b/netwerk/wifi/nsWifiScannerDBus.cpp
---- a/netwerk/wifi/nsWifiScannerDBus.cpp
-+++ b/netwerk/wifi/nsWifiScannerDBus.cpp
-@@ -151,7 +151,7 @@ nsWifiScannerDBus::SendGetAll(const char
- DBusMessageIter argsIter;
- dbus_message_iter_init_append(msg, &argsIter);
-
-- const char* param = "";
-+ const char* param = "org.freedesktop.NetworkManager.AccessPoint";
- if (!dbus_message_iter_append_basic(&argsIter, DBUS_TYPE_STRING, &param)) {
- return NS_ERROR_FAILURE;
- }