diff --git a/patches/mozilla-kde.patch b/patches/mozilla-kde.patch index a3c74bb..75b090a 100644 --- a/patches/mozilla-kde.patch +++ b/patches/mozilla-kde.patch @@ -3,7 +3,7 @@ # Date 1559294891 -7200 # Fri May 31 11:28:11 2019 +0200 # Node ID c2aa7198fb925e7fde96abf65b6f68b9b755f112 -# Parent 9db1669be16001a48b62d147070fb75f60bac251 +# Parent 8d1110b6918acc4e7d3f655d1e55f4b4ff630abe Description: Add KDE integration to Firefox (toolkit parts) Author: Wolfgang Rosenauer Author: Lubos Lunak @@ -31,7 +31,7 @@ diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp #ifdef MOZ_MEMORY # include "mozmemory.h" #endif -@@ -4635,16 +4636,27 @@ nsresult Preferences::InitInitialObjects +@@ -4634,16 +4635,27 @@ nsresult Preferences::InitInitialObjects "unix.js" # if defined(_AIX) , @@ -59,7 +59,7 @@ diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp // Load jar:$app/omni.jar!/defaults/preferences/*.js // or jar:$gre/omni.jar!/defaults/preferences/*.js. -@@ -4709,17 +4721,17 @@ nsresult Preferences::InitInitialObjects +@@ -4708,17 +4720,17 @@ nsresult Preferences::InitInitialObjects } nsCOMPtr path = do_QueryInterface(elem); @@ -81,7 +81,7 @@ diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp diff --git a/modules/libpref/moz.build b/modules/libpref/moz.build --- a/modules/libpref/moz.build +++ b/modules/libpref/moz.build -@@ -119,16 +119,20 @@ EXPORTS.mozilla += [ +@@ -118,16 +118,20 @@ EXPORTS.mozilla += [ ] EXPORTS.mozilla += sorted(["!" + g for g in gen_h]) @@ -147,7 +147,7 @@ diff --git a/python/mozbuild/mozpack/chrome/manifest.py b/python/mozbuild/mozpac 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 -@@ -45,10 +45,14 @@ XPCOM_MANIFESTS += [ +@@ -46,10 +46,14 @@ XPCOM_MANIFESTS += [ if CONFIG["MOZ_PLACES"]: EXTRA_JS_MODULES += [ @@ -165,7 +165,7 @@ diff --git a/toolkit/components/downloads/moz.build b/toolkit/components/downloa diff --git a/toolkit/mozapps/downloads/HelperAppDlg.jsm b/toolkit/mozapps/downloads/HelperAppDlg.jsm --- a/toolkit/mozapps/downloads/HelperAppDlg.jsm +++ b/toolkit/mozapps/downloads/HelperAppDlg.jsm -@@ -1231,36 +1231,66 @@ nsUnknownContentTypeDialog.prototype = { +@@ -1252,36 +1252,66 @@ nsUnknownContentTypeDialog.prototype = { params.handlerApp && params.handlerApp.executable && params.handlerApp.executable.isFile() @@ -841,11 +841,11 @@ diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build ] if CONFIG["MOZ_ENABLE_DBUS"]: - CXXFLAGS += CONFIG["TK_CFLAGS"] CXXFLAGS += CONFIG["MOZ_DBUS_CFLAGS"] if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": - CXXFLAGS += CONFIG["TK_CFLAGS"] + CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"] + CXXFLAGS += CONFIG["MOZ_DBUS_GLIB_CFLAGS"] diff --git a/uriloader/exthandler/unix/nsCommonRegistry.cpp b/uriloader/exthandler/unix/nsCommonRegistry.cpp new file mode 100644 --- /dev/null @@ -1260,7 +1260,7 @@ diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exth diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build --- a/widget/gtk/moz.build +++ b/widget/gtk/moz.build -@@ -135,16 +135,17 @@ FINAL_LIBRARY = "xul" +@@ -136,16 +136,17 @@ FINAL_LIBRARY = "xul" LOCAL_INCLUDES += [ "/layout/base", @@ -1317,7 +1317,7 @@ diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp # include "Units.h" extern mozilla::LazyLogModule gWidgetLog; # define LOG(args) MOZ_LOG(gWidgetLog, mozilla::LogLevel::Debug, args) -@@ -242,17 +245,19 @@ nsFilePicker::AppendFilters(int32_t aFil +@@ -236,17 +239,19 @@ nsFilePicker::AppendFilters(int32_t aFil mAllowURLs = !!(aFilterMask & filterAllowURLs); return nsBaseFilePicker::AppendFilters(aFilterMask); } @@ -1338,7 +1338,7 @@ diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp mFilters.AppendElement(filter); mFilterNames.AppendElement(name); -@@ -352,16 +357,39 @@ nsresult nsFilePicker::Show(int16_t* aRe +@@ -346,16 +351,39 @@ nsresult nsFilePicker::Show(int16_t* aRe return NS_OK; } @@ -1378,7 +1378,7 @@ diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp GtkFileChooserAction action = GetGtkFileChooserAction(mMode); const gchar* accept_button; -@@ -581,16 +609,244 @@ void nsFilePicker::Done(void* file_choos +@@ -575,16 +603,244 @@ void nsFilePicker::Done(void* file_choos mCallback->Done(result); mCallback = nullptr; } else { @@ -1796,7 +1796,7 @@ diff --git a/xpcom/components/moz.build b/xpcom/components/moz.build ] if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": - CXXFLAGS += CONFIG["TK_CFLAGS"] + CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"] if CONFIG["MOZ_ENABLE_DBUS"]: CXXFLAGS += CONFIG["MOZ_DBUS_GLIB_CFLAGS"] @@ -1804,7 +1804,7 @@ diff --git a/xpcom/components/moz.build b/xpcom/components/moz.build diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp --- a/xpcom/io/nsLocalFileUnix.cpp +++ b/xpcom/io/nsLocalFileUnix.cpp -@@ -53,16 +53,17 @@ +@@ -54,16 +54,17 @@ #include "prproces.h" #include "nsIDirectoryEnumerator.h" #include "nsSimpleEnumerator.h" @@ -1822,7 +1822,7 @@ diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp # include "prmem.h" # include "plbase64.h" -@@ -2025,62 +2026,77 @@ nsLocalFile::SetPersistentDescriptor(con +@@ -2071,62 +2072,77 @@ nsLocalFile::SetPersistentDescriptor(con NS_IMETHODIMP nsLocalFile::Reveal() { diff --git a/patches/mozilla-kde_after_unity.patch b/patches/mozilla-kde_after_unity.patch index 75186bd..9148313 100644 --- a/patches/mozilla-kde_after_unity.patch +++ b/patches/mozilla-kde_after_unity.patch @@ -1,7 +1,7 @@ From 6205411ef58130e0e9bb0aad75c7e126dc32b25b Mon Sep 17 00:00:00 2001 -From: evs-ch +From: ohfp <1813007-ohfp@users.noreply.gitlab.com> Date: Thu, 10 Feb 2022 11:04:05 +0100 -Subject: [PATCH 2/3] kde +Subject: [PATCH] kde --- modules/libpref/Preferences.cpp | 14 +- @@ -37,10 +37,10 @@ Subject: [PATCH 2/3] kde create mode 100644 uriloader/exthandler/unix/nsKDERegistry.h diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp -index f236c676c7..e44b4da065 100644 +index f10d140..38669b2 100644 --- a/modules/libpref/Preferences.cpp +++ b/modules/libpref/Preferences.cpp -@@ -89,6 +89,7 @@ +@@ -90,6 +90,7 @@ #ifdef MOZ_BACKGROUNDTASKS # include "mozilla/BackgroundTasks.h" #endif @@ -48,7 +48,7 @@ index f236c676c7..e44b4da065 100644 #ifdef DEBUG # include -@@ -4639,6 +4640,17 @@ nsresult Preferences::InitInitialObjects(bool aIsStartup) { +@@ -4649,6 +4650,17 @@ nsresult Preferences::InitInitialObjects(bool aIsStartup) { #endif }; @@ -66,7 +66,7 @@ index f236c676c7..e44b4da065 100644 rv = pref_LoadPrefsInDir(defaultPrefDir, specialFiles, ArrayLength(specialFiles)); if (NS_FAILED(rv)) { -@@ -4713,7 +4725,7 @@ nsresult Preferences::InitInitialObjects(bool aIsStartup) { +@@ -4723,7 +4735,7 @@ nsresult Preferences::InitInitialObjects(bool aIsStartup) { } // Do we care if a file provided by this process fails to load? @@ -76,7 +76,7 @@ index f236c676c7..e44b4da065 100644 } diff --git a/modules/libpref/moz.build b/modules/libpref/moz.build -index 5d2aca312f..98a83e6d08 100644 +index 5d2aca3..98a83e6 100644 --- a/modules/libpref/moz.build +++ b/modules/libpref/moz.build @@ -123,6 +123,10 @@ UNIFIED_SOURCES += [ @@ -91,7 +91,7 @@ index 5d2aca312f..98a83e6d08 100644 GeneratedFile( diff --git a/python/mozbuild/mozpack/chrome/flags.py b/python/mozbuild/mozpack/chrome/flags.py -index 7d6d7e0c7f..724c527b4c 100644 +index 7d6d7e0..724c527 100644 --- a/python/mozbuild/mozpack/chrome/flags.py +++ b/python/mozbuild/mozpack/chrome/flags.py @@ -234,6 +234,7 @@ class Flags(OrderedDict): @@ -103,7 +103,7 @@ index 7d6d7e0c7f..724c527b4c 100644 RE = re.compile(r"([!<>=]+)") diff --git a/python/mozbuild/mozpack/chrome/manifest.py b/python/mozbuild/mozpack/chrome/manifest.py -index a733685f95..f64b17fb7b 100644 +index a733685..f64b17f 100644 --- a/python/mozbuild/mozpack/chrome/manifest.py +++ b/python/mozbuild/mozpack/chrome/manifest.py @@ -44,6 +44,7 @@ class ManifestEntry(object): @@ -115,7 +115,7 @@ index a733685f95..f64b17fb7b 100644 def __init__(self, base, *flags): diff --git a/toolkit/components/downloads/moz.build b/toolkit/components/downloads/moz.build -index d4172e2d73..8bd0577bc5 100644 +index d4172e2..8bd0577 100644 --- a/toolkit/components/downloads/moz.build +++ b/toolkit/components/downloads/moz.build @@ -51,5 +51,9 @@ if CONFIG["MOZ_PLACES"]: @@ -129,10 +129,10 @@ index d4172e2d73..8bd0577bc5 100644 with Files("**"): BUG_COMPONENT = ("Toolkit", "Downloads API") diff --git a/toolkit/mozapps/downloads/HelperAppDlg.jsm b/toolkit/mozapps/downloads/HelperAppDlg.jsm -index 6c3f2690dd..6d6746ab14 100644 +index 64de8d0..2321f3a 100644 --- a/toolkit/mozapps/downloads/HelperAppDlg.jsm +++ b/toolkit/mozapps/downloads/HelperAppDlg.jsm -@@ -1257,26 +1257,56 @@ nsUnknownContentTypeDialog.prototype = { +@@ -1259,26 +1259,56 @@ nsUnknownContentTypeDialog.prototype = { this.chosenApp = params.handlerApp; } } else if ("@mozilla.org/applicationchooser;1" in Cc) { @@ -210,7 +210,7 @@ index 6c3f2690dd..6d6746ab14 100644 var nsIFilePicker = Ci.nsIFilePicker; var fp = Cc["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker); diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp -index f8d0880545..091ccf3d9e 100644 +index f8d0880..091ccf3 100644 --- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp +++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp @@ -18,6 +18,7 @@ @@ -274,7 +274,7 @@ index f8d0880545..091ccf3d9e 100644 auto result = MakeRefPtr(); result->Init(); diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build -index b1e2b58621..ea2f46c808 100644 +index b1e2b58..ea2f46c 100644 --- a/toolkit/xre/moz.build +++ b/toolkit/xre/moz.build @@ -97,7 +97,9 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "uikit": @@ -289,7 +289,7 @@ index b1e2b58621..ea2f46c808 100644 CXXFLAGS += CONFIG["MOZ_X11_SM_CFLAGS"] diff --git a/toolkit/xre/nsKDEUtils.cpp b/toolkit/xre/nsKDEUtils.cpp new file mode 100644 -index 0000000000..7a6edf0770 +index 0000000..7a6edf0 --- /dev/null +++ b/toolkit/xre/nsKDEUtils.cpp @@ -0,0 +1,321 @@ @@ -616,7 +616,7 @@ index 0000000000..7a6edf0770 + } diff --git a/toolkit/xre/nsKDEUtils.h b/toolkit/xre/nsKDEUtils.h new file mode 100644 -index 0000000000..c9c1284e29 +index 0000000..c9c1284 --- /dev/null +++ b/toolkit/xre/nsKDEUtils.h @@ -0,0 +1,48 @@ @@ -669,7 +669,7 @@ index 0000000000..c9c1284e29 + +#endif // nsKDEUtils diff --git a/uriloader/exthandler/HandlerServiceParent.cpp b/uriloader/exthandler/HandlerServiceParent.cpp -index 0796c7428b..4f21c058f8 100644 +index 0796c74..4f21c05 100644 --- a/uriloader/exthandler/HandlerServiceParent.cpp +++ b/uriloader/exthandler/HandlerServiceParent.cpp @@ -12,7 +12,7 @@ @@ -700,7 +700,7 @@ index 0796c7428b..4f21c058f8 100644 *aHandlerExists = false; } diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build -index 55ca638754..a9bb171a84 100644 +index 92647a9..fc5068c 100644 --- a/uriloader/exthandler/moz.build +++ b/uriloader/exthandler/moz.build @@ -83,7 +83,9 @@ else: @@ -713,7 +713,7 @@ index 55ca638754..a9bb171a84 100644 "unix/nsMIMEInfoUnix.cpp", ] elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "android": -@@ -131,6 +133,7 @@ LOCAL_INCLUDES += [ +@@ -135,6 +137,7 @@ LOCAL_INCLUDES += [ "/dom/ipc", "/netwerk/base", "/netwerk/protocol/http", @@ -723,7 +723,7 @@ index 55ca638754..a9bb171a84 100644 if CONFIG["MOZ_ENABLE_DBUS"]: diff --git a/uriloader/exthandler/unix/nsCommonRegistry.cpp b/uriloader/exthandler/unix/nsCommonRegistry.cpp new file mode 100644 -index 0000000000..630ab6147d +index 0000000..630ab61 --- /dev/null +++ b/uriloader/exthandler/unix/nsCommonRegistry.cpp @@ -0,0 +1,53 @@ @@ -782,7 +782,7 @@ index 0000000000..630ab6147d +} diff --git a/uriloader/exthandler/unix/nsCommonRegistry.h b/uriloader/exthandler/unix/nsCommonRegistry.h new file mode 100644 -index 0000000000..85b3d9cee2 +index 0000000..85b3d9c --- /dev/null +++ b/uriloader/exthandler/unix/nsCommonRegistry.h @@ -0,0 +1,28 @@ @@ -816,7 +816,7 @@ index 0000000000..85b3d9cee2 +#endif diff --git a/uriloader/exthandler/unix/nsKDERegistry.cpp b/uriloader/exthandler/unix/nsKDERegistry.cpp new file mode 100644 -index 0000000000..95c13f38e1 +index 0000000..95c13f3 --- /dev/null +++ b/uriloader/exthandler/unix/nsKDERegistry.cpp @@ -0,0 +1,86 @@ @@ -908,7 +908,7 @@ index 0000000000..95c13f38e1 +} diff --git a/uriloader/exthandler/unix/nsKDERegistry.h b/uriloader/exthandler/unix/nsKDERegistry.h new file mode 100644 -index 0000000000..5b07eebc6d +index 0000000..5b07eeb --- /dev/null +++ b/uriloader/exthandler/unix/nsKDERegistry.h @@ -0,0 +1,34 @@ @@ -947,7 +947,7 @@ index 0000000000..5b07eebc6d + +#endif //nsKDERegistry_h__ diff --git a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp b/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp -index 7cbefcce3e..84083348c8 100644 +index 7cbefcc..8408334 100644 --- a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp +++ b/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp @@ -5,16 +5,19 @@ @@ -1016,7 +1016,7 @@ index 7cbefcce3e..84083348c8 100644 if (!giovfs) { return NS_ERROR_FAILURE; diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exthandler/unix/nsOSHelperAppService.cpp -index b9e7aed3cb..367ad9ee24 100644 +index b9e7aed..367ad9e 100644 --- a/uriloader/exthandler/unix/nsOSHelperAppService.cpp +++ b/uriloader/exthandler/unix/nsOSHelperAppService.cpp @@ -10,7 +10,7 @@ @@ -1065,7 +1065,7 @@ index b9e7aed3cb..367ad9ee24 100644 LOG( ("Got MIMEInfo from GNOME registry without extensions; setting them " diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build -index 4aefaadf40..f787a940f5 100644 +index 47be8f3..8f51607 100644 --- a/widget/gtk/moz.build +++ b/widget/gtk/moz.build @@ -153,6 +153,7 @@ LOCAL_INCLUDES += [ @@ -1077,7 +1077,7 @@ index 4aefaadf40..f787a940f5 100644 "/widget/headless", ] diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp -index 00a5caa288..8e436f0fc0 100644 +index 00a5caa..8e436f0 100644 --- a/widget/gtk/nsFilePicker.cpp +++ b/widget/gtk/nsFilePicker.cpp @@ -5,6 +5,7 @@ @@ -1374,7 +1374,7 @@ index 00a5caa288..8e436f0fc0 100644 void* nsFilePicker::GtkFileChooserNew(const gchar* title, GtkWindow* parent, GtkFileChooserAction action, diff --git a/widget/gtk/nsFilePicker.h b/widget/gtk/nsFilePicker.h -index 9b3110aa00..be9d559c7b 100644 +index 9b3110a..be9d559 100644 --- a/widget/gtk/nsFilePicker.h +++ b/widget/gtk/nsFilePicker.h @@ -72,6 +72,12 @@ class nsFilePicker : public nsBaseFilePicker { @@ -1391,7 +1391,7 @@ index 9b3110aa00..be9d559c7b 100644 GtkFileChooserAction action, const gchar* accept_label); diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestParser.cpp -index f3d0055f2c..d13543ab52 100644 +index f3d0055..d13543a 100644 --- a/xpcom/components/ManifestParser.cpp +++ b/xpcom/components/ManifestParser.cpp @@ -43,6 +43,7 @@ @@ -1470,7 +1470,7 @@ index f3d0055f2c..d13543ab52 100644 stTablet == eBad || #endif diff --git a/xpcom/components/moz.build b/xpcom/components/moz.build -index 6cf78aa9be..dfcf9c7697 100644 +index 6cf78aa..dfcf9c7 100644 --- a/xpcom/components/moz.build +++ b/xpcom/components/moz.build @@ -71,6 +71,7 @@ LOCAL_INCLUDES += [ @@ -1482,7 +1482,7 @@ index 6cf78aa9be..dfcf9c7697 100644 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp -index b609a0b890..974b92f2b4 100644 +index b609a0b..974b92f 100644 --- a/xpcom/io/nsLocalFileUnix.cpp +++ b/xpcom/io/nsLocalFileUnix.cpp @@ -59,6 +59,7 @@ diff --git a/patches/unity-menubar.patch b/patches/unity-menubar.patch index dc9ffd1..d3b2d87 100644 --- a/patches/unity-menubar.patch +++ b/patches/unity-menubar.patch @@ -16,7 +16,7 @@ #endif --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js -@@ -6251,11 +6251,18 @@ function onViewToolbarsPopupShowing(aEve +@@ -6451,11 +6451,18 @@ function onViewToolbarsPopupShowing(aEve MozXULElement.insertFTLIfNeeded("browser/toolbarContextMenu.ftl"); let firstMenuItem = aInsertPoint || popup.firstElementChild; let toolbarNodes = gNavToolbox.querySelectorAll("toolbar"); @@ -47,7 +47,7 @@ --- a/dom/xul/XULPopupElement.cpp +++ b/dom/xul/XULPopupElement.cpp -@@ -211,6 +211,10 @@ void XULPopupElement::GetState(nsString& +@@ -207,6 +207,10 @@ void XULPopupElement::GetState(nsString& // set this here in case there's no frame for the popup aState.AssignLiteral("closed"); @@ -58,7 +58,7 @@ if (nsXULPopupManager* pm = nsXULPopupManager::GetInstance()) { switch (pm->GetPopupState(this)) { case ePopupShown: -@@ -233,6 +237,11 @@ void XULPopupElement::GetState(nsString& +@@ -229,6 +233,11 @@ void XULPopupElement::GetState(nsString& break; } } @@ -72,7 +72,7 @@ nsINode* XULPopupElement::GetTriggerNode() const { --- a/dom/xul/moz.build +++ b/dom/xul/moz.build -@@ -83,4 +83,9 @@ LOCAL_INCLUDES += [ +@@ -82,4 +82,9 @@ LOCAL_INCLUDES += [ include("/ipc/chromium/chromium-config.mozbuild") @@ -84,7 +84,7 @@ FINAL_LIBRARY = "xul" --- a/layout/build/moz.build +++ b/layout/build/moz.build -@@ -68,6 +68,10 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "an +@@ -70,6 +70,10 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "an "/dom/system", "/dom/system/android", ] @@ -97,7 +97,7 @@ "components.conf", --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js -@@ -301,6 +301,9 @@ pref("dom.mouseevent.click.hack.use_lega +@@ -310,6 +310,9 @@ pref("dom.mouseevent.click.hack.use_lega // 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); @@ -125,7 +125,7 @@ } --- a/widget/gtk/moz.build +++ b/widget/gtk/moz.build -@@ -33,6 +33,7 @@ +@@ -34,6 +34,7 @@ EXPORTS += [ EXPORTS.mozilla += ["WidgetUtilsGtk.h"] EXPORTS.mozilla.widget += [ @@ -133,18 +133,11 @@ "WindowSurface.h", "WindowSurfaceProvider.h", ] -@@ -45,6 +46,7 @@ - "MozContainer.cpp", - "MPRISServiceHandler.cpp", - "NativeKeyBindings.cpp", -+ "NativeMenuSupport.cpp", - "nsApplicationChooser.cpp", - "nsAppShell.cpp", - "nsBidiKeyboard.cpp", -@@ -70,6 +72,15 @@ +@@ -71,6 +72,16 @@ UNIFIED_SOURCES += [ SOURCES += [ "MediaKeysEventSourceFactory.cpp", ++ "NativeMenuSupport.cpp", + "nsDbusmenu.cpp", + "nsMenu.cpp", # conflicts with X11 headers + "nsMenuBar.cpp", @@ -157,7 +150,7 @@ "nsNativeThemeGTK.cpp", # conflicts with X11 headers "nsWindow.cpp", # conflicts with X11 headers "WaylandVsyncSource.cpp", # conflicts with X11 headers -@@ -138,6 +149,7 @@ +@@ -138,6 +149,7 @@ LOCAL_INCLUDES += [ "/layout/base", "/layout/forms", "/layout/generic", @@ -5060,7 +5053,7 @@ +#endif /* __nsNativeMenuService_h__ */ --- a/widget/gtk/nsWindow.cpp +++ b/widget/gtk/nsWindow.cpp -@@ -6436,6 +6436,10 @@ void nsWindow::HideWindowChrome(bool aSh +@@ -7122,6 +7122,10 @@ void nsWindow::HideWindowChrome(bool aSh SetWindowDecoration(aShouldHide ? eBorderStyle_none : mBorderStyle); } @@ -5073,7 +5066,7 @@ nsIRollupListener* rollupListener = GetActiveRollupListener(); --- a/widget/gtk/nsWindow.h +++ b/widget/gtk/nsWindow.h -@@ -39,6 +39,8 @@ +@@ -26,6 +26,8 @@ #include "nsRefPtrHashtable.h" #include "IMContextWrapper.h" @@ -5082,8 +5075,8 @@ #ifdef ACCESSIBILITY # include "mozilla/a11y/LocalAccessible.h" #endif -@@ -168,6 +170,8 @@ class nsWindow final : public nsBaseWidg - nsIScreen* aTargetScreen = nullptr) override; +@@ -171,6 +173,8 @@ class nsWindow final : public nsBaseWidg + nsresult MakeFullScreen(bool aFullScreen) override; void HideWindowChrome(bool aShouldHide) override; + void SetMenuBar(mozilla::UniquePtr aMenuBar); @@ -5091,15 +5084,15 @@ /** * GetLastUserInputTime returns a timestamp for the most recent user input * event. This is intended for pointer grab requests (including drags). -@@ -708,6 +712,8 @@ class nsWindow final : public nsBaseWidg - static GtkWindowDecoration sGtkWindowDecoration; +@@ -828,6 +832,8 @@ class nsWindow final : public nsBaseWidg static bool sTransparentMainWindow; -+ -+ mozilla::UniquePtr mMenuBar; ++ mozilla::UniquePtr mMenuBar; ++ #ifdef ACCESSIBILITY RefPtr mRootAccessible; + --- /dev/null +++ b/xpcom/ds/NativeMenuAtoms.py @@ -0,0 +1,9 @@ @@ -5122,7 +5115,7 @@ import sys # Static atom definitions, used to generate nsGkAtomList.h. -@@ -2506,7 +2507,7 @@ STATIC_ATOMS = [ +@@ -2527,7 +2528,7 @@ STATIC_ATOMS = [ InheritingAnonBoxAtom("AnonBox_mozSVGForeignContent", ":-moz-svg-foreign-content"), InheritingAnonBoxAtom("AnonBox_mozSVGText", ":-moz-svg-text"), # END ATOMS @@ -5133,7 +5126,7 @@ --- a/widget/gtk/components.conf +++ b/widget/gtk/components.conf -@@ -82,6 +82,14 @@ Classes = [ +@@ -76,6 +76,14 @@ Classes = [ 'headers': ['/widget/gtk/nsApplicationChooser.h'], 'processes': ProcessSelector.MAIN_PROCESS_ONLY, }, @@ -5161,7 +5154,7 @@ #endif --- /dev/null +++ b/widget/gtk/NativeMenuSupport.cpp -@@ -0,0 +1,25 @@ +@@ -0,0 +1,26 @@ +/* -*- 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 @@ -5171,6 +5164,7 @@ + +#include "MainThreadUtils.h" +#include "nsINativeMenuService.h" ++#include "nsServiceManagerUtils.h" + +namespace mozilla::widget { + @@ -5223,7 +5217,7 @@ +#endif // mozilla_widget_NativeMenuSupport_h --- a/widget/moz.build +++ b/widget/moz.build -@@ -144,6 +144,11 @@ EXPORTS += [ +@@ -139,6 +139,11 @@ EXPORTS += [ "PuppetWidget.h", ]