diff -r 611baabe5b83 -r 6c6375987b6c mozilla-kde.patch --- a/mozilla-kde.patch Thu Sep 05 08:27:52 2019 +0200 +++ b/mozilla-kde.patch Fri Sep 06 18:28:48 2019 +0200 @@ -3,7 +3,7 @@ # Date 1559294891 -7200 # Fri May 31 11:28:11 2019 +0200 # Node ID c2aa7198fb925e7fde96abf65b6f68b9b755f112 -# Parent 93495ad6fa0fe292eadcbfef14e0e27273528497 +# Parent 85e4798b74da9c377f84cf8f5dd59a7f952d92eb Description: Add KDE integration to Firefox (toolkit parts) Author: Wolfgang Rosenauer Author: Lubos Lunak @@ -13,8 +13,7 @@ diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp --- a/modules/libpref/Preferences.cpp +++ b/modules/libpref/Preferences.cpp -@@ -81,16 +81,17 @@ - #include "nsXPCOMCID.h" +@@ -83,16 +83,17 @@ #include "nsXPCOM.h" #include "nsXULAppAPI.h" #include "nsZipArchive.h" @@ -22,16 +21,17 @@ #include "PLDHashTable.h" #include "plstr.h" #include "prlink.h" + #include "xpcpublic.h" +#include "nsKDEUtils.h" + #ifdef DEBUG + # include + #endif + #ifdef MOZ_MEMORY # include "mozmemory.h" #endif - - #ifdef XP_WIN - # include "windows.h" - #endif -@@ -4507,25 +4508,37 @@ static nsresult pref_ReadDefaultPrefs(co +@@ -4623,25 +4624,37 @@ Result Preferences::Ini // application pref files for backwards compatibility. static const char* specialFiles[] = { #if defined(XP_MACOSX) @@ -69,7 +69,7 @@ // Load jar:$app/omni.jar!/defaults/preferences/*.js // or jar:$gre/omni.jar!/defaults/preferences/*.js. -@@ -4573,17 +4586,17 @@ static nsresult pref_ReadDefaultPrefs(co +@@ -4688,17 +4701,17 @@ Result Preferences::Ini } nsCOMPtr path = do_QueryInterface(elem); @@ -115,7 +115,7 @@ diff --git a/python/mozbuild/mozpack/chrome/flags.py b/python/mozbuild/mozpack/chrome/flags.py --- a/python/mozbuild/mozpack/chrome/flags.py +++ b/python/mozbuild/mozpack/chrome/flags.py -@@ -223,16 +223,17 @@ class Flags(OrderedDict): +@@ -227,16 +227,17 @@ class Flags(OrderedDict): 'contentaccessible': Flag, 'os': StringFlag, 'osversion': VersionFlag, @@ -136,7 +136,7 @@ diff --git a/python/mozbuild/mozpack/chrome/manifest.py b/python/mozbuild/mozpack/chrome/manifest.py --- a/python/mozbuild/mozpack/chrome/manifest.py +++ b/python/mozbuild/mozpack/chrome/manifest.py -@@ -39,16 +39,17 @@ class ManifestEntry(object): +@@ -36,16 +36,17 @@ class ManifestEntry(object): 'platformversion', 'os', 'osversion', @@ -172,532 +172,6 @@ + with Files('**'): BUG_COMPONENT = ('Toolkit', 'Downloads API') -diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn ---- a/toolkit/content/jar.mn -+++ b/toolkit/content/jar.mn -@@ -63,16 +63,18 @@ toolkit.jar: - content/global/widgets.css - content/global/bindings/autocomplete.xml (widgets/autocomplete.xml) - content/global/bindings/button.xml (widgets/button.xml) - content/global/bindings/calendar.js (widgets/calendar.js) - content/global/bindings/datekeeper.js (widgets/datekeeper.js) - content/global/bindings/datepicker.js (widgets/datepicker.js) - content/global/bindings/datetimebox.css (widgets/datetimebox.css) - * 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/general.xml (widgets/general.xml) - content/global/bindings/popup.xml (widgets/popup.xml) - content/global/bindings/richlistbox.xml (widgets/richlistbox.xml) - content/global/bindings/scrollbox.xml (widgets/scrollbox.xml) - content/global/bindings/spinner.js (widgets/spinner.js) - content/global/bindings/tabbox.xml (widgets/tabbox.xml) - * content/global/bindings/textbox.xml (widgets/textbox.xml) - content/global/bindings/timekeeper.js (widgets/timekeeper.js) -diff --git a/toolkit/content/widgets/dialog-kde.xml b/toolkit/content/widgets/dialog-kde.xml -new file mode 100644 ---- /dev/null -+++ b/toolkit/content/widgets/dialog-kde.xml -@@ -0,0 +1,499 @@ -+ -+ -+ -+ -+ %globalKeysDTD; -+]> -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+#else -+ keycode="&openHelp.commandkey;"/> -+#endif -+ -+ -+ -+ -+ -+ null -+ (function(event) { -+ if (!document.documentElement.cancelDialog()) -+ event.preventDefault(); -+ }) -+ -+ -+ [] -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ (screen.availLeft + screen.availWidth)) -+ newX = (screen.availLeft + screen.availWidth) - window.outerWidth - 20; -+ -+ if (newY < screen.availTop) -+ newY = screen.availTop + 20; -+ if ((newY + window.outerHeight) > (screen.availTop + screen.availHeight)) -+ newY = (screen.availTop + screen.availHeight) - window.outerHeight - 60; -+ -+ window.moveTo( newX, newY ); -+ ]]> -+ -+ -+ -+ -+ -+ 0 ? xOffset : 0; -+ yOffset = yOffset > 0 ? yOffset : 0; -+ window.moveTo(xOffset, yOffset); -+ ]]> -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ { -+ window.sizeToContent(); -+ }); -+ } -+ ]]> -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ // see bug 63370 for details -+ this._mStrBundle = Cc["@mozilla.org/intl/stringbundle;1"] -+ .getService(Ci.nsIStringBundleService) -+ .createBundle("chrome://global/locale/dialog.properties"); -+ } -+ return this._mStrBundle; -+ ]]> -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ if (!event.defaultPrevented) -+ this.cancelDialog(); -+ -+#ifdef XP_MACOSX -+ -+#else -+ -+ var btn = this.getButton(this.defaultButton); -+ if (btn) -+ btn.setAttribute("default", event.originalTarget == btn || -+ !(event.originalTarget.localName == "button" || -+ event.originalTarget.localName == "toolbarbutton")); -+ -+#endif -+ -+ -+ -+ -+ 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 @@ -1821,7 +1295,7 @@ diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build --- a/widget/gtk/moz.build +++ b/widget/gtk/moz.build -@@ -124,16 +124,17 @@ include('/ipc/chromium/chromium-config.m +@@ -126,16 +126,17 @@ include('/ipc/chromium/chromium-config.m FINAL_LIBRARY = 'xul' @@ -1842,7 +1316,7 @@ diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp --- a/widget/gtk/nsFilePicker.cpp +++ b/widget/gtk/nsFilePicker.cpp -@@ -4,32 +4,34 @@ +@@ -4,16 +4,17 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "mozilla/Types.h" @@ -1855,11 +1329,12 @@ #include "nsGtkUtils.h" #include "nsIFileURL.h" + #include "nsIGIOService.h" #include "nsIURI.h" #include "nsIWidget.h" #include "nsIFile.h" #include "nsIStringBundle.h" - +@@ -21,16 +22,17 @@ #include "nsArrayEnumerator.h" #include "nsMemory.h" #include "nsEnumeratorUtils.h" @@ -1877,7 +1352,7 @@ #define MAX_PREVIEW_SOURCE_SIZE 4096 nsIFile* nsFilePicker::mPrevDisplayDirectory = nullptr; -@@ -227,17 +229,19 @@ nsFilePicker::AppendFilters(int32_t aFil +@@ -228,17 +230,19 @@ nsFilePicker::AppendFilters(int32_t aFil mAllowURLs = !!(aFilterMask & filterAllowURLs); return nsBaseFilePicker::AppendFilters(aFilterMask); } @@ -1898,7 +1373,7 @@ mFilters.AppendElement(filter); mFilterNames.AppendElement(name); -@@ -337,16 +341,39 @@ nsresult nsFilePicker::Show(int16_t* aRe +@@ -338,16 +342,39 @@ nsresult nsFilePicker::Show(int16_t* aRe return NS_OK; } @@ -1938,7 +1413,7 @@ GtkFileChooserAction action = GetGtkFileChooserAction(mMode); -@@ -572,16 +599,240 @@ void nsFilePicker::Done(void* file_choos +@@ -573,16 +600,240 @@ void nsFilePicker::Done(void* file_choos mCallback->Done(result); mCallback = nullptr; } else {