--- a/ChangeLog Mon Mar 09 12:01:12 2009 +0000
+++ b/ChangeLog Tue Mar 10 07:53:06 2009 +0000
@@ -1,3 +1,29 @@
+2009-03-10 Ginn Chen <[email protected]>
+
+ * base-specs/firefox.spec: Bump to Firefox 3.1 beta 3
+ * patches/firefox3-02-preload.diff:
+ * patches/firefox3-04-remove-core-file-check.diff:
+ * patches/firefox3-04-xinerama.diff:
+ * patches/firefox3-06-donot-delay-stopping-realplayer.diff:
+ * patches/firefox3-08-ksh.diff:
+ * patches/firefox3-09-jemalloc-shared-library.diff:
+ * patches/firefox3-11-im-context-not-match.diff:
+ * patches/firefox3-11-strip-gtk-module-settings.diff:
+ * patches/firefox3-12-js.diff:
+ * patches/firefox3-13-js-dtrace.diff:
+ * patches/firefox3-14-alloca.diff:
+ * patches/firefox3-14-compiler-workaround.diff:
+ * patches/firefox3-15-libogg-liboggz.diff:
+ * patches/firefox3-15-libogg.diff:
+ * patches/firefox3-16-liboggz.diff:
+ * patches/firefox3-16-rename-nsSelectionBatcher.diff:
+ * patches/firefox3-17-bigendian.diff:
+ * patches/firefox3-17-libtheora.diff:
+ * patches/firefox3-18-font-config.diff:
+ * patches/firefox3-21-default-to-downloads.diff:
+ * patches/firefox3-21-runmozilla.diff:
+ * patches/firefox3-29-getting-started.diff:
+
2009-03-09 Alfred Peng <[email protected]>
* indiana/indiana-branded.speclist: Add SUNWfirefox to the list.
--- a/base-specs/firefox.spec Mon Mar 09 12:01:12 2009 +0000
+++ b/base-specs/firefox.spec Tue Mar 10 07:53:06 2009 +0000
@@ -11,7 +11,7 @@
Name: firefox
Summary: Mozilla Firefox Web browser
Version: 3.1
-%define tarball_version 3.1b2
+%define tarball_version 3.1b3
Release: 1
Copyright: MPL/LGPL
Group: Applications/Internet
@@ -40,8 +40,8 @@
# bugster:6542910
Patch3: firefox3-03-disable-online-update.diff
-# owner:hawklu date:2007-11-07 type:bug bugster:6589754
-Patch4: firefox3-04-remove-core-file-check.diff
+# owner:ginnchen date:2009-03-04 type:bug bugzilla:448512
+Patch4: firefox3-04-xinerama.diff
# owner:fujiwara date:2008-04-10 type:bug
# bugster:6686579 bugzilla:285267
@@ -64,28 +64,28 @@
# owner:ginnchen date:2008-11-27 type:bug bugzilla:464443
Patch10: firefox3-10-fix-mimetype-for-helper-app.diff
-# owner:ginnchen date:2008-11-27 type:bug bugzilla:460926
-Patch11: firefox3-11-strip-gtk-module-settings.diff
+# owner:ginnchen date:2009-03-04 type:bug bugzilla:472635 status:upstream
+Patch11: firefox3-11-im-context-not-match.diff
-# owner:hawklu date:2008-12-04 type:bug bugzilla:463987
+# owner:hawklu date:2008-12-04 type:bug bugzilla:463987 status:upstream
Patch12: firefox3-12-js.diff
-# owner:hawklu date:2008-12-12 type:bug bugzilla:468041
+# owner:hawklu date:2008-12-12 type:bug bugzilla:468041 status:upstream
Patch13: firefox3-13-js-dtrace.diff
-# owner:hawklu date:2008-12-12 type:bug bugzilla:469639
-Patch14: firefox3-14-alloca.diff
-
-# owner:hawklu date:2008-12-10 type:bug bugzilla:449754 status:upstream
-Patch15: firefox3-15-libogg.diff
+# owner:ginnchen date:2009-03-04 type:branding bugzilla:478390 bugster:6805829
+Patch14: firefox3-14-compiler-workaround.diff
# owner:hawklu date:2008-12-10 type:bug bugzilla:449754 status:upstream
-Patch16: firefox3-16-liboggz.diff
+Patch15: firefox3-15-libogg-liboggz.diff
+
+# owner:ginnchen date:2009-03-04 type:bug bugzilla:471642 status:upstream
+Patch16: firefox3-16-rename-nsSelectionBatcher.diff
-# owner:hawklu date:2008-12-10 type:bug bugzilla:449754 status:upstream
-Patch17: firefox3-17-libtheora.diff
+# owner:ginnchen date:2009-03-04 type:bug bugzilla:479022 status:upstream
+Patch17: firefox3-17-bigendian.diff
-# owner:hawklu date:2008-12-16 type:bug bugster:6770058
+# owner:ginnchen date:2008-12-16 type:bug bugzilla:474758 status:upstream
Patch18: firefox3-18-font-config.diff
# owner:hawklu date:2008-12-16 type:branding
@@ -94,8 +94,8 @@
# owner:hawklu date:2008-04-20 type:branding bugster:664645
Patch20: firefox3-20-gen-devel-files.diff
-# owner:alfred date:2009-02-02 type:branding bugster:6735323
-Patch21: firefox3-21-default-to-downloads.diff
+# owner:ginnchen date:2009-03-04 type:bug bugzilla:472269 status:upstream
+Patch21: firefox3-21-runmozilla.diff
%if %option_with_indiana_branding
# owner:alfred date:2009-03-02 type:branding
@@ -214,7 +214,6 @@
ac_add_options --disable-updater
ac_add_options --disable-tests
ac_add_options --enable-dtrace
-ac_add_options --enable-xinerama
ac_add_options --with-system-jpeg
ac_add_options --enable-system-cairo
ac_add_options --disable-crashreporter
@@ -368,6 +367,8 @@
%{_datadir}/pixmaps/%{name}-icon.png
%changelog
+* Tue Mar 10 2009 - [email protected]
+- Bump to Firefox 3.1 beta 3.
* Mon Mar 09 2009 - [email protected]
- Add patch for OpenSolaris getting started page.
* Mon Feb 02 2009 - [email protected]
--- a/patches/firefox3-02-preload.diff Mon Mar 09 12:01:12 2009 +0000
+++ b/patches/firefox3-02-preload.diff Tue Mar 10 07:53:06 2009 +0000
@@ -1,5 +1,5 @@
---- firefox/browser/app/mozilla.in.ori3 2007-12-26 15:52:21.578403000 +0800
-+++ firefox/browser/app/mozilla.in 2007-12-26 15:54:06.096894000 +0800
+--- firefox/build/unix/mozilla.in.ori3 2007-12-26 15:52:21.578403000 +0800
++++ firefox/build/unix/mozilla.in 2007-12-26 15:54:06.096894000 +0800
@@ -131,6 +131,12 @@ do
esac
done
--- a/patches/firefox3-04-remove-core-file-check.diff Mon Mar 09 12:01:12 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
---- mozilla/build/unix/run-mozilla.sh.old 2008-12-04 15:03:15.261127648 +0800
-+++ mozilla/build/unix/run-mozilla.sh 2008-12-04 15:03:53.614964429 +0800
-@@ -138,63 +138,10 @@
- moz_bail "Cannot execute $prog."
- fi
- ##
-- ## Use md5sum to crc a core file. If md5sum is not found on the system,
-- ## then don't debug core files.
-- ##
-- moz_test_binary /bin/type
-- if [ $? -eq 1 ]
-- then
-- crc_prog=`LC_MESSAGES=C type md5sum 2>/dev/null | awk '{print $3;}' 2>/dev/null | sed -e 's/\.$//'`
-- else
-- crc_prog=`which md5sum 2>/dev/null`
-- fi
-- if [ -x "$crc_prog" ]
-- then
-- DEBUG_CORE_FILES=1
-- fi
-- if [ "$DEBUG_CORE_FILES" ]
-- then
-- crc_old=
-- if [ -f core ]
-- then
-- crc_old=`$crc_prog core | awk '{print $1;}' `
-- fi
-- fi
-- ##
- ## Run the program
- ##
- "$prog" ${1+"$@"}
- exitcode=$?
-- if [ "$DEBUG_CORE_FILES" ]
-- then
-- if [ -f core ]
-- then
-- crc_new=`$crc_prog core | awk '{print $1;}' `
-- fi
-- fi
-- if [ "$crc_old" != "$crc_new" ]
-- then
-- printf "\n\nOh no! %s just dumped a core file.\n\n" $prog
-- printf "Do you want to debug this ? "
-- printf "You need a lot of memory for this, so watch out ? [y/n] "
-- read ans
-- if [ "$ans" = "y" ]
-- then
-- debugger=`moz_get_debugger`
-- if [ -x "$debugger" ]
-- then
-- echo "$debugger $prog core"
--
-- # See http://www.mozilla.org/unix/debugging-faq.html
-- # For why LD_BIND_NOW is needed
-- LD_BIND_NOW=1; export LD_BIND_NOW
--
-- $debugger "$prog" core
-- else
-- echo "Could not find a debugger on your system."
-- fi
-- fi
-- fi
- }
- ##########################################################################
- moz_debug_program()
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/firefox3-04-xinerama.diff Tue Mar 10 07:53:06 2009 +0000
@@ -0,0 +1,85 @@
+diff --git a/widget/src/gtk2/nsScreenManagerGtk.cpp b/widget/src/gtk2/nsScreenManagerGtk.cpp
+--- a/widget/src/gtk2/nsScreenManagerGtk.cpp
++++ b/widget/src/gtk2/nsScreenManagerGtk.cpp
+@@ -102,17 +102,16 @@ root_window_event_filter(GdkXEvent *aGdk
+ }
+ #endif
+
+ return GDK_FILTER_CONTINUE;
+ }
+
+ nsScreenManagerGtk :: nsScreenManagerGtk ( )
+ : mXineramalib(nsnull)
+- , mXineramaIsActive(PR_FALSE)
+ , mRootWindow(nsnull)
+ {
+ // nothing else to do. I guess we could cache a bunch of information
+ // here, but we want to ask the device at runtime in case anything
+ // has changed.
+ }
+
+
+@@ -126,22 +125,16 @@ nsScreenManagerGtk :: ~nsScreenManagerGt
+
+ /* XineramaIsActive() registers a callback function close_display()
+ * in X, which is to be called in XCloseDisplay(). This is the case
+ * if Xinerama is active, even if only with one screen.
+ *
+ * We can't unload libXinerama.so.1 here because this will make
+ * the address of close_display() registered in X to be invalid and
+ * it will crash when XCloseDisplay() is called later. */
+-#ifdef MOZ_X11
+- if (mXineramalib && mXineramalib != SCREEN_MANAGER_LIBRARY_LOAD_FAILED &&
+- !mXineramaIsActive) {
+- PR_UnloadLibrary(mXineramalib);
+- }
+-#endif
+ }
+
+
+ // addref, release, QI
+ NS_IMPL_ISUPPORTS1(nsScreenManagerGtk, nsIScreenManager)
+
+
+ // this function will make sure that everything has been initialized.
+@@ -195,19 +188,16 @@ nsScreenManagerGtk :: Init()
+
+ // get the number of screens via xinerama
+ if (_XnrmIsActive && _XnrmQueryScreens &&
+ _XnrmIsActive(GDK_DISPLAY())) {
+ screenInfo = _XnrmQueryScreens(GDK_DISPLAY(), &numScreens);
+ }
+ }
+
+- // remember for the destructor, if we are really working with Xinerama
+- mXineramaIsActive = numScreens > 0;
+-
+ // screenInfo == NULL if either Xinerama couldn't be loaded or
+ // isn't running on the current display
+ if (!screenInfo || numScreens == 1) {
+ numScreens = 1;
+ #endif
+ nsRefPtr<nsScreenGtk> screen;
+
+ if (mCachedScreenArray.Count() > 0) {
+diff --git a/widget/src/gtk2/nsScreenManagerGtk.h b/widget/src/gtk2/nsScreenManagerGtk.h
+--- a/widget/src/gtk2/nsScreenManagerGtk.h
++++ b/widget/src/gtk2/nsScreenManagerGtk.h
+@@ -70,17 +70,16 @@ private:
+ private:
+
+ nsresult EnsureInit();
+
+ // Cached screen array. Its length is the number of screens we have.
+ nsCOMArray<nsIScreen> mCachedScreenArray;
+
+ PRLibrary *mXineramalib;
+- PRBool mXineramaIsActive;
+
+ GdkWindow *mRootWindow;
+ #ifdef MOZ_X11
+ Atom mNetWorkareaAtom;
+ #endif
+ };
+
+ #endif // nsScreenManagerGtk_h___
--- a/patches/firefox3-06-donot-delay-stopping-realplayer.diff Mon Mar 09 12:01:12 2009 +0000
+++ b/patches/firefox3-06-donot-delay-stopping-realplayer.diff Tue Mar 10 07:53:06 2009 +0000
@@ -1,6 +1,12 @@
---- firefox/layout/generic/nsObjectFrame.cpp.orig
-+++ firefox/layout/generic/nsObjectFrame.cpp
-@@ -1898,7 +1898,8 @@
+diff --git a/layout/generic/nsObjectFrame.cpp b/layout/generic/nsObjectFrame.cpp
+--- a/layout/generic/nsObjectFrame.cpp
++++ b/layout/generic/nsObjectFrame.cpp
+@@ -1892,23 +1892,26 @@ GetMIMEType(nsIPluginInstance *aPluginIn
+ return "";
+ }
+ #endif
+
+ static PRBool
DoDelayedStop(nsPluginInstanceOwner *aInstanceOwner, PRBool aDelayedStop)
{
// Don't delay stopping QuickTime (bug 425157), Flip4Mac (bug 426524),
@@ -9,13 +15,17 @@
+ // RealPlayer/Helix (bug 451007).
if (aDelayedStop
#ifndef XP_WIN
- && !::MatchPluginName(aInstanceOwner, "QuickTime")
-@@ -1905,6 +1906,8 @@
- && !::MatchPluginName(aInstanceOwner, "Flip4Mac")
- && !::MatchPluginName(aInstanceOwner, "XStandard plugin")
- && !::MatchPluginName(aInstanceOwner, "CMISS Zinc Plugin")
-+ && !::MatchPluginName(aInstanceOwner, "RealPlayer")
-+ && !::MatchPluginName(aInstanceOwner, "Helix")
+ && !aInstanceOwner->MatchPluginName("QuickTime")
+ && !aInstanceOwner->MatchPluginName("Flip4Mac")
+ && !aInstanceOwner->MatchPluginName("XStandard plugin")
+ && !aInstanceOwner->MatchPluginName("CMISS Zinc Plugin")
++ && !aInstanceOwner->MatchPluginName("RealPlayer")
++ && !aInstanceOwner->MatchPluginName("Helix")
#endif
#if defined(XP_UNIX) && defined(__arm__)
- && !::MatchPluginName(aInstanceOwner, "Shockwave Flash")
+ && !aInstanceOwner->MatchPluginName("Shockwave Flash")
+ #endif
+ ) {
+ nsCOMPtr<nsIRunnable> evt = new nsStopPluginRunnable(aInstanceOwner);
+ NS_DispatchToCurrentThread(evt);
+ return PR_TRUE;
--- a/patches/firefox3-08-ksh.diff Mon Mar 09 12:01:12 2009 +0000
+++ b/patches/firefox3-08-ksh.diff Tue Mar 10 07:53:06 2009 +0000
@@ -1,28 +1,16 @@
---- mozilla/browser/app/mozilla.in.orig Fri Oct 10 21:14:52 2008
-+++ mozilla/browser/app/mozilla.in Fri Oct 10 21:14:58 2008
+--- mozilla/build/unix/mozilla.in.orig Fri Oct 10 21:14:52 2008
++++ mozilla/build/unix/mozilla.in Fri Oct 10 21:14:58 2008
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
---- firefox/build/unix/run-mozilla.sh.orig Thu Dec 18 00:48:39 2008
-+++ firefox/build/unix/run-mozilla.sh Thu Dec 18 00:48:45 2008
+--- mozilla/build/unix/run-mozilla.sh.orig Fri Oct 10 22:03:20 2008
++++ mozilla/build/unix/run-mozilla.sh Fri Oct 10 22:03:26 2008
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-@@ -296,9 +296,9 @@
- ## to locate shared libraries.
- ##
- ## Note:
--## We choose libgkgfx.so as a representative shared library. If it is
-+## We choose libxul.so as a representative shared library. If it is
- ## a symbolic link, all other shared libraries are symbolic links also.
--if [ `uname -s` != "SunOS" -o -h "$MOZ_DIST_BIN/libgkgfx.so" ]
-+if [ `uname -s` != "SunOS" -o -h "$MOZ_DIST_BIN/libxul.so" ]
- then
- LD_LIBRARY_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins:${MRE_HOME}${LD_LIBRARY_PATH+":$LD_LIBRARY_PATH"}
- fi
--- a/patches/firefox3-09-jemalloc-shared-library.diff Mon Mar 09 12:01:12 2009 +0000
+++ b/patches/firefox3-09-jemalloc-shared-library.diff Tue Mar 10 07:53:06 2009 +0000
@@ -28,3 +28,49 @@
CSRCS = \
jemalloc.c \
+diff --git a/browser/installer/removed-files.in b/browser/installer/removed-files.in
+--- a/browser/installer/removed-files.in
++++ b/browser/installer/removed-files.in
+@@ -622,17 +622,19 @@ res/cursors/CVS/Tag
+ res/cursors/CVS/Tag
+ #endif
+ #ifdef XP_UNIX
+ #ifndef XP_MACOSX
+ readme.txt
+ chrome/icons/default/default.xpm
+ dictionaries/PL.dic
+ dictionaries/PL.aff
++#ifndef SOLARIS
+ libjemalloc.so
++#endif
+ #endif
+ #endif
+ #ifdef XP_WIN
+ #ifdef MOZ_MEMORY
+ Microsoft.VC80.CRT.manifest
+ msvcm80.dll
+ msvcp80.dll
+ msvcr80.dll
+diff --git a/browser/installer/unix/packages-static b/browser/installer/unix/packages-static
+--- a/browser/installer/unix/packages-static
++++ b/browser/installer/unix/packages-static
+@@ -49,16 +49,19 @@ bin/@MOZ_APP_NAME@
+ bin/@MOZ_APP_NAME@
+ bin/application.ini
+ bin/platform.ini
+ bin/mozilla-xremote-client
+ bin/run-mozilla.sh
+ bin/plugins/libnullplugin.so
+ bin/libsqlite3.so
+ bin/README.txt
++#ifdef SOLARIS
++bin/libjemalloc.so
++#endif
+ bin/blocklist.xml
+
+ ; [Components]
+ bin/components/alerts.xpt
+ bin/components/accessibility.xpt
+ bin/components/appshell.xpt
+ bin/components/appstartup.xpt
+ bin/components/autocomplete.xpt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/firefox3-11-im-context-not-match.diff Tue Mar 10 07:53:06 2009 +0000
@@ -0,0 +1,41 @@
+diff --git a/widget/src/gtk2/nsWindow.cpp b/widget/src/gtk2/nsWindow.cpp
+--- a/widget/src/gtk2/nsWindow.cpp
++++ b/widget/src/gtk2/nsWindow.cpp
+@@ -6721,17 +6721,17 @@ IM_preedit_changed_cb(GtkIMContext *aCon
+ nsWindow *aWindow)
+ {
+ gchar *preedit_string;
+ gint cursor_pos;
+ PangoAttrList *feedback_list;
+
+ // if gFocusWindow is null, use the last focused gIMEFocusWindow
+ nsRefPtr<nsWindow> window = gFocusWindow ? gFocusWindow : gIMEFocusWindow;
+- if (!window)
++ if (!window || IM_get_input_context(window) != aContext)
+ return;
+
+ // Should use cursor_pos ?
+ // Of course!!!
+ gtk_im_context_get_preedit_string(aContext, &preedit_string,
+ &feedback_list, &cursor_pos);
+
+ LOGIM(("preedit string is: %s length is: %d\n",
+@@ -6784,17 +6784,17 @@ IM_commit_cb(GtkIMContext *aContext,
+
+ LOGIM(("IM_commit_cb\n"));
+
+ gKeyEventCommitted = PR_TRUE;
+
+ // if gFocusWindow is null, use the last focused gIMEFocusWindow
+ nsRefPtr<nsWindow> window = gFocusWindow ? gFocusWindow : gIMEFocusWindow;
+
+- if (!window)
++ if (!window || IM_get_input_context(window) != aContext)
+ return;
+
+ /* If IME doesn't change they keyevent that generated this commit,
+ don't send it through XIM - just send it as a normal key press
+ event. */
+
+ if (gKeyEvent) {
+ char keyval_utf8[8]; /* should have at least 6 bytes of space */
--- a/patches/firefox3-11-strip-gtk-module-settings.diff Mon Mar 09 12:01:12 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
---- mozilla/toolkit/xre/nsAppRunner.cpp.old4 2008-12-04 15:40:35.671498373 +0800
-+++ mozilla/toolkit/xre/nsAppRunner.cpp 2008-12-04 15:45:01.967704141 +0800
-@@ -2522,20 +2522,6 @@
- InstallUnixSignalHandlers(argv[0]);
- #endif
-
--#ifdef MOZ_ACCESSIBILITY_ATK
-- // Reset GTK_MODULES, strip atk-bridge if exists
-- // Mozilla will load libatk-bridge.so later if necessary
-- const char* gtkModules = PR_GetEnv("GTK_MODULES");
-- if (gtkModules && *gtkModules) {
-- nsCString gtkModulesStr(gtkModules);
-- gtkModulesStr.ReplaceSubstring("atk-bridge", "");
-- char* expr = PR_smprintf("GTK_MODULES=%s", gtkModulesStr.get());
-- if (expr)
-- PR_SetEnv(expr);
-- // We intentionally leak |expr| here since it is required by PR_SetEnv.
-- }
--#endif
--
- // Unbuffer stdout, needed for tinderbox tests.
- setbuf(stdout, 0);
-
-@@ -2926,6 +2912,34 @@
- PR_fprintf(PR_STDERR, "Error: cannot open display: %s\n", display_name);
- return 1;
- }
-+
-+#ifdef MOZ_ACCESSIBILITY_ATK
-+ // Reset GTK_MODULES, strip atk-bridge if exists
-+ // Mozilla will load libatk-bridge.so later if necessary
-+ const char* gtkModules = PR_GetEnv("GTK_MODULES");
-+ if (gtkModules && *gtkModules) {
-+ nsCString gtkModulesStr(gtkModules);
-+ gtkModulesStr.ReplaceSubstring("atk-bridge", "");
-+ char* expr = PR_smprintf("GTK_MODULES=%s", gtkModulesStr.get());
-+ if (expr)
-+ PR_SetEnv(expr);
-+ // We intentionally leak |expr| here since it is required by PR_SetEnv.
-+ }
-+
-+ // Reset gtk-modules setting from gtk settings, strip atk-bridge if exists
-+ // Mozilla will load libatk-bridge.so later if necessary
-+ GtkSettings* settings =
-+ gtk_settings_get_for_screen(gdk_display_get_default_screen(display));
-+ gchar* gtk_modules_setting = nsnull;
-+ g_object_get(settings, "gtk-modules", >k_modules_setting, NULL);
-+ if (gtk_modules_setting) {
-+ nsCString gtkModulesSettingStr(gtkModules);
-+ gtkModulesSettingStr.ReplaceSubstring("atk-bridge", "");
-+ g_object_set(settings, "gtk-modules", gtkModulesSettingStr.get(), NULL);
-+ g_free(gtk_modules_setting);
-+ }
-+#endif
-+
- gdk_display_manager_set_default_display (gdk_display_manager_get(),
- display);
-
--- a/patches/firefox3-12-js.diff Mon Mar 09 12:01:12 2009 +0000
+++ b/patches/firefox3-12-js.diff Tue Mar 10 07:53:06 2009 +0000
@@ -1,20 +1,12 @@
-diff -r 2686d82a880c js/src/Makefile.in
---- a/js/src/Makefile.in Wed Nov 19 00:45:14 2008 -0500
-+++ b/js/src/Makefile.in Wed Nov 19 17:01:52 2008 +0800
-@@ -287,7 +287,8 @@ EXTRA_DSO_LDOPTS += $(NSPR_LIBS)
-
- ifdef MOZ_MEMORY
- ifeq ($(OS_ARCH),SunOS)
--EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,jemalloc,$(DIST)/lib)
-+override SOLARIS_JEMALLOC_LDFLAGS = $(call EXPAND_LIBNAME_PATH,jemalloc,../../$(DIST)/lib)
-+DSO_LDOPTS += $(SOLARIS_JEMALLOC_LDFLAGS)
- endif
- endif
-
-diff -r 2686d82a880c js/src/nanojit/Assembler.cpp
---- a/js/src/nanojit/Assembler.cpp Wed Nov 19 00:45:14 2008 -0500
-+++ b/js/src/nanojit/Assembler.cpp Wed Nov 19 17:01:52 2008 +0800
-@@ -1544,7 +1544,7 @@ namespace nanojit
+diff --git a/js/src/nanojit/Assembler.cpp b/js/src/nanojit/Assembler.cpp
+--- a/js/src/nanojit/Assembler.cpp
++++ b/js/src/nanojit/Assembler.cpp
+@@ -1516,17 +1516,17 @@ namespace nanojit
+ if (_verbose) {
+ memset(s, ' ', 51); s[51] = '\0';
+ s += strlen(s);
+ sprintf(s, " ebp ");
+ s += strlen(s);
for(uint32_t i=_activation.lowwatermark; i<_activation.tos;i++) {
LInsp ins = _activation.entry[i];
@@ -23,3 +15,80 @@
sprintf(s, "%d(%s) ", -4*i,_thisfrag->lirbuf->names->formatRef(ins));
s += strlen(s);
}
+ }
+ output(&outline[0]);
+ }
+ )
+ #endif
+diff --git a/js/src/nanojit/LIR.h b/js/src/nanojit/LIR.h
+--- a/js/src/nanojit/LIR.h
++++ b/js/src/nanojit/LIR.h
+@@ -160,19 +160,19 @@ namespace nanojit
+ }
+
+ inline bool isLoad(LOpcode op) {
+ return op == LIR_ldq || op == LIR_ld || op == LIR_ldc || op == LIR_ldqc || op == LIR_ldcs;
+ }
+
+ // Sun Studio requires explicitly declaring signed int bit-field
+ #if defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+- #define _sign_ signed
++ #define _sign_int signed int
+ #else
+- #define _sign_
++ #define _sign_int int32_t
+ #endif
+
+ // Low-level Instruction 4B
+ // had to lay it our as a union with duplicate code fields since msvc couldn't figure out how to compact it otherwise.
+ class LIns
+ {
+ friend class LirBufWriter;
+ // 3-operand form (backwards reach only)
+@@ -182,17 +182,17 @@ namespace nanojit
+ uint32_t oprnd_3:8; // only used for store, since this location gets clobbered during generation
+ uint32_t oprnd_1:8; // 256 ins window and since they only point backwards this is sufficient.
+ uint32_t oprnd_2:8;
+ };
+
+ struct sti_type
+ {
+ LOpcode code:8;
+- _sign_ int32_t disp:8;
++ _sign_int disp:8;
+ uint32_t oprnd_1:8; // 256 ins window and since they only point backwards this is sufficient.
+ uint32_t oprnd_2:8;
+ };
+
+ // imm8 form
+ struct c_type
+ {
+ LOpcode code:8;
+@@ -200,25 +200,25 @@ namespace nanojit
+ uint32_t imm8a:8;
+ uint32_t imm8b:8;
+ };
+
+ // imm24 form for short tramp & skip
+ struct t_type
+ {
+ LOpcode code:8;
+- _sign_ int32_t imm24:24;
++ _sign_int imm24:24;
+ };
+
+ // imm16 form
+ struct i_type
+ {
+ LOpcode code:8;
+ uint32_t resv:8; // cobberred during assembly
+- _sign_ int32_t imm16:16;
++ _sign_int imm16:16;
+ };
+
+ // overlay used during code generation ( note that last byte is reserved for allocation )
+ struct g_type
+ {
+ LOpcode code:8;
+ uint32_t resv:8; // cobberred during assembly
+ uint32_t unused:16;
--- a/patches/firefox3-13-js-dtrace.diff Mon Mar 09 12:01:12 2009 +0000
+++ b/patches/firefox3-13-js-dtrace.diff Tue Mar 10 07:53:06 2009 +0000
@@ -6,13 +6,14 @@
diff --git a/js/src/Makefile.in b/js/src/Makefile.in
--- a/js/src/Makefile.in
+++ b/js/src/Makefile.in
-@@ -660,5 +660,8 @@ ifdef HAVE_DTRACE
+@@ -652,7 +652,9 @@ $(CURDIR)/javascript-trace.h: $(srcdir)/
sed 's/if _DTRACE_VERSION/ifdef INCLUDE_MOZILLA_DTRACE/' \
javascript-trace.h.in > javascript-trace.h
-$(CPPSRCS:%.cpp=%.$(OBJ_SUFFIX)): $(CURDIR)/javascript-trace.h
+# We can't automatically generate dependencies on auto-generated headers;
+# we have to list them explicitly.
-+$(addsuffix .$(OBJ_SUFFIX),jsdtracef jsinterp jsobj): \
-+ $(CURDIR)/javascript-trace.h
++$(addsuffix .$(OBJ_SUFFIX),jsdtracef jsinterp jsobj): $(CURDIR)/javascript-trace.h
endif
+
+ ifdef GNU_CC
--- a/patches/firefox3-14-alloca.diff Mon Mar 09 12:01:12 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
---- firefox/media/libvorbis/lib/os.h.old1 2008-12-05 15:57:28.760635000 +0800
-+++ firefox/media/libvorbis/lib/os.h 2008-12-05 15:57:34.910086000 +0800
-@@ -26,6 +26,10 @@
-
- #include "misc.h"
-
-+#ifdef SOLARIS
-+#define HAVE_ALLOCA_H
-+#endif
-+
- #ifndef _V_IFDEFJAIL_H_
- # define _V_IFDEFJAIL_H_
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/firefox3-14-compiler-workaround.diff Tue Mar 10 07:53:06 2009 +0000
@@ -0,0 +1,26 @@
+diff --git a/js/src/xpconnect/src/xpcconvert.cpp b/js/src/xpconnect/src/xpcconvert.cpp
+--- a/js/src/xpconnect/src/xpcconvert.cpp
++++ b/js/src/xpconnect/src/xpcconvert.cpp
+@@ -1034,17 +1034,22 @@ CreateHolderIfNeeded(XPCCallContext& ccx
+ {
+ XPCJSObjectHolder* objHolder = XPCJSObjectHolder::newHolder(ccx, obj);
+ if(!objHolder)
+ return JS_FALSE;
+
+ NS_ADDREF(*dest = objHolder);
+ }
+
++#ifdef __SUNPRO_CC
++ // Ugly workaound for a bug of Sun Studio 12. See Bug 478390.
++ *d = (jsval)obj;
++#else
+ *d = OBJECT_TO_JSVAL(obj);
++#endif
+
+ return JS_TRUE;
+ }
+
+ /***************************************************************************/
+ // static
+ JSBool
+ XPCConvert::NativeInterface2JSObject(XPCCallContext& ccx,
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/firefox3-15-libogg-liboggz.diff Tue Mar 10 07:53:06 2009 +0000
@@ -0,0 +1,129 @@
+--- mozilla/media/liboggz/README_MOZILLA.old 2009-02-27 14:09:43.328672939 +0800
++++ mozilla/media/liboggz/README_MOZILLA 2009-02-27 14:16:16.572038295 +0800
+@@ -14,3 +14,6 @@
+ http://trac.annodex.net/ticket/431
+
+ endian.patch is applied to fix bug 452698.
++
++The oggz_off_t.patch fixes a compile error on Solaris see bug 449754
++for details
+--- mozilla/media/liboggz/include/oggz/oggz_off_t_generated.h.old 2009-02-27 14:10:05.456649268 +0800
++++ mozilla/media/liboggz/include/oggz/oggz_off_t_generated.h 2009-02-27 14:16:16.578662552 +0800
+@@ -59,7 +59,7 @@
+
+ #include <sys/types.h>
+
+-#ifdef __APPLE__
++#if defined(__APPLE__) || defined(SOLARIS)
+ typedef off_t oggz_off_t;
+ #else
+ typedef loff_t oggz_off_t;
+--- mozilla/media/liboggz/update.sh.old 2009-02-27 14:11:42.497106984 +0800
++++ mozilla/media/liboggz/update.sh 2009-02-27 14:16:16.579064845 +0800
+@@ -44,3 +44,4 @@
+ patch -p4 <seek.patch
+ patch -p4 <warning.patch
+ patch -p4 <endian.patch
++patch -p3 <oggz_off_t.patch
+--- mozilla/media/liboggz/oggz_off_t.patch.old 2009-02-27 14:10:26.256613056 +0800
++++ mozilla/media/liboggz/oggz_off_t.patch 2009-02-27 14:16:16.578875860 +0800
+@@ -0,0 +1,12 @@
++diff -r 070e364189c8 media/liboggz/include/oggz/oggz_off_t_generated.h
++--- a/media/liboggz/include/oggz/oggz_off_t_generated.h Wed Nov 26 09:04:13 2008 -0600
+++++ b/media/liboggz/include/oggz/oggz_off_t_generated.h Thu Nov 27 17:56:54 2008 +0800
++@@ -59,7 +59,7 @@
++
++ #include <sys/types.h>
++
++-#ifdef __APPLE__
+++#if defined(__APPLE__) || defined(SOLARIS)
++ typedef off_t oggz_off_t;
++ #else
++ typedef loff_t oggz_off_t;
+--- mozilla/media/libogg/int-types.patch.old 2009-02-27 14:08:52.800290896 +0800
++++ mozilla/media/libogg/int-types.patch 2009-02-27 14:16:16.564639611 +0800
+@@ -0,0 +1,20 @@
++--- include/ogg/config_types.h.old 2008-11-10 15:24:49.465597010 +0800
+++++ include/ogg/config_types.h 2008-11-10 15:25:19.249016710 +0800
++@@ -3,9 +3,15 @@
++
++ /* these are filled in by configure */
++ typedef int16_t ogg_int16_t;
++-typedef u_int16_t ogg_uint16_t;
++ typedef int32_t ogg_int32_t;
++-typedef u_int32_t ogg_uint32_t;
++ typedef int64_t ogg_int64_t;
++
+++#ifdef SOLARIS
+++typedef uint16_t ogg_uint16_t;
+++typedef uint32_t ogg_uint32_t;
+++#else
+++typedef u_int16_t ogg_uint16_t;
+++typedef u_int32_t ogg_uint32_t;
+++#endif
+++
++ #endif
+--- mozilla/media/libogg/update.sh.old 2009-02-27 14:09:19.648423953 +0800
++++ mozilla/media/libogg/update.sh 2009-02-27 14:16:16.564805779 +0800
+@@ -11,3 +11,4 @@
+ cp $1/src/bitwise.c ./src/ogg_bitwise.c
+ cp $1/src/framing.c ./src/ogg_framing.c
+ cp $1/AUTHORS ./AUTHORS
++patch -p0 < int-types.patch
+--- mozilla/media/libogg/README_MOZILLA.old 2009-02-27 14:07:42.800031930 +0800
++++ mozilla/media/libogg/README_MOZILLA 2009-02-27 14:16:16.560372242 +0800
+@@ -2,3 +2,7 @@
+ distribution using the update.sh script. The only changes made were
+ those applied by update.sh and the addition/upate of Makefile.in files
+ for the Mozilla build system.
++
++The int-types.patch address a bug that config_types.h generated from
++Linux platform can't be used on OpenSolaris directly see Mozilla bug
++449754
+--- mozilla/media/libogg/include/ogg/config_types.h.old 2009-02-27 14:08:03.872108738 +0800
++++ mozilla/media/libogg/include/ogg/config_types.h 2009-02-27 14:16:16.564440957 +0800
+@@ -3,9 +3,15 @@
+
+ /* these are filled in by configure */
+ typedef int16_t ogg_int16_t;
+-typedef u_int16_t ogg_uint16_t;
+ typedef int32_t ogg_int32_t;
+-typedef u_int32_t ogg_uint32_t;
+ typedef int64_t ogg_int64_t;
+
++#ifdef SOLARIS
++typedef uint16_t ogg_uint16_t;
++typedef uint32_t ogg_uint32_t;
++#else
++typedef u_int16_t ogg_uint16_t;
++typedef u_int32_t ogg_uint32_t;
++#endif
++
+ #endif
+--- mozilla/media/libtheora/lib/Makefile.in.old 2009-02-27 14:12:08.977240726 +0800
++++ mozilla/media/libtheora/lib/Makefile.in 2009-02-27 14:16:16.579666238 +0800
+@@ -49,9 +49,11 @@
+
+ ifeq ($(findstring 86,$(OS_TEST)), 86)
+ ifneq ($(OS_ARCH),WINNT)
++ifneq ($(OS_ARCH),SunOS)
+ DEFINES += -DOC_X86ASM -DUSE_ASM
+ endif
+ endif
++endif
+
+ VPATH := $(srcdir) $(srcdir)/dec
+
+--- mozilla/media/libvorbis/lib/os.h.old 2009-02-27 14:12:34.961367585 +0800
++++ mozilla/media/libvorbis/lib/os.h 2009-02-27 14:16:45.588079308 +0800
+@@ -26,6 +26,10 @@
+
+ #include "misc.h"
+
++#ifdef SOLARIS
++#define HAVE_ALLOCA_H
++#endif
++
+ #ifndef _V_IFDEFJAIL_H_
+ # define _V_IFDEFJAIL_H_
+
--- a/patches/firefox3-15-libogg.diff Mon Mar 09 12:01:12 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-diff -r 0e1de1e5e5b1 media/libogg/README_MOZILLA
---- a/media/libogg/README_MOZILLA Thu Nov 27 21:58:44 2008 -0500
-+++ b/media/libogg/README_MOZILLA Mon Dec 01 17:38:16 2008 +0800
-@@ -2,3 +2,7 @@ distribution using the update.sh script.
- distribution using the update.sh script. The only changes made were
- those applied by update.sh and the addition/upate of Makefile.in files
- for the Mozilla build system.
-+
-+The int-types.patch address a bug that config_types.h generated from
-+Linux platform can't be used on OpenSolaris directly see Mozilla bug
-+449754
-diff -r 0e1de1e5e5b1 media/libogg/include/ogg/config_types.h
---- a/media/libogg/include/ogg/config_types.h Thu Nov 27 21:58:44 2008 -0500
-+++ b/media/libogg/include/ogg/config_types.h Mon Dec 01 17:38:16 2008 +0800
-@@ -3,9 +3,15 @@
-
- /* these are filled in by configure */
- typedef int16_t ogg_int16_t;
--typedef u_int16_t ogg_uint16_t;
- typedef int32_t ogg_int32_t;
--typedef u_int32_t ogg_uint32_t;
- typedef int64_t ogg_int64_t;
-
-+#ifdef SOLARIS
-+typedef uint16_t ogg_uint16_t;
-+typedef uint32_t ogg_uint32_t;
-+#else
-+typedef u_int16_t ogg_uint16_t;
-+typedef u_int32_t ogg_uint32_t;
- #endif
-+
-+#endif
-diff -r 0e1de1e5e5b1 media/libogg/int-types.patch
---- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ b/media/libogg/int-types.patch Mon Dec 01 17:38:16 2008 +0800
-@@ -0,0 +1,20 @@
-+--- include/ogg/config_types.h.old 2008-11-10 15:24:49.465597010 +0800
-++++ include/ogg/config_types.h 2008-11-10 15:25:19.249016710 +0800
-+@@ -3,9 +3,15 @@
-+
-+ /* these are filled in by configure */
-+ typedef int16_t ogg_int16_t;
-+-typedef u_int16_t ogg_uint16_t;
-+ typedef int32_t ogg_int32_t;
-+-typedef u_int32_t ogg_uint32_t;
-+ typedef int64_t ogg_int64_t;
-+
-++#ifdef SOLARIS
-++typedef uint16_t ogg_uint16_t;
-++typedef uint32_t ogg_uint32_t;
-++#else
-++typedef u_int16_t ogg_uint16_t;
-++typedef u_int32_t ogg_uint32_t;
-++#endif
-++
-+ #endif
-diff -r 0e1de1e5e5b1 media/libogg/update.sh
---- a/media/libogg/update.sh Thu Nov 27 21:58:44 2008 -0500
-+++ b/media/libogg/update.sh Mon Dec 01 17:38:16 2008 +0800
-@@ -11,3 +11,4 @@ cp $1/src/bitwise.c ./src/ogg_bitwise.c
- cp $1/src/bitwise.c ./src/ogg_bitwise.c
- cp $1/src/framing.c ./src/ogg_framing.c
- cp $1/AUTHORS ./AUTHORS
-+patch -p0 < int-types.patch
--- a/patches/firefox3-16-liboggz.diff Mon Mar 09 12:01:12 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-diff -r 0e1de1e5e5b1 media/liboggz/README_MOZILLA
---- a/media/liboggz/README_MOZILLA Thu Nov 27 21:58:44 2008 -0500
-+++ b/media/liboggz/README_MOZILLA Mon Dec 01 17:39:32 2008 +0800
-@@ -12,3 +12,6 @@ in a DEBUG #ifdef. See Mozilla bug 45089
- in a DEBUG #ifdef. See Mozilla bug 450891 and Annodex ticket 431:
-
- http://trac.annodex.net/ticket/431
-+
-+The oggz_off_t.patch fixes a compile error on Solaris see bug 449754
-+for details
-diff -r 0e1de1e5e5b1 media/liboggz/include/oggz/oggz_off_t_generated.h
---- a/media/liboggz/include/oggz/oggz_off_t_generated.h Thu Nov 27 21:58:44 2008 -0500
-+++ b/media/liboggz/include/oggz/oggz_off_t_generated.h Mon Dec 01 17:39:32 2008 +0800
-@@ -59,7 +59,7 @@
-
- #include <sys/types.h>
-
--#ifdef __APPLE__
-+#if defined(__APPLE__) || defined(SOLARIS)
- typedef off_t oggz_off_t;
- #else
- typedef loff_t oggz_off_t;
-diff -r 0e1de1e5e5b1 media/liboggz/oggz_off_t.patch
---- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ b/media/liboggz/oggz_off_t.patch Mon Dec 01 17:39:32 2008 +0800
-@@ -0,0 +1,12 @@
-+diff -r 070e364189c8 media/liboggz/include/oggz/oggz_off_t_generated.h
-+--- a/media/liboggz/include/oggz/oggz_off_t_generated.h Wed Nov 26 09:04:13 2008 -0600
-++++ b/media/liboggz/include/oggz/oggz_off_t_generated.h Thu Nov 27 17:56:54 2008 +0800
-+@@ -59,7 +59,7 @@
-+
-+ #include <sys/types.h>
-+
-+-#ifdef __APPLE__
-++#if defined(__APPLE__) || defined(SOLARIS)
-+ typedef off_t oggz_off_t;
-+ #else
-+ typedef loff_t oggz_off_t;
-diff -r 0e1de1e5e5b1 media/liboggz/update.sh
---- a/media/liboggz/update.sh Thu Nov 27 21:58:44 2008 -0500
-+++ b/media/liboggz/update.sh Mon Dec 01 17:39:32 2008 +0800
-@@ -43,3 +43,4 @@ cp $1/AUTHORS ./AUTHORS
- cp $1/AUTHORS ./AUTHORS
- patch -p4 <seek.patch
- patch -p4 <warning.patch
-+patch -p3 <oggz_off_t.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/firefox3-16-rename-nsSelectionBatcher.diff Tue Mar 10 07:53:06 2009 +0000
@@ -0,0 +1,111 @@
+diff --git a/editor/libeditor/html/nsTableEditor.cpp b/editor/libeditor/html/nsTableEditor.cpp
+--- a/editor/libeditor/html/nsTableEditor.cpp
++++ b/editor/libeditor/html/nsTableEditor.cpp
+@@ -96,28 +96,28 @@ class NS_STACK_CLASS nsSetSelectionAfter
+ mEd->SetSelectionAfterTableEdit(mTable, mRow, mCol, mDirection, mSelected);
+ }
+ // This is needed to abort the caret reset in the destructor
+ // when one method yields control to another
+ void CancelSetCaret() {mEd = nsnull; mTable = nsnull;}
+ };
+
+ // Stack-class to turn on/off selection batching for table selection
+-class NS_STACK_CLASS nsSelectionBatcher
++class NS_STACK_CLASS nsSelectionBatcherForTable
+ {
+ private:
+ nsCOMPtr<nsISelectionPrivate> mSelection;
+ public:
+- nsSelectionBatcher(nsISelection *aSelection)
++ nsSelectionBatcherForTable(nsISelection *aSelection)
+ {
+ nsCOMPtr<nsISelection> sel(aSelection);
+ mSelection = do_QueryInterface(sel);
+ if (mSelection) mSelection->StartBatchChanges();
+ }
+- virtual ~nsSelectionBatcher()
++ virtual ~nsSelectionBatcherForTable()
+ {
+ if (mSelection) mSelection->EndBatchChanges();
+ }
+ };
+
+ // Table Editing helper utilities (not exposed in IDL)
+
+ NS_IMETHODIMP
+@@ -1551,17 +1551,17 @@ nsHTMLEditor::SelectBlockOfCells(nsIDOME
+ res = GetCellIndexes(aStartCell, &startRowIndex, &startColIndex);
+ if(NS_FAILED(res)) return res;
+
+ res = GetCellIndexes(aEndCell, &endRowIndex, &endColIndex);
+ if(NS_FAILED(res)) return res;
+
+ // Suppress nsISelectionListener notification
+ // until all selection changes are finished
+- nsSelectionBatcher selectionBatcher(selection);
++ nsSelectionBatcherForTable selectionBatcher(selection);
+
+ // Examine all cell nodes in current selection and
+ // remove those outside the new block cell region
+ PRInt32 minColumn = PR_MIN(startColIndex, endColIndex);
+ PRInt32 minRow = PR_MIN(startRowIndex, endRowIndex);
+ PRInt32 maxColumn = PR_MAX(startColIndex, endColIndex);
+ PRInt32 maxRow = PR_MAX(startRowIndex, endRowIndex);
+
+@@ -1634,17 +1634,17 @@ nsHTMLEditor::SelectAllTableCells()
+
+ nsCOMPtr<nsISelection> selection;
+ res = GetSelection(getter_AddRefs(selection));
+ if (NS_FAILED(res)) return res;
+ if (!selection) return NS_ERROR_FAILURE;
+
+ // Suppress nsISelectionListener notification
+ // until all selection changes are finished
+- nsSelectionBatcher selectionBatcher(selection);
++ nsSelectionBatcherForTable selectionBatcher(selection);
+
+ // It is now safe to clear the selection
+ // BE SURE TO RESET IT BEFORE LEAVING!
+ res = ClearSelection();
+
+ // Select all cells in the same column as current cell
+ PRBool cellSelected = PR_FALSE;
+ PRInt32 rowSpan, colSpan, actualRowSpan, actualColSpan, currentRowIndex, currentColIndex;
+@@ -1704,17 +1704,17 @@ nsHTMLEditor::SelectTableRow()
+ if (NS_FAILED(res)) return res;
+
+ //Note: At this point, we could get first and last cells in row,
+ // then call SelectBlockOfCells, but that would take just
+ // a little less code, so the following is more efficient
+
+ // Suppress nsISelectionListener notification
+ // until all selection changes are finished
+- nsSelectionBatcher selectionBatcher(selection);
++ nsSelectionBatcherForTable selectionBatcher(selection);
+
+ // It is now safe to clear the selection
+ // BE SURE TO RESET IT BEFORE LEAVING!
+ res = ClearSelection();
+
+ // Select all cells in the same row as current cell
+ PRBool cellSelected = PR_FALSE;
+ PRInt32 rowSpan, colSpan, actualRowSpan, actualColSpan, currentRowIndex, currentColIndex;
+@@ -1767,17 +1767,17 @@ nsHTMLEditor::SelectTableColumn()
+ if (!table) return NS_ERROR_FAILURE;
+
+ PRInt32 rowCount, colCount;
+ res = GetTableSize(table, &rowCount, &colCount);
+ if (NS_FAILED(res)) return res;
+
+ // Suppress nsISelectionListener notification
+ // until all selection changes are finished
+- nsSelectionBatcher selectionBatcher(selection);
++ nsSelectionBatcherForTable selectionBatcher(selection);
+
+ // It is now safe to clear the selection
+ // BE SURE TO RESET IT BEFORE LEAVING!
+ res = ClearSelection();
+
+ // Select all cells in the same column as current cell
+ PRBool cellSelected = PR_FALSE;
+ PRInt32 rowSpan, colSpan, actualRowSpan, actualColSpan, currentRowIndex, currentColIndex;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/firefox3-17-bigendian.diff Tue Mar 10 07:53:06 2009 +0000
@@ -0,0 +1,38 @@
+diff --git a/content/canvas/src/nsCanvasRenderingContext2D.cpp b/content/canvas/src/nsCanvasRenderingContext2D.cpp
+--- a/content/canvas/src/nsCanvasRenderingContext2D.cpp
++++ b/content/canvas/src/nsCanvasRenderingContext2D.cpp
+@@ -3814,28 +3814,30 @@ nsCanvasRenderingContext2D::PutImageData
+ }
+ }
+ } else {
+ /* Walk through and premultiply and swap rgba */
+ /* XXX SSE me */
+ PRUint8 ir, ig, ib, ia;
+ PRUint8 *ptr = imgPtr;
+ for (int32 i = 0; i < w*h; i++) {
+-#ifdef IS_LITTLE_ENDIAN
+ ir = ptr[0];
+ ig = ptr[1];
+ ib = ptr[2];
+ ia = ptr[3];
++
++#ifdef IS_LITTLE_ENDIAN
+ ptr[0] = (ib*ia + 254) / 255;
+ ptr[1] = (ig*ia + 254) / 255;
+ ptr[2] = (ir*ia + 254) / 255;
+ #else
+- ptr[0] = (ptr[0]*ptr[3] + 254) / 255;
+- ptr[1] = (ptr[1]*ptr[3] + 254) / 255;
+- ptr[2] = (ptr[2]*ptr[3] + 254) / 255;
++ ptr[0] = ia;
++ ptr[1] = (ir*ia + 254) / 255;
++ ptr[2] = (ig*ia + 254) / 255;
++ ptr[3] = (ib*ia + 254) / 255;
+ #endif
+ ptr += 4;
+ }
+ }
+
+ nsRefPtr<gfxImageSurface> imgsurf = new gfxImageSurface(imageBuffer.get(),
+ gfxIntSize(w, h),
+ w * 4,
--- a/patches/firefox3-17-libtheora.diff Mon Mar 09 12:01:12 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
---- a/media/libtheora/lib/internal.h.orig
-+++ b/media/libtheora/lib/internal.h
-@@ -225,9 +225,9 @@
- /*The quality index used for this fragment's AC coefficients.*/
- unsigned qi:6;
- /*The mode of the macroblock this fragment belongs to.*/
-- int mbmode:8;
-+ signed int mbmode:8;
- /*The prediction-corrected DC component.*/
-- int dc:16;
-+ signed int dc:16;
- /*A pointer to the portion of an image covered by this fragment in several
- images.
- The first three are reconstructed frame buffers, while the last is the
---- a/media/libtheora/lib/Makefile.in Sun Nov 02 23:12:38 2008 -0500
-+++ b/media/libtheora/lib/Makefile.in Wed Nov 05 11:18:42 2008 +0800
-@@ -49,7 +49,9 @@ DEFINES += -DTHEORA_DISABLE_ENCODE
-
- ifeq ($(findstring 86,$(OS_TEST)), 86)
- ifneq ($(OS_ARCH),WINNT)
-+ifneq ($(OS_ARCH),SunOS)
- DEFINES += -DOC_X86ASM -DUSE_ASM
-+endif
- endif
- endif
-
--- a/patches/firefox3-18-font-config.diff Mon Mar 09 12:01:12 2009 +0000
+++ b/patches/firefox3-18-font-config.diff Tue Mar 10 07:53:06 2009 +0000
@@ -1,12 +1,28 @@
-diff -r b80820b02087 gfx/thebes/src/gfxPangoFonts.cpp
---- a/gfx/thebes/src/gfxPangoFonts.cpp Tue Nov 11 17:23:15 2008 -0800
-+++ b/gfx/thebes/src/gfxPangoFonts.cpp Fri Nov 14 11:24:28 2008 +0800
-@@ -843,7 +843,7 @@ gfxFcPangoFontSet::SortPreferredFonts()
+diff --git a/gfx/thebes/src/gfxPangoFonts.cpp b/gfx/thebes/src/gfxPangoFonts.cpp
+--- a/gfx/thebes/src/gfxPangoFonts.cpp
++++ b/gfx/thebes/src/gfxPangoFonts.cpp
+@@ -1324,18 +1324,24 @@ gfxFcPangoFontSet::SortPreferredFonts()
+ truncateMarker = font;
+ }
+ break;
+ }
+ }
FcFontSet *sets[1] = { fontSet };
FcResult result;
-- fontSet.own(FcFontSetSort(NULL, sets, 1, mSortPattern,
++#ifdef SOLARIS
++ // Get around a crash of FcFontSetSort when FcConfig is NULL
+ fontSet.own(FcFontSetSort(FcConfigGetCurrent(), sets, 1, mSortPattern,
++ FcFalse, NULL, &result));
++#else
+ fontSet.own(FcFontSetSort(NULL, sets, 1, mSortPattern,
FcFalse, NULL, &result));
++#endif
if (truncateMarker != NULL && fontSet) {
+ nsAutoRef<FcFontSet> truncatedSet(FcFontSetCreate());
+
+ for (int f = 0; f < fontSet->nfont; ++f) {
+ FcPattern *font = fontSet->fonts[f];
+ if (font == truncateMarker)
+ break;
--- a/patches/firefox3-21-default-to-downloads.diff Mon Mar 09 12:01:12 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
---- mozilla/browser/app/profile/firefox.js.orig 2009-02-02 15:38:05.868767176 +0800
-+++ mozilla/browser/app/profile/firefox.js 2009-02-02 15:38:16.156036025 +0800
-@@ -234,7 +234,7 @@
- pref("browser.download.saveLinkAsFilenameTimeout", 1000);
-
- pref("browser.download.useDownloadDir", true);
--pref("browser.download.folderList", 0);
-+pref("browser.download.folderList", 1);
- pref("browser.download.manager.showAlertOnComplete", true);
- pref("browser.download.manager.showAlertInterval", 2000);
- pref("browser.download.manager.retention", 2);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/firefox3-21-runmozilla.diff Tue Mar 10 07:53:06 2009 +0000
@@ -0,0 +1,36 @@
+diff --git a/build/unix/run-mozilla.sh b/build/unix/run-mozilla.sh
+--- a/build/unix/run-mozilla.sh
++++ b/build/unix/run-mozilla.sh
+@@ -291,19 +291,29 @@ fi
+ ## toolkit/library/libxul.so, $ORIGIN will be "toolkit/library" instead of "dist/bin".
+ ## So the runtime linker will use "toolkit/library" NOT "dist/bin" to locate the
+ ## other shared libraries that libxul.so depends on. This only happens
+ ## when a user (developer) tries to start firefox, thunderbird, or seamonkey
+ ## under dist/bin. To solve the problem, we should rely on LD_LIBRARY_PATH
+ ## to locate shared libraries.
+ ##
+ ## Note:
+-## We choose libxul.so as a representative shared library. If it is
+-## a symbolic link, all other shared libraries are symbolic links also.
+-if [ `uname -s` != "SunOS" -o -h "$MOZ_DIST_BIN/libxul.so" ]
++## We test $MOZ_DIST_BIN/*.so. If any of them is a symbolic link,
++## we need to set LD_LIBRARY_PATH.
++##########################################################################
++moz_should_set_ld_library_path()
++{
++ [ `uname -s` != "SunOS" ] && return 0
++ for sharedlib in $MOZ_DIST_BIN/*.so
++ do
++ [ -h $sharedlib ] && return 0
++ done
++ return 1
++}
++if moz_should_set_ld_library_path
+ then
+ LD_LIBRARY_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins:${MRE_HOME}${LD_LIBRARY_PATH+":$LD_LIBRARY_PATH"}
+ fi
+
+ if [ -n "$LD_LIBRARYN32_PATH" ]
+ then
+ LD_LIBRARYN32_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins:${MRE_HOME}${LD_LIBRARYN32_PATH+":$LD_LIBRARYN32_PATH"}
+ fi
--- a/patches/firefox3-29-getting-started.diff Mon Mar 09 12:01:12 2009 +0000
+++ b/patches/firefox3-29-getting-started.diff Tue Mar 10 07:53:06 2009 +0000
@@ -12,8 +12,8 @@
+++ mozilla/other-licenses/branding/firefox/locales/browserconfig.properties 2008-05-21 11:38:47.665715000 +0800
@@ -1,3 +1,3 @@
# Do NOT localize or otherwise change these values
--#expand browser.startup.homepage=http://__AB_CD__.start2.mozilla.com/firefox?client=firefox-a&rls=__MOZ_DISTRIBUTION_ID_UNQUOTED__:__AB_CD__:official
--#expand browser.startup.homepage_reset=http://__AB_CD__.start2.mozilla.com/firefox?client=firefox-a&rls=__MOZ_DISTRIBUTION_ID_UNQUOTED__:__AB_CD__:official
+-#expand browser.startup.homepage=http://__AB_CD__.start3.mozilla.com/firefox?client=firefox-a&rls=__MOZ_DISTRIBUTION_ID_UNQUOTED__:__AB_CD__:official
+-#expand browser.startup.homepage_reset=http://__AB_CD__.start3.mozilla.com/firefox?client=firefox-a&rls=__MOZ_DISTRIBUTION_ID_UNQUOTED__:__AB_CD__:official
+#expand browser.startup.homepage=file:///usr/share/doc/opensolaris-welcome/html/index.html
+#expand browser.startup.homepage_reset=file:///usr/share/doc/opensolaris-welcome/html/index.html
--- mozilla/browser/components/nsBrowserContentHandler.js.old 2008-05-21 11:40:31.973367000 +0800