Updated to 66.0.1

This commit is contained in:
Алзим 2019-03-23 02:58:56 +03:00
parent 0580a0e7dd
commit ff661d6229
5 changed files with 142 additions and 97 deletions

View file

@ -1,4 +1,4 @@
sources: sources:
cbindgen-vendor.tar.xz: 7efa6255e73d8e3c9dc674822d2e29ebc0e3391b cbindgen-vendor.tar.xz: 7efa6255e73d8e3c9dc674822d2e29ebc0e3391b
firefox-65.0.2.source.tar.xz: b38b5f10faac672656933c1c3537281d449d2785 firefox-66.0.1.source.tar.xz: 76ce815732bbfbdbee8f58e946c5217c58ef7af3
firefox-dictionary-61.0.2.tar.bz2: 25929c585dc8568a32d5be49aacc672f0ed2202f firefox-dictionary-61.0.2.tar.bz2: 25929c585dc8568a32d5be49aacc672f0ed2202f

View file

@ -4,8 +4,8 @@
#include "nsISupportsUtils.h" #include "nsISupportsUtils.h"
#if !defined(XPCOM_GLUE_AVOID_NSPR) #if !defined(XPCOM_GLUE_AVOID_NSPR)
-#include "prthread.h" /* needed for cargo-culting headers */ -# include "prthread.h" /* needed for cargo-culting headers */
+#include "nspr4/prthread.h" /* needed for cargo-culting headers */ +# include "nspr4/prthread.h" /* needed for cargo-culting headers */
#endif #endif
#include "nsDebug.h" #include "nsDebug.h"
@ -13,8 +13,8 @@
#ifdef MOZ_THREAD_SAFETY_OWNERSHIP_CHECKS_SUPPORTED #ifdef MOZ_THREAD_SAFETY_OWNERSHIP_CHECKS_SUPPORTED
-#include "prthread.h" /* needed for thread-safety checks */ -# include "prthread.h" /* needed for thread-safety checks */
+#include "nspr4/prthread.h" /* needed for thread-safety checks */ +# include "nspr4/prthread.h" /* needed for thread-safety checks */
class nsAutoOwningThread { class nsAutoOwningThread {
public: public:
@ -73,10 +73,10 @@
+++ firefox-56.0/xpcom/threads/BlockingResourceBase.h 2017-09-29 01:08:35.088579199 +0300 +++ firefox-56.0/xpcom/threads/BlockingResourceBase.h 2017-09-29 01:08:35.088579199 +0300
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
// NB: Comment this out to enable callstack tracking. // NB: Comment this out to enable callstack tracking.
#define MOZ_CALLSTACK_DISABLED # define MOZ_CALLSTACK_DISABLED
-#include "prinit.h" -# include "prinit.h"
+#include "nspr4/prinit.h" +# include "nspr4/prinit.h"
#include "nsString.h" # include "nsString.h"

View file

@ -1,11 +1,11 @@
# HG changeset patch # HG changeset patch
# Parent 693f0baece29cc958a7d91b89fd12e3b89a502e3 # Parent 87262204aa945e6fce864193d103a93659bf76f6
diff --git a/browser/base/content/browser-kde.xul b/browser/base/content/browser-kde.xul diff --git a/browser/base/content/browser-kde.xul b/browser/base/content/browser-kde.xul
new file mode 100644 new file mode 100644
--- /dev/null --- /dev/null
+++ b/browser/base/content/browser-kde.xul +++ b/browser/base/content/browser-kde.xul
@@ -0,0 +1,1395 @@ @@ -0,0 +1,1408 @@
+#filter substitution +#filter substitution
+<?xml version="1.0"?> +<?xml version="1.0"?>
+# -*- Mode: HTML -*- +# -*- Mode: HTML -*-
@ -276,6 +276,8 @@ new file mode 100644
+ noautofocus="true" + noautofocus="true"
+ hidden="true" + hidden="true"
+ flip="none" + flip="none"
+ consumeoutsideclicks="never"
+ norolluponanchor="true"
+ level="parent"> + level="parent">
+ <html:div class="urlbarView-body-outer"> + <html:div class="urlbarView-body-outer">
+ <html:div class="urlbarView-body-inner"> + <html:div class="urlbarView-body-inner">
@ -579,6 +581,7 @@ new file mode 100644
+ position="bottomcenter topright" + position="bottomcenter topright"
+ tabspecific="true" + tabspecific="true"
+ noautofocus="true" + noautofocus="true"
+ pocket-title="&saveToPocketCmd.label;"
+ copyURL-title="&pageAction.copyLink.label;" + copyURL-title="&pageAction.copyLink.label;"
+ emailLink-title="&emailPageCmd.label;" + emailLink-title="&emailPageCmd.label;"
+ sendToDevice-notReadyTitle="&sendToDevice.syncNotReady.label;" + sendToDevice-notReadyTitle="&sendToDevice.syncNotReady.label;"
@ -771,13 +774,11 @@ new file mode 100644
+ aria-label="&tabsToolbar.label;" + aria-label="&tabsToolbar.label;"
+ context="toolbar-context-menu" + context="toolbar-context-menu"
+ flex="1"> + flex="1">
+ <vbox flex="1" class="toolbar-items">
+ <spacer flex="1000"/>
+ +
+ <hbox class="titlebar-spacer" type="pre-tabs"/>
+
+ <hbox flex="1" align="end" class="toolbar-items">
+ <hbox id="TabsToolbar-customization-target" flex="1"> + <hbox id="TabsToolbar-customization-target" flex="1">
+ <hbox class="titlebar-spacer" type="pre-tabs"
+ skipintoolbarset="true"/>
+
+ <tabs id="tabbrowser-tabs" + <tabs id="tabbrowser-tabs"
+ flex="1" + flex="1"
+ setfocus="false" + setfocus="false"
@ -805,19 +806,15 @@ new file mode 100644
+ label="&listAllTabs.label;" + label="&listAllTabs.label;"
+ tooltiptext="&listAllTabs.label;" + tooltiptext="&listAllTabs.label;"
+ removable="false"/> + removable="false"/>
+
+ <hbox class="titlebar-spacer" type="post-tabs"
+ ordinal="1000"
+ skipintoolbarset="true"/>
+ </hbox> + </hbox>
+ </vbox> + </hbox>
+
+ <hbox class="titlebar-spacer" type="post-tabs"/>
+ +
+#ifndef XP_MACOSX +#ifndef XP_MACOSX
+ <button class="accessibility-indicator" tooltiptext="&accessibilityIndicator.tooltip;" + <button class="accessibility-indicator" tooltiptext="&accessibilityIndicator.tooltip;"
+ ordinal="1000" + aria-live="polite"/>
+ aria-live="polite" skipintoolbarset="true"/> + <hbox class="private-browsing-indicator"/>
+ <hbox class="private-browsing-indicator" skipintoolbarset="true"
+ ordinal="1000"/>
+#endif +#endif
+ +
+#include titlebar-items.inc.xul +#include titlebar-items.inc.xul
@ -1045,7 +1042,22 @@ new file mode 100644
+ class="urlbar-icon urlbar-page-action" + class="urlbar-icon urlbar-page-action"
+ role="button" + role="button"
+ tooltiptext="&pageActionButton.tooltip;" + tooltiptext="&pageActionButton.tooltip;"
+ onmousedown="BrowserPageActions.mainButtonClicked(event);"/> + onmousedown="BrowserPageActions.mainButtonClicked(event);"
+ onkeypress="BrowserPageActions.mainButtonClicked(event);"/>
+ <hbox id="pocket-button-box"
+ hidden="true"
+ class="urlbar-icon-wrapper urlbar-page-action"
+ onclick="BrowserPageActions.doCommandForAction(PageActions.actionForID('pocket'), event, this);">
+ <image id="pocket-button"
+ class="urlbar-icon"
+ tooltiptext="&pocketButton.tooltiptext;"
+ role="button"/>
+ <hbox id="pocket-button-animatable-box">
+ <image id="pocket-button-animatable-image"
+ tooltiptext="&pocketButton.tooltiptext;"
+ role="presentation"/>
+ </hbox>
+ </hbox>
+ <hbox id="star-button-box" + <hbox id="star-button-box"
+ hidden="true" + hidden="true"
+ class="urlbar-icon-wrapper urlbar-page-action" + class="urlbar-icon-wrapper urlbar-page-action"
@ -1097,6 +1109,7 @@ new file mode 100644
+ <toolbarbutton id="library-button" class="toolbarbutton-1 chromeclass-toolbar-additional subviewbutton-nav" + <toolbarbutton id="library-button" class="toolbarbutton-1 chromeclass-toolbar-additional subviewbutton-nav"
+ removable="true" + removable="true"
+ onmousedown="PanelUI.showSubView('appMenu-libraryView', this, event);" + onmousedown="PanelUI.showSubView('appMenu-libraryView', this, event);"
+ onkeypress="PanelUI.showSubView('appMenu-libraryView', this, event);"
+ closemenu="none" + closemenu="none"
+ cui-areatype="toolbar" + cui-areatype="toolbar"
+ tooltiptext="&libraryButton.tooltip;" + tooltiptext="&libraryButton.tooltip;"
@ -1431,21 +1444,21 @@ diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/ns
#include "DirectoryProvider.h" #include "DirectoryProvider.h"
#if defined(XP_WIN) #if defined(XP_WIN)
#include "nsWindowsShellService.h" # include "nsWindowsShellService.h"
#elif defined(XP_MACOSX) #elif defined(XP_MACOSX)
#include "nsMacShellService.h" # include "nsMacShellService.h"
#elif defined(MOZ_WIDGET_GTK) #elif defined(MOZ_WIDGET_GTK)
-#include "nsGNOMEShellService.h" -# include "nsGNOMEShellService.h"
+#include "nsUnixShellService.h" +# include "nsUnixShellService.h"
#endif #endif
#include "nsIToolkitShellService.h"
#if defined(MOZ_WIDGET_COCOA) #if defined(MOZ_WIDGET_COCOA)
#include "nsMacAttribution.h" # include "nsMacAttribution.h"
#endif #endif
#if defined(XP_WIN) #if defined(XP_WIN)
#include "nsIEHistoryEnumerator.h" @@ -34,18 +34,16 @@ using namespace mozilla::browser;
@@ -33,18 +33,16 @@ using namespace mozilla::browser;
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -1464,7 +1477,7 @@ diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/ns
#if defined(XP_WIN) #if defined(XP_WIN)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsIEHistoryEnumerator) NS_GENERIC_FACTORY_CONSTRUCTOR(nsIEHistoryEnumerator)
@@ -67,17 +65,17 @@ NS_DEFINE_NAMED_CID(NS_MACATTRIBUTIONSER @@ -64,17 +62,17 @@ NS_DEFINE_NAMED_CID(NS_MACATTRIBUTIONSER
#endif #endif
static const mozilla::Module::CIDEntry kBrowserCIDs[] = { static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
@ -1475,12 +1488,12 @@ diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/ns
#elif defined(MOZ_WIDGET_GTK) #elif defined(MOZ_WIDGET_GTK)
- { &kNS_SHELLSERVICE_CID, false, nullptr, nsGNOMEShellServiceConstructor }, - { &kNS_SHELLSERVICE_CID, false, nullptr, nsGNOMEShellServiceConstructor },
+ { &kNS_SHELLSERVICE_CID, false, nullptr, nsUnixShellServiceConstructor }, + { &kNS_SHELLSERVICE_CID, false, nullptr, nsUnixShellServiceConstructor },
#elif defined(XP_MACOSX)
{ &kNS_SHELLSERVICE_CID, false, nullptr, nsMacShellServiceConstructor },
#endif #endif
{ &kNS_BROWSER_ABOUT_REDIRECTOR_CID, false, nullptr, AboutRedirector::Create }, { &kNS_BROWSER_ABOUT_REDIRECTOR_CID, false, nullptr, AboutRedirector::Create },
#if defined(XP_WIN) #if defined(XP_WIN)
{ &kNS_WINIEHISTORYENUMERATOR_CID, false, nullptr, nsIEHistoryEnumeratorConstructor }, { &kNS_WINIEHISTORYENUMERATOR_CID, false, nullptr, nsIEHistoryEnumeratorConstructor },
#elif defined(XP_MACOSX)
{ &kNS_SHELLSERVICE_CID, false, nullptr, nsMacShellServiceConstructor },
#endif #endif
#if defined(MOZ_WIDGET_COCOA) #if defined(MOZ_WIDGET_COCOA)
diff --git a/browser/components/preferences/in-content/main.js b/browser/components/preferences/in-content/main.js diff --git a/browser/components/preferences/in-content/main.js b/browser/components/preferences/in-content/main.js
@ -1510,7 +1523,7 @@ diff --git a/browser/components/preferences/in-content/main.js b/browser/compone
performanceSettingsLink.setAttribute("href", performanceSettingsUrl); performanceSettingsLink.setAttribute("href", performanceSettingsUrl);
this.updateDefaultPerformanceSettingsPref(); this.updateDefaultPerformanceSettingsPref();
@@ -1012,16 +1019,27 @@ var gMainPane = { @@ -1021,16 +1028,27 @@ var gMainPane = {
// Reset exponential backoff delay time in order to do visual update in pollForDefaultBrowser. // Reset exponential backoff delay time in order to do visual update in pollForDefaultBrowser.
this._backoffIndex = 0; this._backoffIndex = 0;
@ -1541,30 +1554,30 @@ diff --git a/browser/components/preferences/in-content/main.js b/browser/compone
diff --git a/browser/components/shell/moz.build b/browser/components/shell/moz.build diff --git a/browser/components/shell/moz.build b/browser/components/shell/moz.build
--- a/browser/components/shell/moz.build --- a/browser/components/shell/moz.build
+++ b/browser/components/shell/moz.build +++ b/browser/components/shell/moz.build
@@ -39,16 +39,18 @@ if CONFIG['OS_ARCH'] == 'WINNT': @@ -29,16 +29,18 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'coco
]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
SOURCES += [
'nsMacShellService.cpp',
] ]
elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
XPIDL_SOURCES += [
'nsIGNOMEShellService.idl',
]
SOURCES += [ SOURCES += [
'nsGNOMEShellService.cpp', 'nsGNOMEShellService.cpp',
+ 'nsKDEShellService.cpp', + 'nsKDEShellService.cpp',
+ 'nsUnixShellService.cpp', + 'nsUnixShellService.cpp',
] ]
elif CONFIG['OS_ARCH'] == 'WINNT':
if SOURCES: SOURCES += [
FINAL_LIBRARY = 'browsercomps' 'nsWindowsShellService.cpp',
]
EXTRA_JS_MODULES += [ LOCAL_INCLUDES += [
'HeadlessShell.jsm', '../../../other-licenses/nsis/Contrib/CityHash/cityhash',
'ShellService.jsm', ]
diff --git a/browser/components/shell/nsKDEShellService.cpp b/browser/components/shell/nsKDEShellService.cpp diff --git a/browser/components/shell/nsKDEShellService.cpp b/browser/components/shell/nsKDEShellService.cpp
new file mode 100644 new file mode 100644
--- /dev/null --- /dev/null
+++ b/browser/components/shell/nsKDEShellService.cpp +++ b/browser/components/shell/nsKDEShellService.cpp
@@ -0,0 +1,153 @@ @@ -0,0 +1,150 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* -*- 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 +/* 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 + * License, v. 2.0. If a copy of the MPL was not distributed with this
@ -1598,13 +1611,10 @@ new file mode 100644
+NS_IMPL_ISUPPORTS(nsKDEShellService, nsIGNOMEShellService, nsIShellService) +NS_IMPL_ISUPPORTS(nsKDEShellService, nsIGNOMEShellService, nsIShellService)
+ +
+NS_IMETHODIMP +NS_IMETHODIMP
+nsKDEShellService::IsDefaultBrowser(bool aStartupCheck, +nsKDEShellService::IsDefaultBrowser(bool aForAllTypes,
+ bool aForAllTypes,
+ bool* aIsDefaultBrowser) + bool* aIsDefaultBrowser)
+{ +{
+ *aIsDefaultBrowser = false; + *aIsDefaultBrowser = false;
+ if (aStartupCheck)
+ mCheckedThisSession = true;
+ +
+ nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID ); + nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID );
+ if (!command) + if (!command)
@ -1722,7 +1732,7 @@ diff --git a/browser/components/shell/nsKDEShellService.h b/browser/components/s
new file mode 100644 new file mode 100644
--- /dev/null --- /dev/null
+++ b/browser/components/shell/nsKDEShellService.h +++ b/browser/components/shell/nsKDEShellService.h
@@ -0,0 +1,30 @@ @@ -0,0 +1,32 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* -*- 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 +/* 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 + * License, v. 2.0. If a copy of the MPL was not distributed with this
@ -1732,10 +1742,12 @@ new file mode 100644
+#define nskdeshellservice_h____ +#define nskdeshellservice_h____
+ +
+#include "nsIGNOMEShellService.h" +#include "nsIGNOMEShellService.h"
+#include "nsToolkitShellService.h"
+#include "nsString.h" +#include "nsString.h"
+#include "mozilla/Attributes.h" +#include "mozilla/Attributes.h"
+ +
+class nsKDEShellService final : public nsIGNOMEShellService +class nsKDEShellService final : public nsIGNOMEShellService,
+ public nsToolkitShellService
+{ +{
+public: +public:
+ nsKDEShellService() : mCheckedThisSession(false) { } + nsKDEShellService() : mCheckedThisSession(false) { }
@ -1803,7 +1815,7 @@ new file mode 100644
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
--- a/browser/installer/package-manifest.in --- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in +++ b/browser/installer/package-manifest.in
@@ -451,16 +451,18 @@ @@ -452,16 +452,18 @@
@RESPATH@/browser/defaults/settings/pinning @RESPATH@/browser/defaults/settings/pinning
@RESPATH@/browser/defaults/settings/main @RESPATH@/browser/defaults/settings/main

View file

@ -10,7 +10,7 @@
# This also means only STABLE upstream releases, NO betas. # This also means only STABLE upstream releases, NO betas.
# This is a discussed topic. Please, do not flame it again. # This is a discussed topic. Please, do not flame it again.
%define major 65.0.2 %define major 66.0.1
%define ff_epoch 0 %define ff_epoch 0
# (tpg) set version HERE !!! # (tpg) set version HERE !!!
%define realver %{major} %define realver %{major}
@ -85,6 +85,7 @@ BuildRequires: clang-devel
%if 0%{?clang} %if 0%{?clang}
BuildRequires: lld BuildRequires: lld
%endif %endif
BuildRequires: nasm
BuildRequires: libatomic-devel BuildRequires: libatomic-devel
BuildRequires: pkgconfig(xinerama) BuildRequires: pkgconfig(xinerama)
BuildRequires: pkgconfig(xscrnsaver) BuildRequires: pkgconfig(xscrnsaver)
@ -281,7 +282,8 @@ ac_add_options --enable-default-toolkit=cairo-gtk2
%endif %endif
# # Enables security hardening compiler options # # Enables security hardening compiler options
# ac_add_options --enable-hardening # ac_add_options --enable-hardening
ac_add_options --enable-linker=%{linker} # # https://bugzilla.mozilla.org/show_bug.cgi?id=1483822
# ac_add_options --enable-linker=%{linker}
# # Optimization for size is broken with gcc7 and later # # Optimization for size is broken with gcc7 and later
# ac_add_options --enable-optimize="-O2" # ac_add_options --enable-optimize="-O2"
ac_add_options --enable-official-branding ac_add_options --enable-official-branding
@ -296,7 +298,8 @@ ac_add_options --target=%{_target_platform}
ac_add_options --with-distribution-id=org.rosa ac_add_options --with-distribution-id=org.rosa
# Uncomment the following line if you wish to use Google's geolocaton API # Uncomment the following line if you wish to use Google's geolocaton API
# (needed for use with saved maps with Google Maps) # (needed for use with saved maps with Google Maps)
ac_add_options --with-google-api-keyfile=%{SOURCE11} ac_add_options --with-google-location-service-api-keyfile=%{SOURCE11}
ac_add_options --with-google-safebrowsing-api-keyfile=%{SOURCE11}
# Uncomment the following line if you wish to use Mozilla Location Service # Uncomment the following line if you wish to use Mozilla Location Service
ac_add_options --with-mozilla-api-keyfile=%{SOURCE10} ac_add_options --with-mozilla-api-keyfile=%{SOURCE10}
ac_add_options --with-system-bz2 ac_add_options --with-system-bz2

View file

@ -1,5 +1,5 @@
# HG changeset patch # HG changeset patch
# Parent ff3da33eabc1d8760ec41a87afbaf44ded300ede # Parent f55e33a10c2a23625826ef6f8dbe18d5a455d29e
Description: Add KDE integration to Firefox (toolkit parts) Description: Add KDE integration to Firefox (toolkit parts)
Author: Wolfgang Rosenauer <wolfgang@rosenauer.org> Author: Wolfgang Rosenauer <wolfgang@rosenauer.org>
Author: Lubos Lunak <lunak@suse.com> Author: Lubos Lunak <lunak@suse.com>
@ -21,13 +21,13 @@ diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp
+#include "nsKDEUtils.h" +#include "nsKDEUtils.h"
#ifdef MOZ_MEMORY #ifdef MOZ_MEMORY
#include "mozmemory.h" # include "mozmemory.h"
#endif #endif
#ifdef XP_WIN #ifdef XP_WIN
#include "windows.h" # include "windows.h"
#endif #endif
@@ -4466,25 +4467,37 @@ float MOZ_MAYBE_UNUSED GetPref<float>(co @@ -4467,25 +4468,37 @@ float MOZ_MAYBE_UNUSED GetPref<float>(co
// application pref files for backwards compatibility. // application pref files for backwards compatibility.
static const char* specialFiles[] = { static const char* specialFiles[] = {
#if defined(XP_MACOSX) #if defined(XP_MACOSX)
@ -37,10 +37,10 @@ diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp
#elif defined(XP_UNIX) #elif defined(XP_UNIX)
"unix.js" "unix.js"
+ , "" // placeholder for KDE (empty is otherwise harmless) + , "" // placeholder for KDE (empty is otherwise harmless)
#if defined(_AIX) # if defined(_AIX)
, ,
"aix.js" "aix.js"
#endif # endif
#elif defined(XP_BEOS) #elif defined(XP_BEOS)
"beos.js" "beos.js"
#endif #endif
@ -65,7 +65,7 @@ diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp
// Load jar:$app/omni.jar!/defaults/preferences/*.js // Load jar:$app/omni.jar!/defaults/preferences/*.js
// or jar:$gre/omni.jar!/defaults/preferences/*.js. // or jar:$gre/omni.jar!/defaults/preferences/*.js.
@@ -4532,17 +4545,17 @@ float MOZ_MAYBE_UNUSED GetPref<float>(co @@ -4533,17 +4546,17 @@ float MOZ_MAYBE_UNUSED GetPref<float>(co
} }
nsCOMPtr<nsIFile> path = do_QueryInterface(elem); nsCOMPtr<nsIFile> path = do_QueryInterface(elem);
@ -171,12 +171,12 @@ diff --git a/toolkit/components/downloads/moz.build b/toolkit/components/downloa
diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn
--- a/toolkit/content/jar.mn --- a/toolkit/content/jar.mn
+++ b/toolkit/content/jar.mn +++ b/toolkit/content/jar.mn
@@ -67,16 +67,18 @@ toolkit.jar: @@ -65,16 +65,18 @@ toolkit.jar:
content/global/bindings/button.xml (widgets/button.xml)
content/global/bindings/calendar.js (widgets/calendar.js) content/global/bindings/calendar.js (widgets/calendar.js)
content/global/bindings/checkbox.xml (widgets/checkbox.xml) content/global/bindings/checkbox.xml (widgets/checkbox.xml)
content/global/bindings/datekeeper.js (widgets/datekeeper.js) content/global/bindings/datekeeper.js (widgets/datekeeper.js)
content/global/bindings/datepicker.js (widgets/datepicker.js) content/global/bindings/datepicker.js (widgets/datepicker.js)
content/global/bindings/datetimepopup.xml (widgets/datetimepopup.xml)
content/global/bindings/datetimebox.xml (widgets/datetimebox.xml) content/global/bindings/datetimebox.xml (widgets/datetimebox.xml)
content/global/bindings/datetimebox.css (widgets/datetimebox.css) content/global/bindings/datetimebox.css (widgets/datetimebox.css)
* content/global/bindings/dialog.xml (widgets/dialog.xml) * content/global/bindings/dialog.xml (widgets/dialog.xml)
@ -186,15 +186,15 @@ diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn
content/global/bindings/menu.xml (widgets/menu.xml) content/global/bindings/menu.xml (widgets/menu.xml)
content/global/bindings/menulist.xml (widgets/menulist.xml) content/global/bindings/menulist.xml (widgets/menulist.xml)
content/global/bindings/notification.xml (widgets/notification.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/popup.xml (widgets/popup.xml)
content/global/bindings/radio.xml (widgets/radio.xml) content/global/bindings/radio.xml (widgets/radio.xml)
content/global/bindings/richlistbox.xml (widgets/richlistbox.xml) content/global/bindings/richlistbox.xml (widgets/richlistbox.xml)
content/global/bindings/scrollbox.xml (widgets/scrollbox.xml)
diff --git a/toolkit/content/widgets/dialog-kde.xml b/toolkit/content/widgets/dialog-kde.xml diff --git a/toolkit/content/widgets/dialog-kde.xml b/toolkit/content/widgets/dialog-kde.xml
new file mode 100644 new file mode 100644
--- /dev/null --- /dev/null
+++ b/toolkit/content/widgets/dialog-kde.xml +++ b/toolkit/content/widgets/dialog-kde.xml
@@ -0,0 +1,477 @@ @@ -0,0 +1,507 @@
+<?xml version="1.0"?> +<?xml version="1.0"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public +<!-- 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 + - License, v. 2.0. If a copy of the MPL was not distributed with this
@ -229,7 +229,7 @@ new file mode 100644
+ <xul:button dlgtype="accept" class="dialog-button" xbl:inherits="disabled=buttondisabledaccept"/> + <xul:button dlgtype="accept" class="dialog-button" xbl:inherits="disabled=buttondisabledaccept"/>
+#elif XP_UNIX +#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:button dlgtype="extra2" class="dialog-button" hidden="true"/>
+ <xul:spacer anonid="spacer" flex="1"/> + <xul:spacer anonid="spacer" flex="1"/>
+ <xul:button dlgtype="accept" class="dialog-button" xbl:inherits="disabled=buttondisabledaccept"/> + <xul:button dlgtype="accept" class="dialog-button" xbl:inherits="disabled=buttondisabledaccept"/>
@ -266,6 +266,11 @@ new file mode 100644
+ event.preventDefault(); + event.preventDefault();
+ })</field> + })</field>
+ +
+ <!-- Gets populated by elements that are passed to document.l10n.setAttributes
+ to localize the dialog buttons. Needed to properly size the dialog after
+ the asynchronous translation. -->
+ <field name="_l10nButtons">[]</field>
+
+ <property name="buttons" + <property name="buttons"
+ onget="return this.getAttribute('buttons');" + onget="return this.getAttribute('buttons');"
+ onset="this._configureButtons(val); return val;"/> + onset="this._configureButtons(val); return val;"/>
@ -365,16 +370,32 @@ new file mode 100644
+ this._configureButtons(this.buttons); + this._configureButtons(this.buttons);
+ +
+ // listen for when window is closed via native close buttons + // listen for when window is closed via native close buttons
+ window.addEventListener("close", this._closeHandler); + window.addEventListener("close", this);
+ +
+ // for things that we need to initialize after onload fires + // for things that we need to initialize after onload fires
+ window.addEventListener("load", this.postLoadInit); + window.addEventListener("load", this);
+ +
+ window.moveToAlertPosition = this.moveToAlertPosition; + window.moveToAlertPosition = this.moveToAlertPosition;
+ window.centerWindowOnScreen = this.centerWindowOnScreen; + window.centerWindowOnScreen = this.centerWindowOnScreen;
+ ]]> + ]]>
+ </constructor> + </constructor>
+ +
+ <method name="handleEvent">
+ <parameter name="aEvent"/>
+ <body><![CDATA[
+ switch (aEvent.type) {
+ case "close": {
+ this._closeHandler(aEvent);
+ break;
+ }
+ case "load": {
+ this.postLoadInit(aEvent);
+ break;
+ }
+ }
+ ]]></body>
+ </method>
+
+ <method name="postLoadInit"> + <method name="postLoadInit">
+ <parameter name="aEvent"/> + <parameter name="aEvent"/>
+ <body> + <body>
@ -422,6 +443,12 @@ new file mode 100644
+ +
+ // Give focus after onload completes, see bug 103197. + // Give focus after onload completes, see bug 103197.
+ setTimeout(focusInit, 0); + setTimeout(focusInit, 0);
+
+ if (this._l10nButtons.length) {
+ document.l10n.translateElements(this._l10nButtons).then(() => {
+ window.sizeToContent();
+ });
+ }
+ ]]> + ]]>
+ </body> + </body>
+ </method> + </method>
@ -490,13 +517,14 @@ new file mode 100644
+ button.setAttribute("label", this.getAttribute("buttonlabel" + dlgtype)); + button.setAttribute("label", this.getAttribute("buttonlabel" + dlgtype));
+ if (this.hasAttribute("buttonaccesskey" + dlgtype)) + if (this.hasAttribute("buttonaccesskey" + dlgtype))
+ button.setAttribute("accesskey", this.getAttribute("buttonaccesskey" + dlgtype)); + button.setAttribute("accesskey", this.getAttribute("buttonaccesskey" + dlgtype));
+ } else if (this.hasAttribute("buttonid" + dlgtype)) {
+ document.l10n.setAttributes(button, this.getAttribute("buttonid" + dlgtype));
+ this._l10nButtons.push(button);
+ } else if (dlgtype != "extra1" && dlgtype != "extra2") { + } else if (dlgtype != "extra1" && dlgtype != "extra2") {
+ button.setAttribute("label", this.mStrBundle.GetStringFromName("button-" + dlgtype)); + button.setAttribute("label", this.mStrBundle.GetStringFromName("button-" + dlgtype));
+ var accessKey = this.mStrBundle.GetStringFromName("accesskey-" + dlgtype); + var accessKey = this.mStrBundle.GetStringFromName("accesskey-" + dlgtype);
+ if (accessKey) + if (accessKey)
+ button.setAttribute("accesskey", accessKey); + button.setAttribute("accesskey", accessKey);
+ } else if (this.hasAttribute("buttonid" + dlgtype)) {
+ document.l10n.setAttributes(button, this.getAttribute("buttonid" + dlgtype));
+ } + }
+ } + }
+ // allow specifying alternate icons in the dialog header + // allow specifying alternate icons in the dialog header
@ -664,7 +692,9 @@ new file mode 100644
+ <handler event="focus" phase="capturing"> + <handler event="focus" phase="capturing">
+ var btn = this.getButton(this.defaultButton); + var btn = this.getButton(this.defaultButton);
+ if (btn) + if (btn)
+ btn.setAttribute("default", event.originalTarget == btn || !(event.originalTarget instanceof Ci.nsIDOMXULButtonElement)); + btn.setAttribute("default", event.originalTarget == btn ||
+ !(event.originalTarget.localName == "button" ||
+ event.originalTarget.localName == "toolbarbutton"));
+ </handler> + </handler>
+#endif +#endif
+ </handlers> + </handlers>
@ -675,7 +705,7 @@ new file mode 100644
diff --git a/toolkit/mozapps/downloads/nsHelperAppDlg.js b/toolkit/mozapps/downloads/nsHelperAppDlg.js diff --git a/toolkit/mozapps/downloads/nsHelperAppDlg.js b/toolkit/mozapps/downloads/nsHelperAppDlg.js
--- a/toolkit/mozapps/downloads/nsHelperAppDlg.js --- a/toolkit/mozapps/downloads/nsHelperAppDlg.js
+++ b/toolkit/mozapps/downloads/nsHelperAppDlg.js +++ b/toolkit/mozapps/downloads/nsHelperAppDlg.js
@@ -1030,30 +1030,60 @@ nsUnknownContentTypeDialog.prototype = { @@ -1033,30 +1033,60 @@ nsUnknownContentTypeDialog.prototype = {
if (params.handlerApp && if (params.handlerApp &&
params.handlerApp.executable && params.handlerApp.executable &&
@ -848,7 +878,7 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build
--- a/toolkit/xre/moz.build --- a/toolkit/xre/moz.build
+++ b/toolkit/xre/moz.build +++ b/toolkit/xre/moz.build
@@ -73,17 +73,19 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'co @@ -81,17 +81,19 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'co
'../components/printingui', '../components/printingui',
] ]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'uikit': elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'uikit':
@ -1281,8 +1311,8 @@ diff --git a/uriloader/exthandler/HandlerServiceParent.cpp b/uriloader/exthandle
#include "ContentHandlerService.h" #include "ContentHandlerService.h"
#include "nsStringEnumerator.h" #include "nsStringEnumerator.h"
#ifdef MOZ_WIDGET_GTK #ifdef MOZ_WIDGET_GTK
-#include "unix/nsGNOMERegistry.h" -# include "unix/nsGNOMERegistry.h"
+#include "unix/nsCommonRegistry.h" +# include "unix/nsCommonRegistry.h"
#endif #endif
using mozilla::dom::ContentHandlerService; using mozilla::dom::ContentHandlerService;
@ -1591,7 +1621,7 @@ diff --git a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp b/uriloader/exthandler
#include "nsIIOService.h" #include "nsIIOService.h"
#include "nsAutoPtr.h" #include "nsAutoPtr.h"
#ifdef MOZ_ENABLE_DBUS #ifdef MOZ_ENABLE_DBUS
#include "nsDBusHandlerApp.h" # include "nsDBusHandlerApp.h"
#endif #endif
+#if defined(XP_UNIX) && !defined(XP_MACOSX) +#if defined(XP_UNIX) && !defined(XP_MACOSX)
+#include "nsKDEUtils.h" +#include "nsKDEUtils.h"
@ -1678,8 +1708,8 @@ diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exth
#include "nsOSHelperAppService.h" #include "nsOSHelperAppService.h"
#include "nsMIMEInfoUnix.h" #include "nsMIMEInfoUnix.h"
#ifdef MOZ_WIDGET_GTK #ifdef MOZ_WIDGET_GTK
-#include "nsGNOMERegistry.h" -# include "nsGNOMERegistry.h"
+#include "nsCommonRegistry.h" +# include "nsCommonRegistry.h"
#endif #endif
#include "nsISupports.h" #include "nsISupports.h"
#include "nsString.h" #include "nsString.h"
@ -1688,7 +1718,7 @@ diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exth
#include "nsIURL.h" #include "nsIURL.h"
#include "nsIFileStreams.h" #include "nsIFileStreams.h"
#include "nsILineInputStream.h" #include "nsILineInputStream.h"
@@ -1031,17 +1031,17 @@ nsresult nsOSHelperAppService::GetHandle @@ -1025,17 +1025,17 @@ nsresult nsOSHelperAppService::GetHandle
nsresult nsOSHelperAppService::OSProtocolHandlerExists( nsresult nsOSHelperAppService::OSProtocolHandlerExists(
const char* aProtocolScheme, bool* aHandlerExists) { const char* aProtocolScheme, bool* aHandlerExists) {
@ -1707,7 +1737,7 @@ diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exth
nsCOMPtr<nsIHandlerService> handlerSvc = nsCOMPtr<nsIHandlerService> handlerSvc =
do_GetService(NS_HANDLERSERVICE_CONTRACTID, &rv); do_GetService(NS_HANDLERSERVICE_CONTRACTID, &rv);
if (NS_SUCCEEDED(rv) && handlerSvc) { if (NS_SUCCEEDED(rv) && handlerSvc) {
@@ -1051,17 +1051,17 @@ nsresult nsOSHelperAppService::OSProtoco @@ -1045,17 +1045,17 @@ nsresult nsOSHelperAppService::OSProtoco
} }
return rv; return rv;
@ -1726,7 +1756,7 @@ diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exth
nsresult nsOSHelperAppService::GetFileTokenForPath( nsresult nsOSHelperAppService::GetFileTokenForPath(
const char16_t* platformAppPath, nsIFile** aFile) { const char16_t* platformAppPath, nsIFile** aFile) {
@@ -1142,17 +1142,17 @@ already_AddRefed<nsMIMEInfoBase> nsOSHel @@ -1136,17 +1136,17 @@ already_AddRefed<nsMIMEInfoBase> nsOSHel
nsresult rv = nsresult rv =
LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt), majorType, LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt), majorType,
minorType, mime_types_description, true); minorType, mime_types_description, true);
@ -1745,7 +1775,7 @@ diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exth
rv = LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt), majorType, rv = LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt), majorType,
minorType, mime_types_description, false); minorType, mime_types_description, false);
@@ -1254,17 +1254,17 @@ already_AddRefed<nsMIMEInfoBase> nsOSHel @@ -1248,17 +1248,17 @@ already_AddRefed<nsMIMEInfoBase> nsOSHel
// Now look up our extensions // Now look up our extensions
nsAutoString extensions, mime_types_description; nsAutoString extensions, mime_types_description;
@ -2201,15 +2231,15 @@ diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestPars
nsAutoString osVersion; nsAutoString osVersion;
+ nsAutoString desktop; + nsAutoString desktop;
#if defined(XP_WIN) #if defined(XP_WIN)
#pragma warning(push) # pragma warning(push)
#pragma warning(disable : 4996) // VC12+ deprecates GetVersionEx # pragma warning(disable : 4996) // VC12+ deprecates GetVersionEx
OSVERSIONINFO info = {sizeof(OSVERSIONINFO)}; OSVERSIONINFO info = {sizeof(OSVERSIONINFO)};
if (GetVersionEx(&info)) { if (GetVersionEx(&info)) {
nsTextFormatter::ssprintf(osVersion, u"%ld.%ld", info.dwMajorVersion, nsTextFormatter::ssprintf(osVersion, u"%ld.%ld", info.dwMajorVersion,
info.dwMinorVersion); info.dwMinorVersion);
} }
+ desktop = NS_LITERAL_STRING("win"); + desktop = NS_LITERAL_STRING("win");
#pragma warning(pop) # pragma warning(pop)
#elif defined(MOZ_WIDGET_COCOA) #elif defined(MOZ_WIDGET_COCOA)
SInt32 majorVersion = nsCocoaFeatures::OSXVersionMajor(); SInt32 majorVersion = nsCocoaFeatures::OSXVersionMajor();
SInt32 minorVersion = nsCocoaFeatures::OSXVersionMinor(); SInt32 minorVersion = nsCocoaFeatures::OSXVersionMinor();
@ -2310,15 +2340,15 @@ diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
#include "prlink.h" #include "prlink.h"
#ifdef MOZ_WIDGET_GTK #ifdef MOZ_WIDGET_GTK
#include "nsIGIOService.h" # include "nsIGIOService.h"
+#include "nsKDEUtils.h" +# include "nsKDEUtils.h"
#endif #endif
#ifdef MOZ_WIDGET_COCOA #ifdef MOZ_WIDGET_COCOA
#include <Carbon/Carbon.h> # include <Carbon/Carbon.h>
#include "CocoaFileUtils.h" # include "CocoaFileUtils.h"
#include "prmem.h" # include "prmem.h"
#include "plbase64.h" # include "plbase64.h"
@@ -1902,62 +1903,77 @@ nsLocalFile::SetPersistentDescriptor(con @@ -1902,62 +1903,77 @@ nsLocalFile::SetPersistentDescriptor(con