Hello community,
here is the log from the commit of package mozilla-xulrunner192 for openSUSE:12.1:Update:Test checked in at 2011-11-16 16:19:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.1:Update:Test/mozilla-xulrunner192 (Old)
and /work/SRC/openSUSE:12.1:Update:Test/.mozilla-xulrunner192.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mozilla-xulrunner192", Maintainer is "PCerny@suse.com"
Changes:
--------
New Changes file:
--- /dev/null 2010-08-26 16:28:41.000000000 +0200
+++ /work/SRC/openSUSE:12.1:Update:Test/.mozilla-xulrunner192.new/mozilla-xulrunner192.changes 2011-11-16 16:19:28.000000000 +0100
@@ -0,0 +1,476 @@
+-------------------------------------------------------------------
+Wed Sep 21 10:17:09 UTC 2011 - wr@rosenauer.org
+
+- security update to 1.9.2.23 (bnc#720264)
+- bring KDE's dialog.xml in sync with original widget
+
+-------------------------------------------------------------------
+Wed Sep 14 07:08:55 UTC 2011 - wr@rosenauer.org
+
+- add dbus-1-glib-devel to BuildRequires (not pulled in
+ automatically with 12.1)
+
+-------------------------------------------------------------------
+Wed Sep 7 14:30:34 UTC 2011 - pcerny@suse.com
+
+- security update to 1.9.2.22 (bnc#714931)
+ * Complete blocking of certificates issued by DigiNotar
+ (bmo#683449)
+
+-------------------------------------------------------------------
+Fri Sep 2 14:40:07 UTC 2011 - pcerny@suse.com
+
+- security update to 1.9.2.21 (bnc#714931)
+ * MFSA 2011-34
+ Protection against fraudulent DigiNotar certificates
+ (bmo#682927)
+
+-------------------------------------------------------------------
+Fri Aug 5 09:35:34 UTC 2011 - wr@rosenauer.org
+
+- security update to 1.9.2.20 (bnc#712224)
+ fixed security issues MFSA 2011-30
+ * CVE-2011-2982
+ Miscellaneous memory safety hazards
+ * CVE-2011-0084 (bmo#648094)
+ Crash in SVGTextElement.getCharNumAtPosition()
+ * CVE-2011-2981
+ Privilege escalation using event handlers
+ * CVE-2011-2378 (bmo#572129)
+ Privilege escalation dropping a tab element in content area
+ * CVE-2011-2980 (bmo#642469)
+ Binary planting vulnerability in ThinkPadSensor::Startup
+ * CVE-2011-2983 (bmo#626297)
+ Private data leakage using RegExp.input
+- added mozilla-implicit-declarations.patch to fix rpmlint/gcc
+ checks
+- added mozilla-curl.patch to remove obsolete header dependency
+- added mozilla-linux3.patch to make python symbol dumper aware
+ of the "linux3" platform
+
+-------------------------------------------------------------------
+Mon Jun 20 09:32:58 UTC 2011 - wr@rosenauer.org
+
+- security update to 1.9.2.18 (bnc#701296)
+ * MFSA 2011-19/CVE-2011-2374 CVE-2011-2376 CVE-2011-2364
+ CVE-2011-2365
+ Miscellaneous memory safety hazards
+ * MFSA 2011-20/CVE-2011-2373 (bmo#617247)
+ Use-after-free vulnerability when viewing XUL document with
+ script disabled
+ * MFSA 2011-21/CVE-2011-2377 (bmo#638018, bmo#639303)
+ Memory corruption due to multipart/x-mixed-replace images
+ * MFSA 2011-22/CVE-2011-2371 (bmo#664009)
+ Integer overflow and arbitrary code execution in
+ Array.reduceRight()
+ * MFSA 2011-23/CVE-2011-0083 CVE-2011-0085 CVE-2011-2363
+ Multiple dangling pointer vulnerabilities
+ * MFSA 2011-24/CVE-2011-2362 (bmo#616264)
+ Cookie isolation error
+- speedier find-external-requires.sh
+- do not build dump_syms static as it is not needed for us
+ -> fixes build for 12.1 and above
+
+-------------------------------------------------------------------
+Wed May 11 09:44:20 UTC 2011 - cgiboudeaux@gmx.com
+
+- Add mozilla-gcc46.patch. Fixes various build errors with GCC4.6
+
+-------------------------------------------------------------------
+Thu Apr 21 10:16:51 UTC 2011 - wr@rosenauer.org
+
+- security update to 1.9.2.17 (bnc#689281)
+ * MFSA 2011-12/ CVE-2011-0069 CVE-2011-0070 CVE-2011-0072
+ CVE-2011-0074 CVE-2011-0075 CVE-2011-0077 CVE-2011-0078
+ CVE-2011-0080 CVE-2011-0081
+ Miscellaneous memory safety hazards
+ * MFSA 2011-13/CVE-2011-0065/CVE-2011-0066/CVE-2011-0073
+ Multiple dangling pointer vulnerabilities
+ * MFSA 2011-14/CVE-2011-0067 (bmo#527935)
+ Information stealing via form history
+ * MFSA 2011-18/CVE-2011-1202 (bmo#640339)
+ XSLT generate-id() function heap address leak
+
+-------------------------------------------------------------------
+Mon Mar 28 16:25:25 UTC 2011 - llunak@novell.com
+
+- fix 'save as' with KDE integration (bnc#557598)
+
+-------------------------------------------------------------------
+Sat Mar 19 22:11:41 UTC 2011 - wr@rosenauer.org
+
+- security update to 1.9.2.16 (bnc#680771)
+ * MFSA 2011-11
+ Update HTTPS certificate blacklist (bmo#642395)
+
+-------------------------------------------------------------------
+Fri Mar 4 12:05:39 UTC 2011 - wr@rosenauer.org
+
+- update to 1.9.2.15
+ * fix a regression introduced with previous update affecting
+ Java applet integration (bmo#629030)
+
+-------------------------------------------------------------------
+Wed Mar 2 10:33:25 UTC 2011 - pcerny@novell.com
+
+- use full path to the ntlm_auth binary (bmo#634334)
+ (mozilla-ntlm-full-path.patch)
+
+-------------------------------------------------------------------
+Tue Feb 22 07:47:01 UTC 2011 - wr@rosenauer.org
+
+- security update to 1.9.2.14 (build3) (bnc#667155)
+ * MFSA 2011-01/CVE-2011-0053/CVE-2011-0062
+ Miscellaneous memory safety hazards (rv:1.9.2.14/ 1.9.1.17)
+ * MFSA 2011-02/CVE-2011-0051 (bmo#616659)
+ Recursive eval call causes confirm dialogs to evaluate to true
+ * MFSA 2011-03/CVE-2011-0055 (bmo#616009, bmo#619255)
+ Use-after-free error in JSON.stringify
+ * MFSA 2011-04/CVE-2011-0054 (bmo#615657)
+ Buffer overflow in JavaScript upvarMap
+ * MFSA 2011-05/CVE-2011-0056 (bmo#622015)
+ Buffer overflow in JavaScript atom map
+ * MFSA 2011-06/CVE-2011-0057 (bmo#626631)
+ Use-after-free error using Web Workers
+ * MFSA 2011-08/CVE-2010-1585 (bmo#562547)
+ ParanoidFragmentSink allows javascript: URLs in chrome documents
+ * MFSA 2011-09/CVE-2011-0061 (bmo#610601)
+ Crash caused by corrupted JPEG image
+ * MFSA 2011-10/CVE-2011-0059 (bmo#573873)
+ CSRF risk with plugins and 307 redirects
+
+-------------------------------------------------------------------
+Thu Nov 25 09:25:50 UTC 2010 - wr@rosenauer.org
+
+- security update to 1.9.2.13 (bnc#657016)
+ * MFSA 2010-74/CVE-2010-3776/CVE-2010-3777/CVE-2010-3778
+ Miscellaneous memory safety hazards (rv:1.9.2.13/ 1.9.1.16)
+ * MFSA 2010-75/CVE-2010-3769 (bmo#608336)
+ Buffer overflow while line breaking after document.write with
+ long string
+ * MFSA 2010-76/CVE-2010-3771 (bmo#609437)
+ Chrome privilege escalation with window.open and <isindex> element
+ * MFSA 2010-77/CVE-2010-3772 (bmo#594547)
+ Crash and remote code execution using HTML tags inside a XUL tree
+ * MFSA 2010-78/CVE-2010-3768 (bmo#527276)
+ Add support for OTS font sanitizer
+ * MFSA 2010-79/CVE-2010-3775
+ Java security bypass from LiveConnect loaded via data: URL
+ meta refresh
+ * MFSA 2010-80/CVE-2010-3766 (bmo#590771)
+ Use-after-free error with nsDOMAttribute MutationObserver
+ * MFSA 2010-81/CVE-2010-3767 (bmo#599468)
+ Integer overflow vulnerability in NewIdArray
+ * MFSA 2010-82/CVE-2010-3773 (bmo#554449)
+ Incomplete fix for CVE-2010-0179
+ * MFSA 2010-83/VE-2010-3774 (bmo#602780)
+ Location bar SSL spoofing using network error page
+ * MFSA 2010-84/CVE-2010-3770 (bmo#601429)
+ XSS hazard in multiple character encodings
+
+-------------------------------------------------------------------
+Wed Oct 27 07:12:14 CEST 2010 - wr@rosenauer.org
+
+- security update to 1.9.2.12 (bnc#649492)
+ * MFSA 2010-73/CVE-2010-3765 (bmo#607222)
+ Heap buffer overflow mixing document.write and DOM insertion
+- ignore empty LANGUAGE environment variable (bnc#648854)
+
+-------------------------------------------------------------------
+Wed Oct 6 07:13:34 CEST 2010 - wr@rosenauer.org
+
+- security update to 1.9.2.11 (bnc#645315)
+ * MFSA 2010-64/CVE-2010-3174/CVE-2010-3175/CVE-2010-3176
+ Miscellaneous memory safety hazards
+ * MFSA 2010-65/CVE-2010-3179 (bmo#583077)
+ Buffer overflow and memory corruption using document.write
+ * MFSA 2010-66/CVE-2010-3180 (bmo#588929)
+ Use-after-free error in nsBarProp
+ * MFSA 2010-67/CVE-2010-3183 (bmo#598669)
+ Dangling pointer vulnerability in LookupGetterOrSetter
+ * MFSA 2010-68/CVE-2010-3177 (bmo#556734)
+ XSS in gopher parser when parsing hrefs
+ * MFSA 2010-69/CVE-2010-3178 (bmo#576616)
+ Cross-site information disclosure via modal calls
+ * MFSA 2010-70/CVE-2010-3170 (bmo#578697)
+ SSL wildcard certificate matching IP addresses
+ * MFSA 2010-71/CVE-2010-3182 (bmo#590753)
++++ 279 more lines (skipped)
++++ between /dev/null
++++ and /work/SRC/openSUSE:12.1:Update:Test/.mozilla-xulrunner192.new/mozilla-xulrunner192.changes
New:
----
_link
add-plugins.sh.in
baselibs.conf
create-tar.sh
find-external-requires.sh
gecko-lockdown.patch
idldir.patch
l10n-1.9.2.23.tar.bz2
mozilla-cairo-lcd.patch
mozilla-curl.patch
mozilla-dump_syms-static.patch
mozilla-gcc46.patch
mozilla-gconf-backend.patch
mozilla-gdk-pixbuf.patch
mozilla-implicit-declarations.patch
mozilla-kde.patch
mozilla-libproxy.patch
mozilla-linux3.patch
mozilla-locale.patch
mozilla-nongnome-proxies.patch
mozilla-ntlm-full-path.patch
mozilla-pkgconfig.patch
mozilla-prefer_plugin_pref.patch
mozilla-prlog.patch
mozilla-shared-nss-db.patch
mozilla-ua-locale-pref.patch
mozilla-xulrunner192-rpmlintrc
mozilla-xulrunner192.changes
mozilla-xulrunner192.spec
toolkit-download-folder.patch
toolkit-lockdown.js
toolkit-ui-lockdown.patch
xulrunner-openSUSE-prefs.js
xulrunner-source-1.9.2.23.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ mozilla-xulrunner192.spec ++++++
++++ 602 lines (skipped)
++++++ _link ++++++
<link project="openSUSE:12.1" package="mozilla-xulrunner192" baserev="6888137348e37fe2682b59db547ceaf0">
<patches>
<branch/>
</patches>
</link>
++++++ add-plugins.sh.in ++++++
#! /bin/sh
# Copyright (c) 2008 Wolfgang Rosenauer. All rights reserved.
#
# check if we are started as root
# only one of UID and USER must be set correctly
if test "$UID" != 0 -a "$USER" != root; then
echo "You must be root to start $0."
exit 1
fi
PREFIX="%PROGDIR"
# dictionaries
MYSPELL=/usr/share/myspell
MOZ_SPELL=$PREFIX/dictionaries
if [ -d $MOZ_SPELL ] ; then
if [ -d $MYSPELL ] ; then
for dict in $MYSPELL/??[-_]??.aff ; do
# check is it is really the file or it is a string which contain '??_??'
if ! [ -e $dict ] ; then
continue
fi
# the dict file name
dict_file=`echo ${dict##*/}`
# the dict file has a valid name
lang=`echo ${dict_file:0:2}`
country=`echo ${dict_file:3:2}`
# check for .dic file
if [ ! -r $MYSPELL/${lang}[-_]${country}.dic ] ; then
continue
fi
# create links
if [ ! -r $MOZ_SPELL/${lang}[-_]${country}.aff ] ; then
ln -sf $MYSPELL/${lang}[-_]${country}.aff \
$MOZ_SPELL/${lang}-${country}.aff
fi
if [ ! -r $MOZ_SPELL/${lang}[-_]${country}.dic ] ; then
ln -sf $MYSPELL/${lang}[-_]${country}.dic \
$MOZ_SPELL/${lang}-${country}.dic
fi
done
echo "-> added myspell dictionaries"
fi
# remove broken links
for dict in $MOZ_SPELL/*.{aff,dic} ; do
if ! [ -r $dict ] ; then
rm -f $dict
fi
done
fi
++++++ baselibs.conf ++++++
mozilla-xulrunner192
+/usr/lib(64)?/xulrunner-.*
+/etc/gre.d/.*
recommends "mozilla-xulrunner192-gnome-<targettype>"
requires "mozilla-js192-<targettype> = <version>"
mozilla-js192
mozilla-xulrunner192-translations-common
+/usr/lib(64)?/xulrunner-.*
requires "mozilla-xulrunner192-<targettype> = <version>"
supplements "packageand(mozilla-xulrunner192-translations-common:mozilla-xulrunner192-<targettype>)"
mozilla-xulrunner192-translations-other
+/usr/lib(64)?/xulrunner-.*
requires "mozilla-xulrunner192-<targettype> = <version>"
supplements "packageand(mozilla-xulrunner192-translations-other:mozilla-xulrunner192-<targettype>)"
mozilla-xulrunner192-gnome
+/usr/lib(64)?/xulrunner-.*
requires "mozilla-xulrunner192-<targettype> = <version>"
++++++ create-tar.sh ++++++
#!/bin/bash
RELEASE_TAG="FIREFOX_3_6_23_RELEASE"
VERSION="1.9.2.23"
# mozilla
hg clone http://hg.mozilla.org/releases/mozilla-1.9.2 mozilla
pushd mozilla
hg update -r $RELEASE_TAG
popd
tar cjf xulrunner-source-$VERSION.tar.bz2 --exclude=.hgtags --exclude=.hgignore --exclude=.hg --exclude=CVS mozilla
# l10n
test ! -d l10n && mkdir l10n
for locale in $(awk '{ print $1; }' mozilla/browser/locales/shipped-locales); do
case $locale in
ja-JP-mac|en-US)
;;
*)
hg clone http://hg.mozilla.org/releases/l10n-mozilla-1.9.2/$locale l10n/$locale
hg -R l10n/$locale up -C -r $RELEASE_TAG
;;
esac
done
tar cjf l10n-$VERSION.tar.bz2 --exclude=.hgtags --exclude=.hgignore --exclude=.hg l10n
++++++ find-external-requires.sh ++++++
#!/bin/sh
# Finds requirements provided outside of the current file set
filelist=$( sed "s/[]['\"*?{}]/\\\\\&/g" )
provides=$( echo "$filelist" | /usr/lib/rpm/find-provides )
echo "$filelist" \
| /usr/lib/rpm/find-requires \
| grep -F -v "$provides" \
| sort -u
++++++ gecko-lockdown.patch ++++++
From: various contributors
Subject: lockdown hooks for Gecko
diff --git a/extensions/cookie/nsCookiePermission.cpp b/extensions/cookie/nsCookiePermission.cpp
--- a/extensions/cookie/nsCookiePermission.cpp
+++ b/extensions/cookie/nsCookiePermission.cpp
@@ -1,10 +1,10 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim:ts=2:sw=2:et: */
+/* vim: set ts=2 sw=2 et: */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
@@ -81,16 +81,17 @@ static const PRBool kDefaultPolicy = PR_
static const char kCookiesLifetimePolicy[] = "network.cookie.lifetimePolicy";
static const char kCookiesLifetimeDays[] = "network.cookie.lifetime.days";
static const char kCookiesAlwaysAcceptSession[] = "network.cookie.alwaysAcceptSessionCookies";
static const char kCookiesPrefsMigrated[] = "network.cookie.prefsMigrated";
// obsolete pref names for migration
static const char kCookiesLifetimeEnabled[] = "network.cookie.lifetime.enabled";
static const char kCookiesLifetimeBehavior[] = "network.cookie.lifetime.behavior";
+static const char kCookiesHonorExceptions[] = "network.cookie.honorExceptions";
static const char kCookiesAskPermission[] = "network.cookie.warnAboutCookies";
static const char kPermissionType[] = "cookie";
#ifdef MOZ_MAIL_NEWS
// returns PR_TRUE if URI appears to be the URI of a mailnews protocol
// XXXbz this should be a protocol flag, not a scheme list, dammit!
static PRBool
@@ -120,16 +121,17 @@ nsCookiePermission::Init()
// failure to access the pref service is non-fatal...
nsCOMPtr<nsIPrefBranch2> prefBranch =
do_GetService(NS_PREFSERVICE_CONTRACTID);
if (prefBranch) {
prefBranch->AddObserver(kCookiesLifetimePolicy, this, PR_FALSE);
prefBranch->AddObserver(kCookiesLifetimeDays, this, PR_FALSE);
prefBranch->AddObserver(kCookiesAlwaysAcceptSession, this, PR_FALSE);
+ prefBranch->AddObserver(kCookiesHonorExceptions, this, PR_FALSE);
PrefChanged(prefBranch, nsnull);
// migration code for original cookie prefs
PRBool migrated;
rv = prefBranch->GetBoolPref(kCookiesPrefsMigrated, &migrated);
if (NS_FAILED(rv) || !migrated) {
PRBool warnAboutCookies = PR_FALSE;
prefBranch->GetBoolPref(kCookiesAskPermission, &warnAboutCookies);
@@ -173,16 +175,20 @@ nsCookiePermission::PrefChanged(nsIPrefB
if (PREF_CHANGED(kCookiesLifetimeDays) &&
NS_SUCCEEDED(aPrefBranch->GetIntPref(kCookiesLifetimeDays, &val)))
// save cookie lifetime in seconds instead of days
mCookiesLifetimeSec = val * 24 * 60 * 60;
if (PREF_CHANGED(kCookiesAlwaysAcceptSession) &&
NS_SUCCEEDED(aPrefBranch->GetBoolPref(kCookiesAlwaysAcceptSession, &val)))
mCookiesAlwaysAcceptSession = val;
+
+ if (PREF_CHANGED(kCookiesHonorExceptions) &&
+ NS_SUCCEEDED(aPrefBranch->GetBoolPref(kCookiesHonorExceptions, &val)))
+ mCookiesHonorExceptions = val;
}
NS_IMETHODIMP
nsCookiePermission::SetAccess(nsIURI *aURI,
nsCookieAccess aAccess)
{
//
// NOTE: nsCookieAccess values conveniently match up with
@@ -202,16 +208,21 @@ nsCookiePermission::CanAccess(nsIURI
// it.
if (IsFromMailNews(aURI)) {
*aResult = ACCESS_DENY;
return NS_OK;
}
#endif // MOZ_MAIL_NEWS
// finally, check with permission manager...
+ if (!mCookiesHonorExceptions) {
+ *aResult = ACCESS_DEFAULT;
+ return NS_OK;
+ }
+
nsresult rv = mPermMgr->TestPermission(aURI, kPermissionType, (PRUint32 *) aResult);
if (NS_SUCCEEDED(rv)) {
switch (*aResult) {
// if we have one of the publicly-available values, just return it
case nsIPermissionManager::UNKNOWN_ACTION: // ACCESS_DEFAULT
case nsIPermissionManager::ALLOW_ACTION: // ACCESS_ALLOW
case nsIPermissionManager::DENY_ACTION: // ACCESS_DENY
break;
diff --git a/extensions/cookie/nsCookiePermission.h b/extensions/cookie/nsCookiePermission.h
--- a/extensions/cookie/nsCookiePermission.h
+++ b/extensions/cookie/nsCookiePermission.h
@@ -54,30 +54,32 @@ public:
NS_DECL_ISUPPORTS
NS_DECL_NSICOOKIEPERMISSION
NS_DECL_NSIOBSERVER
nsCookiePermission()
: mCookiesLifetimeSec(LL_MAXINT)
, mCookiesLifetimePolicy(0) // ACCEPT_NORMALLY
, mCookiesAlwaysAcceptSession(PR_FALSE)
+ , mCookiesHonorExceptions(PR_TRUE)
{}
virtual ~nsCookiePermission() {}
nsresult Init();
void PrefChanged(nsIPrefBranch *, const char *);
private:
PRBool InPrivateBrowsing();
nsCOMPtr<nsIPermissionManager> mPermMgr;
nsCOMPtr<nsIPrivateBrowsingService> mPBService;
PRInt64 mCookiesLifetimeSec; // lifetime limit specified in seconds
PRUint8 mCookiesLifetimePolicy; // pref for how long cookies are stored
PRPackedBool mCookiesAlwaysAcceptSession; // don't prompt for session cookies
+ PRPackedBool mCookiesHonorExceptions;
};
// {EF565D0A-AB9A-4A13-9160-0644CDFD859A}
#define NS_COOKIEPERMISSION_CID \
{0xEF565D0A, 0xAB9A, 0x4A13, {0x91, 0x60, 0x06, 0x44, 0xcd, 0xfd, 0x85, 0x9a }}
#endif
diff --git a/extensions/permissions/nsContentBlocker.cpp b/extensions/permissions/nsContentBlocker.cpp
--- a/extensions/permissions/nsContentBlocker.cpp
+++ b/extensions/permissions/nsContentBlocker.cpp
@@ -71,32 +71,38 @@ static const char *kTypeString[NUMBER_OF
NS_IMPL_ISUPPORTS3(nsContentBlocker,
nsIContentPolicy,
nsIObserver,
nsSupportsWeakReference)
nsContentBlocker::nsContentBlocker()
{
memset(mBehaviorPref, BEHAVIOR_ACCEPT, NUMBER_OF_TYPES);
+ memset(mHonorExceptions, PR_TRUE, NUMBER_OF_TYPES);
}
nsresult
nsContentBlocker::Init()
{
nsresult rv;
mPermissionManager = do_GetService(NS_PERMISSIONMANAGER_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIPrefService> prefService = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIPrefBranch> prefBranch;
rv = prefService->GetBranch("permissions.default.", getter_AddRefs(prefBranch));
NS_ENSURE_SUCCESS(rv, rv);
+ nsCOMPtr<nsIPrefBranch> honorExceptionsPrefBranch;
+ rv = prefService->GetBranch("permissions.honorExceptions.",
+ getter_AddRefs(honorExceptionsPrefBranch));
+ NS_ENSURE_SUCCESS(rv, rv);
+
// Migrate old image blocker pref
nsCOMPtr<nsIPrefBranch> oldPrefBranch;
oldPrefBranch = do_QueryInterface(prefService);
PRInt32 oldPref;
rv = oldPrefBranch->GetIntPref("network.image.imageBehavior", &oldPref);
if (NS_SUCCEEDED(rv) && oldPref) {
PRInt32 newPref;
switch (oldPref) {
@@ -116,39 +122,49 @@ nsContentBlocker::Init()
// The branch is not a copy of the prefservice, but a new object, because
// it is a non-default branch. Adding obeservers to it will only work if
// we make sure that the object doesn't die. So, keep a reference to it.
mPrefBranchInternal = do_QueryInterface(prefBranch, &rv);
NS_ENSURE_SUCCESS(rv, rv);
+ mHonorExceptionsPrefBranchInternal =
+ do_QueryInterface(honorExceptionsPrefBranch, &rv);
+ NS_ENSURE_SUCCESS(rv, rv);
+
rv = mPrefBranchInternal->AddObserver("", this, PR_TRUE);
- PrefChanged(prefBranch, nsnull);
+ NS_ENSURE_SUCCESS(rv, rv);
+
+ rv = mHonorExceptionsPrefBranchInternal->AddObserver("", this, PR_TRUE);
+ PrefChanged(nsnull);
return rv;
}
#undef LIMIT
#define LIMIT(x, low, high, default) ((x) >= (low) && (x) <= (high) ? (x) : (default))
void
-nsContentBlocker::PrefChanged(nsIPrefBranch *aPrefBranch,
- const char *aPref)
+nsContentBlocker::PrefChanged(const char *aPref)
{
- PRInt32 val;
-
-#define PREF_CHANGED(_P) (!aPref || !strcmp(aPref, _P))
-
- for(PRUint32 i = 0; i < NUMBER_OF_TYPES; ++i) {
- if (PREF_CHANGED(kTypeString[i]) &&
- NS_SUCCEEDED(aPrefBranch->GetIntPref(kTypeString[i], &val)))
- mBehaviorPref[i] = LIMIT(val, 1, 3, 1);
+ for (PRUint32 i = 0; i < NUMBER_OF_TYPES; ++i) {
+ if (!aPref || !strcmp(kTypeString[i], aPref)) {
+ PRInt32 val;
+ PRBool b;
+ if (mPrefBranchInternal &&
+ NS_SUCCEEDED(mPrefBranchInternal->GetIntPref(kTypeString[i], &val))) {
+ mBehaviorPref[i] = LIMIT(val, 1, 3, 1);
+ }
+ if (mHonorExceptionsPrefBranchInternal &&
+ NS_SUCCEEDED(mHonorExceptionsPrefBranchInternal->GetBoolPref(kTypeString[i], &b))) {
+ mHonorExceptions[i] = b;
+ }
+ }
}
-
}
// nsIContentPolicy Implementation
NS_IMETHODIMP
nsContentBlocker::ShouldLoad(PRUint32 aContentType,
nsIURI *aContentLocation,
nsIURI *aRequestingLocation,
nsISupports *aRequestingContext,
@@ -264,21 +280,23 @@ nsContentBlocker::TestPermission(nsIURI
// This default will also get used if there is an unknown value in the
// permission list, or if the permission manager returns unknown values.
*aPermission = PR_TRUE;
// check the permission list first; if we find an entry, it overrides
// default prefs.
// Don't forget the aContentType ranges from 1..8, while the
// array is indexed 0..7
- PRUint32 permission;
- nsresult rv = mPermissionManager->TestPermission(aCurrentURI,
- kTypeString[aContentType - 1],
- &permission);
- NS_ENSURE_SUCCESS(rv, rv);
+ PRUint32 permission = 0;
+ if (mHonorExceptions[aContentType - 1]) {
+ nsresult rv = mPermissionManager->TestPermission(aCurrentURI,
+ kTypeString[aContentType - 1],
+ &permission);
+ NS_ENSURE_SUCCESS(rv, rv);
+ }
// If there is nothing on the list, use the default.
if (!permission) {
permission = mBehaviorPref[aContentType - 1];
*aFromPrefs = PR_TRUE;
}
// Use the fact that the nsIPermissionManager values map to
@@ -294,17 +312,17 @@ nsContentBlocker::TestPermission(nsIURI
case BEHAVIOR_NOFOREIGN:
// Third party checking
// Need a requesting uri for third party checks to work.
if (!aFirstURI)
return NS_OK;
PRBool trustedSource = PR_FALSE;
- rv = aFirstURI->SchemeIs("chrome", &trustedSource);
+ nsresult rv = aFirstURI->SchemeIs("chrome", &trustedSource);
NS_ENSURE_SUCCESS(rv,rv);
if (!trustedSource) {
rv = aFirstURI->SchemeIs("resource", &trustedSource);
NS_ENSURE_SUCCESS(rv,rv);
}
if (trustedSource)
return NS_OK;
@@ -360,12 +378,11 @@ nsContentBlocker::TestPermission(nsIURI
NS_IMETHODIMP
nsContentBlocker::Observe(nsISupports *aSubject,
const char *aTopic,
const PRUnichar *aData)
{
NS_ASSERTION(!strcmp(NS_PREFBRANCH_PREFCHANGE_TOPIC_ID, aTopic),
"unexpected topic - we only deal with pref changes!");
- if (mPrefBranchInternal)
- PrefChanged(mPrefBranchInternal, NS_LossyConvertUTF16toASCII(aData).get());
+ PrefChanged(NS_LossyConvertUTF16toASCII(aData).get());
return NS_OK;
}
diff --git a/extensions/permissions/nsContentBlocker.h b/extensions/permissions/nsContentBlocker.h
--- a/extensions/permissions/nsContentBlocker.h
+++ b/extensions/permissions/nsContentBlocker.h
@@ -61,26 +61,28 @@ public:
NS_DECL_NSIOBSERVER
nsContentBlocker();
nsresult Init();
private:
~nsContentBlocker() {}
- void PrefChanged(nsIPrefBranch *, const char *);
+ void PrefChanged(const char *);
nsresult TestPermission(nsIURI *aCurrentURI,
nsIURI *aFirstURI,
PRInt32 aContentType,
PRBool *aPermission,
PRBool *aFromPrefs);
nsCOMPtr<nsIPermissionManager> mPermissionManager;
nsCOMPtr<nsIPrefBranch2> mPrefBranchInternal;
+ nsCOMPtr<nsIPrefBranch2> mHonorExceptionsPrefBranchInternal;
PRUint8 mBehaviorPref[NUMBER_OF_TYPES];
+ PRPackedBool mHonorExceptions[NUMBER_OF_TYPES];
};
#define NS_CONTENTBLOCKER_CID \
{ 0x4ca6b67b, 0x5cc7, 0x4e71, \
{ 0xa9, 0x8a, 0x97, 0xaf, 0x1c, 0x13, 0x48, 0x62 } }
#define NS_CONTENTBLOCKER_CONTRACTID "@mozilla.org/permissions/contentblocker;1"
diff --git a/modules/libpref/src/init/all.js b/modules/libpref/src/init/all.js
--- a/modules/libpref/src/init/all.js
+++ b/modules/libpref/src/init/all.js
@@ -853,16 +853,17 @@ pref("network.automatic-ntlm-auth.truste
// response to a NTLM challenge. By default, this is disabled since servers
// should almost never need the LM hash, and the LM hash is what makes NTLM
// authentication less secure. See bug 250691 for further details.
// NOTE: automatic-ntlm-auth which leverages the OS-provided NTLM
// implementation will not be affected by this preference.
pref("network.ntlm.send-lm-response", false);
pref("permissions.default.image", 1); // 1-Accept, 2-Deny, 3-dontAcceptForeign
+pref("permissions.honorExceptions.image", true);
pref("network.proxy.type", 5);
pref("network.proxy.ftp", "");
pref("network.proxy.ftp_port", 0);
pref("network.proxy.gopher", "");
pref("network.proxy.gopher_port", 0);
pref("network.proxy.http", "");
@@ -872,16 +873,17 @@ pref("network.proxy.ssl_port",
pref("network.proxy.socks", "");
pref("network.proxy.socks_port", 0);
pref("network.proxy.socks_version", 5);
pref("network.proxy.socks_remote_dns", false);
pref("network.proxy.no_proxies_on", "localhost, 127.0.0.1");
pref("network.proxy.failover_timeout", 1800); // 30 minutes
pref("network.online", true); //online/offline
pref("network.cookie.cookieBehavior", 0); // 0-Accept, 1-dontAcceptForeign, 2-dontUse
+pref("network.cookie.honorExceptions", true);
pref("network.cookie.lifetimePolicy", 0); // accept normally, 1-askBeforeAccepting, 2-acceptForSession,3-acceptForNDays
pref("network.cookie.alwaysAcceptSessionCookies", false);
pref("network.cookie.prefsMigrated", false);
pref("network.cookie.lifetime.days", 90);
// The PAC file to load. Ignored unless network.proxy.type is 2.
pref("network.proxy.autoconfig_url", "");
diff --git a/xpinstall/src/nsXPInstallManager.cpp b/xpinstall/src/nsXPInstallManager.cpp
--- a/xpinstall/src/nsXPInstallManager.cpp
+++ b/xpinstall/src/nsXPInstallManager.cpp
@@ -300,36 +300,46 @@ nsXPInstallManager::InitManagerInternal(
packageList[j++] = item->GetSafeURLString();
packageList[j++] = item->mIconURL.get();
packageList[j++] = item->mCertName.get();
}
//-----------------------------------------------------
// Get permission to install
//-----------------------------------------------------
+ nsCOMPtr<nsIPrefBranch> pref(do_GetService(NS_PREFSERVICE_CONTRACTID));
#ifdef ENABLE_SKIN_SIMPLE_INSTALLATION_UI
if ( mChromeType == CHROME_SKIN )
{
// We may want to enable the simple installation UI once
// bug 343037 is fixed
// skins get a simpler/friendlier dialog
// XXX currently not embeddable
- OKtoInstall = ConfirmChromeInstall( mParentWindow, packageList );
+ PRBool themesDisabled = PR_FALSE;
+ if (pref)
+ pref->GetBoolPref("config.lockdown.disable_themes", &themesDisabled);
+ OKtoInstall = !themesDisabled &&
+ ConfirmChromeInstall( mParentWindow, packageList );
}
else
{
#endif
+ PRBool extensionsDisabled = PR_FALSE;
+ if (pref)
+ pref->GetBoolPref("config.lockdown.disable_extensions", &extensionsDisabled);
+ if (!extensionsDisabled) {
rv = dlgSvc->ConfirmInstall( mParentWindow,
packageList,
numStrings,
&OKtoInstall );
if (NS_FAILED(rv))
OKtoInstall = PR_FALSE;
+ }
#ifdef ENABLE_SKIN_SIMPLE_INSTALLATION_UI
}
#endif
if (OKtoInstall)
{
//-----------------------------------------------------
// Open the progress dialog
++++++ idldir.patch ++++++
From: Wolfgang Rosenauer
Subject: fix IDL installation dir
This is only needed to get the correct path in xulrunner-config
Index: config/autoconf.mk.in
===================================================================
RCS file: /cvsroot/mozilla/config/autoconf.mk.in,v
retrieving revision 3.449
diff -u -r3.449 autoconf.mk.in
--- config/autoconf.mk.in 16 Feb 2008 22:23:08 -0000 3.449
+++ b/config/autoconf.mk.in 19 Feb 2008 14:07:13 -0000
@@ -62,7 +62,7 @@
libdir = @libdir@
datadir = @datadir@
mandir = @mandir@
-idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
+idldir = $(includedir)
installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)
++++++ mozilla-cairo-lcd.patch ++++++
++++ 1296 lines (skipped)
++++++ mozilla-curl.patch ++++++
# HG changeset patch
# User Evan Shaw
# Parent 2d4a2ce9f921163094c9a29c776b2a6e986febe2
bug 673072 - remove deprecated curl header curl/types.h from Breakpad includes. r=ted
diff --git a/config/system-headers b/config/system-headers
--- a/config/system-headers
+++ b/config/system-headers
@@ -198,17 +198,16 @@ crt_externs.h
crypt.h
cstdio
cstdlib
cstring
ctime
ctype.h
curl/curl.h
curl/easy.h
-curl/types.h
curses.h
cxxabi.h
DateTimeUtils.h
dbus/dbus.h
dbus/dbus-glib.h
dbus/dbus-glib-lowlevel.h
ddeml.h
Debug.h
diff --git a/js/src/config/system-headers b/js/src/config/system-headers
--- a/js/src/config/system-headers
+++ b/js/src/config/system-headers
@@ -198,17 +198,16 @@ crt_externs.h
crypt.h
cstdio
cstdlib
cstring
ctime
ctype.h
curl/curl.h
curl/easy.h
-curl/types.h
curses.h
cxxabi.h
DateTimeUtils.h
dbus/dbus.h
dbus/dbus-glib.h
dbus/dbus-glib-lowlevel.h
ddeml.h
Debug.h
diff --git a/toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc b/toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc
--- a/toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc
+++ b/toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc
@@ -26,17 +26,16 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <cassert>
#include
#include
#include
-#include
#include "common/linux/http_upload.h"
namespace {
// Callback to get the response data from server.
static size_t WriteCallback(void *ptr, size_t size,
size_t nmemb, void *userp) {
diff --git a/toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc b/toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc
--- a/toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc
+++ b/toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc
@@ -24,17 +24,16 @@
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include
#include
-#include
#include
#include <string>
#include "common/linux/libcurl_wrapper.h"
#include "third_party/linux/include/glog/logging.h"
namespace google_breakpad {
++++++ mozilla-dump_syms-static.patch ++++++
# HG changeset patch
# Parent e589abb2c4d6aaa6083d254416211ac90360dbdd
NO-BUG: Ignore a hack which is not needed in distribution build environments.
diff --git a/toolkit/crashreporter/google-breakpad/src/tools/linux/dump_syms/Makefile.in b/toolkit/crashreporter/google-breakpad/src/tools/linux/dump_syms/Makefile.in
--- a/toolkit/crashreporter/google-breakpad/src/tools/linux/dump_syms/Makefile.in
+++ b/toolkit/crashreporter/google-breakpad/src/tools/linux/dump_syms/Makefile.in
@@ -59,11 +59,11 @@ HOST_LIBS += \
$(NULL)
# force C++ linking
CPP_PROG_LINK = 1
FORCE_USE_PIC = 1
#XXX: bug 554854 causes us to be unable to run binaries on the build slaves
# due to them having an older libstdc++
-HOST_LDFLAGS += -static
+#HOST_LDFLAGS += -static
include $(topsrcdir)/config/rules.mk
++++++ mozilla-gcc46.patch ++++++
# HG changeset patch
# Parent 8bb5926317b6f1e7c9291c8e7079b0c51ccc4615
From: Christophe Giboudeaux
Subject: gcc 4.6 build fixes.
diff --git a/embedding/browser/gtk/src/EmbedPrivate.cpp b/embedding/browser/gtk/src/EmbedPrivate.cpp
--- a/embedding/browser/gtk/src/EmbedPrivate.cpp
+++ b/embedding/browser/gtk/src/EmbedPrivate.cpp
@@ -99,16 +99,17 @@ nsISupports *EmbedPrivate::s
GtkWidget *EmbedPrivate::sOffscreenWindow = 0;
GtkWidget *EmbedPrivate::sOffscreenFixed = 0;
nsIDirectoryServiceProvider *EmbedPrivate::sAppFileLocProvider = nsnull;
class GTKEmbedDirectoryProvider : public nsIDirectoryServiceProvider2
{
public:
+ GTKEmbedDirectoryProvider() {}
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIDIRECTORYSERVICEPROVIDER
NS_DECL_NSIDIRECTORYSERVICEPROVIDER2
};
static const GTKEmbedDirectoryProvider kDirectoryProvider;
NS_IMPL_QUERY_INTERFACE2(GTKEmbedDirectoryProvider,
diff --git a/gfx/ots/src/os2.cc b/gfx/ots/src/os2.cc
--- a/gfx/ots/src/os2.cc
+++ b/gfx/ots/src/os2.cc
@@ -1,12 +1,14 @@
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <cstddef>
+
#include "os2.h"
#include "head.h"
// OS/2 - OS/2 and Windows Metrics
// http://www.microsoft.com/opentype/otspec/os2.htm
namespace ots {
diff --git a/intl/unicharutil/util/nsUnicharUtils.h b/intl/unicharutil/util/nsUnicharUtils.h
--- a/intl/unicharutil/util/nsUnicharUtils.h
+++ b/intl/unicharutil/util/nsUnicharUtils.h
@@ -67,16 +67,18 @@ inline PRBool IsLowerCase(PRUnichar c) {
return ToUpperCase(c) != c;
}
#ifdef MOZILLA_INTERNAL_API
class nsCaseInsensitiveStringComparator : public nsStringComparator
{
public:
+ nsCaseInsensitiveStringComparator() {
+ }
virtual int operator() (const PRUnichar*,
const PRUnichar*,
PRUint32 aLength) const;
virtual int operator() (PRUnichar,
PRUnichar) const;
};
class nsCaseInsensitiveStringArrayComparator
diff --git a/toolkit/crashreporter/google-breakpad/src/common/linux/language.cc b/toolkit/crashreporter/google-breakpad/src/common/linux/language.cc
--- a/toolkit/crashreporter/google-breakpad/src/common/linux/language.cc
+++ b/toolkit/crashreporter/google-breakpad/src/common/linux/language.cc
@@ -34,16 +34,17 @@
#include "common/linux/language.h"
namespace google_breakpad {
// C++ language-specific operations.
class CPPLanguage: public Language {
public:
+ CPPLanguage() {}
string MakeQualifiedName(const string &parent_name,
const string &name) const {
if (parent_name.empty())
return name;
else
return parent_name + "::" + name;
}
};
diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -635,16 +635,17 @@ class nsXULAppInfo : public nsIXULAppInf
#endif
#ifdef MOZ_CRASHREPORTER
public nsICrashReporter_MOZILLA_1_9_2_BRANCH,
#endif
public nsIXULRuntime
{
public:
+ nsXULAppInfo() {}
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIXULAPPINFO
NS_DECL_NSIXULRUNTIME
#ifdef MOZ_CRASHREPORTER
NS_DECL_NSICRASHREPORTER
NS_DECL_NSICRASHREPORTER_MOZILLA_1_9_2_BRANCH
#endif
#ifdef XP_WIN
diff --git a/xpcom/base/nsDebugImpl.h b/xpcom/base/nsDebugImpl.h
--- a/xpcom/base/nsDebugImpl.h
+++ b/xpcom/base/nsDebugImpl.h
@@ -35,16 +35,17 @@
* ***** END LICENSE BLOCK ***** */
#include "nsIDebug.h"
#include "nsIDebug2.h"
class nsDebugImpl : public nsIDebug2
{
public:
+ nsDebugImpl() {}
NS_DECL_ISUPPORTS
NS_DECL_NSIDEBUG
NS_DECL_NSIDEBUG2
static NS_METHOD Create(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr);
};
diff --git a/xpcom/base/nsTraceRefcntImpl.h b/xpcom/base/nsTraceRefcntImpl.h
--- a/xpcom/base/nsTraceRefcntImpl.h
+++ b/xpcom/base/nsTraceRefcntImpl.h
@@ -39,16 +39,17 @@
#define nsTraceRefcntImpl_h___
#include // for FILE
#include "nsITraceRefcnt.h"
class nsTraceRefcntImpl : public nsITraceRefcnt
{
public:
+ nsTraceRefcntImpl() {}
NS_DECL_ISUPPORTS
NS_DECL_NSITRACEREFCNT
static NS_COM void Startup();
static NS_COM void Shutdown();
enum StatisticsType {
ALL_STATS,
diff --git a/xpcom/glue/nsEnumeratorUtils.cpp b/xpcom/glue/nsEnumeratorUtils.cpp
--- a/xpcom/glue/nsEnumeratorUtils.cpp
+++ b/xpcom/glue/nsEnumeratorUtils.cpp
@@ -47,16 +47,17 @@
#include "nsCOMPtr.h"
class EmptyEnumeratorImpl : public nsISimpleEnumerator,
public nsIUTF8StringEnumerator,
public nsIStringEnumerator
{
public:
+ EmptyEnumeratorImpl() {}
// nsISupports interface
NS_DECL_ISUPPORTS_INHERITED // not really inherited, but no mRefCnt
// nsISimpleEnumerator
NS_DECL_NSISIMPLEENUMERATOR
NS_DECL_NSIUTF8STRINGENUMERATOR
// can't use NS_DECL_NSISTRINGENUMERATOR because they share the
// HasMore() signature
diff --git a/xpcom/io/nsUnicharInputStream.h b/xpcom/io/nsUnicharInputStream.h
--- a/xpcom/io/nsUnicharInputStream.h
+++ b/xpcom/io/nsUnicharInputStream.h
@@ -46,16 +46,17 @@
#define NS_SIMPLE_UNICHAR_STREAM_FACTORY_CID \
{ 0x428dca6f, 0x1a0f, 0x4cda, { 0xb5, 0x16, 0xd, 0x52, 0x44, 0x74, 0x5a, 0x6a } }
class nsSimpleUnicharStreamFactory :
public nsIFactory,
private nsISimpleUnicharStreamFactory
{
public:
+ nsSimpleUnicharStreamFactory() {}
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIFACTORY
NS_DECL_NSISIMPLEUNICHARSTREAMFACTORY
static NS_COM nsSimpleUnicharStreamFactory* GetInstance();
private:
static const nsSimpleUnicharStreamFactory kInstance;
++++++ mozilla-gconf-backend.patch ++++++
++++ 3516 lines (skipped)
++++++ mozilla-gdk-pixbuf.patch ++++++
# HG changeset patch
# Parent ca3a2bf92df09c5425fa1b2486366d40ed757fa1
Fix compilation with Gnome > 2.30
diff --git a/toolkit/system/gnome/Makefile.in b/toolkit/system/gnome/Makefile.in
--- a/toolkit/system/gnome/Makefile.in
+++ b/toolkit/system/gnome/Makefile.in
@@ -77,21 +77,23 @@ endif
EXTRA_DSO_LDOPTS += \
$(XPCOM_GLUE_LDOPTS) \
$(XPCOM_FROZEN_LDOPTS) \
$(NSPR_LIBS) \
$(MOZ_GCONF_LIBS) \
$(MOZ_GNOMEVFS_LIBS) \
$(GLIB_LIBS) \
$(MOZ_LIBNOTIFY_LIBS) \
+ $(MOZ_GTK2_LIBS) \
$(NULL)
LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/components/build/
include $(topsrcdir)/config/rules.mk
CXXFLAGS += \
$(MOZ_GTK2_CFLAGS) \
$(MOZ_GCONF_CFLAGS) \
$(MOZ_GNOMEVFS_CFLAGS) \
$(GLIB_CFLAGS) \
$(MOZ_LIBNOTIFY_CFLAGS) \
+ $(MOZ_GTK2_CFLAGS) \
$(NULL)
++++++ mozilla-implicit-declarations.patch ++++++
# HG changeset patch
# Parent e3c883f8276a5fd4afab00e226cf19031d6fc5ae
diff --git a/gfx/qcms/iccread.c b/gfx/qcms/iccread.c
--- a/gfx/qcms/iccread.c
+++ b/gfx/qcms/iccread.c
@@ -18,16 +18,17 @@
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include
#include
#include
+#include
#include "qcmsint.h"
//XXX: use a better typename
typedef uint32_t __be32;
typedef uint16_t __be16;
#if 0
not used yet
++++++ mozilla-kde.patch ++++++
++++ 4063 lines (skipped)
++++++ mozilla-libproxy.patch ++++++
From: Wolfgang Rosenauer
Subject: Add the option to use libproxy for system proxy settings
References:
https://bugzilla.mozilla.org/show_bug.cgi?id=517655
diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -545,16 +545,20 @@ FT2_CFLAGS = @FT2_CFLAGS@
FT2_LIBS = @FT2_LIBS@
MOZ_PANGO_CFLAGS = @MOZ_PANGO_CFLAGS@
MOZ_PANGO_LIBS = @MOZ_PANGO_LIBS@
MOZ_XIE_LIBS = @MOZ_XIE_LIBS@
XT_LIBS = @XT_LIBS@
+MOZ_LIBPROXY_CFLAGS = @MOZ_LIBPROXY_CFLAGS@
+MOZ_LIBPROXY_LIBS = @MOZ_LIBPROXY_LIBS@
+MOZ_ENABLE_LIBPROXY = @MOZ_ENABLE_LIBPROXY@
+
MOZ_LIBNOTIFY_CFLAGS = @MOZ_LIBNOTIFY_CFLAGS@
MOZ_LIBNOTIFY_LIBS = @MOZ_LIBNOTIFY_LIBS@
MOZ_ENABLE_LIBNOTIFY = @MOZ_ENABLE_LIBNOTIFY@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_LIBS = @GLIB_LIBS@
GLIB_GMODULE_LIBS = @GLIB_GMODULE_LIBS@
LIBIDL_CFLAGS = @LIBIDL_CFLAGS@
diff --git a/config/system-headers b/config/system-headers
--- a/config/system-headers
+++ b/config/system-headers
@@ -1013,11 +1013,14 @@ hunspell.hxx
#if MOZ_NATIVE_BZ2==1
bzlib.h
#endif
#if MOZ_PLATFORM_MAEMO==5
hildon-uri.h
hildon-mime.h
libosso.h
#endif
+#ifdef MOZ_ENABLE_LIBPROXY
+proxy.h
+#endif
#if MOZ_NATIVE_LIBEVENT==1
event.h
#endif
diff --git a/configure.in b/configure.in
--- a/configure.in
+++ b/configure.in
@@ -5327,16 +5327,38 @@ then
fi
fi
AC_SUBST(MOZ_ENABLE_DBUS)
AC_SUBST(MOZ_DBUS_CFLAGS)
AC_SUBST(MOZ_DBUS_LIBS)
AC_SUBST(MOZ_DBUS_GLIB_CFLAGS)
AC_SUBST(MOZ_DBUS_GLIB_LIBS)
+dnl = libproxy support
+dnl ========================================================
+
+if test "$MOZ_ENABLE_GTK2"
+then
+ MOZ_ENABLE_LIBPROXY=
+
+ MOZ_ARG_ENABLE_BOOL(libproxy,
+ [ --enable-libproxy Enable libproxy support ],
+ MOZ_ENABLE_LIBPROXY=1,
+ MOZ_ENABLE_LIBPROXY=)
+
+ if test "$MOZ_ENABLE_LIBPROXY"
+ then
+ PKG_CHECK_MODULES(MOZ_LIBPROXY, libproxy-1.0)
+ AC_DEFINE(MOZ_ENABLE_LIBPROXY)
+ fi
+fi
+AC_SUBST(MOZ_ENABLE_LIBPROXY)
+AC_SUBST(MOZ_LIBPROXY_CFLAGS)
+AC_SUBST(MOZ_LIBPROXY_LIBS)
+
dnl ========================================================
dnl = libnotify support
dnl ========================================================
if test "$MOZ_ENABLE_GTK2"
then
MOZ_ENABLE_LIBNOTIFY=1
diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in
--- a/toolkit/library/Makefile.in
+++ b/toolkit/library/Makefile.in
@@ -243,16 +243,20 @@ endif
ifdef MOZ_TREE_FREETYPE
EXTRA_DSO_LDOPTS += $(FT2_LIBS)
endif
ifdef MOZ_ENABLE_STARTUP_NOTIFICATION
EXTRA_DSO_LDOPTS += $(MOZ_STARTUP_NOTIFICATION_LIBS)
endif
+ifdef MOZ_ENABLE_LIBPROXY
+EXTRA_DSO_LDOPTS += $(MOZ_LIBPROXY_LIBS)
+endif
+
ifeq ($(OS_ARCH),BeOS)
EXTRA_DSO_LDOPTS += -lbe -ltracker
endif
ifeq ($(OS_ARCH),SunOS)
EXTRA_DSO_LDOPTS += -lelf -ldemangle -lCstd
endif
diff --git a/toolkit/system/unixproxy/Makefile.in b/toolkit/system/unixproxy/Makefile.in
--- a/toolkit/system/unixproxy/Makefile.in
+++ b/toolkit/system/unixproxy/Makefile.in
@@ -15,16 +15,17 @@
#
# The Initial Developer of the Original Code is
# IBM Corporation.
# Portions created by the Initial Developer are Copyright (C) 2004
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Brian Ryner
+# Wolfgang Rosenauer
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
@@ -53,15 +54,30 @@ LIBXUL_LIBRARY = 1
REQUIRES = \
xpcom \
string \
necko \
mozgnome \
$(NULL)
-EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS)
+EXTRA_DSO_LDOPTS += \
+ $(MOZ_LIBPROXY_LIBS) \
+ $(MOZ_COMPONENT_LIBS) \
+ $(NULL)
+
+ifdef MOZ_ENABLE_LIBPROXY
+
+CPPSRCS = \
+ nsLibProxySettings.cpp \
+ $(NULL)
+
+CXXFLAGS += $(MOZ_LIBPROXY_CFLAGS)
+
+else # MOZ_ENABLE_LIBPROXY
CPPSRCS = \
nsUnixSystemProxySettings.cpp \
$(NULL)
+endif # MOZ_ENABLE_LIBPROXY
+
include $(topsrcdir)/config/rules.mk
diff --git a/toolkit/system/unixproxy/nsLibProxySettings.cpp b/toolkit/system/unixproxy/nsLibProxySettings.cpp
new file mode 100644
--- /dev/null
+++ b/toolkit/system/unixproxy/nsLibProxySettings.cpp
@@ -0,0 +1,167 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla libproxy integration code.
+ *
+ * The Initial Developer of the Original Code is
+ * Wolfgang Rosenauer .
+ * Portions created by the Initial Developer are Copyright (C) 2010
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "nsISystemProxySettings.h"
+#include "nsIGenericFactory.h"
+#include "nsIServiceManager.h"
+#include "nsIIOService.h"
+#include "nsIURI.h"
+#include "nsString.h"
+#include "nsNetUtil.h"
+#include "nsCOMPtr.h"
+#include "nspr.h"
+
+#include
+
+class nsUnixSystemProxySettings : public nsISystemProxySettings {
+public:
+ NS_DECL_ISUPPORTS
+ NS_DECL_NSISYSTEMPROXYSETTINGS
+
+ nsUnixSystemProxySettings() { mProxyFactory = nsnull; }
+ nsresult Init();
+
+private:
+ ~nsUnixSystemProxySettings() {
+ if (mProxyFactory)
+ px_proxy_factory_free(mProxyFactory);
+ }
+
+ pxProxyFactory *mProxyFactory;
+};
+
+NS_IMPL_ISUPPORTS1(nsUnixSystemProxySettings, nsISystemProxySettings)
+
+nsresult
+nsUnixSystemProxySettings::Init()
+{
+ return NS_OK;
+}
+
+nsresult
+nsUnixSystemProxySettings::GetPACURI(nsACString& aResult)
+{
+ // Make sure we return an empty result.
+ aResult.Truncate();
+ return NS_OK;
+}
+
+nsresult
+nsUnixSystemProxySettings::GetProxyForURI(nsIURI* aURI, nsACString& aResult)
+{
+ nsresult rv;
+
+ if (!mProxyFactory) {
+ mProxyFactory = px_proxy_factory_new();
+ }
+ NS_ENSURE_TRUE(mProxyFactory, NS_ERROR_NOT_AVAILABLE);
+
+ nsCOMPtr<nsIIOService> ios = do_GetIOService(&rv);
+ NS_ENSURE_SUCCESS(rv, rv);
+
+ nsCAutoString spec;
+ rv = aURI->GetSpec(spec);
+ NS_ENSURE_SUCCESS(rv, rv);
+
+ char **proxyArray = nsnull;
+ proxyArray = px_proxy_factory_get_proxies(mProxyFactory, (char*)(spec.get()));
+ NS_ENSURE_TRUE(proxyArray, NS_ERROR_NOT_AVAILABLE);
+
+ // Translate libproxy's output to PAC string as expected
+ // libproxy returns an array of proxies in the format:
+ // <procotol>://[username:password@]proxy:port
+ // or
+ // direct://
+ //
+ // PAC format: "PROXY proxy1.foo.com:8080; PROXY proxy2.foo.com:8080; DIRECT"
+ int c = 0;
+ while (proxyArray[c] != NULL) {
+ if (!aResult.IsEmpty()) {
+ aResult.AppendLiteral("; ");
+ }
+
+ PRBool isScheme = PR_FALSE;
+ nsXPIDLCString schemeString;
+ nsXPIDLCString hostPortString;
+ nsCOMPtr<nsIURI> proxyURI;
+
+ rv = ios->NewURI(nsDependentCString(proxyArray[c]),
+ nsnull,
+ nsnull,
+ getter_AddRefs(proxyURI));
+ if (NS_FAILED(rv)) {
+ c++;
+ continue;
+ }
+
+ proxyURI->GetScheme(schemeString);
+ if (NS_SUCCEEDED(proxyURI->SchemeIs("http", &isScheme)) && isScheme) {
+ schemeString.AssignLiteral("proxy");
+ }
+ aResult.Append(schemeString);
+ if (NS_SUCCEEDED(proxyURI->SchemeIs("direct", &isScheme)) && !isScheme) {
+ // Add the proxy URI only if it's not DIRECT
+ proxyURI->GetHostPort(hostPortString);
+ aResult.AppendLiteral(" ");
+ aResult.Append(hostPortString);
+ }
+
+ c++;
+ }
+
+#ifdef DEBUG
+ printf("returned PAC proxy string: %s\n", PromiseFlatCString(aResult).get());
+#endif
+
+ PR_Free(proxyArray);
+ return NS_OK;
+}
+
+#define NS_UNIXSYSTEMPROXYSERVICE_CID /* 0fa3158c-d5a7-43de-9181-a285e74cf1d4 */\
+ { 0x0fa3158c, 0xd5a7, 0x43de, \
+ {0x91, 0x81, 0xa2, 0x85, 0xe7, 0x4c, 0xf1, 0xd4 } }
+
+NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsUnixSystemProxySettings, Init)
+
+static const nsModuleComponentInfo components[] = {
+ { "Unix System Proxy Settings Service",
+ NS_UNIXSYSTEMPROXYSERVICE_CID,
+ NS_SYSTEMPROXYSETTINGS_CONTRACTID,
+ nsUnixSystemProxySettingsConstructor }
+};
+
+NS_IMPL_NSGETMODULE(nsUnixProxyModule, components)
++++++ mozilla-linux3.patch ++++++
# HG changeset patch
# Parent bf7c3e1c6174630743f9f94808c4dd3a2edc0c6b
diff --git a/toolkit/crashreporter/tools/symbolstore.py b/toolkit/crashreporter/tools/symbolstore.py
--- a/toolkit/crashreporter/tools/symbolstore.py
+++ b/toolkit/crashreporter/tools/symbolstore.py
@@ -376,16 +376,17 @@ def GetVCSFilename(file, srcdirs):
return (file.replace("\\", "/"), root)
def GetPlatformSpecificDumper(**kwargs):
"""This function simply returns a instance of a subclass of Dumper
that is appropriate for the current platform."""
return {'win32': Dumper_Win32,
'cygwin': Dumper_Win32,
'linux2': Dumper_Linux,
+ 'linux3': Dumper_Linux,
'sunos5': Dumper_Solaris,
'darwin': Dumper_Mac}[sys.platform](**kwargs)
def SourceIndex(fileStream, outputPath, vcs_root):
"""Takes a list of files, writes info to a data block in a .stream file"""
# Creates a .pdb.stream file in the mozilla\objdir to be used for source indexing
# Create the srcsrv data block that indexes the pdb file
result = True
++++++ mozilla-locale.patch ++++++
# HG changeset patch
# User Wolfgang Rosenauer
# Parent e069ee20084757311e0826e68d5a1fbeb3dcc29f
Bug 583793 - Firefox interface language set to LANG, ignores LANGUAGE
diff --git a/intl/locale/src/nsLocaleService.cpp b/intl/locale/src/nsLocaleService.cpp
--- a/intl/locale/src/nsLocaleService.cpp
+++ b/intl/locale/src/nsLocaleService.cpp
@@ -169,39 +169,48 @@ nsLocaleService::nsLocaleService(void)
nsAutoString category, category_platform;
nsLocale* resultLocale;
int i;
resultLocale = new nsLocale();
if ( resultLocale == NULL ) {
return;
}
+
+ // Get system configuration
+ char* language = getenv("LANGUAGE");
+ char* lang = getenv("LANG");
for( i = 0; i < LocaleListLength; i++ ) {
nsresult result;
+ // setlocale( , "") evaluates LC_* and LANG
char* lc_temp = setlocale(posix_locale_category[i], "");
CopyASCIItoUTF16(LocaleList[i], category);
- category_platform = category;
+ category_platform = category;
category_platform.AppendLiteral("##PLATFORM");
if (lc_temp != nsnull) {
result = posixConverter->GetXPLocale(lc_temp, xpLocale);
CopyASCIItoUTF16(lc_temp, platformLocale);
} else {
- char* lang = getenv("LANG");
if ( lang == nsnull ) {
platformLocale.AssignLiteral("en_US");
result = posixConverter->GetXPLocale("en-US", xpLocale);
}
else {
CopyASCIItoUTF16(lang, platformLocale);
- result = posixConverter->GetXPLocale(lang, xpLocale);
+ result = posixConverter->GetXPLocale(lang, xpLocale);
}
}
if (NS_FAILED(result)) {
return;
}
+ // LANGUAGE is overriding LC_MESSAGES
+ if (i == LC_MESSAGES && language && *language) {
+ CopyASCIItoUTF16(language, platformLocale);
+ result = posixConverter->GetXPLocale(language, xpLocale);
+ }
resultLocale->AddCategory(category, xpLocale);
resultLocale->AddCategory(category_platform, platformLocale);
}
mSystemLocale = do_QueryInterface(resultLocale);
mApplicationLocale = do_QueryInterface(resultLocale);
} // if ( NS_SUCCEEDED )...
#endif // XP_UNIX || XP_BEOS
++++++ mozilla-nongnome-proxies.patch ++++++
From: Wolfgang Rosenauer
Subject: Do not use gconf for proxy settings if not running within Gnome
Index: toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
===================================================================
RCS file: /cvsroot/mozilla/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp,v
retrieving revision 1.1
diff -u -p -6 -r1.1 nsUnixSystemProxySettings.cpp
--- toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp 29 Jan 2008 15:58:41 -0000 1.1
+++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp 17 Apr 2008 19:02:19 -0000
@@ -69,13 +69,19 @@ private:
NS_IMPL_ISUPPORTS1(nsUnixSystemProxySettings, nsISystemProxySettings)
nsresult
nsUnixSystemProxySettings::Init()
{
- mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
+ // If this is a GNOME session, load gconf and try to use its preferences.
+ // If gconf is not available (which would be stupid) we'll proceed as if
+ // this was not a GNOME session, using *_PROXY environment variables.
+ const char* sessionType = PR_GetEnv("DESKTOP_SESSION");
+ if (sessionType && !strcmp(sessionType, "gnome")) {
+ mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
+ }
return NS_OK;
}
PRBool
nsUnixSystemProxySettings::IsProxyMode(const char* aMode)
{
++++++ mozilla-ntlm-full-path.patch ++++++
# HG changeset patch
# User Petr Cerny
# Parent 685ce8f9d8549783e9643907b9e95a3efda526f0
diff --git a/extensions/auth/nsAuthSambaNTLM.cpp b/extensions/auth/nsAuthSambaNTLM.cpp
--- a/extensions/auth/nsAuthSambaNTLM.cpp
+++ b/extensions/auth/nsAuthSambaNTLM.cpp
@@ -200,17 +200,17 @@ static PRUint8* ExtractMessage(const nsA
nsresult
nsAuthSambaNTLM::SpawnNTLMAuthHelper()
{
const char* username = PR_GetEnv("USER");
if (!username)
return NS_ERROR_FAILURE;
char* args[] = {
- "ntlm_auth",
+ "/usr/bin/ntlm_auth",
"--helper-protocol", "ntlmssp-client-1",
"--use-cached-creds",
"--username", const_cast(username),
nsnull
};
PRBool isOK = SpawnIOChild(args, &mChildPID, &mFromChildFD, &mToChildFD);
if (!isOK)
++++++ mozilla-pkgconfig.patch ++++++
From: Wolfgang Rosenauer
Subject: pkgconfig tuning
diff --git a/xulrunner/installer/Makefile.in b/xulrunner/installer/Makefile.in
--- a/xulrunner/installer/Makefile.in
+++ b/xulrunner/installer/Makefile.in
@@ -62,16 +62,19 @@ PKG_DMG_SOURCE = $(STAGEPATH)xulrunner-p
endif
include $(topsrcdir)/config/rules.mk
INSTALL_SDK = 1
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
+# the apilibdir always ends with 1.9 as every patch update will provide a link
+apilibdir = $(dir $(installdir))xulrunner-1.9.2
+
$(MOZILLA_VERSION).system.conf: $(topsrcdir)/config/milestone.txt Makefile
printf "[%s]\nGRE_PATH=%s\nxulrunner=true\nabi=%s" \
$(MOZILLA_VERSION) $(installdir) $(TARGET_XPCOM_ABI)> $@
ifndef SKIP_GRE_REGISTRATION
# to register xulrunner per-user, override this with $HOME/.gre.d
regdir = /etc/gre.d
@@ -116,16 +119,17 @@ endif
%.pc: $(srcdir)/%.pc.in $(GLOBAL_DEPS)
cat $< | sed \
-e "s|%ojidef%|$(OJIDEF)|" \
-e "s|%prefix%|$(prefix)|" \
-e "s|%includedir%|$(includedir)|" \
-e "s|%idldir%|$(idldir)|" \
-e "s|%sdkdir%|$(sdkdir)|" \
+ -e "s|%libdir%|$(apilibdir)|" \
-e "s|%MOZ_APP_NAME%|$(MOZ_APP_NAME)|" \
-e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \
-e "s|%WCHAR_CFLAGS%|$(WCHAR_CFLAGS)|" \
-e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \
-e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" \
-e "s|%NSPR_NAME%|$(NSPR_NAME)|" \
-e "s|%NSPR_VERSION%|$(NSPR_VERSION)|" > $@
chmod 644 $@
diff --git a/xulrunner/installer/libxul-embedding.pc.in b/xulrunner/installer/libxul-embedding.pc.in
--- a/xulrunner/installer/libxul-embedding.pc.in
+++ b/xulrunner/installer/libxul-embedding.pc.in
@@ -1,10 +1,11 @@
prefix=%prefix%
sdkdir=%sdkdir%
includedir=%includedir%
idldir=%idldir%
Name: libxul-embedding
Description: Static library for version-independent embedding of the Mozilla runtime
Version: %MOZILLA_VERSION%
-Libs: -L${sdkdir}/lib -lxpcomglue
+Requires: %NSPR_NAME% >= %NSPR_VERSION%
+Libs: -L${sdkdir}/sdk/lib -lxpcomglue
Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS%
diff --git a/xulrunner/installer/libxul.pc.in b/xulrunner/installer/libxul.pc.in
--- a/xulrunner/installer/libxul.pc.in
+++ b/xulrunner/installer/libxul.pc.in
@@ -1,10 +1,11 @@
prefix=%prefix%
sdkdir=%sdkdir%
+libdir=%libdir%
includedir=%includedir%
idldir=%idldir%
Name: libxul
Description: The Mozilla Runtime and Embedding Engine
Version: %MOZILLA_VERSION%
Requires: %NSPR_NAME% >= %NSPR_VERSION%
Libs: -L${sdkdir}/lib -lxpcomglue_s -lxul -lxpcom
diff --git a/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in b/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in
--- a/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in
+++ b/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in
@@ -1,8 +1,9 @@
prefix=%prefix%
sdkdir=%sdkdir%
+libdir=%libdir%
includedir=%includedir%
Name: mozilla-gtkembedmoz
Description: Static version-independent Mozilla Embedding Widget for Gtk+
Version: %MOZILLA_VERSION%
Requires: libxul-embedding = %MOZILLA_VERSION%
diff --git a/xulrunner/installer/mozilla-gtkmozembed.pc.in b/xulrunner/installer/mozilla-gtkmozembed.pc.in
--- a/xulrunner/installer/mozilla-gtkmozembed.pc.in
+++ b/xulrunner/installer/mozilla-gtkmozembed.pc.in
@@ -1,8 +1,9 @@
prefix=%prefix%
sdkdir=%sdkdir%
+libdir=%libdir%
includedir=%includedir%
Name: mozilla-gtkembedmoz
Description: Mozilla Embedding Widget for Gtk+
Version: %MOZILLA_VERSION%
Requires: libxul = %MOZILLA_VERSION%
diff --git a/xulrunner/installer/mozilla-js.pc.in b/xulrunner/installer/mozilla-js.pc.in
--- a/xulrunner/installer/mozilla-js.pc.in
+++ b/xulrunner/installer/mozilla-js.pc.in
@@ -1,10 +1,11 @@
prefix=%prefix%
sdkdir=%sdkdir%
+libdir=%libdir%
includedir=%includedir%
Name: JavaScript
Description: The Mozilla JavaScript Library
Version: %MOZILLA_VERSION%
Requires: %NSPR_NAME% >= %NSPR_VERSION%
-Libs: -L${sdkdir}/lib -lmozjs
+Libs: -Wl,-rpath,${libdir} -L${sdkdir}/lib -lmozjs
Cflags: -I${includedir} -DXP_UNIX -DJS_THREADSAFE
++++++ mozilla-prefer_plugin_pref.patch ++++++
From: Ubuntu
Subject: introduce a pref to prefer certain plugins for mime-types
diff --git a/modules/plugin/base/src/nsPluginHost.cpp b/modules/plugin/base/src/nsPluginHost.cpp
--- a/modules/plugin/base/src/nsPluginHost.cpp
+++ b/modules/plugin/base/src/nsPluginHost.cpp
@@ -3929,8 +3929,41 @@ nsPluginHost::FindPluginForType(const ch
// if we have a mimetype passed in, search the mPlugins
// linked list for a match
if (nsnull != aMimeType) {
+ nsresult res;
+ nsCOMPtr<nsIPrefBranch> prefB (do_QueryInterface(mPrefService));
+
+ char *preferredPluginPath = NULL;
+ nsCAutoString mimetypePrefString ("modules.plugins.mimetype.");
+ mimetypePrefString.Append(aMimeType);
+ const char *mimetypePrefChar = mimetypePrefString.get();
+ res = prefB->GetCharPref(mimetypePrefChar, &preferredPluginPath);
+
+ if(!NS_SUCCEEDED(res)) preferredPluginPath = NULL;
+
plugins = mPlugins;
-
+ if(preferredPluginPath) {
+ while (nsnull != plugins) {
+ if (0 == PL_strcasecmp(plugins->mFileName.get(), preferredPluginPath) ||
+ 0 == PL_strcasecmp(plugins->mFullPath.get(), preferredPluginPath)) {
+ return plugins;
+ }
+ plugins = plugins->mNext;
+ }
+
+ // now lets search for substrings
+ plugins=mPlugins;
+ while (nsnull != plugins) {
+ if (nsnull != PL_strstr(plugins->mFileName.get(), preferredPluginPath) ||
+ nsnull != PL_strstr(plugins->mFullPath.get(), preferredPluginPath)) {
+ return plugins;
+ }
+ plugins = plugins->mNext;
+ }
+ }
+
+ // if there is no pref for this mime-type, or if the plugin named in pref
+ // isn't found, we pick the first that matches for this mime-type
+ plugins = mPlugins;
while (nsnull != plugins) {
variants = plugins->mVariants;
for (cnt = 0; cnt < variants; cnt++) {
++++++ mozilla-prlog.patch ++++++
# Patch originally from mozilla-1.9.1 branch
# HG changeset patch
# User Jonas Sicking
# Date 1281670510 25200
# Node ID d5ad248a92152333b5d6b22b802a3ac32a11b4b8
# Parent 184125a9b1f8b98eddd8f3da39d4415e928b1d80
Compatibility with NSPR < 4.8.6 (bmo#567620)
diff --git a/content/html/content/src/nsHTMLFrameSetElement.cpp b/content/html/content/src/nsHTMLFrameSetElement.cpp
--- a/content/html/content/src/nsHTMLFrameSetElement.cpp
+++ b/content/html/content/src/nsHTMLFrameSetElement.cpp
@@ -43,6 +43,7 @@
#include "nsIFrameSetElement.h"
#include "nsIHTMLDocument.h"
#include "nsIDocument.h"
+#include "prlog.h"
class nsHTMLFrameSetElement : public nsGenericHTMLElement,
public nsIDOMHTMLFrameSetElement,
++++++ mozilla-shared-nss-db.patch ++++++
From: Hans Petter Jansson
Wolfgang Rosenauer
Subject: use libnsssharedhelper if available at compile time
(can be disabled by exporting MOZ_XRE_NO_NSSHELPER=1)
References:
diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -561,16 +561,20 @@ MOZ_ENABLE_LIBNOTIFY = @MOZ_ENABLE_LIBNO
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_LIBS = @GLIB_LIBS@
GLIB_GMODULE_LIBS = @GLIB_GMODULE_LIBS@
LIBIDL_CFLAGS = @LIBIDL_CFLAGS@
LIBIDL_LIBS = @LIBIDL_LIBS@
STATIC_LIBIDL = @STATIC_LIBIDL@
+MOZ_ENABLE_NSSHELPER = @MOZ_ENABLE_NSSHELPER@
+NSSHELPER_CFLAGS = @NSSHELPER_CFLAGS@
+NSSHELPER_LIBS = @NSSHELPER_LIBS@
+
MOZ_NATIVE_MAKEDEPEND = @SYSTEM_MAKEDEPEND@
MOZ_AUTO_DEPS = @MOZ_AUTO_DEPS@
COMPILER_DEPEND = @COMPILER_DEPEND@
MDDEPDIR := @MDDEPDIR@
MOZ_DEMANGLE_SYMBOLS = @MOZ_DEMANGLE_SYMBOLS@
diff --git a/configure.in b/configure.in
--- a/configure.in
+++ b/configure.in
@@ -8016,16 +8016,32 @@ AC_SUBST(QCMS_LIBS)
dnl ========================================================
dnl OTS
dnl ========================================================
MOZ_OTS_LIBS='$(DEPTH)/gfx/ots/src/$(LIB_PREFIX)mozots.$(LIB_SUFFIX)'
AC_SUBST(MOZ_OTS_LIBS)
dnl ========================================================
+dnl Check for nss-shared-helper
+dnl ========================================================
+
+ PKG_CHECK_MODULES(NSSHELPER, nss-shared-helper,
+ [MOZ_ENABLE_NSSHELPER=1],
+ [MOZ_ENABLE_NSSHELPER=])
+
+if test "$MOZ_ENABLE_NSSHELPER"; then
+ AC_DEFINE(MOZ_ENABLE_NSSHELPER)
+fi
+AC_SUBST(MOZ_ENABLE_NSSHELPER)
+AC_SUBST(NSSHELPER_CFLAGS)
+AC_SUBST(NSSHELPER_LIBS)
+
+
+dnl ========================================================
dnl disable xul
dnl ========================================================
MOZ_ARG_DISABLE_BOOL(xul,
[ --disable-xul Disable XUL],
MOZ_XUL= )
if test "$MOZ_XUL"; then
AC_DEFINE(MOZ_XUL)
else
diff --git a/security/manager/ssl/src/Makefile.in b/security/manager/ssl/src/Makefile.in
--- a/security/manager/ssl/src/Makefile.in
+++ b/security/manager/ssl/src/Makefile.in
@@ -133,19 +133,20 @@ REQUIRES = nspr \
$(NULL)
EXTRA_DEPS = $(NSS_DEP_LIBS)
DEFINES += -DNSS_ENABLE_ECC
# Use local includes because they are inserted before INCLUDES
# so that Mozilla's nss.h is used, not glibc's
-LOCAL_INCLUDES += $(NSS_CFLAGS)
+LOCAL_INCLUDES += $(NSS_CFLAGS) $(NSSHELPER_CFLAGS)
EXTRA_DSO_LDOPTS += \
$(MOZ_UNICHARUTIL_LIBS) \
$(MOZ_COMPONENT_LIBS) \
$(MOZ_JS_LIBS) \
+ $(NSSHELPER_LIBS) \
$(NSS_LIBS) \
$(NULL)
include $(topsrcdir)/config/rules.mk
diff --git a/security/manager/ssl/src/nsNSSComponent.cpp b/security/manager/ssl/src/nsNSSComponent.cpp
--- a/security/manager/ssl/src/nsNSSComponent.cpp
+++ b/security/manager/ssl/src/nsNSSComponent.cpp
@@ -39,16 +39,23 @@
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
+#ifdef MOZ_ENABLE_NSSHELPER
+#pragma GCC visibility push(default)
+#include
+#pragma GCC visibility pop
+#include "prenv.h"
+#endif
+
#include "nsNSSComponent.h"
#include "nsNSSCallbacks.h"
#include "nsNSSIOLayer.h"
#include "nsSSLThread.h"
#include "nsCertVerificationThread.h"
#include "nsNetUtil.h"
#include "nsAppDirectoryServiceDefs.h"
@@ -1606,17 +1613,31 @@ nsNSSComponent::InitializeNSS(PRBool sho
// The call to ConfigureInternalPKCS11Token needs to be done before NSS is initialized,
// but affects only static data.
// If we could assume i18n will not change between profiles, one call per application
// run were sufficient. As I can't predict what happens in the future, let's repeat
// this call for every re-init of NSS.
ConfigureInternalPKCS11Token();
- SECStatus init_rv = ::NSS_InitReadWrite(profileStr.get());
+ SECStatus init_rv = SECFailure;
+#ifdef MOZ_ENABLE_NSSHELPER
+ if (PR_GetEnv("MOZ_XRE_NO_NSSHELPER")) {
+ init_rv = ::NSS_InitReadWrite(profileStr.get());
+ } else {
+ init_rv = ::nsshelp_open_db ("mozilla-xul", profileStr.get(), 0);
+
+ if (init_rv != SECSuccess) {
+ PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("can not init NSS using nsshelp_open_db in %s\n", profileStr.get()));
+ init_rv = ::NSS_InitReadWrite(profileStr.get());
+ }
+ }
+#else
+ init_rv = ::NSS_InitReadWrite(profileStr.get());
+#endif
if (init_rv != SECSuccess) {
PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("can not init NSS r/w in %s\n", profileStr.get()));
if (supress_warning_preference) {
which_nss_problem = problem_none;
}
else {
diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in
--- a/toolkit/library/Makefile.in
+++ b/toolkit/library/Makefile.in
@@ -189,17 +189,17 @@ else
EXTRA_DSO_LDOPTS += \
$(MOZ_COMPONENT_LIBS) \
$(MOZ_JS_LIBS) \
$(NULL)
endif
DEFINES += -DIMPL_XREAPI
-EXTRA_DSO_LDOPTS += $(NSPR_LIBS)
+EXTRA_DSO_LDOPTS += $(NSPR_LIBS) $(NSSHELPER_LIBS)
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
CXXFLAGS += $(TK_CFLAGS)
EXTRA_DSO_LDOPTS += \
-framework SystemConfiguration \
-framework QuickTime \
-framework IOKit \
-lcrypto \
++++++ mozilla-ua-locale-pref.patch ++++++
diff --git a/chrome/src/nsChromeRegistry.cpp b/chrome/src/nsChromeRegistry.cpp
--- a/chrome/src/nsChromeRegistry.cpp
+++ b/chrome/src/nsChromeRegistry.cpp
@@ -1267,20 +1267,21 @@ nsChromeRegistry::WrappersEnabled(nsIURI
return PL_DHASH_ENTRY_IS_LIVE(entry) &&
entry->flags & PackageEntry::XPCNATIVEWRAPPERS;
}
nsresult
nsChromeRegistry::SelectLocaleFromPref(nsIPrefBranch* prefs)
{
nsresult rv;
- PRBool matchOSLocale = PR_FALSE;
+ PRBool matchOSLocale = PR_FALSE, userLocaleOverride = PR_FALSE;
+ prefs->PrefHasUserValue(SELECTED_LOCALE_PREF, &userLocaleOverride);
rv = prefs->GetBoolPref(MATCH_OS_LOCALE_PREF, &matchOSLocale);
- if (NS_SUCCEEDED(rv) && matchOSLocale) {
+ if (NS_SUCCEEDED(rv) && matchOSLocale && !userLocaleOverride) {
// compute lang and region code only when needed!
nsCAutoString uiLocale;
rv = getUILangCountry(uiLocale);
if (NS_SUCCEEDED(rv))
mSelectedLocale = uiLocale;
}
else {
nsXPIDLCString provider;
diff --git a/chrome/test/unit/data/test_bug519468.manifest b/chrome/test/unit/data/test_bug519468.manifest
deleted file mode 100644
--- a/chrome/test/unit/data/test_bug519468.manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-locale testmatchos en-US jar:en-US.jar!/locale/en-US/global/
-locale testmatchos fr-FR jar:en-US.jar!/locale/en-US/global/
diff --git a/chrome/test/unit/test_bug519468.js b/chrome/test/unit/test_bug519468.js
--- a/chrome/test/unit/test_bug519468.js
+++ b/chrome/test/unit/test_bug519468.js
@@ -31,50 +31,90 @@
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK *****
*/
+function write_locale(stream, locale, package) {
+ var s = "locale " + package + " " + locale + " jar:" + locale + ".jar!";
+ s += "/locale/" + locale + "/" + package +"/\n";
+ stream.write(s, s.length);
+}
+
+var localeService = Cc["@mozilla.org/intl/nslocaleservice;1"]
+ .getService(Ci.nsILocaleService);
+
+var systemLocale = localeService.getLocaleComponentForUserAgent();
+
+var locales;
+
+if (systemLocale == "en-US")
+ locales = [ "en-US", "fr-FR", "de-DE" ];
+else if (systemLocale == "fr-FR")
+ locales = [ "en-US", systemLocale, "de-DE" ];
+else
+ locales = [ "en-US", systemLocale, "fr-FR" ];
+
+var workingDir = Cc["@mozilla.org/file/directory_service;1"].
+ getService(Ci.nsIProperties).get("TmpD", Ci.nsIFile);
+var manifest = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile);
+manifest.initWithFile(workingDir);
+manifest.append("test_bug519468.manifest");
+manifest.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0600);
+var stream = Cc["@mozilla.org/network/file-output-stream;1"].
+ createInstance(Ci.nsIFileOutputStream);
+stream.init(manifest, 0x04 | 0x08 | 0x20, 0600, 0); // write, create, truncate
+locales.slice(0,2).forEach(function(l) write_locale(stream, l, "testmatchos"));
+write_locale(stream, locales[2], "testnomatchos");
+stream.close();
+
var MANIFESTS = [
- do_get_file("data/test_bug519468.manifest")
+ manifest
];
registerManifests(MANIFESTS);
var chromeReg = Cc["@mozilla.org/chrome/chrome-registry;1"]
.getService(Ci.nsIXULChromeRegistry)
.QueryInterface(Ci.nsIToolkitChromeRegistry);
-var localeService = Cc["@mozilla.org/intl/nslocaleservice;1"]
- .getService(Ci.nsILocaleService);
-
var prefService = Cc["@mozilla.org/preferences-service;1"]
.getService(Ci.nsIPrefService)
.QueryInterface(Ci.nsIPrefBranch);
function test_locale(aTest) {
prefService.setBoolPref("intl.locale.matchOS", aTest.matchOS);
- prefService.setCharPref("general.useragent.locale", aTest.selected || "en-US");
+ if (aTest.selected)
+ prefService.setCharPref("general.useragent.locale", aTest.selected);
+ else
+ try {
+ prefService.clearUserPref("general.useragent.locale");
+ } catch(e) {}
- var selectedLocale = chromeReg.getSelectedLocale("testmatchos");
+ var selectedLocale = chromeReg.getSelectedLocale(aTest.package);
do_check_eq(selectedLocale, aTest.locale);
}
function run_test()
{
- var systemLocale = localeService.getLocaleComponentForUserAgent();
-
var tests = [
- {matchOS: false, selected: null, locale: "en-US"},
{matchOS: true, selected: null, locale: systemLocale},
- {matchOS: true, selected: "fr-FR", locale: systemLocale},
- {matchOS: false, selected: "fr-FR", locale: "fr-FR"},
- {matchOS: true, selected: null, locale: systemLocale}
+ {matchOS: true, selected: locales[0], locale: locales[0]},
+ {matchOS: true, selected: locales[1], locale: locales[1]},
+ {matchOS: true, selected: locales[2], locale: locales[0]},
+ {matchOS: true, selected: null, locale: locales[2], package: "testnomatchos"},
+ {matchOS: false, selected: null, locale: locales[0]},
+ {matchOS: false, selected: locales[0], locale: locales[0]},
+ {matchOS: false, selected: locales[1], locale: locales[1]},
+ {matchOS: false, selected: locales[2], locale: locales[0]},
];
for (var i = 0; i < tests.length; ++ i) {
var test = tests[i];
+ if (!test.package)
+ test.package = "testmatchos";
test_locale(test);
}
+ manifest.remove(false);
}
++++++ mozilla-xulrunner192-rpmlintrc ++++++
addFilter("no-jar-manifest")
++++++ toolkit-download-folder.patch ++++++
From: Wolfgang Rosenauer
Subject: Don't use localized Downloads unless XDG is set up
References:
https://bugzilla.novell.com/show_bug.cgi?id=501724
diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js
--- a/browser/components/preferences/main.js
+++ b/browser/components/preferences/main.js
@@ -344,7 +344,7 @@ var gMainPane = {
// With 3.0, a new desktop folder - 'Downloads' was introduced for
// platforms and versions that don't support a default system downloads
// folder. See nsDownloadManager for details.
- downloadFolder.label = bundlePreferences.getString("downloadsFolderName");
+ downloadFolder.label = "Downloads";
iconUrlSpec = fph.getURLSpecFromFile(this._indexToFolder(1));
} else {
// 'Desktop'
diff --git a/toolkit/components/downloads/src/nsDownloadManager.cpp b/toolkit/components/downloads/src/nsDownloadManager.cpp
--- a/toolkit/components/downloads/src/nsDownloadManager.cpp
+++ b/toolkit/components/downloads/src/nsDownloadManager.cpp
@@ -1269,8 +1269,10 @@ nsDownloadManager::GetDefaultDownloadsDi
// XDG user dir spec, with a fallback to Home/Downloads
nsXPIDLString folderName;
- mBundle->GetStringFromName(NS_LITERAL_STRING("downloadsFolder").get(),
- getter_Copies(folderName));
+ // We don't want localized "Downloads" unless XDG is used
+ //mBundle->GetStringFromName(NS_LITERAL_STRING("downloadsFolder").get(),
+ // getter_Copies(folderName));
+ folderName.AssignLiteral("Downloads");
#if defined (XP_MACOSX)
rv = dirService->Get(NS_OSX_DEFAULT_DOWNLOAD_DIR,
++++++ toolkit-lockdown.js ++++++
pref("config.lockdown.showsavedpasswords", false);
pref("config.lockdown.savepage", false);
pref("config.lockdown.printing", false);
++++++ toolkit-ui-lockdown.patch ++++++
From: various contributors
Subject: toolkit ui lockdown hooks
diff --git a/toolkit/components/passwordmgr/content/passwordManager.js b/toolkit/components/passwordmgr/content/passwordManager.js
--- a/toolkit/components/passwordmgr/content/passwordManager.js
+++ b/toolkit/components/passwordmgr/content/passwordManager.js
@@ -119,19 +119,28 @@ function LoadSignons() {
// SignonColumnSort) assumes we want to toggle the sort
// direction but here we don't so we have to trick it
lastSignonSortAscending = !lastSignonSortAscending;
SignonColumnSort(lastSignonSortColumn);
// disable "remove all signons" button if there are no signons
var element = document.getElementById("removeAllSignons");
var toggle = document.getElementById("togglePasswords");
+ try {
+ var viewLocked = Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefBranch)
+ .getBoolPref("config.lockdown.showsavedpasswords");
+ } catch (e) {
+ var viewLocked = false;
+ }
if (signons.length == 0 || gSelectUserInUse) {
element.setAttribute("disabled","true");
toggle.setAttribute("disabled","true");
+ } else if (viewLocked) {
+ toggle.setAttribute("disabled","true");
} else {
element.removeAttribute("disabled");
toggle.removeAttribute("disabled");
}
return true;
}
@@ -166,16 +175,28 @@ function DeleteAllSignons() {
var syncNeeded = (signonsTreeView._filterSet.length != 0);
DeleteAllFromTree(signonsTree, signonsTreeView,
signonsTreeView._filterSet.length ? signonsTreeView._filterSet : signons,
deletedSignons, "removeSignon", "removeAllSignons");
FinalizeSignonDeletions(syncNeeded);
}
function TogglePasswordVisible() {
+ try {
+ var viewLocked = Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefBranch)
+ .getBoolPref("config.lockdown.showsavedpasswords");
+ } catch (e) {
+ var viewLocked = false;
+ }
+ // at that point if viewLocked is true, we shouldn't reach this code,
+ // but better be safe than sorry.
+ if (viewLocked) {
+ return;
+ }
if (showingPasswords || ConfirmShowPasswords()) {
showingPasswords = !showingPasswords;
document.getElementById("togglePasswords").label = kSignonBundle.getString(showingPasswords ? "hidePasswords" : "showPasswords");
document.getElementById("togglePasswords").accessKey = kSignonBundle.getString(showingPasswords ? "hidePasswordsAccessKey" : "showPasswordsAccessKey");
document.getElementById("passwordCol").hidden = !showingPasswords;
_filterPasswords();
}
diff --git a/toolkit/components/printing/content/printdialog.js b/toolkit/components/printing/content/printdialog.js
--- a/toolkit/components/printing/content/printdialog.js
+++ b/toolkit/components/printing/content/printdialog.js
@@ -45,16 +45,17 @@ var printService = null;
var gOriginalNumCopies = 1;
var paramBlock;
var gPrefs = null;
var gPrintSettings = null;
var gWebBrowserPrint = null;
var gPrintSetInterface = Components.interfaces.nsIPrintSettings;
var doDebug = false;
+var gPrefService = null;
//---------------------------------------------------
function initDialog()
{
dialog = new Object;
dialog.propertiesButton = document.getElementById("properties");
dialog.descText = document.getElementById("descText");
@@ -82,21 +83,33 @@ function initDialog()
dialog.printButton = document.documentElement.getButton("accept");
// <data> elements
dialog.printName = document.getElementById("printButton");
dialog.fpDialog = document.getElementById("fpDialog");
dialog.enabled = false;
+
+ gPrefService = Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefService).getBranch(null);
+ if (gPrefService.getBoolPref("config.lockdown.savepage")) {
+ dialog.fileCheck.setAttribute("disabled", "true");
+ }
+ if (gPrefService.getBoolPref("config.lockdown.printing")) {
+ dialog.printButton.setAttribute("disabled", "true");
+ }
}
//---------------------------------------------------
function checkInteger(element)
{
+ if (gPrefService.getBoolPref("config.lockdown.printing"))
+ return;
+
var value = element.value;
if (value && value.length > 0) {
value = value.replace(/[^0-9]/g,"");
if (!value) value = "";
element.value = value;
}
if (!value || value < 1 || value > 999)
dialog.printButton.setAttribute("disabled","true");
++++++ xulrunner-openSUSE-prefs.js ++++++
// openSUSE overrides for default settings
pref("layout.word_select.stop_at_punctuation", false);
pref("intl.locale.matchOS", true);
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org