77 getter_AddRefs(list)); |
77 getter_AddRefs(list)); |
78 if (!list) |
78 if (!list) |
79 return NS_OK; |
79 return NS_OK; |
80 |
80 |
81 bool hasMore; |
81 bool hasMore; |
82 @@ -1140,17 +1159,17 @@ static nsresult pref_LoadPrefsInDirList( |
82 @@ -1138,17 +1157,17 @@ static nsresult pref_LoadPrefsInDirList( |
83 |
83 |
84 nsAutoCString leaf; |
84 nsAutoCString leaf; |
85 path->GetNativeLeafName(leaf); |
85 path->GetNativeLeafName(leaf); |
86 |
86 |
87 // Do we care if a file provided by this process fails to load? |
87 // Do we care if a file provided by this process fails to load? |
88 if (Substring(leaf, leaf.Length() - 4).Equals(NS_LITERAL_CSTRING(".xpi"))) |
88 if (Substring(leaf, leaf.Length() - 4).Equals(NS_LITERAL_CSTRING(".xpi"))) |
89 ReadExtensionPrefs(path); |
89 ReadExtensionPrefs(path); |
90 else |
90 else |
91 - pref_LoadPrefsInDir(path, nullptr, 0); |
91 - pref_LoadPrefsInDir(path, nullptr, 0); |
92 + pref_LoadPrefsInDir(path, specialFiles, NS_ARRAY_LENGTH(specialFiles)); |
92 + pref_LoadPrefsInDir(path, specialFiles, MOZ_ARRAY_LENGTH(specialFiles)); |
93 } |
93 } |
94 return NS_OK; |
94 return NS_OK; |
95 } |
95 } |
96 |
96 |
97 static nsresult pref_ReadPrefFromJar(nsZipArchive* jarReader, const char *name) |
97 static nsresult pref_ReadPrefFromJar(nsZipArchive* jarReader, const char *name) |
98 { |
98 { |
99 nsZipItemPtr<char> manifest(jarReader, name, true); |
99 nsZipItemPtr<char> manifest(jarReader, name, true); |
100 NS_ENSURE_TRUE(manifest.Buffer(), NS_ERROR_NOT_AVAILABLE); |
100 NS_ENSURE_TRUE(manifest.Buffer(), NS_ERROR_NOT_AVAILABLE); |
101 @@ -1244,28 +1263,40 @@ static nsresult pref_InitInitialObjects( |
101 @@ -1242,28 +1261,40 @@ static nsresult pref_InitInitialObjects( |
102 /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */ |
102 /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */ |
103 static const char* specialFiles[] = { |
103 static const char* specialFiles[] = { |
104 #if defined(XP_MACOSX) |
104 #if defined(XP_MACOSX) |
105 "macprefs.js" |
105 "macprefs.js" |
106 #elif defined(XP_WIN) |
106 #elif defined(XP_WIN) |
268 if (fileURL && |
268 if (fileURL && |
269 NS_SUCCEEDED(fileURL->GetFile(getter_AddRefs(file))) && |
269 NS_SUCCEEDED(fileURL->GetFile(getter_AddRefs(file))) && |
270 diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn |
270 diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn |
271 --- a/toolkit/content/jar.mn |
271 --- a/toolkit/content/jar.mn |
272 +++ b/toolkit/content/jar.mn |
272 +++ b/toolkit/content/jar.mn |
273 @@ -53,29 +53,33 @@ toolkit.jar: |
273 @@ -55,29 +55,33 @@ toolkit.jar: |
274 content/global/viewZoomOverlay.js (viewZoomOverlay.js) |
274 content/global/viewZoomOverlay.js (viewZoomOverlay.js) |
275 *+ content/global/bindings/autocomplete.xml (widgets/autocomplete.xml) |
275 *+ content/global/bindings/autocomplete.xml (widgets/autocomplete.xml) |
276 content/global/bindings/browser.xml (widgets/browser.xml) |
276 content/global/bindings/browser.xml (widgets/browser.xml) |
277 content/global/bindings/button.xml (widgets/button.xml) |
277 content/global/bindings/button.xml (widgets/button.xml) |
278 content/global/bindings/checkbox.xml (widgets/checkbox.xml) |
278 content/global/bindings/checkbox.xml (widgets/checkbox.xml) |
1348 + <xul:button dlgtype="extra1" class="dialog-button" hidden="true"/> |
1348 + <xul:button dlgtype="extra1" class="dialog-button" hidden="true"/> |
1349 + <xul:spacer anonid="spacer" flex="1"/> |
1349 + <xul:spacer anonid="spacer" flex="1"/> |
1350 + <xul:button dlgtype="cancel" class="dialog-button" icon="cancel"/> |
1350 + <xul:button dlgtype="cancel" class="dialog-button" icon="cancel"/> |
1351 + <xul:button dlgtype="accept" class="dialog-button" icon="accept"/> |
1351 + <xul:button dlgtype="accept" class="dialog-button" icon="accept"/> |
1352 +#elif XP_UNIX |
1352 +#elif XP_UNIX |
1353 + pack="end"> |
1353 + pack="end"> |
1354 + <xul:button dlgtype="help" class="dialog-button" hidden="true" icon="help"/> |
1354 + <xul:button dlgtype="help" class="dialog-button" hidden="true" icon="help"/> |
1355 + <xul:button dlgtype="extra2" class="dialog-button" hidden="true"/> |
1355 + <xul:button dlgtype="extra2" class="dialog-button" hidden="true"/> |
1356 + <xul:spacer anonid="spacer" flex="1"/> |
1356 + <xul:spacer anonid="spacer" flex="1"/> |
1357 + <xul:button dlgtype="accept" class="dialog-button" icon="accept"/> |
1357 + <xul:button dlgtype="accept" class="dialog-button" icon="accept"/> |
1358 + <xul:button dlgtype="extra1" class="dialog-button" hidden="true"/> |
1358 + <xul:button dlgtype="extra1" class="dialog-button" hidden="true"/> |
1359 + <xul:button dlgtype="cancel" class="dialog-button" icon="cancel"/> |
1359 + <xul:button dlgtype="cancel" class="dialog-button" icon="cancel"/> |
1360 + <xul:button dlgtype="disclosure" class="dialog-button" hidden="true"/> |
1360 + <xul:button dlgtype="disclosure" class="dialog-button" hidden="true"/> |
1361 + |
|
1362 +#else |
1361 +#else |
1363 + pack="end"> |
1362 + pack="end"> |
1364 + <xul:button dlgtype="extra2" class="dialog-button" hidden="true"/> |
1363 + <xul:button dlgtype="extra2" class="dialog-button" hidden="true"/> |
1365 + <xul:spacer anonid="spacer" flex="1"/> |
1364 + <xul:spacer anonid="spacer" flex="1"/> |
1366 + <xul:button dlgtype="accept" class="dialog-button" icon="accept"/> |
1365 + <xul:button dlgtype="accept" class="dialog-button" icon="accept"/> |
1806 + </method> |
1805 + </method> |
1807 + </implementation> |
1806 + </implementation> |
1808 + <handlers> |
1807 + <handlers> |
1809 + <handler event="dialogaccept"> |
1808 + <handler event="dialogaccept"> |
1810 + <![CDATA[ |
1809 + <![CDATA[ |
1811 + if (!this._fireEvent("beforeaccept", this)) |
1810 + if (!this._fireEvent("beforeaccept", this)){ |
1812 + return; |
1811 + return false; |
1813 + |
1812 + } |
|
1813 + |
1814 + if (this.type == "child" && window.opener) { |
1814 + if (this.type == "child" && window.opener) { |
1815 + var psvc = Components.classes["@mozilla.org/preferences-service;1"] |
1815 + var psvc = Components.classes["@mozilla.org/preferences-service;1"] |
1816 + .getService(Components.interfaces.nsIPrefBranch); |
1816 + .getService(Components.interfaces.nsIPrefBranch); |
1817 + var instantApply = psvc.getBoolPref("browser.preferences.instantApply"); |
1817 + var instantApply = psvc.getBoolPref("browser.preferences.instantApply"); |
1818 + if (instantApply) { |
1818 + if (instantApply) { |
2615 diff --git a/uriloader/exthandler/Makefile.in b/uriloader/exthandler/Makefile.in |
2617 diff --git a/uriloader/exthandler/Makefile.in b/uriloader/exthandler/Makefile.in |
2616 --- a/uriloader/exthandler/Makefile.in |
2618 --- a/uriloader/exthandler/Makefile.in |
2617 +++ b/uriloader/exthandler/Makefile.in |
2619 +++ b/uriloader/exthandler/Makefile.in |
2618 @@ -19,9 +19,10 @@ endif |
2620 @@ -19,9 +19,10 @@ endif |
2619 ifdef MOZ_ENABLE_DBUS |
2621 ifdef MOZ_ENABLE_DBUS |
2620 LOCAL_INCLUDES += $(TK_CFLAGS) $(MOZ_DBUS_CFLAGS) |
2622 OS_INCLUDES += $(TK_CFLAGS) $(MOZ_DBUS_CFLAGS) |
2621 endif |
2623 endif |
2622 |
2624 |
2623 include $(topsrcdir)/config/rules.mk |
2625 include $(topsrcdir)/config/rules.mk |
2624 |
2626 |
2625 ifneq (,$(filter qt gtk2 gtk3, $(MOZ_WIDGET_TOOLKIT))) |
2627 ifneq (,$(filter qt gtk2 gtk3, $(MOZ_WIDGET_TOOLKIT))) |
3070 |
3072 |
3071 // Now look up our extensions |
3073 // Now look up our extensions |
3072 diff --git a/widget/gtk/Makefile.in b/widget/gtk/Makefile.in |
3074 diff --git a/widget/gtk/Makefile.in b/widget/gtk/Makefile.in |
3073 --- a/widget/gtk/Makefile.in |
3075 --- a/widget/gtk/Makefile.in |
3074 +++ b/widget/gtk/Makefile.in |
3076 +++ b/widget/gtk/Makefile.in |
3075 @@ -4,11 +4,13 @@ |
3077 @@ -3,11 +3,13 @@ |
|
3078 # License, v. 2.0. If a copy of the MPL was not distributed with this |
3076 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
3079 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
3077 |
3080 |
3078 include $(topsrcdir)/config/rules.mk |
3081 include $(topsrcdir)/config/rules.mk |
3079 |
3082 |
3080 CFLAGS += $(MOZ_STARTUP_NOTIFICATION_CFLAGS) |
3083 CFLAGS += $(MOZ_STARTUP_NOTIFICATION_CFLAGS) |
3081 CXXFLAGS += $(MOZ_CAIRO_CFLAGS) $(MOZ_PIXMAN_CFLAGS) \ |
3084 CXXFLAGS += $(MOZ_CAIRO_CFLAGS) $(MOZ_STARTUP_NOTIFICATION_CFLAGS) |
3082 $(MOZ_STARTUP_NOTIFICATION_CFLAGS) |
|
3083 |
3085 |
3084 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre |
3086 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre |
3085 + |
3087 + |
3086 CFLAGS += $(TK_CFLAGS) |
3088 CFLAGS += $(TK_CFLAGS) |
3087 CXXFLAGS += $(TK_CFLAGS) |
3089 CXXFLAGS += $(TK_CFLAGS) |
3450 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre |
3452 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre |
3451 endif |
3453 endif |
3452 diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestParser.cpp |
3454 diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestParser.cpp |
3453 --- a/xpcom/components/ManifestParser.cpp |
3455 --- a/xpcom/components/ManifestParser.cpp |
3454 +++ b/xpcom/components/ManifestParser.cpp |
3456 +++ b/xpcom/components/ManifestParser.cpp |
3455 @@ -30,16 +30,17 @@ |
3457 @@ -31,16 +31,17 @@ |
3456 #include "nsTextFormatter.h" |
3458 #include "nsTextFormatter.h" |
3457 #include "nsVersionComparator.h" |
3459 #include "nsVersionComparator.h" |
3458 #include "nsXPCOMCIDInternal.h" |
3460 #include "nsXPCOMCIDInternal.h" |
3459 |
3461 |
3460 #include "nsIConsoleService.h" |
3462 #include "nsIConsoleService.h" |
3468 struct ManifestDirective |
3470 struct ManifestDirective |
3469 { |
3471 { |
3470 const char* directive; |
3472 const char* directive; |
3471 int argc; |
3473 int argc; |
3472 |
3474 |
3473 @@ -397,16 +398,17 @@ ParseManifest(NSLocationType type, FileL |
3475 @@ -398,16 +399,17 @@ ParseManifest(NSLocationType type, FileL |
3474 NS_NAMED_LITERAL_STRING(kPlatform, "platform"); |
3476 NS_NAMED_LITERAL_STRING(kPlatform, "platform"); |
3475 NS_NAMED_LITERAL_STRING(kContentAccessible, "contentaccessible"); |
3477 NS_NAMED_LITERAL_STRING(kContentAccessible, "contentaccessible"); |
3476 NS_NAMED_LITERAL_STRING(kApplication, "application"); |
3478 NS_NAMED_LITERAL_STRING(kApplication, "application"); |
3477 NS_NAMED_LITERAL_STRING(kAppVersion, "appversion"); |
3479 NS_NAMED_LITERAL_STRING(kAppVersion, "appversion"); |
3478 NS_NAMED_LITERAL_STRING(kGeckoVersion, "platformversion"); |
3480 NS_NAMED_LITERAL_STRING(kGeckoVersion, "platformversion"); |
3486 |
3488 |
3487 // Obsolete |
3489 // Obsolete |
3488 NS_NAMED_LITERAL_STRING(kXPCNativeWrappers, "xpcnativewrappers"); |
3490 NS_NAMED_LITERAL_STRING(kXPCNativeWrappers, "xpcnativewrappers"); |
3489 |
3491 |
3490 nsAutoString appID; |
3492 nsAutoString appID; |
3491 @@ -444,41 +446,46 @@ ParseManifest(NSLocationType type, FileL |
3493 @@ -445,42 +447,47 @@ ParseManifest(NSLocationType type, FileL |
3492 CopyUTF8toUTF16(s, abi); |
3494 CopyUTF8toUTF16(s, abi); |
3493 abi.Insert(PRUnichar('_'), 0); |
3495 abi.Insert(char16_t('_'), 0); |
3494 abi.Insert(osTarget, 0); |
3496 abi.Insert(osTarget, 0); |
3495 } |
3497 } |
3496 } |
3498 } |
3497 } |
3499 } |
3498 |
3500 |
3499 nsAutoString osVersion; |
3501 nsAutoString osVersion; |
3500 + nsAutoString desktop; |
3502 + nsAutoString desktop; |
3501 #if defined(XP_WIN) |
3503 #if defined(XP_WIN) |
|
3504 #pragma warning(push) |
|
3505 #pragma warning(disable:4996) // VC12+ deprecates GetVersionEx |
3502 OSVERSIONINFO info = { sizeof(OSVERSIONINFO) }; |
3506 OSVERSIONINFO info = { sizeof(OSVERSIONINFO) }; |
3503 if (GetVersionEx(&info)) { |
3507 if (GetVersionEx(&info)) { |
3504 nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(), |
3508 nsTextFormatter::ssprintf(osVersion, MOZ_UTF16("%ld.%ld"), |
3505 info.dwMajorVersion, |
3509 info.dwMajorVersion, |
3506 info.dwMinorVersion); |
3510 info.dwMinorVersion); |
3507 } |
3511 } |
3508 + desktop = NS_LITERAL_STRING("win"); |
3512 + desktop = NS_LITERAL_STRING("win"); |
|
3513 #pragma warning(pop) |
3509 #elif defined(MOZ_WIDGET_COCOA) |
3514 #elif defined(MOZ_WIDGET_COCOA) |
3510 SInt32 majorVersion, minorVersion; |
3515 SInt32 majorVersion = nsCocoaFeatures::OSXVersionMajor(); |
3511 if ((Gestalt(gestaltSystemVersionMajor, &majorVersion) == noErr) && |
3516 SInt32 minorVersion = nsCocoaFeatures::OSXVersionMinor(); |
3512 (Gestalt(gestaltSystemVersionMinor, &minorVersion) == noErr)) { |
3517 nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(), |
3513 nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(), |
3518 majorVersion, |
3514 majorVersion, |
3519 minorVersion); |
3515 minorVersion); |
|
3516 } |
|
3517 + desktop = NS_LITERAL_STRING("macosx"); |
3520 + desktop = NS_LITERAL_STRING("macosx"); |
3518 #elif defined(MOZ_WIDGET_GTK) |
3521 #elif defined(MOZ_WIDGET_GTK) |
3519 nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(), |
3522 nsTextFormatter::ssprintf(osVersion, MOZ_UTF16("%ld.%ld"), |
3520 gtk_major_version, |
3523 gtk_major_version, |
3521 gtk_minor_version); |
3524 gtk_minor_version); |
3522 + desktop = nsKDEUtils::kdeSession() ? NS_LITERAL_STRING("kde") : NS_LITERAL_STRING("gnome"); |
3525 + desktop = nsKDEUtils::kdeSession() ? NS_LITERAL_STRING("kde") : NS_LITERAL_STRING("gnome"); |
3523 #elif defined(MOZ_WIDGET_ANDROID) |
3526 #elif defined(MOZ_WIDGET_ANDROID) |
3524 bool isTablet = false; |
3527 bool isTablet = false; |
3533 // at the end. |
3536 // at the end. |
3534 nsTArray<CachedDirective> contracts; |
3537 nsTArray<CachedDirective> contracts; |
3535 |
3538 |
3536 char *token; |
3539 char *token; |
3537 char *newline = buf; |
3540 char *newline = buf; |
3538 @@ -560,24 +567,26 @@ ParseManifest(NSLocationType type, FileL |
3541 @@ -562,24 +569,26 @@ ParseManifest(NSLocationType type, FileL |
3539 TriState stOsVersion = eUnspecified; |
3542 TriState stOsVersion = eUnspecified; |
3540 TriState stOs = eUnspecified; |
3543 TriState stOs = eUnspecified; |
3541 TriState stABI = eUnspecified; |
3544 TriState stABI = eUnspecified; |
3542 #if defined(MOZ_WIDGET_ANDROID) |
3545 #if defined(MOZ_WIDGET_ANDROID) |
3543 TriState stTablet = eUnspecified; |
3546 TriState stTablet = eUnspecified; |
3560 continue; |
3563 continue; |
3561 |
3564 |
3562 #if defined(MOZ_WIDGET_ANDROID) |
3565 #if defined(MOZ_WIDGET_ANDROID) |
3563 bool tablet = false; |
3566 bool tablet = false; |
3564 if (CheckFlag(kTablet, wtoken, tablet)) { |
3567 if (CheckFlag(kTablet, wtoken, tablet)) { |
3565 @@ -606,16 +615,17 @@ ParseManifest(NSLocationType type, FileL |
3568 @@ -608,16 +617,17 @@ ParseManifest(NSLocationType type, FileL |
3566 } |
3569 } |
3567 |
3570 |
3568 if (!ok || |
3571 if (!ok || |
3569 stApp == eBad || |
3572 stApp == eBad || |
3570 stAppVersion == eBad || |
3573 stAppVersion == eBad || |