Hello community,
here is the log from the commit of package kompozer for openSUSE:Factory
checked in at Wed Jun 3 00:52:12 CEST 2009.
--------
--- GNOME/kompozer/kompozer.changes 2009-01-12 11:17:49.000000000 +0100
+++ /mounts/work_src_done/STABLE/kompozer/kompozer.changes 2009-06-02 19:01:25.000000000 +0200
@@ -1,0 +2,12 @@
+Tue Jun 2 15:50:48 CEST 2009 - sbrabec@suse.cz
+
+- Updated to the latest version 0.8a4:
+ * based on the latest Firefox 2 version includes all its fixes
+ including many security fixes (including latest CVE-2009-0776,
+ CVE-2009-1311 and CVE-2009-1044)
+ * includes fixes collected by the community
+ * works with gtk >= 2.14 (bnc#465291).
+- Imported patchset from the latest OBS mozilla firefox2 package.
+- Updated desktop icon.
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
dumpstack.patch
gtk.patch
kompozer-0.7.10dfsg-src.tar.bz2
kompozer.ppc64.patch
mozilla-gcc4.patch
nvu-implicit_decl.patch
nvu-overflow.patch
nvu-retval.patch
nvu-undefined-operation.patch
nvu-uninitialized-variable.patch
system-nspr.patch
New:
----
abuild.patch
cjk-postscript-fonts.dif
configure.patch
em-356370.patch
firefox-381370.patch
firefox-ntlm.patch
gcc-undefined-ops.patch
gnome-vfs.patch
greasemonkey.patch
kompozer-0.8a4-src.tar.bz2
kompozer-path_len.patch
locale.patch
misc.dif
mozilla-gcc4.3-fixes.patch
nspr-prdtoa.patch
postscript.patch
proxy-dev.patch
startup.patch
synaptics-scroll-358863.patch
system-extensions.patch
x11-session.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kompozer.spec ++++++
--- /var/tmp/diff_new_pack.Di1733/_old 2009-06-03 00:50:55.000000000 +0200
+++ /var/tmp/diff_new_pack.Di1733/_new 2009-06-03 00:50:55.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package kompozer (Version 0.7.10)
+# spec file for package kompozer (Version 0.7.99.0.4)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,30 +19,72 @@
Name: kompozer
-BuildRequires: fdupes gcc-c++ gtk2-devel krb5-devel libgnome-devel libidl-devel mozilla-nspr-devel orbit-devel tcsh unzip update-desktop-files zip
+BuildRequires: fdupes gcc-c++ gtk2-devel krb5-devel libgnome-devel libidl-devel mozilla-nspr-devel orbit-devel startup-notification-devel tcsh unzip update-desktop-files zip
%define kompozer 1
License: GPL v2 or later; LGPL v2.1 or later; MOZILLA PUBLIC LICENSE (MPL/NPL)
-Version: 0.7.10
-Release: 2
+Version: 0.7.99.0.4
+Release: 1
Summary: Web Authoring System
Url: http://www.kompozer.net/
Group: Productivity/Publishing/HTML/Editors
-Source: %{name}-%{version}dfsg-src.tar.bz2
+#Source: %{name}-%{version}dfsg-src.tar.bz2
+Source: kompozer-0.8a4-src.tar.bz2
Source1: kompozer.desktop
Source2: kompozer.png
-Patch: mozilla-freetype218.patch
-Patch1: nvu-retval.patch
-Patch2: nss-opt.patch
-Patch3: mozilla-gcc4.patch
-Patch4: system-nspr.patch
-Patch5: gtk.patch
-Patch6: nvu-implicit_decl.patch
-Patch7: dumpstack.patch
-Patch8: nvu-undefined-operation.patch
-Patch9: nvu-uninitialized-variable.patch
-Patch10: nvu-overflow.patch
-Patch11: unused-includes.patch
-Patch12: kompozer.ppc64.patch
+#
+# The patchwork bellow is a port from the old nvu/kompozer
+Patch200: mozilla-freetype218.patch
+Patch211: unused-includes.patch
+#
+# The patchwork bellow is a backport from OBS mozilla firefox2 package
+# last change: Thu Apr 23 2009 - wr@rosenauer.org
+# Patches commented with #B are browser only.
+# Patches commented with #N don't apply, but maybe may be useful.
+# Patches commented with #X don't compile, but maybe may be useful.
+# Patches with name kompozer-* required porting.
+# Patch100 needs to be regenerated from scratch calling autoconf-2.13 from package autoconf213.
+Patch1: x11-session.patch
+#NPatch2: rpath.patch
+Patch3: gcc-undefined-ops.patch
+Patch4: mozilla-gcc4.3-fixes.patch
+Patch5: abuild.patch
+# NSPR bmo #270502
+Patch6: nspr-prdtoa.patch
+Patch7: locale.patch
+# lockdown infrastructure
+#BPatch8: firefox-ui-lockdown.patch
+#BPatch9: gecko-lockdown.patch
+#BPatch10: gconf-backend.patch
+Patch11: gnome-vfs.patch
+Patch12: misc.dif
+Patch13: nss-opt.patch
+#BPatch14: credits.patch
+Patch15: em-356370.patch
+# bmo #273524 (only for NLD)
+#NPatch16: gnome-vfs-default.patch
+# integration
+#BPatch17: firefox-appname.patch
+#BPatch18: firefox-no-update.patch
+#BPatch19: dbus.patch
+Patch1020: kompozer-path_len.patch
+# customization
+Patch22: cjk-postscript-fonts.dif
+Patch23: startup.patch
+# bmo #324060
+#XPatch24: cups-paper.patch
+Patch25: system-extensions.patch
+#NPatch27: system-proxies.patch
+# bmo #331522
+Patch32: postscript.patch
+Patch33: proxy-dev.patch
+# integration
+#NPatch34: skin-selection.patch
+Patch36: greasemonkey.patch
+Patch37: firefox-381370.patch
+Patch40: synaptics-scroll-358863.patch
+Patch41: firefox-ntlm.patch
+# gconf-backend.patch dbus.patch startup.patch
+Patch100: configure.patch
%define _use_internal_dependency_generator 0
%define my_provides %{_builddir}/%{?buildsubdir}/my-provides
%define my_requires %{_builddir}/%{?buildsubdir}/my-requires
@@ -94,54 +136,104 @@
G�rard Talbot
%prep
-%setup -q
-cd mozilla
-%patch
-%patch1
-%patch2
+%setup -q -n mozilla
+cp composer/config/mozconfig.fedora composer/config/mozconfig.opensuse
+%patch200
+%patch211
+%patch1 -p1
+#%patch2
%patch3
%patch4
-%patch5
+%patch5 -p2
%patch6
%patch7
-%patch8
-%patch9
-%patch10
+# lockdown stuff
+#%patch8 -p1
+#%patch9
+#%patch10 -p2
%patch11
-%patch12 -p1
+%patch12
+%patch13
+#%patch14
+%patch15
+#%patch17
+#%patch18
+#%patch19
+%patch1020 -p1
+%patch22
+%patch23
+#%patch24
+%patch25
+#%patch27
+#if #nld9
+#%patch16
+#endif
+%patch32
+%patch33 -p1
+#%patch34
+%patch36
+%patch37 -p2
+%patch40 -p0
+%patch41 -p2
+%patch100
%build
-cd mozilla
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
-cp composer/config/mozconfig.linux .mozconfig
+%ifarch ppc64
+export CFLAGS="$CFLAGS -mminimal-toc"
+%endif
+cp composer/config/mozconfig.opensuse .mozconfig
echo "ac_add_options --with-system-nspr" >>.mozconfig
+echo "ac_add_options --enable-startup-notification" >>.mozconfig
echo "export CFLAGS=\"$CFLAGS\"" >>.mozconfig
echo "export CXXFLAGS=\"$CFLAGS\"" >>.mozconfig
echo "export HOST_CFLAGS=\"$CFLAGS\"" >>.mozconfig
echo "export HOST_CXXFLAGS=\"$CFLAGS\"" >>.mozconfig
-echo "ac_add_options --enable-optimize=\"$CFLAGS\"" >>.mozconfig
-export LDFLAGS=-L/usr/X11R6/%_lib
-# Work around build problems with system nspr:
-export LIBRARY_PATH=$PWD/dist/lib
-# FIXME: Parallel build is broken in version 0.7.10:
-#make -f client.mk build_all %{?jobs:-j%jobs}
+#
+# The configuration bellow is a backport from OBS mozilla firefox2 package
+# last change: Thu Apr 23 2009 - wr@rosenauer.org
+cat << EOF >> .mozconfig
+#mk_add_options MOZILLA_OFFICIAL=1
+#mk_add_options BUILD_OFFICIAL=1
+mk_add_options MOZ_MAKE_FLAGS=%{?jobs:-j%jobs}
+#. \$topsrcdir/browser/config/mozconfig
+#ac_add_options --prefix=%{_prefix}
+#ac_add_options --libdir=%{_libdir}
+#ac_add_options --sysconfdir=%{_sysconfdir}
+#ac_add_options --mandir=%{_mandir}
+#ac_add_options --includedir=%{_includedir}
+ac_add_options --enable-optimize="$CFLAGS"
+ac_add_options --with-system-jpeg
+ac_add_options --with-system-png
+ac_add_options --with-system-mng
+ac_add_options --with-system-zlib
+ac_add_options --enable-default-toolkit=gtk2
+#Bac_add_options --enable-gconf
+ac_add_options --enable-svg
+ac_add_options --enable-canvas
+ac_add_options --enable-xft
+ac_add_options --disable-freetype2
+ac_add_options --disable-installer
+#ac_add_options --enable-static
+#ac_add_options --disable-shared
+#ac_add_options --disable-tests
+#ac_add_options --disable-debug
+EOF
make -f client.mk build_all
%install
-cd mozilla
mkdir -p $RPM_BUILD_ROOT/usr/lib/kompozer
-cp -rL dist/bin/* $RPM_BUILD_ROOT/usr/lib/kompozer
-cp -rL dist/bin/.autoreg $RPM_BUILD_ROOT/usr/lib/kompozer
+cp -rL ../obj-kompozer/dist/bin/* $RPM_BUILD_ROOT/usr/lib/kompozer
+cp -rL ../obj-kompozer/dist/bin/.autoreg $RPM_BUILD_ROOT/usr/lib/kompozer
mkdir -p $RPM_BUILD_ROOT/usr/bin
ln -s ../lib/kompozer/kompozer $RPM_BUILD_ROOT/usr/bin/kompozer
mkdir -p $RPM_BUILD_ROOT/usr/share/applications
cp %{S:1} $RPM_BUILD_ROOT/usr/share/applications
mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
cp %{S:2} $RPM_BUILD_ROOT/usr/share/pixmaps
-%suse_update_desktop_file kompozer Network WebDevelopment
+%suse_update_desktop_file kompozer
$RPM_BUILD_ROOT/usr/lib/kompozer/run-mozilla.sh $RPM_BUILD_ROOT/usr/lib/kompozer/regxpcom
-$RPM_BUILD_ROOT/usr/lib/kompozer/run-mozilla.sh $RPM_BUILD_ROOT/usr/lib/kompozer/regchrome
$RPM_BUILD_ROOT/usr/lib/kompozer/run-mozilla.sh $RPM_BUILD_ROOT/usr/lib/kompozer/kompozer-bin -register
sed -i s:$RPM_BUILD_ROOT::g $RPM_BUILD_ROOT/usr/lib/kompozer/components/xpti.dat
cat << EOF > %{my_provides}
@@ -161,6 +253,8 @@
chmod 755 %{my_provides} %{my_requires}
%define __find_provides %{my_provides}
%define __find_requires %{my_requires}
+find $RPM_BUILD_ROOT/usr/lib/kompozer -name '*.xpm' -exec chmod -x {} \;
+chmod -x $RPM_BUILD_ROOT/usr/lib/kompozer/LICENSE
%fdupes $RPM_BUILD_ROOT%{_prefix}
%clean
@@ -168,12 +262,21 @@
%files
%defattr (-, root, root)
-%doc mozilla/LEGAL mozilla/LICENSE patches/README.txt
+%doc LEGAL LICENSE README.txt
/usr/bin/*
/usr/lib/kompozer
/usr/share/*/kompozer.*
%changelog
+* Tue Jun 02 2009 sbrabec@suse.cz
+- Updated to the latest version 0.8a4:
+ * based on the latest Firefox 2 version includes all its fixes
+ including many security fixes (including latest CVE-2009-0776,
+ CVE-2009-1311 and CVE-2009-1044)
+ * includes fixes collected by the community
+ * works with gtk >= 2.14 (bnc#465291).
+- Imported patchset from the latest OBS mozilla firefox2 package.
+- Updated desktop icon.
* Mon Jan 12 2009 olh@suse.de
- handle ppc64 in security files
* Tue Sep 16 2008 sbrabec@suse.cz
++++++ abuild.patch ++++++
From fc0aca6d95704d57d2a09750a8ffb364dfda00c4 Mon Sep 17 00:00:00 2001
From: Michael Wolf
Date: Thu, 13 Nov 2008 12:48:08 -0600
Subject: [PATCH] abuild.patch
From: Wolfgang Rosenauer
Subject: Fix compiler warnings which disturb autobuild
References:
### autobuild
... testing for serious compiler warnings
Program is using uninitialized variables. Note the difference between "is used"
and "may be used". Please investigate and fix.
Problematic file(s) and their linenumbers:
certificate.c: 541
nsUnicodeToJamoTTF.cpp: 855
nsObjectFrame.cpp: 1933
###
### autobuild
... testing for serious compiler warnings
Program returns random data in a function. Please fix.
Problematic file(s) and their linenumbers:
nsWebShell.cpp: 562
nsOperaProfileMigrator.cpp: 831
Program is using uninitialized variables. Note the difference between "is used
" and "may be used".
Please investigate and fix.
Problematic file(s) and their linenumbers:
nsFrame.cpp: 3536
###
### autobuild
... testing for serious compiler warnings
(using /usr/lib/build/checks-data/check_gcc_output)
(using /abuild/maw-sles10/.build.log)
ERROR: Program returns random data in a function. Please fix.
Problematic file(s) and their linenumbers:
ns4xPlugin.cpp: 2247
###
---
mozilla/docshell/base/nsWebShell.cpp | 1 +
mozilla/gfx/src/gtk/nsFontMetricsUtils.cpp | 2 ++
mozilla/intl/uconv/ucvko/nsUnicodeToJamoTTF.cpp | 1 +
mozilla/layout/generic/nsFrame.cpp | 2 +-
mozilla/layout/generic/nsObjectFrame.cpp | 1 +
mozilla/modules/plugin/base/src/ns4xPlugin.cpp | 3 +++
6 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/mozilla/docshell/base/nsWebShell.cpp b/mozilla/docshell/base/nsWebShell.cpp
index d49e2a4..8dee938 100644
--- a/mozilla/docshell/base/nsWebShell.cpp
+++ b/mozilla/docshell/base/nsWebShell.cpp
@@ -565,6 +565,7 @@ nsWebShell::OnLinkClickSync(nsIContent *aContent,
NS_ABORT_IF_FALSE(0,"unexpected link verb");
return NS_ERROR_UNEXPECTED;
}
+ return NS_ERROR_UNEXPECTED;
}
NS_IMETHODIMP
diff --git a/mozilla/gfx/src/gtk/nsFontMetricsUtils.cpp b/mozilla/gfx/src/gtk/nsFontMetricsUtils.cpp
index 2bcd769..4ffef6a 100644
--- a/mozilla/gfx/src/gtk/nsFontMetricsUtils.cpp
+++ b/mozilla/gfx/src/gtk/nsFontMetricsUtils.cpp
@@ -75,6 +75,7 @@ NS_FontMetricsGetHints(void)
#ifdef MOZ_ENABLE_COREXFONTS
return nsFontMetricsGTK::GetHints();
#endif
+ return 1;
}
nsresult
@@ -95,6 +96,7 @@ NS_FontMetricsFamilyExists(nsIDeviceContext *aDevice, const nsString &aName)
#ifdef MOZ_ENABLE_COREXFONTS
return nsFontMetricsGTK::FamilyExists(aDevice, aName);
#endif
+ return 1;
}
#if defined(MOZ_ENABLE_XFT) && defined(MOZ_ENABLE_COREXFONTS)
diff --git a/mozilla/intl/uconv/ucvko/nsUnicodeToJamoTTF.cpp b/mozilla/intl/uconv/ucvko/nsUnicodeToJamoTTF.cpp
index a9960b2..0879f41 100644
--- a/mozilla/intl/uconv/ucvko/nsUnicodeToJamoTTF.cpp
+++ b/mozilla/intl/uconv/ucvko/nsUnicodeToJamoTTF.cpp
@@ -842,6 +842,7 @@ PRInt16 JamoSrchReplace (const JamoNormMap* aClusters,
{
const JamoNormMap *match;
JamoNormMap key;
+ key.liga = 0;
// cluster array is made up of PRUint8's to save memory
// and we have to subtract aOffset from the input before looking it up.
diff --git a/mozilla/layout/generic/nsFrame.cpp b/mozilla/layout/generic/nsFrame.cpp
index ac067b3..8a80f9d 100644
--- a/mozilla/layout/generic/nsFrame.cpp
+++ b/mozilla/layout/generic/nsFrame.cpp
@@ -3576,7 +3576,7 @@ nsFrame::PeekOffsetParagraph(nsPresContext* aPresContext,
#ifdef DEBUG_paragraph
printf("Selecting paragraph\n");
#endif
- nsIFrame* blockFrame;
+ nsIFrame* blockFrame = NULL;
nsCOMPtr<nsILineIterator> iter (getter_AddRefs(GetBlockFrameAndLineIter(this, &blockFrame)));
if (!blockFrame || !iter)
return NS_ERROR_UNEXPECTED;
diff --git a/mozilla/layout/generic/nsObjectFrame.cpp b/mozilla/layout/generic/nsObjectFrame.cpp
index 3cc5680..e145fc0 100644
--- a/mozilla/layout/generic/nsObjectFrame.cpp
+++ b/mozilla/layout/generic/nsObjectFrame.cpp
@@ -1848,6 +1848,7 @@ nsObjectFrame::Paint(nsPresContext* aPresContext,
nsPoint origin;
float t2p;
window.window = nsnull;
+ window.ws_info = nsnull;
// prepare embedded mode printing struct
nsPluginPrint npprint;
diff --git a/mozilla/modules/plugin/base/src/ns4xPlugin.cpp b/mozilla/modules/plugin/base/src/ns4xPlugin.cpp
index 9d427da..4bd5512 100644
--- a/mozilla/modules/plugin/base/src/ns4xPlugin.cpp
+++ b/mozilla/modules/plugin/base/src/ns4xPlugin.cpp
@@ -2244,6 +2244,9 @@ _setvalue(NPP npp, NPPVariable variable, void *result)
default:
return NPERR_NO_ERROR;
}
+ /* to make gcc happy: */
+ return NPERR_NO_ERROR;
+
}
////////////////////////////////////////////////////////////////////////
++++++ cjk-postscript-fonts.dif ++++++
--- modules/libpref/src/init/all.js
+++ modules/libpref/src/init/all.js
@@ -2250,8 +2250,10 @@
pref("print.postscript.nativefont.ar", "");
pref("print.postscript.nativefont.el", "");
pref("print.postscript.nativefont.he", "");
-pref("print.postscript.nativefont.ja", "");
-pref("print.postscript.nativefont.ko", "");
+pref("print.postscript.nativefont.ja", "UTF-8");
+pref("print.postscript.nativefont.ja", "Ryumin-Light-UniJIS-UTF8-H");
+pref("print.postscript.nativefont.ko", "UTF-8");
+pref("print.postscript.nativefont.ko", "Baekmuk-Gulim-UniKS-UTF8-H");
pref("print.postscript.nativefont.th", "");
pref("print.postscript.nativefont.tr", "");
pref("print.postscript.nativefont.x-baltic", "");
@@ -2260,8 +2262,10 @@
pref("print.postscript.nativefont.x-unicode", "");
pref("print.postscript.nativefont.x-user-def", "");
pref("print.postscript.nativefont.x-western", "");
-pref("print.postscript.nativefont.zh-CN", "");
-pref("print.postscript.nativefont.zh-TW", "");
+pref("print.postscript.nativefont.zh-CN", "UTF-8");
+pref("print.postscript.nativefont.zh-CN", "GB-Song-Medium-UniGB-UTF8-H");
+pref("print.postscript.nativefont.zh-TW", "UTF-8");
+pref("print.postscript.nativefont.zh-TW", "B5-Song-Medium-UniCNS-UTF8-H");
pref("print.postscript.nativefont.zh-HK", "");
# XP_UNIX
++++++ configure.patch ++++++
++++ 5979 lines (skipped)
++++++ em-356370.patch ++++++
References:
https://bugzilla.novell.com/show_bug.cgi?id=217374
https://bugzilla.mozilla.org/show_bug.cgi?id=356370
Index: toolkit/mozapps/extensions/src/nsExtensionManager.js.in
===================================================================
RCS file: /cvsroot/mozilla/toolkit/mozapps/extensions/src/nsExtensionManager.js.in,v
retrieving revision 1.144.2.60
diff -u -p -6 -r1.144.2.60 nsExtensionManager.js.in
--- toolkit/mozapps/extensions/src/nsExtensionManager.js.in 17 Sep 2006 22:17:11 -0000 1.144.2.60
+++ toolkit/mozapps/extensions/src/nsExtensionManager.js.in 29 Nov 2006 07:54:31 -0000
@@ -4008,12 +4008,13 @@ ExtensionManager.prototype = {
for (var i = 0; i < allItems.length; ++i) {
var item = allItems[i];
// An item entry is valid only if it is not disabled, not about to
// be disabled, and not about to be uninstalled.
var installLocation = this.getInstallLocation(item.id);
+ if (! installLocation) continue;
if (installLocation.name in StartupCache.entries &&
item.id in StartupCache.entries[installLocation.name] &&
StartupCache.entries[installLocation.name][item.id]) {
var op = StartupCache.entries[installLocation.name][item.id].op;
if (op == OP_NEEDS_INSTALL || op == OP_NEEDS_UPGRADE ||
op == OP_NEEDS_UNINSTALL || op == OP_NEEDS_DISABLE)
++++++ firefox-381370.patch ++++++
diff --git a/mozilla/caps/src/nsScriptSecurityManager.cpp b/mozilla/caps/src/nsScriptSecurityManager.cpp
index 9ca48b4..d871c52 100644
--- a/mozilla/caps/src/nsScriptSecurityManager.cpp
+++ b/mozilla/caps/src/nsScriptSecurityManager.cpp
@@ -1478,6 +1478,27 @@ nsScriptSecurityManager::CheckLoadURIWithPrincipal(nsIPrincipal* aPrincipal,
nsCOMPtr<nsIPrefBranch> prefService =
do_GetService(NS_PREFSERVICE_CONTRACTID);
if (prefService) {
+ PRBool allow_anyway = PR_FALSE;
+ nsresult allowed_result;
+ nsXPIDLCString allowed_gnomeVFSProtocols;
+ allowed_result = prefService->GetCharPref("network.gnomevfs.allowed-protocols",
+ getter_Copies(allowed_gnomeVFSProtocols));
+ if (NS_SUCCEEDED(allowed_result))
+ allowed_gnomeVFSProtocols.StripWhitespace();
+ else
+ allowed_gnomeVFSProtocols.Truncate();
+
+ nsCAutoString allowed_scheme(targetScheme);
+ allowed_scheme.Append(':');
+ nsACString::const_iterator allowed_begin, allowed_end, allowed_iter;
+ allowed_gnomeVFSProtocols.BeginReading(allowed_begin);
+ allowed_gnomeVFSProtocols.EndReading(allowed_end);
+ allowed_iter = allowed_begin;
+ if (CaseInsensitiveFindInReadable(allowed_scheme, allowed_iter, allowed_end) &&
+ (allowed_iter == allowed_begin || *(--allowed_iter) == ',')) {
+ allow_anyway = PR_TRUE;
+ }
+
nsXPIDLCString gnomeVFSProtocols;
nsresult result =
prefService->GetCharPref("network.gnomevfs.supported-protocols",
@@ -1494,11 +1515,14 @@ nsScriptSecurityManager::CheckLoadURIWithPrincipal(nsIPrincipal* aPrincipal,
gnomeVFSProtocols.BeginReading(begin);
gnomeVFSProtocols.EndReading(end);
iter = begin;
- if (CaseInsensitiveFindInReadable(scheme, iter, end) &&
- (iter == begin || *(--iter) == ',')) {
- // Deny this load
- ReportError(nsnull, errorTag, sourceURI, aTargetURI);
- return NS_ERROR_DOM_BAD_URI;
+ if (CaseInsensitiveFindInReadable(scheme, iter, end) && (iter == begin || *(--iter) == ',')) {
+ // Deny this load iff allow_anyway is false
+ if (allow_anyway == PR_FALSE) {
+ ReportError(nsnull, errorTag, sourceURI, aTargetURI);
+ return NS_ERROR_DOM_BAD_URI;
+ } else {
+ return NS_OK;
+ }
}
}
}
diff --git a/mozilla/modules/libpref/src/init/all.js b/mozilla/modules/libpref/src/init/all.js
index f9651a1..539540a 100644
--- a/mozilla/modules/libpref/src/init/all.js
+++ b/mozilla/modules/libpref/src/init/all.js
@@ -2410,4 +2410,5 @@ pref("print.print_command", "lp -c -s ${MOZ_PRINTER_NAME:+'-d '}${MOZ_PRINTER_NA
#ifdef MOZ_X11
pref("network.gnomevfs.supported-protocols", "smb:,sftp:");
+pref("network.gnomevfs.allowed-protocols", "");
#endif
++++++ firefox-ntlm.patch ++++++
diff --git a/mozilla/extensions/auth/Makefile.in b/mozilla/extensions/auth/Makefile.in
index f0aff40..46e5f5e 100644
--- a/mozilla/extensions/auth/Makefile.in
+++ b/mozilla/extensions/auth/Makefile.in
@@ -78,6 +78,8 @@ CPPSRCS += \
ifeq ($(OS_ARCH),WINNT)
LOCAL_INCLUDES += -DUSE_SSPI
CPPSRCS += nsAuthSSPI.cpp
+else
+CPPSRCS += nsAuthSambaNTLM.cpp
endif
include $(topsrcdir)/config/rules.mk
diff --git a/mozilla/extensions/auth/nsAuthFactory.cpp b/mozilla/extensions/auth/nsAuthFactory.cpp
index b3d515c..71705e5 100644
--- a/mozilla/extensions/auth/nsAuthFactory.cpp
+++ b/mozilla/extensions/auth/nsAuthFactory.cpp
@@ -127,6 +127,36 @@ nsKerbSSPIAuthConstructor(nsISupports *outer, REFNSIID iid, void **result)
{0x8c, 0xd6, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66} \
}
+#else
+
+#define NS_SAMBANTLMAUTH_CID \
+{ /* bc54f001-6eb0-4e32-9f49-7e064d8e70ef */ \
+ 0xbc54f001, \
+ 0x6eb0, \
+ 0x4e32, \
+ {0x9f, 0x49, 0x7e, 0x06, 0x4d, 0x8e, 0x70, 0xef} \
+}
+
+#include "nsAuthSambaNTLM.h"
+static NS_METHOD
+nsSambaNTLMAuthConstructor(nsISupports *outer, REFNSIID iid, void **result)
+{
+ if (outer)
+ return NS_ERROR_NO_AGGREGATION;
+
+ nsCOMPtr<nsAuthSambaNTLM> auth = new nsAuthSambaNTLM();
+ if (!auth)
+ return NS_ERROR_OUT_OF_MEMORY;
+
+ nsresult rv = auth->SpawnNTLMAuthHelper();
+ if (NS_FAILED(rv)) {
+ // Failure here probably means that cached credentials were not available
+ return rv;
+ }
+
+ return auth->QueryInterface(iid, result);
+}
+
#endif
static NS_METHOD
@@ -206,6 +236,12 @@ static nsModuleComponentInfo components[] = {
NS_AUTH_MODULE_CONTRACTID_PREFIX "sys-ntlm",
nsSysNTLMAuthConstructor
},
+#else
+ { "nsAuthSambaNTLM",
+ NS_SAMBANTLMAUTH_CID,
+ NS_AUTH_MODULE_CONTRACTID_PREFIX "sys-ntlm",
+ nsSambaNTLMAuthConstructor
+ },
#endif
{ "nsHttpNegotiateAuth",
NS_HTTPNEGOTIATEAUTH_CID,
diff --git a/mozilla/extensions/auth/nsAuthSambaNTLM.cpp b/mozilla/extensions/auth/nsAuthSambaNTLM.cpp
new file mode 100644
index 0000000..05d00f2
--- /dev/null
+++ b/mozilla/extensions/auth/nsAuthSambaNTLM.cpp
@@ -0,0 +1,323 @@
+/* vim:set ts=4 sw=4 et cindent: */
+/* ***** 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 Samba NTLM Authentication.
+ *
+ * The Initial Developer of the Original Code is Novell.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Robert O'Callahan (rocallahan@novell.com)
+ *
+ * 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 "nsAuth.h"
+#include "nsAuthSambaNTLM.h"
+#include "prenv.h"
+#include "plbase64.h"
+
+#include
+#include
+#include
+#include
+#include
+
+nsAuthSambaNTLM::nsAuthSambaNTLM()
+ : mInitialMessage(nsnull), mChildPID(0), mFromChildFD(-1), mToChildFD(-1)
+{
+}
+
+nsAuthSambaNTLM::~nsAuthSambaNTLM()
+{
+ // ntlm_auth reads from stdin regularly so closing our file handles
+ // should cause it to exit. Trying to kill it with a signal would be
+ // problematic because another process could have spawned with that pid
+ // if it has unexpectedly quit.
+ Shutdown();
+ free(mInitialMessage);
+}
+
+void
+nsAuthSambaNTLM::Shutdown()
+{
+ if (mFromChildFD >= 0) {
+ close(mFromChildFD);
+ mFromChildFD = -1;
+ }
+ if (mToChildFD >= 0) {
+ close(mToChildFD);
+ mToChildFD = -1;
+ }
+ if (mChildPID) {
+ waitpid(mChildPID, nsnull, 0);
+ mChildPID = 0;
+ }
+}
+
+NS_IMPL_ISUPPORTS1(nsAuthSambaNTLM, nsIAuthModule)
+
+static PRBool
+SpawnIOChild(char** aArgs, pid_t* aPID, int* aFromChildFD, int* aToChildFD)
+{
+ int toChildPipe[2];
+ if (pipe(toChildPipe) < 0)
+ return PR_FALSE;
+ int fromChildPipe[2];
+ if (pipe(fromChildPipe) < 0) {
+ close(toChildPipe[0]);
+ close(toChildPipe[1]);
+ return PR_FALSE;
+ }
+
+ pid_t pid = fork();
+ if (pid < 0) {
+ PRInt32 i;
+ for (i = 0; i < 2; ++i) {
+ close(fromChildPipe[i]);
+ close(toChildPipe[i]);
+ }
+ NS_WARNING("fork() failed");
+ return PR_FALSE;
+ }
+
+ if (pid > 0) {
+ // We are the parent
+ close(toChildPipe[0]);
+ close(fromChildPipe[1]);
+ *aPID = pid;
+ *aFromChildFD = fromChildPipe[0];
+ *aToChildFD = toChildPipe[1];
+ return PR_TRUE;
+ }
+
+ // We are the child
+ close(toChildPipe[1]);
+ close(fromChildPipe[0]);
+ // Make stdin read from toChildPipe
+ int result0 = dup2(toChildPipe[0], 0);
+ // Make stdout write to fromChildPipe
+ int result1 = dup2(fromChildPipe[1], 1);
+ if (result0 >= 0 && result1 >= 0) {
+ execvp(aArgs[0], aArgs);
+ }
+
+ // Guess an error occurred! Just exit, the parent will notice
+ // that we're not responding correctly.
+ LOG(("ntlm_auth exec failure, errno=%d", errno));
+ exit(0);
+ // ... satisfy the compiler
+ return PR_FALSE;
+}
+
+static PRBool WriteString(int aFD, const nsACString& aString)
+{
+ PRInt32 length = aString.Length();
+ nsPromiseFlatCString flat(aString);
+ const char* s = flat.get();
+ LOG(("Writing to ntlm_auth: %s", s));
+
+ while (length > 0) {
+ int result = write(aFD, s, length);
+ if (result <= 0)
+ return PR_FALSE;
+ s += result;
+ length -= result;
+ }
+ return PR_TRUE;
+}
+
+static PRBool ReadLine(int aFD, nsACString& aString)
+{
+ // ntlm_auth is defined to only send one line in response to each of our
+ // input lines. So this simple unbuffered strategy works as long as we
+ // read the response immediately after sending one request.
+ aString.Truncate();
+ for (;;) {
+ char buf[1024];
+ int result = read(aFD, buf, sizeof(buf));
+ if (result <= 0)
+ return PR_FALSE;
+ aString.Append(buf, result);
+ if (buf[result - 1] == '\n') {
+ LOG(("Read from ntlm_auth: %s", nsPromiseFlatCString(aString).get()));
+ return PR_TRUE;
+ }
+ }
+}
+
+/**
+ * Returns a heap-allocated array of PRUint8s, and stores the length in aLen.
+ * Returns nsnull if there's an error of any kind.
+ */
+static PRUint8* ExtractMessage(const nsACString& aLine, PRUint32* aLen)
+{
+ // ntlm_auth sends blobs to us as base64-encoded strings after the "xx "
+ // preamble on the response line.
+ PRInt32 length = aLine.Length();
+ // The caller should verify there is a valid "xx " prefix and the line
+ // is terminated with a \n
+ NS_ASSERTION(length >= 4, "Line too short...");
+ nsPromiseFlatCString flat(aLine);
+ const char* s = flat.get() + 3;
+ length -= 4; // lose first 3 chars plus trailing \n
+ NS_ASSERTION(s[length] == '\n', "aLine not newline-terminated");
+
+ if (length & 3) {
+ // The base64 encoded block must be multiple of 4. If not, something
+ // screwed up.
+ NS_WARNING("Base64 encoded block should be a multiple of 4 chars");
+ return nsnull;
+ }
+
+ // Calculate the exact length. I wonder why there isn't a function for this
+ // in plbase64.
+ PRInt32 numEquals;
+ for (numEquals = 0; numEquals < length; ++numEquals) {
+ if (flat.get()[length - 1 - numEquals] != '=')
+ break;
+ }
+ *aLen = (length/4)*3 - numEquals;
+ return NS_REINTERPRET_CAST(PRUint8*, PL_Base64Decode(flat.get() + 3, length - 4, nsnull));
+}
+
+nsresult
+nsAuthSambaNTLM::SpawnNTLMAuthHelper()
+{
+ const char* username = PR_GetEnv("USER");
+ if (!username)
+ return NS_ERROR_FAILURE;
+
+ char* args[] = {
+ "ntlm_auth",
+ "--helper-protocol", "ntlmssp-client-1",
+ "--use-cached-creds",
+ "--username", NS_CONST_CAST(char*, username),
+ nsnull
+ };
+
+ PRBool isOK = SpawnIOChild(args, &mChildPID, &mFromChildFD, &mToChildFD);
+ if (!isOK)
+ return NS_ERROR_FAILURE;
+
+ if (!WriteString(mToChildFD, NS_LITERAL_CSTRING("YR\n")))
+ return NS_ERROR_FAILURE;
+ nsCString line;
+ if (!ReadLine(mFromChildFD, line))
+ return NS_ERROR_FAILURE;
+ if (!StringBeginsWith(line, NS_LITERAL_CSTRING("YR "))) {
+ // Something went wrong. Perhaps no credentials are accessible.
+ return NS_ERROR_FAILURE;
+ }
+
+ // It gave us an initial client-to-server request packet. Save that
+ // because we'll need it later.
+ mInitialMessage = ExtractMessage(line, &mInitialMessageLen);
+ if (!mInitialMessage)
+ return NS_ERROR_FAILURE;
+ return NS_OK;
+}
+
+NS_IMETHODIMP
+nsAuthSambaNTLM::Init(const char *serviceName,
+ PRUint32 serviceFlags,
+ const PRUnichar *domain,
+ const PRUnichar *username,
+ const PRUnichar *password)
+{
+ NS_ASSERTION(!username && !domain && !password, "unexpected credentials");
+ return NS_OK;
+}
+
+NS_IMETHODIMP
+nsAuthSambaNTLM::GetNextToken(const void *inToken,
+ PRUint32 inTokenLen,
+ void **outToken,
+ PRUint32 *outTokenLen)
+{
+ if (!inToken) {
+ /* someone wants our initial message */
+ *outToken = nsMemory::Clone(mInitialMessage, mInitialMessageLen);
+ if (!*outToken)
+ return NS_ERROR_OUT_OF_MEMORY;
+ *outTokenLen = mInitialMessageLen;
+ return NS_OK;
+ }
+
+ /* inToken must be a type 2 message. Get ntlm_auth to generate our response */
+ char* encoded = PL_Base64Encode(NS_STATIC_CAST(const char*, inToken), inTokenLen, nsnull);
+ if (!encoded)
+ return NS_ERROR_OUT_OF_MEMORY;
+
+ nsCString request;
+ request.AssignLiteral("TT ");
+ request.Append(encoded);
+ free(encoded);
+ request.Append('\n');
+
+ if (!WriteString(mToChildFD, request))
+ return NS_ERROR_FAILURE;
+ nsCString line;
+ if (!ReadLine(mFromChildFD, line))
+ return NS_ERROR_FAILURE;
+ if (!StringBeginsWith(line, NS_LITERAL_CSTRING("KK "))) {
+ // Something went wrong. Perhaps no credentials are accessible.
+ return NS_ERROR_FAILURE;
+ }
+ PRUint8* buf = ExtractMessage(line, outTokenLen);
+ if (!buf)
+ return NS_ERROR_FAILURE;
+ // *outToken has to be freed by nsMemory::Free, which may not be free()
+ *outToken = nsMemory::Clone(buf, *outTokenLen);
+ if (!*outToken) {
+ free(buf);
+ return NS_ERROR_OUT_OF_MEMORY;
+ }
+
+ // We're done. Close our file descriptors now and reap the helper
+ // process.
+ Shutdown();
+ return NS_OK;
+}
+
+NS_IMETHODIMP
+nsAuthSambaNTLM::Unwrap(const void *inToken,
+ PRUint32 inTokenLen,
+ void **outToken,
+ PRUint32 *outTokenLen)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP
+nsAuthSambaNTLM::Wrap(const void *inToken,
+ PRUint32 inTokenLen,
+ PRBool confidential,
+ void **outToken,
+ PRUint32 *outTokenLen)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
diff --git a/mozilla/extensions/auth/nsAuthSambaNTLM.h b/mozilla/extensions/auth/nsAuthSambaNTLM.h
new file mode 100644
index 0000000..6034f03
--- /dev/null
+++ b/mozilla/extensions/auth/nsAuthSambaNTLM.h
@@ -0,0 +1,78 @@
+/* vim:set ts=4 sw=4 et cindent: */
+/* ***** 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 Samba NTLM Authentication.
+ *
+ * The Initial Developer of the Original Code is Novell.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Robert O'Callahan (rocallahan@novell.com)
+ *
+ * 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 ***** */
+
+#ifndef nsAuthSambaNTLM_h__
+#define nsAuthSambaNTLM_h__
+
+#include "nsIAuthModule.h"
+#include "nsString.h"
+#include "nsCOMPtr.h"
+
+/**
+ * This is an implementation of NTLM authentication that does single-signon
+ * by obtaining the user's Unix username and then asking Samba's
+ * ntlm_auth tool to do the authentication for us
+ * using the user's password cached in winbindd, if available. If the
+ * password is not available then this component fails to instantiate so
+ * nsHttpNTLMAuth will fall back to a different NTLM implementation.
+ */
+class nsAuthSambaNTLM : public nsIAuthModule
+{
+public:
+ NS_DECL_ISUPPORTS
+ NS_DECL_NSIAUTHMODULE
+
+ nsAuthSambaNTLM();
+
+ // We spawn the ntlm_auth helper from the module constructor, because
+ // that lets us fail to instantiate the module if ntlm_auth isn't
+ // available, triggering fallback to the built-in NTLM support (which
+ // doesn't support single signon, of course)
+ nsresult SpawnNTLMAuthHelper();
+
+private:
+ ~nsAuthSambaNTLM();
+
+ void Shutdown();
+
+ PRUint8* mInitialMessage; /* free with free() */
+ PRUint32 mInitialMessageLen;
+ PRInt32 mChildPID;
+ PRInt32 mFromChildFD, mToChildFD;
+};
+
+#endif /* nsAuthSambaNTLM_h__ */
diff --git a/mozilla/netwerk/protocol/http/src/nsHttpNTLMAuth.cpp b/mozilla/netwerk/protocol/http/src/nsHttpNTLMAuth.cpp
index 9c25334..cde2695 100644
--- a/mozilla/netwerk/protocol/http/src/nsHttpNTLMAuth.cpp
+++ b/mozilla/netwerk/protocol/http/src/nsHttpNTLMAuth.cpp
@@ -46,8 +46,6 @@
//-----------------------------------------------------------------------------
-#ifdef XP_WIN
-
#include "nsIPrefBranch.h"
#include "nsIPrefService.h"
#include "nsIServiceManager.h"
@@ -208,8 +206,6 @@ public:
};
NS_IMPL_ISUPPORTS0(nsNTLMSessionState)
-#endif
-
//-----------------------------------------------------------------------------
NS_IMPL_ISUPPORTS1(nsHttpNTLMAuth, nsIHttpAuthenticator)
@@ -231,7 +227,6 @@ nsHttpNTLMAuth::ChallengeReceived(nsIHttpChannel *channel,
// start new auth sequence if challenge is exactly "NTLM"
if (PL_strcasecmp(challenge, "NTLM") == 0) {
nsCOMPtr<nsISupports> module;
-#ifdef XP_WIN
//
// our session state is non-null to indicate that we've flagged
// this auth domain as not accepting the system's default login.
@@ -239,7 +234,7 @@ nsHttpNTLMAuth::ChallengeReceived(nsIHttpChannel *channel,
PRBool trySysNTLM = (*sessionState == nsnull);
//
- // on windows, we may have access to the built-in SSPI library,
+ // we may have access to a built-in SSPI library,
// which could be used to authenticate the user without prompting.
//
// if the continuationState is null, then we may want to try using
@@ -266,9 +261,7 @@ nsHttpNTLMAuth::ChallengeReceived(nsIHttpChannel *channel,
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*sessionState);
}
-#else
- {
-#endif
+
module = do_CreateInstance(NS_AUTH_MODULE_CONTRACTID_PREFIX "ntlm");
// prompt user for domain, username, and password...
++++++ gcc-undefined-ops.patch ++++++
--- layout/base/nsCSSRendering.cpp.orig 2006-10-25 23:59:19.000000000 +0200
+++ layout/base/nsCSSRendering.cpp 2006-10-26 00:00:04.000000000 +0200
@@ -1000,14 +1000,14 @@
FillOrInvertRect(aContext, dashRect.x, borderOutside.y,dashRect.width, dashRect.height-adjust,isInvert);
FillOrInvertRect(aContext,dashRect.x,(borderOutside.YMost()-(dashRect.height-adjust)),dashRect.width, dashRect.height-adjust,isInvert);
currRect.y += (dashRect.height-adjust);
- temp = temp-= (dashRect.height-adjust);
+ temp -= (dashRect.height-adjust);
} else {
adjust = (temp%dashRect.width)/2; // adjust a tad longer
// draw in the left and right
FillOrInvertRect(aContext, dashRect.x, borderOutside.y,dashRect.width, dashRect.height+adjust,isInvert);
FillOrInvertRect(aContext, dashRect.x,(borderOutside.YMost()-(dashRect.height+adjust)),dashRect.width, dashRect.height+adjust,isInvert);
currRect.y += (dashRect.height+adjust);
- temp = temp-= (dashRect.height+adjust);
+ temp -= (dashRect.height+adjust);
}
if( temp > ywidth)
@@ -1066,14 +1066,14 @@
FillOrInvertRect(aContext, borderOutside.x,dashRect.y,dashRect.width-adjust,dashRect.height,isInvert);
FillOrInvertRect(aContext, (borderOutside.XMost()-(dashRect.width-adjust)),dashRect.y,dashRect.width-adjust,dashRect.height,isInvert);
currRect.x += (dashRect.width-adjust);
- temp = temp-= (dashRect.width-adjust);
+ temp -= (dashRect.width-adjust);
} else {
adjust = (temp%dashRect.width)/2;
// draw in the left and right
FillOrInvertRect(aContext, borderOutside.x,dashRect.y,dashRect.width+adjust,dashRect.height,isInvert);
FillOrInvertRect(aContext, (borderOutside.XMost()-(dashRect.width+adjust)),dashRect.y,dashRect.width+adjust,dashRect.height,isInvert);
currRect.x += (dashRect.width+adjust);
- temp = temp-= (dashRect.width+adjust);
+ temp -= (dashRect.width+adjust);
}
--- layout/xul/base/src/nsBox.cpp.orig 2006-10-26 00:00:26.000000000 +0200
+++ layout/xul/base/src/nsBox.cpp 2006-10-26 00:01:30.000000000 +0200
@@ -863,7 +863,7 @@
while (box) {
nsRect* overflowArea = box->GetOverflowAreaProperty();
nsRect bounds = overflowArea ? *overflowArea + box->GetPosition() :
- bounds = box->GetRect();
+ box->GetRect();
rect.UnionRect(rect, bounds);
box->GetNextBox(&box);
--- intl/unicharutil/src/nsEntityConverter.cpp.orig 2005-04-02 20:44:00.000000000 +0200
+++ intl/unicharutil/src/nsEntityConverter.cpp 2006-10-26 00:07:24.000000000 +0200
@@ -236,7 +236,8 @@
if (IS_HIGH_SURROGATE(inString[i]) &&
i + 2 < len &&
IS_LOW_SURROGATE(inString[i + 1])) {
- key.AppendInt(SURROGATE_TO_UCS4(inString[i], inString[++i]), 10);
+ key.AppendInt(SURROGATE_TO_UCS4(inString[i], inString[i + 1]), 10);
+ ++i;
}
else {
key.AppendInt(inString[i],10);
--- content/events/src/nsEventStateManager.cpp.orig 2006-08-06 00:19:17.000000000 +0200
+++ content/events/src/nsEventStateManager.cpp 2006-10-26 00:11:16.000000000 +0200
@@ -4301,7 +4301,7 @@
do_QueryInterface(GetDocumentOuterWindow(mDocument));
if (newWindow) {
nsIFocusController *newFocusController =
- newFocusController = newWindow->GetRootFocusController();
+ newWindow->GetRootFocusController();
nsCOMPtr<nsPIDOMWindow> oldWindow =
do_QueryInterface(GetDocumentOuterWindow(gLastFocusedDocument));
if (oldWindow) {
--- netwerk/cache/src/nsDiskCacheMap.h.orig 2006-02-04 23:01:22.000000000 +0100
+++ netwerk/cache/src/nsDiskCacheMap.h 2006-10-26 00:15:09.000000000 +0200
@@ -168,7 +168,7 @@
// set blockCount
NS_ASSERTION( (blockCount>=1) && (blockCount<=4),"invalid block count");
- blockCount = --blockCount;
+ --blockCount;
mDataLocation |= (blockCount << eExtraBlocksOffset) & eExtraBlocksMask;
mDataLocation |= eLocationInitializedMask;
@@ -236,7 +236,7 @@
// set blockCount
NS_ASSERTION( (blockCount>=1) && (blockCount<=4),"invalid block count");
- blockCount = --blockCount;
+ --blockCount;
mMetaLocation |= (blockCount << eExtraBlocksOffset) & eExtraBlocksMask;
mMetaLocation |= eLocationInitializedMask;
++++++ gnome-vfs.patch ++++++
Index: uriloader/exthandler/Makefile.in
================================================================================
--- uriloader/exthandler/Makefile.in
+++ uriloader/exthandler/Makefile.in
@@ -103,7 +103,7 @@
LOCAL_INCLUDES = -I$(srcdir)
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
-OSHELPER += nsGNOMERegistry.cpp
+OSHELPER += nsMIMEInfoUnix.cpp nsGNOMERegistry.cpp
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),beos)
--- uriloader/exthandler/unix/nsGNOMERegistry.cpp
+++ uriloader/exthandler/unix/nsGNOMERegistry.cpp
@@ -42,7 +42,7 @@
#include "nsString.h"
#include "nsIComponentManager.h"
#include "nsILocalFile.h"
-#include "nsMIMEInfoImpl.h"
+#include "nsMIMEInfoUnix.h"
#include "nsAutoPtr.h"
#include
@@ -56,12 +56,12 @@
typedef struct _GnomeProgram GnomeProgram;
typedef struct _GnomeModuleInfo GnomeModuleInfo;
-typedef struct {
+struct GnomeVFSMimeApplication {
char *id;
char *name;
char *command;
/* there is more here, but we don't need it */
-} GnomeVFSMimeApplication;
+};
typedef GConfClient * (*_gconf_client_get_default_fn)();
typedef gchar * (*_gconf_client_get_string_fn)(GConfClient *,
@@ -264,7 +264,7 @@
}
-/* static */ already_AddRefed<nsMIMEInfoBase>
+/* static */ already_AddRefed<nsMIMEInfoUnix>
nsGNOMERegistry::GetFromExtension(const char *aFileExt)
{
if (!gconfLib)
@@ -286,7 +286,7 @@
return GetFromType(mimeType);
}
-/* static */ already_AddRefed<nsMIMEInfoBase>
+/* static */ already_AddRefed<nsMIMEInfoUnix>
nsGNOMERegistry::GetFromType(const char *aMIMEType)
{
if (!gconfLib)
@@ -296,9 +296,11 @@
if (!handlerApp)
return nsnull;
- nsRefPtr<nsMIMEInfoImpl> mimeInfo = new nsMIMEInfoImpl(aMIMEType);
+ nsRefPtr<nsMIMEInfoUnix> mimeInfo = new nsMIMEInfoUnix(aMIMEType);
NS_ENSURE_TRUE(mimeInfo, nsnull);
+ mimeInfo->SetDefaultGnomeVFSMimeApplication(handlerApp);
+
// Get the list of extensions and append then to the mimeInfo.
GList *extensions = _gnome_vfs_mime_get_extensions_list(aMIMEType);
for (GList *extension = extensions; extension; extension = extension->next)
@@ -320,11 +322,21 @@
return nsnull;
}
- gchar *commandPath = g_find_program_in_path(nativeCommand);
+ gchar **argv;
+ gboolean res = g_shell_parse_argv(nativeCommand, NULL, &argv, NULL);
+ if (!res) {
+ NS_ERROR("Could not convert helper app command to filesystem encoding");
+ _gnome_vfs_mime_application_free(handlerApp);
+ return nsnull;
+ }
+
+ gchar *commandPath = g_find_program_in_path(argv[0]);
g_free(nativeCommand);
+ g_strfreev(argv);
if (!commandPath) {
+ NS_WARNING("could not find command in path");
_gnome_vfs_mime_application_free(handlerApp);
return nsnull;
}
@@ -342,7 +354,7 @@
_gnome_vfs_mime_application_free(handlerApp);
- nsMIMEInfoBase* retval;
+ nsMIMEInfoUnix* retval;
NS_ADDREF((retval = mimeInfo));
return retval;
}
--- uriloader/exthandler/unix/nsGNOMERegistry.h
+++ uriloader/exthandler/unix/nsGNOMERegistry.h
@@ -35,10 +35,13 @@
*
* ***** END LICENSE BLOCK ***** */
+#ifndef nsGNOMERegistry_h__
+#define nsGNOMERegistry_h__
+
#include "nsIURI.h"
#include "nsCOMPtr.h"
-class nsMIMEInfoBase;
+class nsMIMEInfoUnix;
class nsGNOMERegistry
{
@@ -52,7 +55,9 @@
static void GetAppDescForScheme(const nsACString& aScheme,
nsAString& aDesc);
- static already_AddRefed<nsMIMEInfoBase> GetFromExtension(const char *aFileExt);
+ static already_AddRefed<nsMIMEInfoUnix> GetFromExtension(const char *aFileExt);
- static already_AddRefed<nsMIMEInfoBase> GetFromType(const char *aMIMEType);
+ static already_AddRefed<nsMIMEInfoUnix> GetFromType(const char *aMIMEType);
};
+
+#endif // nsGNOMERegistry_h__
--- uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
+++ uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
@@ -0,0 +1,196 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.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.org Code.
+ *
+ * The Initial Developer of the Original Code is
+ * Red Hat, Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Christopher Aillon (Original author)
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "nsMIMEInfoUnix.h"
+#include "prlink.h"
+#include "prmem.h"
+#include
+#include
+
+static PRLibrary *gnomeLib;
+static PRLibrary *vfsLib;
+
+typedef struct _GnomeProgram GnomeProgram;
+typedef struct _GnomeModuleInfo GnomeModuleInfo;
+
+typedef enum {
+ GNOME_VFS_OK // there's more but we don't care about them.
+} GnomeVFSResult;
+
+typedef GnomeVFSResult (*_gnome_vfs_mime_application_launch_fn)
+ (GnomeVFSMimeApplication *app,
+ GList *uris);
+typedef void (*_gnome_vfs_mime_application_free_fn)(GnomeVFSMimeApplication *);
+typedef GnomeVFSMimeApplication * (*_gnome_vfs_mime_application_copy_fn)(GnomeVFSMimeApplication *);
+typedef GnomeProgram * (*_gnome_program_init_fn)(const char *, const char *,
+ const GnomeModuleInfo *, int,
+ char **, const char *, ...);
+typedef const char * (*_gnome_vfs_mime_application_get_name_fn)(GnomeVFSMimeApplication *);
+typedef const GnomeModuleInfo * (*_libgnome_module_info_get_fn)();
+typedef GnomeProgram * (*_gnome_program_get_fn)();
+typedef char * (*_gnome_vfs_make_uri_from_input_fn)(const char *);
+
+#define DECL_FUNC_PTR(func) static _##func##_fn _##func
+
+DECL_FUNC_PTR(gnome_vfs_mime_application_launch);
+DECL_FUNC_PTR(gnome_vfs_mime_application_free);
+DECL_FUNC_PTR(gnome_vfs_mime_application_copy);
+DECL_FUNC_PTR(gnome_vfs_mime_application_get_name);
+DECL_FUNC_PTR(gnome_program_init);
+DECL_FUNC_PTR(gnome_program_get);
+DECL_FUNC_PTR(libgnome_module_info_get);
+DECL_FUNC_PTR(gnome_vfs_make_uri_from_input);
+
+static PRLibrary *
+LoadVersionedLibrary(const char* libName, const char* libVersion)
+{
+ char *platformLibName = PR_GetLibraryName(nsnull, libName);
+ nsCAutoString versionLibName(platformLibName);
+ versionLibName.Append(libVersion);
+ PR_Free(platformLibName);
+ return PR_LoadLibrary(versionLibName.get());
+}
+
+static void
+Cleanup()
+{
+ // Unload all libraries
+ if (gnomeLib)
+ PR_UnloadLibrary(gnomeLib);
+ if (vfsLib)
+ PR_UnloadLibrary(vfsLib);
+
+ gnomeLib = vfsLib = nsnull;
+}
+
+static void
+InitGnomeVFS()
+{
+ static PRBool initialized = PR_FALSE;
+
+ if (initialized)
+ return;
+
+ #define ENSURE_LIB(lib) \
+ PR_BEGIN_MACRO \
+ if (!lib) { \
+ Cleanup(); \
+ return; \
+ } \
+ PR_END_MACRO
+
+ #define GET_LIB_FUNCTION(lib, func, failure) \
+ PR_BEGIN_MACRO \
+ _##func = (_##func##_fn) PR_FindFunctionSymbol(lib##Lib, #func); \
+ if (!_##func) { \
+ failure; \
+ } \
+ PR_END_MACRO
+
+ // Attempt to open libgnome
+ gnomeLib = LoadVersionedLibrary("gnome-2", ".0");
+ ENSURE_LIB(gnomeLib);
+
+ GET_LIB_FUNCTION(gnome, gnome_program_init, return Cleanup());
+ GET_LIB_FUNCTION(gnome, libgnome_module_info_get, return Cleanup());
+ GET_LIB_FUNCTION(gnome, gnome_program_get, return Cleanup());
+
+ // Attempt to open libgnomevfs
+ vfsLib = LoadVersionedLibrary("gnomevfs-2", ".0");
+ ENSURE_LIB(vfsLib);
+
+ GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_launch, /* do nothing */);
+ GET_LIB_FUNCTION(vfs, gnome_vfs_make_uri_from_input, return Cleanup());
+ GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_get_name, return Cleanup());
+ GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_free, return Cleanup());
+ GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_copy, return Cleanup());
+
+ // Initialize GNOME, if it's not already initialized. It's not
+ // necessary to tell GNOME about our actual command line arguments.
+
+ if (!_gnome_program_get()) {
+ char *argv[1] = { "gecko" };
+ _gnome_program_init("Gecko", "1.0", _libgnome_module_info_get(),
+ 1, argv, NULL);
+ }
+
+ // Note: after GNOME has been initialized, do not ever unload these
+ // libraries. They register atexit handlers, so if they are unloaded, we'll
+ // crash on exit.
+}
+
+void
+nsMIMEInfoUnix::SetDefaultGnomeVFSMimeApplication(GnomeVFSMimeApplication* app)
+{
+ if (_gnome_vfs_mime_application_copy && _gnome_vfs_mime_application_free) {
+ mDefaultVFSApplication = _gnome_vfs_mime_application_copy(app);
+
+ mPreferredAction = nsIMIMEInfo::useSystemDefault;
+
+ const gchar * name = _gnome_vfs_mime_application_get_name(mDefaultVFSApplication);
+ if (name)
+ mDefaultAppDescription = NS_ConvertUTF8toUCS2(name);
+ }
+}
+
+nsMIMEInfoUnix::~nsMIMEInfoUnix()
+{
+ if (mDefaultVFSApplication)
+ _gnome_vfs_mime_application_free(mDefaultVFSApplication);
+}
+
+nsresult
+nsMIMEInfoUnix::LaunchDefaultWithFile(nsIFile* aFile)
+{
+ NS_ENSURE_ARG_POINTER(aFile);
+
+ InitGnomeVFS();
+
+ if (_gnome_vfs_mime_application_launch && mDefaultVFSApplication) {
+ nsCAutoString nativePath;
+ aFile->GetNativePath(nativePath);
+
+ gchar *uri = _gnome_vfs_make_uri_from_input(nativePath.get());
+
+ GList *uris = NULL;
+ uris = g_list_append(uris, uri);
+
+ GnomeVFSResult result = _gnome_vfs_mime_application_launch(mDefaultVFSApplication, uris);
+
+ g_free(uri);
+ g_list_free(uris);
+
+ if (result != GNOME_VFS_OK)
+ return NS_ERROR_FAILURE;
+
+ return NS_OK;
+ }
+
+ if (!mDefaultApplication)
+ return NS_ERROR_FILE_NOT_FOUND;
+
+ return LaunchWithIProcess(mDefaultApplication, aFile);
+}
--- uriloader/exthandler/unix/nsMIMEInfoUnix.h
+++ uriloader/exthandler/unix/nsMIMEInfoUnix.h
@@ -0,0 +1,50 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.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.org Code.
+ *
+ * The Initial Developer of the Original Code is
+ * Red Hat, Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Christopher Aillon (Original author)
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#ifndef nsMimeInfoUnix_h__
+#define nsMimeInfoUnix_h__
+
+#include "nsMIMEInfoImpl.h"
+
+struct GnomeVFSMimeApplication;
+
+class nsMIMEInfoUnix : public nsMIMEInfoImpl
+{
+public:
+ nsMIMEInfoUnix(const char* aType = "") : nsMIMEInfoImpl(aType), mDefaultVFSApplication(nsnull) {}
+ nsMIMEInfoUnix(const nsACString& aMIMEType) : nsMIMEInfoImpl(aMIMEType) {};
+
+ virtual ~nsMIMEInfoUnix();
+
+ void SetDefaultGnomeVFSMimeApplication(GnomeVFSMimeApplication *app);
+
+protected:
+ virtual NS_HIDDEN_(nsresult) LaunchDefaultWithFile(nsIFile* aFile);
+
+ GnomeVFSMimeApplication *mDefaultVFSApplication;
+};
+
+#endif // nsMimeInfoUnix_h__
--- uriloader/exthandler/unix/nsOSHelperAppService.cpp
+++ uriloader/exthandler/unix/nsOSHelperAppService.cpp
@@ -44,6 +44,7 @@
#include "nsOSHelperAppService.h"
#ifdef MOZ_WIDGET_GTK2
#include "nsGNOMERegistry.h"
+#include "nsMIMEInfoUnix.h"
#endif
#include "nsISupports.h"
#include "nsString.h"
++++++ greasemonkey.patch ++++++
Index: docshell/base/nsDocShell.cpp
================================================================================
--- docshell/base/nsDocShell.cpp
+++ docshell/base/nsDocShell.cpp
@@ -5758,6 +5758,9 @@
if (onLocationChangeNeeded) {
FireOnLocationChange(this, request, mCurrentURI);
}
+
+ FireOnStateChange(this, request,
+ STATE_TRANSFERRING|STATE_IS_NETWORK|STATE_IS_DOCUMENT, NS_OK);
return NS_OK;
}
--- xpfe/browser/src/nsBrowserStatusFilter.cpp
+++ xpfe/browser/src/nsBrowserStatusFilter.cpp
@@ -152,8 +152,10 @@
if (aStateFlags & STATE_IS_REQUEST) {
if (!mUseRealProgressFlag && mTotalRequests)
return OnProgressChange(nsnull, nsnull, 0, 0, mFinishedRequests, mTotalRequests);
+ } else if (aStateFlags & STATE_IS_DOCUMENT) {
+ return mListener->OnStateChange(aWebProgress, aRequest, aStateFlags,
+ aStatus);
}
-
// no need to forward this state change
return NS_OK;
} else {
++++++ kompozer.desktop ++++++
--- /var/tmp/diff_new_pack.Di1733/_old 2009-06-03 00:50:55.000000000 +0200
+++ /var/tmp/diff_new_pack.Di1733/_new 2009-06-03 00:50:55.000000000 +0200
@@ -1,9 +1,12 @@
[Desktop Entry]
Name=KompoZer
GenericName=Web Authoring System
+Comment=Create Web Pages
TryExec=kompozer
Exec=kompozer %u
Icon=kompozer
-Terminal=false
+Categories=Network;WebDevelopment;
MimeType=text/html;application/xhtml+xml;
Type=Application
+Terminal=false
+StartupNotify=true
++++++ kompozer-path_len.patch ++++++
From: upstream
Subject: crashes with Factory's glibc
References:
https://bugzilla.novell.com/show_bug.cgi?id=354150
https://bugzilla.mozilla.org/show_bug.cgi?id=412610
================================================================================
--- mozilla/config/pathsub.h
+++ mozilla/config/pathsub.h
@@ -46,7 +46,7 @@
#include
#ifndef PATH_MAX
-#define PATH_MAX 1024
+#error "PATH_MAX is not defined!"
#endif
/*
--- mozilla/dbm/include/mcom_db.h
+++ mozilla/dbm/include/mcom_db.h
@@ -214,7 +214,8 @@
#endif /* __DBINTERFACE_PRIVATE */
#ifdef SCO
-#define MAXPATHLEN 1024
+#include
+#define MAXPATHLEN PATH_MAX
#endif
#include
--- mozilla/js/src/jsfile.c
+++ mozilla/js/src/jsfile.c
@@ -105,7 +105,8 @@
#define utfstring "binary"
#define unicodestring "unicode"
-#define MAX_PATH_LENGTH 1024
+#include
+#define MAX_PATH_LENGTH PATH_MAX
#define MODE_SIZE 256
#define NUMBER_SIZE 32
#define MAX_LINE_LENGTH 256
--- mozilla/modules/libjar/nsZipArchive.cpp
+++ mozilla/modules/libjar/nsZipArchive.cpp
@@ -121,7 +121,7 @@
# define S_IFLNK 0120000
# endif
# ifndef PATH_MAX
-# define PATH_MAX 1024
+# include
# endif
#endif /* XP_UNIX */
--- mozilla/modules/libreg/src/reg.c
+++ mozilla/modules/libreg/src/reg.c
@@ -96,7 +96,8 @@
#define MAX_PATH PATH_MAX
#elif defined(XP_UNIX)
#ifndef MAX_PATH
-#define MAX_PATH 1024
+#include
+#define MAX_PATH PATH_MAX
#endif
#elif defined(XP_OS2)
#ifndef MAX_PATH
--- mozilla/nsprpub/config/pathsub.h
+++ mozilla/nsprpub/config/pathsub.h
@@ -50,7 +50,7 @@
#endif
#ifndef PATH_MAX
-#define PATH_MAX 1024
+#error "PATH_MAX is not defined!"
#endif
/*
--- mozilla/security/coreconf/nsinstall/pathsub.h
+++ mozilla/security/coreconf/nsinstall/pathsub.h
@@ -49,7 +49,7 @@
#endif
#ifndef PATH_MAX
-#define PATH_MAX 1024
+#error "PATH_MAX is not defined!"
#endif
/*
--- mozilla/toolkit/mozapps/update/src/updater/updater.cpp
+++ mozilla/toolkit/mozapps/update/src/updater/updater.cpp
@@ -107,7 +107,8 @@
# elif defined(CCHMAXPATH)
# define MAXPATHLEN CCHMAXPATH
# else
-# define MAXPATHLEN 1024
+# include
+# define MAXPATHLEN PATH_MAX
# endif
#endif
--- mozilla/toolkit/xre/nsAppRunner.h
+++ mozilla/toolkit/xre/nsAppRunner.h
@@ -42,7 +42,8 @@
#include
#endif
-#define MAXPATHLEN 4096
+#include
+#define MAXPATHLEN PATH_MAX
#include "nscore.h"
--- mozilla/widget/src/xremoteclient/XRemoteClient.cpp
+++ mozilla/widget/src/xremoteclient/XRemoteClient.cpp
@@ -76,7 +76,8 @@
#endif
#ifndef MAX_PATH
-#define MAX_PATH 1024
+#include
+#define MAX_PATH PATH_MAX
#endif
#define ARRAY_LENGTH(array_) (sizeof(array_)/sizeof(array_[0]))
--- mozilla/xpcom/build/nsXPCOMPrivate.h
+++ mozilla/xpcom/build/nsXPCOMPrivate.h
@@ -252,7 +252,8 @@
#elif defined(CCHMAXPATH)
#define MAXPATHLEN CCHMAXPATH
#else
-#define MAXPATHLEN 1024
+#include
+#define MAXPATHLEN PATH_MAX
#endif
#endif
--- mozilla/xpcom/io/SpecialSystemDirectory.cpp
+++ mozilla/xpcom/io/SpecialSystemDirectory.cpp
@@ -109,7 +109,8 @@
#elif defined(CCHMAXPATH)
#define MAXPATHLEN CCHMAXPATH
#else
-#define MAXPATHLEN 1024
+#include
+#define MAXPATHLEN PATH_MAX
#endif
#endif
--- mozilla/xpcom/obsolete/nsFileSpecUnix.cpp
+++ mozilla/xpcom/obsolete/nsFileSpecUnix.cpp
@@ -79,7 +79,8 @@
#endif
#ifndef MAXPATHLEN
-#define MAXPATHLEN 1024 /* Guessing this is okay. Works for SCO. */
+#include
+#define MAXPATHLEN PATH_MAX /* Guessing this is okay. Works for SCO. */
#endif
#if defined(__QNX__)
--- mozilla/xpcom/typelib/xpidl/xpidl_java.c
+++ mozilla/xpcom/typelib/xpidl/xpidl_java.c
@@ -44,6 +44,7 @@
#include "xpidl.h"
#include
#include
+#include
#ifdef XP_WIN
#include
++++++ kompozer.png ++++++
Files GNOME/kompozer/kompozer.png and /mounts/work_src_done/STABLE/kompozer/kompozer.png differ
++++++ locale.patch ++++++
--- modules/libpref/src/init/all.js.orig 2004-10-15 14:50:11.740865580 +0200
+++ modules/libpref/src/init/all.js 2004-10-15 14:50:34.371625152 +0200
@@ -653,7 +653,7 @@
pref("intl.charset.detector", "chrome://navigator/locale/navigator.properties");
pref("intl.charset.default", "chrome://navigator-platform/locale/navigator.properties");
pref("intl.content.langcode", "chrome://communicator-region/locale/region.properties");
-pref("intl.locale.matchOS", false);
+pref("intl.locale.matchOS", true);
// fallback charset list for Unicode conversion (converting from Unicode)
// currently used for mail send only to handle symbol characters (e.g Euro, trademark, smartquotes)
// for ISO-8859-1
++++++ misc.dif ++++++
--- gfx/src/x11shared/nsFT2FontCatalog.cpp
+++ gfx/src/x11shared/nsFT2FontCatalog.cpp
@@ -49,6 +49,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -92,9 +93,6 @@
// Called to get the TrueType font summary from the disk font catalog.
//
-// Solaris is missing a prototype for ctime
-extern "C" {char *ctime(const time_t *timep);}
-
#include
#include FT_GLYPH_H
#include FT_FREETYPE_H
++++++ mozilla-freetype218.patch ++++++
--- /var/tmp/diff_new_pack.Di1733/_old 2009-06-03 00:50:55.000000000 +0200
+++ /var/tmp/diff_new_pack.Di1733/_new 2009-06-03 00:50:55.000000000 +0200
@@ -55,7 +55,7 @@
{"FTC_Manager_Done", NS_FT2_OFFSET(nsFTC_Manager_Done), PR_TRUE},
{"FTC_Manager_New", NS_FT2_OFFSET(nsFTC_Manager_New), PR_TRUE},
{"FTC_Image_Cache_New", NS_FT2_OFFSET(nsFTC_Image_Cache_New), PR_TRUE},
-@@ -282,7 +282,7 @@
+@@ -288,7 +288,7 @@
}
NS_IMETHODIMP
@@ -64,7 +64,7 @@
FT_UInt glyphID, FT_Glyph *glyph)
{
// call the FreeType2 function via the function pointer
-@@ -291,11 +291,11 @@
+@@ -297,11 +297,11 @@
}
NS_IMETHODIMP
@@ -79,7 +79,7 @@
return error ? NS_ERROR_FAILURE : NS_OK;
}
-@@ -320,7 +320,7 @@
+@@ -326,7 +326,7 @@
}
NS_IMETHODIMP
@@ -88,7 +88,7 @@
{
// call the FreeType2 function via the function pointer
FT_Error error = nsFTC_Image_Cache_New(manager, cache);
-@@ -389,7 +389,7 @@
+@@ -395,7 +395,7 @@
}
NS_IMETHODIMP
@@ -99,7 +99,7 @@
return NS_OK;
--- gfx/src/freetype/nsFreeType.h
+++ gfx/src/freetype/nsFreeType.h
-@@ -104,13 +104,13 @@
+@@ -120,13 +120,13 @@
typedef FT_Error (*FT_New_Face_t)(FT_Library, const char*, FT_Long, FT_Face*);
typedef FT_Error (*FT_Set_Charmap_t)(FT_Face face, FT_CharMap charmap);
typedef FT_Error (*FTC_Image_Cache_Lookup_t)
@@ -117,7 +117,7 @@
// #ifdef MOZ_SVG
typedef FT_Error (*FT_Glyph_Transform_t)(FT_Glyph, FT_Matrix*, FT_Vector*);
typedef FT_Error (*FT_Get_Kerning_t)
-@@ -165,7 +165,7 @@
+@@ -181,7 +181,7 @@
FT_Outline_Decompose_t nsFT_Outline_Decompose;
FT_Set_Charmap_t nsFT_Set_Charmap;
FTC_Image_Cache_Lookup_t nsFTC_Image_Cache_Lookup;
@@ -126,7 +126,7 @@
FTC_Manager_Done_t nsFTC_Manager_Done;
FTC_Manager_New_t nsFTC_Manager_New;
FTC_Image_Cache_New_t nsFTC_Image_Cache_New;
-@@ -213,7 +213,7 @@
+@@ -229,7 +229,7 @@
PRLibrary *mSharedLib;
FT_Library mFreeTypeLibrary;
FTC_Manager mFTCacheManager;
@@ -137,7 +137,7 @@
static nsHashtable *sRange1CharSetNames;
--- gfx/src/ps/nsFontMetricsPS.cpp
+++ gfx/src/ps/nsFontMetricsPS.cpp
-@@ -1141,10 +1141,10 @@
+@@ -1870,10 +1870,10 @@
mPixelSize = NSToIntRound(app2dev * mFont->size);
@@ -152,7 +152,7 @@
nsresult rv;
mFt2 = do_GetService(NS_FREETYPE2_CONTRACTID, &rv);
-@@ -1190,7 +1190,7 @@
+@@ -1907,7 +1907,7 @@
if (!face)
return 0;
@@ -161,7 +161,7 @@
nsresult rv = mFt2->GetImageCache(&iCache);
if (NS_FAILED(rv)) {
NS_ERROR("Failed to get Image Cache");
-@@ -1228,8 +1228,8 @@
+@@ -1945,8 +1945,8 @@
FTC_Manager cManager;
mFt2->GetFTCacheManager(&cManager);
@@ -172,7 +172,7 @@
NS_ASSERTION(rv==0, "failed to get face/size");
if (rv)
return nsnull;
-@@ -1622,16 +1622,16 @@
+@@ -2392,16 +2392,16 @@
mEntry->GetFamilyName(fontName);
mEntry->GetStyleName(styleName);
@@ -197,24 +197,24 @@
--- gfx/src/ps/nsFontMetricsPS.h
+++ gfx/src/ps/nsFontMetricsPS.h
-@@ -320,7 +320,7 @@
+@@ -424,7 +424,7 @@
nsCOMPtr<nsITrueTypeFontCatalogEntry> mFaceID;
nsCOMPtr<nsIFreeType2> mFt2;
PRUint16 mPixelSize;
- FTC_Image_Desc mImageDesc;
+ FTC_ImageType mImageDesc;
+ nsCString mFontNameBase; // the base name of type 1 (sub) fonts
+ nscoord mHeight;
-
- static PRBool AddUserPref(nsIAtom *aLang, const nsFont& aFont,
-@@ -363,7 +363,7 @@
+@@ -493,7 +493,7 @@
protected:
nsCOMPtr<nsITrueTypeFontCatalogEntry> mEntry;
nsCOMPtr<nsIFreeType2> mFt2;
- FTC_Image_Desc mImageDesc;
+ FTC_ImageType mImageDesc;
};
- #endif
-
+ #endif // MOZ_ENABLE_FREETYPE2
+ #endif // MOZ_ENABLE_XFT
--- gfx/src/x11shared/nsFontFreeType.cpp
+++ gfx/src/x11shared/nsFontFreeType.cpp
@@ -177,7 +177,7 @@
@@ -301,7 +301,7 @@
--- layout/svg/renderer/src/libart/nsSVGLibartGlyphMetricsFT.cpp
+++ layout/svg/renderer/src/libart/nsSVGLibartGlyphMetricsFT.cpp
-@@ -440,19 +440,19 @@
+@@ -423,19 +423,19 @@
return;
}
++++++ mozilla-gcc4.3-fixes.patch ++++++
References:
https://bugzilla.mozilla.org/show_bug.cgi?id=403675
https://bugzilla.mozilla.org/show_bug.cgi?id=386362
Index: modules/libpr0n/encoders/png/nsPNGEncoder.h
===================================================================
RCS file: /cvsroot/mozilla/modules/libpr0n/encoders/png/nsPNGEncoder.h,v
retrieving revision 1.1.18.1
diff -u -p -6 -r1.1.18.1 nsPNGEncoder.h
--- modules/libpr0n/encoders/png/nsPNGEncoder.h 20 May 2006 17:20:49 -0000 1.1.18.1
+++ modules/libpr0n/encoders/png/nsPNGEncoder.h 13 Nov 2007 22:07:36 -0000
@@ -35,14 +35,16 @@
*
* ***** END LICENSE BLOCK ***** */
#include "imgIEncoder.h"
#ifdef MOZILLA_1_8_BRANCH
#define imgIEncoder imgIEncoder_MOZILLA_1_8_BRANCH
+#ifndef NS_DECL_IMGIENCODER
#define NS_DECL_IMGIENCODER NS_DECL_IMGIENCODER_MOZILLA_1_8_BRANCH
#endif
+#endif
#include
#define NS_PNGENCODER_CID \
{ /* 38d1592e-b81e-432b-86f8-471878bbfe07 */ \
0x38d1592e, \
@@ -60,12 +62,20 @@ public:
NS_DECL_ISUPPORTS
NS_DECL_IMGIENCODER
NS_DECL_NSIINPUTSTREAM
nsPNGEncoder();
+ NS_IMETHOD InitFromData(const PRUint8* aData,
+ PRUint32 aLength, // (unused, req'd by JS)
+ PRUint32 aWidth,
+ PRUint32 aHeight,
+ PRUint32 aStride,
+ PRUint32 aInputFormat,
+ const nsAString& aOutputOptions);
+
private:
~nsPNGEncoder();
protected:
void ConvertHostARGBRow(const PRUint8* aSrc, PRUint8* aDest,
PRUint32 aPixelWidth, PRBool aUseTransparency);
Index: modules/libpr0n/encoders/jpeg/nsJPEGEncoder.h
===================================================================
RCS file: /cvsroot/mozilla/modules/libpr0n/encoders/jpeg/nsJPEGEncoder.h,v
retrieving revision 1.1.14.1
diff -u -p -6 -r1.1.14.1 nsJPEGEncoder.h
--- modules/libpr0n/encoders/jpeg/nsJPEGEncoder.h 20 May 2006 17:20:48 -0000 1.1.14.1
+++ modules/libpr0n/encoders/jpeg/nsJPEGEncoder.h 13 Nov 2007 22:07:57 -0000
@@ -36,14 +36,16 @@
*
* ***** END LICENSE BLOCK ***** */
#include "imgIEncoder.h"
#ifdef MOZILLA_1_8_BRANCH
#define imgIEncoder imgIEncoder_MOZILLA_1_8_BRANCH
+#ifndef NS_DECL_IMGIENCODER
#define NS_DECL_IMGIENCODER NS_DECL_IMGIENCODER_MOZILLA_1_8_BRANCH
#endif
+#endif
// needed for JPEG library
#include
extern "C" {
#include "jpeglib.h"
@@ -66,12 +68,20 @@ public:
NS_DECL_ISUPPORTS
NS_DECL_IMGIENCODER
NS_DECL_NSIINPUTSTREAM
nsJPEGEncoder();
+ NS_IMETHOD InitFromData(const PRUint8* aData,
+ PRUint32 aLength, // (unused, req'd by JS)
+ PRUint32 aWidth,
+ PRUint32 aHeight,
+ PRUint32 aStride,
+ PRUint32 aInputFormat,
+ const nsAString& aOutputOptions);
+
private:
~nsJPEGEncoder();
protected:
void ConvertHostARGBRow(const PRUint8* aSrc, PRUint8* aDest,
Index: modules/libpr0n/public/imgIEncoder.idl
===================================================================
RCS file: /cvsroot/mozilla/modules/libpr0n/public/imgIEncoder.idl,v
retrieving revision 1.1.10.3
diff -u -p -r1.1.10.3 imgIEncoder.idl
--- modules/libpr0n/public/imgIEncoder.idl 20 May 2006 17:20:49 -0000 1.1.10.3
+++ modules/libpr0n/public/imgIEncoder.idl 14 Nov 2007 10:41:40 -0000
@@ -96,6 +96,6 @@ interface nsIFile;
[scriptable, uuid(CCC5B3AD-3E67-4e3d-97E1-B06B2E96FEF8)]
interface imgIEncoder : nsISupports
{
- void encodeClipboardImage(in nsIClipboardImage aClipboardImage, out nsIFile aImageFile);
+ /* void encodeClipboardImage(in nsIClipboardImage aClipboardImage, out nsIFile aImageFile); */
};
++++++ nspr-prdtoa.patch ++++++
--- nsprpub/pr/src/misc/Makefile.in.foo Wed Jun 11 15:42:57 2003
+++ nsprpub/pr/src/misc/Makefile.in Wed Jun 11 15:42:49 2003
@@ -82,6 +82,14 @@
include $(topsrcdir)/config/rules.mk
+NONOPT_CFLAGS=$(filter-out -O%, $(CFLAGS))
+
+ifeq ($(OS_ARCH),Linux)
+$(OBJDIR)/prdtoa.$(OBJ_SUFFIX): prdtoa.c
+ @$(MAKE_OBJDIR)
+ $(CC) -o $@ -c $(NONOPT_CFLAGS) -ffloat-store $<
+endif
+
#
# Generate prerr.h, prerr.c, and prerr.properties from prerr.et.
#
++++++ nss-opt.patch ++++++
--- /var/tmp/diff_new_pack.Di1733/_old 2009-06-03 00:50:55.000000000 +0200
+++ /var/tmp/diff_new_pack.Di1733/_new 2009-06-03 00:50:55.000000000 +0200
@@ -5,13 +5,10 @@
CFLAGS are not taken from mozilla build
Index: security/manager/Makefile.in
-===================================================================
-RCS file: /cvsroot/mozilla/security/manager/Makefile.in,v
-retrieving revision 1.52
-diff -u -r1.52 Makefile.in
---- security/manager/Makefile.in 7 Jan 2004 13:36:50 -0000 1.52
-+++ security/manager/Makefile.in 10 Mar 2004 09:44:29 -0000
-@@ -71,7 +71,10 @@
+================================================================================
+--- security/manager/Makefile.in
++++ security/manager/Makefile.in
+@@ -154,7 +154,10 @@
ifneq ($(ABS_topsrcdir),$(MOZ_BUILD_ROOT))
DEFAULT_GMAKE_FLAGS += BUILD_TREE=$(MOZ_BUILD_ROOT)
endif
++++++ postscript.patch ++++++
From: Wolfgang Rosenauer
Subject: make pagesize postscript DSC conform
References:
http://www.cups.org/str.php?L1542
https://bugzilla.mozilla.org/show_bug.cgi?id=334485
Index: gfx/src/ps/nsPostScriptObj.cpp
================================================================================
--- gfx/src/ps/nsPostScriptObj.cpp
+++ gfx/src/ps/nsPostScriptObj.cpp
@@ -466,6 +466,7 @@
// Tell the printer what size paper it should use
fprintf(f,
+ "%%%%BeginFeature: *PageSize %s\n"
"/setpagedevice where\n" // Test for the feature
"{ pop 2 dict\n"
" dup /PageSize [ %s %s ] put\n" // Paper dimensions
@@ -473,7 +474,9 @@
" dup /PageSize 3 put\n" // Select the nearest page size to fit
" put\n"
" setpagedevice\n" // Install settings
- "} if\n",
+ "} if\n"
+ "%%%%EndFeature\n",
+ mPrintSetup->paper_name,
fpCString(NSTwipsToFloatPoints(paper_width)).get(),
fpCString(NSTwipsToFloatPoints(paper_height)).get());
++++++ proxy-dev.patch ++++++
From: Robert O'Callahan
Subject: proxy.pac: host resolution error
References:
https://bugzilla.novell.com/show_bug.cgi?id=196506
https://bugzilla.mozilla.org/show_bug.cgi?id=347307
diff --git a/netwerk/base/src/nsProxyAutoConfig.js b/netwerk/base/src/nsProxyAutoConfig.js
index 6a34044..2186502 100644
--- a/netwerk/base/src/nsProxyAutoConfig.js
+++ b/netwerk/base/src/nsProxyAutoConfig.js
@@ -50,7 +50,7 @@ const kPAC_CID = Components.ID("{63ac8c66-1dd2-11b2-b070-84d00d3eaece}");
const nsISupports = Components.interfaces.nsISupports;
const nsIProxyAutoConfig = Components.interfaces.nsIProxyAutoConfig;
-const nsIDNSService = Components.interfaces.nsIDNSService;
+const nsPIDNSService = Components.interfaces.nsPIDNSService;
// implementor of nsIProxyAutoConfig
function nsProxyAutoConfig() {};
@@ -114,7 +114,7 @@ function proxyAlert(msg) {
// wrapper for getting local IP address called by PAC file
function myIpAddress() {
try {
- return dns.resolve(dns.myHostName, 0).getNextAddrAsString();
+ return dns.getNetworkAddrAsString();
} catch (e) {
return '127.0.0.1';
}
@@ -176,7 +176,7 @@ function NSGetModule(compMgr, fileSpec) {
}
var pac = new nsProxyAutoConfig() ;
-var dns = Components.classes[kDNS_CONTRACTID].getService(nsIDNSService);
+var dns = Components.classes[kDNS_CONTRACTID].getService(nsPIDNSService);
var pacUtils =
"function dnsDomainIs(host, domain) {\n" +
diff --git a/netwerk/dns/public/nsPIDNSService.idl b/netwerk/dns/public/nsPIDNSService.idl
index e0eea6d..1abb223 100644
--- a/netwerk/dns/public/nsPIDNSService.idl
+++ b/netwerk/dns/public/nsPIDNSService.idl
@@ -58,4 +58,11 @@ interface nsPIDNSService : nsIDNSService
* this method.
*/
void shutdown();
+
+ /**
+ * Returns the IP address of the machine that is most suitable for
+ * identifying the machine's network. Favour VPN addresses above
+ * wired/wireless addresses above 127.x.x.x addresses.
+ */
+ ACString getNetworkAddrAsString();
};
diff --git a/netwerk/dns/src/nsDNSService2.cpp b/netwerk/dns/src/nsDNSService2.cpp
index f38e0c1..e928a76 100644
--- a/netwerk/dns/src/nsDNSService2.cpp
+++ b/netwerk/dns/src/nsDNSService2.cpp
@@ -56,6 +56,11 @@
#include "prio.h"
#include "plstr.h"
+#include
+#include
+#include
+#include
+
static const char kPrefDnsCacheEntries[] = "network.dnsCacheEntries";
static const char kPrefDnsCacheExpiration[] = "network.dnsCacheExpiration";
static const char kPrefEnableIDN[] = "network.enableIDN";
@@ -135,6 +140,18 @@ nsDNSRecord::GetNextAddr(PRUint16 port, PRNetAddr *addr)
return NS_OK;
}
+static nsresult
+AddrToString(PRNetAddr* aAddr, nsACString& aResult)
+{
+ char buf[64];
+ if (PR_NetAddrToString(aAddr, buf, sizeof(buf)) == PR_SUCCESS) {
+ aResult.Assign(buf);
+ return NS_OK;
+ }
+ NS_ERROR("PR_NetAddrToString failed unexpectedly");
+ return NS_ERROR_FAILURE; // conversion failed for some reason
+}
+
NS_IMETHODIMP
nsDNSRecord::GetNextAddrAsString(nsACString &result)
{
@@ -142,13 +159,7 @@ nsDNSRecord::GetNextAddrAsString(nsACString &result)
nsresult rv = GetNextAddr(0, &addr);
if (NS_FAILED(rv)) return rv;
- char buf[64];
- if (PR_NetAddrToString(&addr, buf, sizeof(buf)) == PR_SUCCESS) {
- result.Assign(buf);
- return NS_OK;
- }
- NS_ERROR("PR_NetAddrToString failed unexpectedly");
- return NS_ERROR_FAILURE; // conversion failed for some reason
+ return AddrToString(&addr, result);
}
NS_IMETHODIMP
@@ -580,3 +591,76 @@ nsDNSService::GetAFForLookup(const nsACString &host)
return af;
}
+
+static PRInt32
+GetScoreForInterface(struct ifaddrs* aInterface)
+{
+ // Interface must be up
+ if (!(aInterface->ifa_flags & IFF_UP))
+ return 0;
+ // Interface must be configured
+ if (!(aInterface->ifa_flags & IFF_RUNNING))
+ return 0;
+
+ // Interface must have an address
+ if (aInterface->ifa_addr == NULL)
+ return 0;
+
+ // Interface must have an address
+ if (aInterface->ifa_addr == NULL)
+ return 0;
+
+ // Only look at IP interfaces
+ sa_family_t type = aInterface->ifa_addr->sa_family;
+ if (type != AF_INET && type != AF_INET6)
+ return 0;
+
+ // Loopback interfaces get the lowest score
+ if (aInterface->ifa_flags & IFF_LOOPBACK)
+ return 1;
+
+ if (strchr(aInterface->ifa_name, ':')) {
+ // guess that it's probably a VPN address
+ return 3;
+ }
+
+ // Regular interface
+ return 2;
+}
+
+nsresult
+SockaddrToString(struct sockaddr* aAddr, nsACString& aResult)
+{
+ PRNetAddr* addr = NS_REINTERPRET_CAST(PRNetAddr*, aAddr);
+ return AddrToString(addr, aResult);
+}
+
+NS_IMETHODIMP
+nsDNSService::GetNetworkAddrAsString(nsACString& aResult)
+{
+ aResult.AssignLiteral("127.0.0.1");
+
+ struct ifaddrs* addrs;
+ if (getifaddrs(&addrs) < 0)
+ return NS_OK;
+
+ struct ifaddrs* bestAddr = nsnull;
+ PRInt32 bestScore = 0;
+ struct ifaddrs* addr;
+ for (addr = addrs; addr; addr = addr->ifa_next) {
+ PRInt32 score = GetScoreForInterface(addr);
+ if (score > 0 && (!bestAddr || score > bestScore)) {
+ bestAddr = addr;
+ bestScore = score;
+ }
+ }
+
+ if (!bestAddr) {
+ freeifaddrs(addrs);
+ return NS_OK;
+ }
+
+ nsresult rv = SockaddrToString(bestAddr->ifa_addr, aResult);
+ freeifaddrs(addrs);
+ return rv;
+}
++++++ startup.patch ++++++
++++ 1214 lines (skipped)
++++++ synaptics-scroll-358863.patch ++++++
For some reason, Firefox on Linux doesn't default to treating mouse buttons 6&7 as
horizontal scrolling as it does on Windows and Mac OS X. This changes the default
preferences. More discussion at bnc#358863, bmo#412256
--- modules/libpref/src/Makefile.in.orig 2006-02-03 15:44:52.000000000 +0100
+++ modules/libpref/src/Makefile.in 2008-05-01 00:12:26.425900000 +0200
@@ -83,6 +83,7 @@
DEFINES += -DOS_ARCH=$(OS_ARCH) \
-DMOZ_WIDGET_TOOLKIT=$(MOZ_WIDGET_TOOLKIT) \
+ -DHORIZSCROLL_AVAILABLE \
$(NULL)
PREF_JS_EXPORTS = $(srcdir)/init/all.js
++++++ system-extensions.patch ++++++
Index: toolkit/mozapps/extensions/src/nsExtensionManager.js.in
================================================================================
--- toolkit/mozapps/extensions/src/nsExtensionManager.js.in
+++ toolkit/mozapps/extensions/src/nsExtensionManager.js.in
@@ -119,6 +119,7 @@
const KEY_APP_PROFILE = "app-profile";
const KEY_APP_GLOBAL = "app-global";
+const KEY_APP_SYSTEM = "app-system";
const CATEGORY_INSTALL_LOCATIONS = "extension-install-locations";
@@ -2676,6 +2677,16 @@
priority);
InstallLocations.put(profileLocation);
+ // Register App-System Install Location
+ try {
+ var appSystemExtensions = getDirNoCreate("DrvD", ["usr","lib","browser-extensions","firefox"]);
+ var priority = nsIInstallLocation.PRIORITY_APP_PROFILE - 1;
+ var systemLocation = new DirectoryInstallLocation(KEY_APP_SYSTEM,
+ appSystemExtensions, true,
+ priority);
+ InstallLocations.put(systemLocation);
+ } catch (e) {}
+
#ifdef XP_WIN
// Register HKEY_LOCAL_MACHINE Install Location
InstallLocations.put(
@@ -3852,7 +3863,7 @@
// Prepare themes for installation
// Only enumerate directories in the app-profile and app-global locations.
- var locations = [KEY_APP_PROFILE, KEY_APP_GLOBAL];
+ var locations = [KEY_APP_PROFILE, KEY_APP_GLOBAL, KEY_APP_SYSTEM];
for (var i = 0; i < locations.length; ++i) {
var location = InstallLocations.get(locations[i]);
if (!location.canAccess)
@@ -3918,7 +3929,8 @@
var items = PendingOperations.getOperations(OP_NEEDS_INSTALL);
for (i = items.length - 1; i >= 0; --i) {
if (items[i].locationKey == KEY_APP_PROFILE ||
- items[i].locationKey == KEY_APP_GLOBAL)
+ items[i].locationKey == KEY_APP_GLOBAL ||
+ items[i].locationKey == KEY_APP_SYSTEM)
itemsToCheck.push(items[i].id);
}
this._finishOperations();
@@ -4903,7 +4915,8 @@
}
}
else if (installLocation.name == KEY_APP_PROFILE ||
- installLocation.name == KEY_APP_GLOBAL) {
+ installLocation.name == KEY_APP_GLOBAL ||
+ installLocation.name == KEY_APP_SYSTEM) {
// Check for a pointer file and remove it if it exists
var pointerFile = installLocation.location.clone();
pointerFile.append(id);
++++++ unused-includes.patch ++++++
--- /var/tmp/diff_new_pack.Di1733/_old 2009-06-03 00:50:55.000000000 +0200
+++ /var/tmp/diff_new_pack.Di1733/_new 2009-06-03 00:50:55.000000000 +0200
@@ -9,13 +9,3 @@
// "This code is for IA64 only"
---- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ipf64.cpp
-+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ipf64.cpp
-@@ -40,7 +40,6 @@
- #include "xptcprivate.h"
-
- #include
--#include
-
- // "This code is for IA64 only"
-
++++++ x11-session.patch ++++++
From: upstream
Subject: Support X11 session management
References:
https://bugzilla.novell.com/show_bug.cgi?id=227047
https://bugzilla.mozilla.org/show_bug.cgi?id=93789
diff --git a/toolkit/xre/Makefile.in b/toolkit/xre/Makefile.in
index e3dd8d9..4371882 100644
--- a/toolkit/xre/Makefile.in
+++ b/toolkit/xre/Makefile.in
@@ -137,21 +137,25 @@ ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_
CPPSRCS += nsNativeAppSupportMac.cpp
else
ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
CPPSRCS += nsNativeAppSupportOS2.cpp
else
ifeq ($(MOZ_WIDGET_TOOLKIT),beos)
CPPSRCS += nsNativeAppSupportBeOS.cpp
else
+ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
+CPPSRCS += nsNativeAppSupportUnix.cpp
+else
CPPSRCS += nsNativeAppSupportDefault.cpp
endif
endif
endif
endif
+endif
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
CMSRCS = MacLaunchHelper.m
CPPSRCS += nsCommandLineServiceMac.cpp
LOCAL_INCLUDES += -I$(topsrcdir)/xpfe/bootstrap/appleevents
OS_CXXFLAGS += -fexceptions
SHARED_LIBRARY_LIBS += $(DEPTH)/xpfe/bootstrap/appleevents/$(LIB_PREFIX)appleevents_s.$(LIB_SUFFIX)
endif
diff --git a/toolkit/xre/nsNativeAppSupportUnix.cpp b/toolkit/xre/nsNativeAppSupportUnix.cpp
new file mode 100644
index 0000000..ad73f4c
--- /dev/null
+++ b/toolkit/xre/nsNativeAppSupportUnix.cpp
@@ -0,0 +1,194 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** 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 Unix Native App Support.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2007
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Michael Wu (original author)
+ *
+ * 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 "nsNativeAppSupportBase.h"
+#include "nsCOMPtr.h"
+#include "nsXPCOM.h"
+#include "nsISupportsPrimitives.h"
+#include "nsIObserverService.h"
+#include "nsIAppStartup.h"
+#include "nsServiceManagerUtils.h"
+#include "prlink.h"
+
+#include
+#include
+
+typedef struct _GnomeProgram GnomeProgram;
+typedef struct _GnomeModuleInfo GnomeModuleInfo;
+typedef struct _GnomeClient GnomeClient;
+
+typedef enum {
+ GNOME_SAVE_GLOBAL,
+ GNOME_SAVE_LOCAL,
+ GNOME_SAVE_BOTH
+} GnomeSaveStyle;
+
+typedef enum {
+ GNOME_INTERACT_NONE,
+ GNOME_INTERACT_ERRORS,
+ GNOME_INTERACT_ANY
+} GnomeInteractStyle;
+
+typedef enum {
+ GNOME_DIALOG_ERROR,
+ GNOME_DIALOG_NORMAL
+} GnomeDialogType;
+
+typedef GnomeProgram * (*_gnome_program_init_fn)(const char *, const char *,
+ const GnomeModuleInfo *, int,
+ char **, const char *, ...);
+typedef const GnomeModuleInfo * (*_libgnomeui_module_info_get_fn)();
+typedef GnomeClient * (*_gnome_master_client_fn)(void);
+typedef void (*GnomeInteractFunction)(GnomeClient *, gint, GnomeDialogType,
+ gpointer);
+typedef void (*_gnome_client_request_interaction_fn)(GnomeClient *,
+ GnomeDialogType,
+ GnomeInteractFunction,
+ gpointer);
+typedef void (*_gnome_interaction_key_return_fn)(gint, gboolean);
+
+static _gnome_client_request_interaction_fn gnome_client_request_interaction;
+static _gnome_interaction_key_return_fn gnome_interaction_key_return;
+
+void interact_cb(GnomeClient *client, gint key,
+ GnomeDialogType type, gpointer data)
+{
+ nsCOMPtr<nsIObserverService> obsServ =
+ do_GetService("@mozilla.org/observer-service;1");
+ nsCOMPtr<nsISupportsPRBool> cancelQuit =
+ do_CreateInstance(NS_SUPPORTS_PRBOOL_CONTRACTID);
+
+ cancelQuit->SetData(PR_FALSE);
+
+ obsServ->NotifyObservers(cancelQuit, "quit-application-requested", nsnull);
+
+ PRBool abortQuit;
+ cancelQuit->GetData(&abortQuit);
+
+ gnome_interaction_key_return(key, abortQuit);
+}
+
+gboolean save_yourself_cb(GnomeClient *client, gint phase,
+ GnomeSaveStyle style, gboolean shutdown,
+ GnomeInteractStyle interact, gboolean fast,
+ gpointer user_data)
+{
+ if (interact == GNOME_INTERACT_ANY)
+ gnome_client_request_interaction(client, GNOME_DIALOG_NORMAL,
+ interact_cb, nsnull);
+ return TRUE;
+}
+
+void die_cb(GnomeClient *client, gpointer user_data)
+{
+ nsCOMPtr<nsIObserverService> obsServ =
+ do_GetService("@mozilla.org/observer-service;1");
+ nsCOMPtr<nsIAppStartup> appService =
+ do_GetService("@mozilla.org/toolkit/app-startup;1");
+
+ if (obsServ)
+ obsServ->NotifyObservers(nsnull, "quit-application-granted", nsnull);
+
+ if (appService)
+ appService->Quit(nsIAppStartup::eForceQuit);
+}
+
+class nsNativeAppSupportUnix : public nsNativeAppSupportBase
+{
+public:
+ NS_IMETHOD Start(PRBool* aRetVal);
+};
+
+NS_IMETHODIMP
+nsNativeAppSupportUnix::Start(PRBool *aRetVal)
+{
+ *aRetVal = PR_TRUE;
+
+ PRLibrary *gnomeuiLib = PR_LoadLibrary("libgnomeui-2.so.0");
+ if (!gnomeuiLib)
+ return NS_OK;
+
+ PRLibrary *gnomeLib = PR_LoadLibrary("libgnome-2.so.0");
+ if (!gnomeLib) {
+ PR_UnloadLibrary(gnomeuiLib);
+ return NS_OK;
+ }
+
+ _gnome_program_init_fn gnome_program_init =
+ (_gnome_program_init_fn)PR_FindFunctionSymbol(gnomeLib, "gnome_program_init");
+ _libgnomeui_module_info_get_fn libgnomeui_module_info_get = (_libgnomeui_module_info_get_fn)PR_FindFunctionSymbol(gnomeuiLib, "libgnomeui_module_info_get");
+ if (!gnome_program_init || !libgnomeui_module_info_get) {
+ PR_UnloadLibrary(gnomeuiLib);
+ PR_UnloadLibrary(gnomeLib);
+ return NS_OK;
+ }
+
+ char *argv[2] = { "gecko", "--disable-crash-dialog" };
+ gnome_program_init("Gecko", "1.0", libgnomeui_module_info_get(), 2, argv, NULL);
+
+ // Careful! These libraries cannot be unloaded after this point because
+ // gnome_program_init causes atexit handlers to be registered. Strange
+ // crashes will occur if these libraries are unloaded.
+
+ gnome_client_request_interaction = (_gnome_client_request_interaction_fn)
+ PR_FindFunctionSymbol(gnomeuiLib, "gnome_client_request_interaction");
+ gnome_interaction_key_return = (_gnome_interaction_key_return_fn)
+ PR_FindFunctionSymbol(gnomeuiLib, "gnome_interaction_key_return");
+
+ _gnome_master_client_fn gnome_master_client = (_gnome_master_client_fn)
+ PR_FindFunctionSymbol(gnomeuiLib, "gnome_master_client");
+
+ GnomeClient *client = gnome_master_client();
+ g_signal_connect(client, "save-yourself", G_CALLBACK(save_yourself_cb), NULL);
+ g_signal_connect(client, "die", G_CALLBACK(die_cb), NULL);
+
+ return NS_OK;
+}
+
+nsresult
+NS_CreateNativeAppSupport(nsINativeAppSupport **aResult)
+{
+ nsNativeAppSupportBase* native = new nsNativeAppSupportUnix();
+ if (!native)
+ return NS_ERROR_OUT_OF_MEMORY;
+
+ *aResult = native;
+ NS_ADDREF(*aResult);
+
+ return NS_OK;
+}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org