Update to Thunderbird 3.0b2

This commit is contained in:
Jan Horak 2009-03-02 12:50:22 +00:00
parent a6403eb92c
commit f31a5b0805
24 changed files with 62 additions and 9783 deletions

View File

@ -1,2 +1,2 @@
thunderbird-2.0.0.18-source.tar.bz2
thunderbird-langpacks-2.0.0.18-20081119.tar.bz2
thunderbird-langpacks-3.0-20090302.tar.bz2
thunderbird-3.0b2-source.tar.bz2

View File

@ -1,22 +0,0 @@
Index: nsprpub/pr/src/misc/Makefile.in
===================================================================
RCS file: /cvsroot/mozilla/nsprpub/pr/src/misc/Makefile.in,v
retrieving revision 1.15.2.2
diff -u -r1.15.2.2 Makefile.in
--- nsprpub/pr/src/misc/Makefile.in 6 Jun 2003 03:09:17 -0000 1.15.2.2
+++ nsprpub/pr/src/misc/Makefile.in 19 Nov 2004 00:58:35 -0000
@@ -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
+
# Prevent floating point errors caused by MSVC 6.0 Processor Pack
# optimizations (bug 207421). This disables optimizations that
# could change the precision of floating-point calculations for

View File

@ -1,459 +0,0 @@
Index: uriloader/exthandler/Makefile.in
===================================================================
RCS file: /cvsroot/mozilla/uriloader/exthandler/Makefile.in,v
retrieving revision 1.60
diff -d -u -p -r1.60 Makefile.in
--- uriloader/exthandler/Makefile.in 2 May 2005 16:30:03 -0000 1.60
+++ uriloader/exthandler/Makefile.in 21 Jul 2005 03:07:39 -0000
@@ -102,7 +102,7 @@ endif
LOCAL_INCLUDES = -I$(srcdir)
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
-OSHELPER += nsGNOMERegistry.cpp
+OSHELPER += nsMIMEInfoUnix.cpp nsGNOMERegistry.cpp
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),beos)
Index: uriloader/exthandler/unix/nsGNOMERegistry.cpp
===================================================================
RCS file: /cvsroot/mozilla/uriloader/exthandler/unix/nsGNOMERegistry.cpp,v
retrieving revision 1.10
diff -d -u -p -r1.10 nsGNOMERegistry.cpp
--- uriloader/exthandler/unix/nsGNOMERegistry.cpp 16 Oct 2004 13:46:17 -0000 1.10
+++ uriloader/exthandler/unix/nsGNOMERegistry.cpp 21 Jul 2005 03:07:40 -0000
@@ -42,7 +42,7 @@
#include "nsString.h"
#include "nsIComponentManager.h"
#include "nsILocalFile.h"
-#include "nsMIMEInfoImpl.h"
+#include "nsMIMEInfoUnix.h"
#include "nsAutoPtr.h"
#include <glib.h>
@@ -56,12 +56,12 @@ typedef struct _GConfClient GConfClient;
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 @@ nsGNOMERegistry::GetAppDescForScheme(con
}
-/* static */ already_AddRefed<nsMIMEInfoBase>
+/* static */ already_AddRefed<nsMIMEInfoUnix>
nsGNOMERegistry::GetFromExtension(const char *aFileExt)
{
if (!gconfLib)
@@ -286,7 +286,7 @@ nsGNOMERegistry::GetFromExtension(const
return GetFromType(mimeType);
}
-/* static */ already_AddRefed<nsMIMEInfoBase>
+/* static */ already_AddRefed<nsMIMEInfoUnix>
nsGNOMERegistry::GetFromType(const char *aMIMEType)
{
if (!gconfLib)
@@ -296,9 +296,11 @@ nsGNOMERegistry::GetFromType(const char
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 @@ nsGNOMERegistry::GetFromType(const char
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 @@ nsGNOMERegistry::GetFromType(const char
_gnome_vfs_mime_application_free(handlerApp);
- nsMIMEInfoBase* retval;
+ nsMIMEInfoUnix* retval;
NS_ADDREF((retval = mimeInfo));
return retval;
}
Index: uriloader/exthandler/unix/nsGNOMERegistry.h
===================================================================
RCS file: /cvsroot/mozilla/uriloader/exthandler/unix/nsGNOMERegistry.h,v
retrieving revision 1.3
diff -d -u -p -r1.3 nsGNOMERegistry.h
--- uriloader/exthandler/unix/nsGNOMERegistry.h 16 Oct 2004 13:46:17 -0000 1.3
+++ uriloader/exthandler/unix/nsGNOMERegistry.h 21 Jul 2005 03:07:40 -0000
@@ -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 @@ class nsGNOMERegistry
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__
Index: uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
===================================================================
RCS file: uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
diff -N uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ uriloader/exthandler/unix/nsMIMEInfoUnix.cpp 21 Jul 2005 03:07:40 -0000
@@ -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 <caillon@redhat.com> (Original author)
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "nsMIMEInfoUnix.h"
+#include "prlink.h"
+#include "prmem.h"
+#include <glib.h>
+#include <glib-object.h>
+
+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);
+}
Index: uriloader/exthandler/unix/nsMIMEInfoUnix.h
===================================================================
RCS file: uriloader/exthandler/unix/nsMIMEInfoUnix.h
diff -N uriloader/exthandler/unix/nsMIMEInfoUnix.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ uriloader/exthandler/unix/nsMIMEInfoUnix.h 21 Jul 2005 03:07:40 -0000
@@ -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 <caillon@redhat.com> (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__
Index: uriloader/exthandler/unix/nsOSHelperAppService.cpp
===================================================================
RCS file: /cvsroot/mozilla/uriloader/exthandler/unix/nsOSHelperAppService.cpp,v
retrieving revision 1.58
diff -d -u -p -r1.58 nsOSHelperAppService.cpp
--- uriloader/exthandler/unix/nsOSHelperAppService.cpp 25 Oct 2004 07:46:01 -0000 1.58
+++ uriloader/exthandler/unix/nsOSHelperAppService.cpp 21 Jul 2005 03:07:40 -0000
@@ -44,6 +44,7 @@
#include "nsOSHelperAppService.h"
#ifdef MOZ_WIDGET_GTK2
#include "nsGNOMERegistry.h"
+#include "nsMIMEInfoUnix.h"
#endif
#include "nsISupports.h"
#include "nsString.h"
@@ -1486,6 +1487,17 @@ nsOSHelperAppService::GetFromType(const
LOG(("Here we do a mimetype lookup for '%s'\n", aMIMEType.get()));
+#ifdef MOZ_WIDGET_GTK2
+ // Look in GNOME registry first since it is the preferred method in GNOME,
+ // should trump the mailcap entry
+ LOG(("Looking in GNOME registry\n"));
+ nsMIMEInfoBase *gnomeInfo = nsGNOMERegistry::GetFromType(aMIMEType.get()).get();
+ if (gnomeInfo) {
+ LOG(("Got MIMEInfo from GNOME registry\n"));
+ return gnomeInfo;
+ }
+#endif
+
// extract the major and minor types
NS_ConvertASCIItoUTF16 mimeType(aMIMEType);
nsAString::const_iterator start_iter, end_iter,
@@ -1522,21 +1534,6 @@ nsOSHelperAppService::GetFromType(const
mozillaFlags,
PR_TRUE);
-
- if (handler.IsEmpty() && extensions.IsEmpty() &&
- mailcap_description.IsEmpty() && mime_types_description.IsEmpty()) {
- // No useful data yet
-
-#ifdef MOZ_WIDGET_GTK2
- LOG(("Looking in GNOME registry\n"));
- nsMIMEInfoBase *gnomeInfo = nsGNOMERegistry::GetFromType(aMIMEType.get()).get();
- if (gnomeInfo) {
- LOG(("Got MIMEInfo from GNOME registry\n"));
- return gnomeInfo;
- }
-#endif
- }
-
if (handler.IsEmpty() && mailcap_description.IsEmpty()) {
DoLookUpHandlerAndDescription(majorType,
minorType,

View File

@ -1,23 +0,0 @@
Index: mozilla/editor/libeditor/text/nsTextEditRules.cpp
===================================================================
RCS file: /cvsroot/mozilla/editor/libeditor/text/nsTextEditRules.cpp,v
retrieving revision 1.195
diff -d -u -p -r1.195 nsTextEditRules.cpp
--- mozilla/editor/libeditor/text/nsTextEditRules.cpp 16 Jun 2005 13:10:56 -0000 1.195
+++ mozilla/editor/libeditor/text/nsTextEditRules.cpp 4 Oct 2006 16:02:19 -0000
@@ -1390,13 +1390,13 @@ nsTextEditRules::EchoInsertionToPWBuff(P
// manage the password buffer
mPasswordText.Insert(*aOutString, aStart);
- // change the output to '*' only
+ // change the output to 'U+2022' only
PRInt32 length = aOutString->Length();
PRInt32 i;
aOutString->Truncate();
for (i=0; i<length; i++)
{
- aOutString->Append(PRUnichar('*'));
+ aOutString->Append(PRUnichar(0x2022));
}
return NS_OK;

View File

@ -1,19 +0,0 @@
diff -pruN -x '.moz*' -x .deps -x 'firefox*' -x '*.mk' -x 'config*' -x dist -x build -x toolkit -x '*o' -x '*a' -x '*html' mozilla.orig/layout/generic/nsTextFrame.cpp mozilla/layout/generic/nsTextFrame.cpp
--- mozilla.orig/layout/generic/nsTextFrame.cpp 2006-08-26 13:33:35.000000000 +0900
+++ mozilla/layout/generic/nsTextFrame.cpp 2006-12-13 20:54:32.000000000 +0900
@@ -4261,12 +4261,10 @@ nsTextFrame::GetPointFromOffset(nsPresCo
if (tc) {
totalLength = tc->Text()->GetLength(); // raw value which includes whitespace
}
- if ((hitLength == textLength) && (inOffset = mContentLength) &&
- (mContentOffset + mContentLength == totalLength)) {
- // no need to re-measure when at the end of the last-in-flow
- }
+ if (hitLength > 0)
+ inRendContext->GetRangeWidth(paintBuffer.mBuffer, textLength, 0, hitLength, (PRUint32&)width);
else
- inRendContext->GetWidth(paintBuffer.mBuffer, hitLength, width);
+ width = 0;
}
if ((hitLength == textLength) && (TEXT_TRIMMED_WS & mState)) {
//

View File

@ -1,52 +0,0 @@
Index: mozilla/gfx/src/gtk/nsFontMetricsPango.cpp
===================================================================
RCS file: /cvsroot/mozilla/gfx/src/gtk/nsFontMetricsPango.cpp,v
retrieving revision 1.24
diff -d -u -p -6 -r1.24 nsFontMetricsPango.cpp
--- mozilla/gfx/src/gtk/nsFontMetricsPango.cpp 25 Aug 2006 01:02:34 -0000 1.24
+++ mozilla/gfx/src/gtk/nsFontMetricsPango.cpp 6 Sep 2006 07:01:49 -0000
@@ -948,13 +948,12 @@ nsFontMetricsPango::GetClusterInfo(const
PRInt32
nsFontMetricsPango::GetPosition(const PRUnichar *aText, PRUint32 aLength,
nsPoint aPt)
{
int trailing = 0;
int inx = 0;
- gboolean found = FALSE;
const gchar *curChar;
PRInt32 retval = 0;
float f = mDeviceContext->AppUnitsToDevUnits();
PangoLayout *layout = pango_layout_new(mPangoContext);
@@ -974,28 +973,18 @@ nsFontMetricsPango::GetPosition(const PR
}
// Set up the pango layout
pango_layout_set_text(layout, text, strlen(text));
FixupSpaceWidths(layout, text);
- found = pango_layout_xy_to_index(layout, localX, localY,
- &inx, &trailing);
+ pango_layout_xy_to_index(layout, localX, localY,
+ &inx, &trailing);
// Convert the index back to the utf-16 index
curChar = text;
- // Jump to the end if it's not found.
- if (!found) {
- if (inx == 0)
- retval = 0;
- else if (trailing)
- retval = aLength;
-
- goto loser;
- }
-
for (PRUint32 curOffset=0; curOffset < aLength;
curOffset++, curChar = g_utf8_find_next_char(curChar, NULL)) {
// Check for a match before checking for a surrogate pair
if (curChar - text == inx) {
retval = curOffset;

View File

@ -1,53 +0,0 @@
diff -pruN -x '.moz*' -x .deps -x 'thunderbird*' -x '*.mk' -x 'config*' -x dist -x build -x toolkit -x '*o' -x '*a' -x '*html' -x 'firefox*' mozilla.orig/layout/generic/nsTextFrame.cpp mozilla/layout/generic/nsTextFrame.cpp
--- mozilla.orig/layout/generic/nsTextFrame.cpp 2006-12-20 12:15:38.000000000 +0900
+++ mozilla/layout/generic/nsTextFrame.cpp 2006-12-20 21:29:39.000000000 +0900
@@ -2973,15 +2973,16 @@ nsTextFrame::RenderString(nsIRenderingCo
nsIFontMetrics* lastFont = aTextStyle.mLastFont;
PRInt32 pendingCount;
- PRUnichar* runStart = bp;
+ PRUnichar* runStart = bp, *top = aBuffer;
nscoord charWidth, width = 0;
PRInt32 countSoFar = 0;
+ PRUint32 offset;
// Save the color we want to use for the text, since calls to
// PaintTextDecorations in this method will call SetColor() on the rendering
// context.
nscolor textColor;
aRenderingContext.GetColor(textColor);
- for (; --aLength >= 0; aBuffer++) {
+ for (offset = 0; offset < aLength; aBuffer++, offset++) {
nsIFontMetrics* nextFont;
nscoord glyphWidth = 0;
PRUnichar ch = *aBuffer;
@@ -3038,7 +3039,7 @@ nsTextFrame::RenderString(nsIRenderingCo
else if (ch == ' ') {
glyphWidth += aTextStyle.mSpaceWidth + aTextStyle.mWordSpacing + aTextStyle.mLetterSpacing;
}
- else if (IS_HIGH_SURROGATE(ch) && aLength > 0 &&
+ else if (IS_HIGH_SURROGATE(ch) && (offset + 1) < aLength &&
IS_LOW_SURROGATE(*(aBuffer+1))) {
// special handling for surrogate pair
@@ -3046,7 +3047,7 @@ nsTextFrame::RenderString(nsIRenderingCo
glyphWidth += charWidth + aTextStyle.mLetterSpacing;
// copy the surrogate low
*bp++ = ch;
- --aLength;
+ offset++;
aBuffer++;
ch = *aBuffer;
// put the width into the space buffer
@@ -3058,10 +3059,10 @@ nsTextFrame::RenderString(nsIRenderingCo
glyphWidth = 0;
}
else {
- aRenderingContext.GetWidth(ch, charWidth);
+ aRenderingContext.GetRangeWidth(top, aLength, offset, offset + 1, (PRUint32&)charWidth);
glyphWidth += charWidth + aTextStyle.mLetterSpacing;
}
- if (justifying && (!isEndOfLine || aLength > 0)
+ if (justifying && (!isEndOfLine || (offset + 1) < aLength)
&& IsJustifiableCharacter(ch, isCJ)) {
glyphWidth += aTextStyle.mExtraSpacePerJustifiableCharacter;
if ((PRUint32)--aTextStyle.mNumJustifiableCharacterToRender

View File

@ -1,39 +0,0 @@
diff -pruN -x '.moz*' -x .deps -x 'thunderbird*' -x '*.mk' -x 'config*' -x dist -x build -x toolkit -x '*o' -x '*a' -x '*html' mozilla.orig/layout/generic/nsTextFrame.cpp mozilla/layout/generic/nsTextFrame.cpp
--- mozilla.orig/layout/generic/nsTextFrame.cpp 2006-12-20 12:53:26.000000000 +0900
+++ mozilla/layout/generic/nsTextFrame.cpp 2006-12-20 15:43:14.000000000 +0900
@@ -2097,11 +2097,11 @@ nsTextFrame::PaintTextDecorations(nsIRen
nsRect rect = GetRect();
while(aDetails){
const nscoord* sp= aSpacing;
- PRInt32 startOffset = 0;
- PRInt32 textWidth = 0;
- PRInt32 start = PR_MAX(0,(aDetails->mStart - (PRInt32)aIndex));
- PRInt32 end = PR_MIN((PRInt32)aLength,(aDetails->mEnd - (PRInt32)aIndex));
- PRInt32 i;
+ PRUint32 startOffset = 0;
+ PRUint32 textWidth = 0;
+ PRInt32 start = PR_MAX(0,(aDetails->mStart - (PRInt32)aIndex));
+ PRInt32 end = PR_MIN((PRInt32)aLength,(aDetails->mEnd - (PRInt32)aIndex));
+ PRInt32 i;
if ((start < end) && ((aLength - start) > 0))
{
//aDetails allready processed to have offsets from frame start not content offsets
@@ -2117,7 +2117,7 @@ nsTextFrame::PaintTextDecorations(nsIRen
}
}
else
- aRenderingContext.GetWidth(aText, start, startOffset);
+ aRenderingContext.GetRangeWidth(aText, aLength, 0, start, startOffset);
}
if (sp){
for (i = start; i < end;i ++){
@@ -2125,8 +2125,7 @@ nsTextFrame::PaintTextDecorations(nsIRen
}
}
else
- aRenderingContext.GetWidth(aText + start,
- PRUint32(end - start), textWidth);
+ aRenderingContext.GetRangeWidth(aText, aLength, start, end, textWidth);
}
nscoord offset, size;

View File

@ -1,263 +0,0 @@
Index: layout/base/nsPresContext.cpp
===================================================================
RCS file: /cvsroot/mozilla/layout/base/nsPresContext.cpp,v
retrieving revision 3.288.12.5
diff -d -u -p -r3.288.12.5 nsPresContext.cpp
--- layout/base/nsPresContext.cpp 17 May 2006 07:56:35 -0000 3.288.12.5
+++ layout/base/nsPresContext.cpp 19 Sep 2008 16:33:31 -0000
@@ -73,6 +73,9 @@
#include "nsIDOMDocument.h"
#include "nsAutoPtr.h"
#include "nsEventStateManager.h"
+#include "nsIEventQueue.h"
+#include "nsIEventQueueService.h"
+
#ifdef IBMBIDI
#include "nsBidiPresUtils.h"
#endif // IBMBIDI
@@ -267,6 +270,7 @@ nsPresContext::~nsPresContext()
NS_IF_RELEASE(mDeviceContext);
NS_IF_RELEASE(mLookAndFeel);
NS_IF_RELEASE(mLangGroup);
+ NS_IF_RELEASE(mEventQueueService);
}
NS_IMPL_ISUPPORTS2(nsPresContext, nsPresContext, nsIObserver)
@@ -285,6 +289,17 @@ static const char* const kGenericFont[]
".fantasy."
};
+// Set to true when LookAndFeelChanged needs to be called. This is used
+// because the look and feel is a service, so there's no need to notify it from
+// more than one prescontext.
+static PRBool sLookAndFeelChanged;
+
+// Set to true when ThemeChanged needs to be called on mTheme. This is used
+// because mTheme is a service, so there's no need to notify it from more than
+// one prescontext.
+static PRBool sThemeChanged;
+
+
void
nsPresContext::GetFontPreferences()
{
@@ -716,6 +731,9 @@ nsPresContext::Init(nsIDeviceContext* aD
this);
#endif
+ rv = CallGetService(NS_EVENTQUEUESERVICE_CONTRACTID, &mEventQueueService);
+ NS_ENSURE_SUCCESS(rv, rv);
+
// Initialize our state from the user preferences
GetUserPreferences();
@@ -1197,33 +1215,126 @@ nsPresContext::GetTheme()
void
nsPresContext::ThemeChanged()
{
+ if (!mPendingThemeChanged) {
+ sLookAndFeelChanged = PR_TRUE;
+ sThemeChanged = PR_TRUE;
+
+ nsCOMPtr<nsIEventQueue> eventQ;
+ mEventQueueService->
+ GetSpecialEventQueue(nsIEventQueueService::UI_THREAD_EVENT_QUEUE,
+ getter_AddRefs(eventQ));
+ if (!eventQ) {
+ return;
+ }
+
+ PLEvent* evt = new PLEvent();
+ if (!evt) {
+ return;
+ }
+
+ PL_InitEvent(evt, this, nsPresContext::ThemeChangedInternal,
+ nsPresContext::DestroyThemeChangeEvt);
+
+ // After this point, event destruction will release |this|
+ NS_ADDREF_THIS();
+
+ nsresult rv = eventQ->PostEvent(evt);
+ if (NS_FAILED(rv)) {
+ PL_DestroyEvent(evt);
+ } else {
+ mPendingThemeChanged = PR_TRUE;
+ }
+ }
+}
+
+void* PR_CALLBACK
+nsPresContext::ThemeChangedInternal(PLEvent *aEvent)
+{
+ nsPresContext* pc = NS_STATIC_CAST(nsPresContext*, aEvent->owner);
+
+ pc->mPendingThemeChanged = PR_FALSE;
+
// Tell the theme that it changed, so it can flush any handles to stale theme
// data.
- if (mTheme)
- mTheme->ThemeChanged();
+ if (pc->mTheme && sThemeChanged) {
+ pc->mTheme->ThemeChanged();
+ sThemeChanged = PR_FALSE;
+ }
// Clear all cached nsILookAndFeel colors.
- if (mLookAndFeel)
- mLookAndFeel->LookAndFeelChanged();
+ if (pc->mLookAndFeel && sLookAndFeelChanged) {
+ pc->mLookAndFeel->LookAndFeelChanged();
+ sLookAndFeelChanged = PR_FALSE;
+ }
// We have to clear style data because the assumption of style rule
// immutability has been violated since any style rule that uses
// system colors or fonts (and probably -moz-appearance as well) has
// changed.
- nsPresContext::ClearStyleDataAndReflow();
+ pc->ClearStyleDataAndReflow();
+
+ return nsnull;
+}
+
+
+void PR_CALLBACK
+nsPresContext::DestroyThemeChangeEvt(PLEvent* aEvent)
+{
+ nsPresContext* pc = NS_STATIC_CAST(nsPresContext*, aEvent->owner);
+ NS_RELEASE(pc);
+ delete aEvent;
}
void
nsPresContext::SysColorChanged()
{
- if (mLookAndFeel) {
+ if (!mPendingSysColorChanged) {
+ sLookAndFeelChanged = PR_TRUE;
+
+ nsCOMPtr<nsIEventQueue> eventQ;
+ mEventQueueService->
+ GetSpecialEventQueue(nsIEventQueueService::UI_THREAD_EVENT_QUEUE,
+ getter_AddRefs(eventQ));
+ if (!eventQ) {
+ return;
+ }
+
+ PLEvent* evt = new PLEvent();
+ if (!evt) {
+ return;
+ }
+
+ PL_InitEvent(evt, this, nsPresContext::SysColorChangedInternal,
+ nsPresContext::DestroySysColorChangeEvt);
+
+ // After this point, event destruction will release |this|
+ NS_ADDREF_THIS();
+
+ nsresult rv = eventQ->PostEvent(evt);
+ if (NS_FAILED(rv)) {
+ PL_DestroyEvent(evt);
+ } else {
+ mPendingSysColorChanged = PR_TRUE;
+ }
+ }
+}
+
+void* PR_CALLBACK
+nsPresContext::SysColorChangedInternal(PLEvent *aEvent)
+{
+ nsPresContext* pc = NS_STATIC_CAST(nsPresContext*, aEvent->owner);
+
+ pc->mPendingSysColorChanged = PR_FALSE;
+
+ if (pc->mLookAndFeel && sLookAndFeelChanged) {
// Don't use the cached values for the system colors
- mLookAndFeel->LookAndFeelChanged();
+ pc->mLookAndFeel->LookAndFeelChanged();
+ sLookAndFeelChanged = PR_FALSE;
}
-
+
// Reset default background and foreground colors for the document since
// they may be using system colors
- GetDocumentColorPreferences();
+ pc->GetDocumentColorPreferences();
// Clear out all of the style data since it may contain RGB values
// which originated from system colors.
@@ -1239,7 +1350,17 @@ nsPresContext::SysColorChanged()
// data without reflowing/updating views will lead to incorrect change hints
// later, because when generating change hints, any style structs which have
// been cleared and not reread are assumed to not be used at all.
- ClearStyleDataAndReflow();
+ pc->ClearStyleDataAndReflow();
+
+ return nsnull;
+}
+
+void PR_CALLBACK
+nsPresContext::DestroySysColorChangeEvt(PLEvent* aEvent)
+{
+ nsPresContext* pc = NS_STATIC_CAST(nsPresContext*, aEvent->owner);
+ NS_RELEASE(pc);
+ delete aEvent;
}
void
Index: layout/base/nsPresContext.h
===================================================================
RCS file: /cvsroot/mozilla/layout/base/nsPresContext.h,v
retrieving revision 3.150.4.3
diff -d -u -p -r3.150.4.3 nsPresContext.h
--- layout/base/nsPresContext.h 29 Aug 2007 23:07:47 -0000 3.150.4.3
+++ layout/base/nsPresContext.h 19 Sep 2008 16:33:31 -0000
@@ -56,6 +56,7 @@
#include "nsCRT.h"
#include "nsIPrintSettings.h"
#include "nsPropertyTable.h"
+#include "plevent.h"
#ifdef IBMBIDI
class nsBidiPresUtils;
#endif // IBMBIDI
@@ -76,6 +77,7 @@ class nsIAtom;
class nsIEventStateManager;
class nsIURI;
class nsILookAndFeel;
+class nsIEventQueueService;
class nsICSSPseudoComparator;
class nsIAtom;
struct nsStyleStruct;
@@ -630,6 +632,14 @@ public:
PRBool IsChrome();
protected:
+ static NS_HIDDEN_(void*) PR_CALLBACK ThemeChangedInternal(PLEvent* aEvent);
+ static NS_HIDDEN_(void*) PR_CALLBACK SysColorChangedInternal(PLEvent* aEvent);
+ static NS_HIDDEN_(void) PR_CALLBACK DestroyThemeChangeEvt(PLEvent* aEvent);
+ static NS_HIDDEN_(void) PR_CALLBACK DestroySysColorChangeEvt(PLEvent* aEvent);
+
+ friend void* PR_CALLBACK ThemeChangedInternal(PLEvent* aEvent);
+ friend void* PR_CALLBACK SysColorChangedInternal(PLEvent* aEvent);
+
NS_HIDDEN_(void) SetImgAnimations(nsIContent *aParent, PRUint16 aMode);
NS_HIDDEN_(void) GetDocumentColorPreferences();
@@ -657,6 +667,7 @@ protected:
// from gfx back to layout.
nsIEventStateManager* mEventManager; // [STRONG]
nsILookAndFeel* mLookAndFeel; // [STRONG]
+ nsIEventQueueService *mEventQueueService; // [STRONG]
nsIAtom* mMedium; // initialized by subclass ctors;
// weak pointer to static atom
@@ -727,6 +738,8 @@ protected:
unsigned mCanPaginatedScroll : 1;
unsigned mDoScaledTwips : 1;
unsigned mEnableJapaneseTransform : 1;
+ unsigned mPendingSysColorChanged : 1;
+ unsigned mPendingThemeChanged : 1;
#ifdef IBMBIDI
unsigned mIsVisual : 1;
unsigned mIsBidiSystem : 1;

View File

@ -1,283 +0,0 @@
diff -pruN -x '.moz*' -x .libs -x .deps -x dist -x 'config*' -x 'firefox*' -x '*a' -x '*so' -x '*o' -x build -x '*html' mozilla.orig/gfx/src/gtk/nsFontMetricsXft.cpp mozilla/gfx/src/gtk/nsFontMetricsXft.cpp
--- mozilla.orig/gfx/src/gtk/nsFontMetricsXft.cpp 2006-04-25 08:58:36.000000000 +0900
+++ mozilla/gfx/src/gtk/nsFontMetricsXft.cpp 2007-02-08 01:50:05.000000000 +0900
@@ -227,10 +227,14 @@ static nsresult EnumFontsXft (nsIAto
static void ConvertCharToUCS4 (const char *aString,
PRUint32 aLength,
+ PRUint32 aStart,
+ PRUint32 aEnd,
nsAutoFcChar32Buffer &aOutBuffer,
PRUint32 *aOutLen);
static void ConvertUnicharToUCS4 (const PRUnichar *aString,
PRUint32 aLength,
+ PRUint32 aStart,
+ PRUint32 aEnd,
nsAutoFcChar32Buffer &aOutBuffer,
PRUint32 *aOutLen);
static nsresult ConvertUCS4ToCustom (FcChar32 *aSrc, PRUint32 aSrcLen,
@@ -507,7 +511,7 @@ nsFontMetricsXft::GetWidth(const PRUnich
return NS_OK;
}
- gint rawWidth = RawGetWidth(aString, aLength);
+ gint rawWidth = RawGetWidth(aString, aLength, 0, aLength);
float f;
f = mDeviceContext->DevUnitsToAppUnits();
@@ -533,7 +537,7 @@ nsFontMetricsXft::GetTextDimensions(cons
return NS_OK;
nsresult rv;
- rv = EnumerateGlyphs(aString, aLength,
+ rv = EnumerateGlyphs(aString, aLength, 0, aLength,
&nsFontMetricsXft::TextDimensionsCallback,
&aDimensions);
@@ -608,7 +612,7 @@ nsFontMetricsXft::DrawString(const char
nsAutoDrawSpecBuffer drawBuffer(data.draw, &data.color);
data.drawBuffer = &drawBuffer;
- return EnumerateGlyphs(aString, aLength,
+ return EnumerateGlyphs(aString, aLength, 0, aLength,
&nsFontMetricsXft::DrawStringCallback, &data);
}
@@ -638,7 +642,7 @@ nsFontMetricsXft::DrawString(const PRUni
nsAutoDrawSpecBuffer drawBuffer(data.draw, &data.color);
data.drawBuffer = &drawBuffer;
- return EnumerateGlyphs(aString, aLength,
+ return EnumerateGlyphs(aString, aLength, 0, aLength,
&nsFontMetricsXft::DrawStringCallback, &data);
}
@@ -662,7 +666,7 @@ nsFontMetricsXft::GetBoundingMetrics(con
data.firstTime = PR_TRUE;
nsresult rv;
- rv = EnumerateGlyphs(aString, aLength,
+ rv = EnumerateGlyphs(aString, aLength, 0, aLength,
&nsFontMetricsXft::BoundingMetricsCallback, &data);
NS_ENSURE_SUCCESS(rv, rv);
@@ -700,7 +704,7 @@ nsFontMetricsXft::GetBoundingMetrics(con
data.firstTime = PR_TRUE;
nsresult rv;
- rv = EnumerateGlyphs(aString, aLength,
+ rv = EnumerateGlyphs(aString, aLength, 0, aLength,
&nsFontMetricsXft::BoundingMetricsCallback, &data);
NS_ENSURE_SUCCESS(rv, rv);
@@ -758,7 +762,17 @@ nsFontMetricsXft::GetRangeWidth(const PR
PRUint32 aEnd,
PRUint32 &aWidth)
{
- return NS_ERROR_NOT_IMPLEMENTED;
+ if (!aLength) {
+ aWidth = 0;
+ return NS_OK;
+ }
+
+ gint rawWidth = RawGetWidth(aText, aLength, aStart, aEnd);
+ float f = mDeviceContext->DevUnitsToAppUnits();
+
+ aWidth = NSToCoordRound(rawWidth * f);
+
+ return NS_OK;
}
nsresult
@@ -768,7 +782,17 @@ nsFontMetricsXft::GetRangeWidth(const ch
PRUint32 aEnd,
PRUint32 &aWidth)
{
- return NS_ERROR_NOT_IMPLEMENTED;
+ if (!aLength) {
+ aWidth = 0;
+ return NS_OK;
+ }
+
+ gint rawWidth = RawGetWidth(aText, aLength, aStart, aEnd);
+ float f = mDeviceContext->DevUnitsToAppUnits();
+
+ aWidth = NSToCoordRound(rawWidth * f);
+
+ return NS_OK;
}
PRUint32
@@ -850,12 +874,12 @@ nsFontMetricsXft::CacheFontMetrics(void)
// mSpaceWidth (width of a space)
gint rawWidth;
PRUnichar unispace(' ');
- rawWidth = RawGetWidth(&unispace, 1);
+ rawWidth = RawGetWidth(&unispace, 1, 0, 1);
mSpaceWidth = NSToCoordRound(rawWidth * f);
// mAveCharWidth (width of an 'average' char)
PRUnichar xUnichar('x');
- rawWidth = RawGetWidth(&xUnichar, 1);
+ rawWidth = RawGetWidth(&xUnichar, 1, 0, 1);
mAveCharWidth = NSToCoordRound(rawWidth * f);
// mXHeight (height of an 'x' character)
@@ -1226,12 +1250,27 @@ nsFontMetricsXft::DoMatch(PRBool aMatchA
}
gint
-nsFontMetricsXft::RawGetWidth(const PRUnichar* aString, PRUint32 aLength)
+nsFontMetricsXft::RawGetWidth(const PRUnichar* aString, PRUint32 aLength, PRUint32 aStart, PRUint32 aEnd)
+{
+ nscoord width = 0;
+ nsresult rv;
+
+ rv = EnumerateGlyphs(aString, aLength, aStart, aEnd,
+ &nsFontMetricsXft::GetWidthCallback, &width);
+
+ if (NS_FAILED(rv))
+ width = 0;
+
+ return width;
+}
+
+gint
+nsFontMetricsXft::RawGetWidth(const char* aString, PRUint32 aLength, PRUint32 aStart, PRUint32 aEnd)
{
nscoord width = 0;
nsresult rv;
- rv = EnumerateGlyphs(aString, aLength,
+ rv = EnumerateGlyphs(aString, aLength, aStart, aEnd,
&nsFontMetricsXft::GetWidthCallback, &width);
if (NS_FAILED(rv))
@@ -1457,6 +1496,8 @@ nsFontMetricsXft::EnumerateXftGlyphs(con
nsresult
nsFontMetricsXft::EnumerateGlyphs(const PRUnichar *aString,
PRUint32 aLen,
+ PRUint32 aStart,
+ PRUint32 aEnd,
GlyphEnumeratorCallback aCallback,
void *aCallbackData)
{
@@ -1465,7 +1506,7 @@ nsFontMetricsXft::EnumerateGlyphs(const
NS_ENSURE_TRUE(aLen, NS_OK);
- ConvertUnicharToUCS4(aString, aLen, charBuffer, &len);
+ ConvertUnicharToUCS4(aString, aLen, aStart, aEnd, charBuffer, &len);
if (!len)
return NS_ERROR_OUT_OF_MEMORY;
@@ -1475,6 +1516,8 @@ nsFontMetricsXft::EnumerateGlyphs(const
nsresult
nsFontMetricsXft::EnumerateGlyphs(const char *aString,
PRUint32 aLen,
+ PRUint32 aStart,
+ PRUint32 aEnd,
GlyphEnumeratorCallback aCallback,
void *aCallbackData)
{
@@ -1484,7 +1527,7 @@ nsFontMetricsXft::EnumerateGlyphs(const
NS_ENSURE_TRUE(aLen, NS_OK);
// Convert the incoming string into an array of UCS4 chars
- ConvertCharToUCS4(aString, aLen, charBuffer, &len);
+ ConvertCharToUCS4(aString, aLen, aStart, aEnd, charBuffer, &len);
if (!len)
return NS_ERROR_OUT_OF_MEMORY;
@@ -2343,7 +2386,7 @@ EnumFontsXft(nsIAtom* aLangGroup, const
/* static */
void
-ConvertCharToUCS4(const char *aString, PRUint32 aLength,
+ConvertCharToUCS4(const char *aString, PRUint32 aLength, PRUint32 aStart, PRUint32 aEnd,
nsAutoFcChar32Buffer &aOutBuffer, PRUint32 *aOutLen)
{
*aOutLen = 0;
@@ -2352,19 +2395,21 @@ ConvertCharToUCS4(const char *aString, P
if (!aOutBuffer.EnsureElemCapacity(aLength))
return;
outBuffer = aOutBuffer.get();
+ if (aEnd > aLength)
+ aEnd = aLength;
- for (PRUint32 i = 0; i < aLength; ++i) {
- outBuffer[i] = PRUint8(aString[i]); // to convert char >= 0x80 correctly
+ for (PRUint32 i = aStart; i < aLength && i < aEnd; ++i) {
+ outBuffer[i - aStart] = PRUint8(aString[i]); // to convert char >= 0x80 correctly
}
- *aOutLen = aLength;
+ *aOutLen = aEnd - aStart;
}
// Convert the incoming string into an array of UCS4 chars
/* static */
void
-ConvertUnicharToUCS4(const PRUnichar *aString, PRUint32 aLength,
+ConvertUnicharToUCS4(const PRUnichar *aString, PRUint32 aLength, PRUint32 aStart, PRUint32 aEnd,
nsAutoFcChar32Buffer &aOutBuffer, PRUint32 *aOutLen)
{
*aOutLen = 0;
@@ -2378,7 +2423,7 @@ ConvertUnicharToUCS4(const PRUnichar *aS
// Walk the passed in string looking for surrogates to convert to
// their full ucs4 representation.
- for (PRUint32 i = 0; i < aLength; ++i) {
+ for (PRUint32 i = aStart; i < aLength && i < aEnd; ++i) {
PRUnichar c = aString[i];
// Optimized for the non-surrogate case
@@ -2693,12 +2738,12 @@ ConvertUCS4ToCustom(FcChar32 *aSrc, PRU
#endif
// Convert 16bit custom font codes to UCS4
ConvertUnicharToUCS4(NS_REINTERPRET_CAST(PRUnichar *, med),
- medLen >> 1, aResult, &aDestLen);
+ medLen >> 1, 0, medLen >> 1, aResult, &aDestLen);
rv = aDestLen ? rv : NS_ERROR_OUT_OF_MEMORY;
}
else {
// Convert 8bit custom font codes to UCS4
- ConvertCharToUCS4(med, medLen, aResult, &aDestLen);
+ ConvertCharToUCS4(med, medLen, 0, medLen, aResult, &aDestLen);
rv = aDestLen ? rv : NS_ERROR_OUT_OF_MEMORY;
}
diff -pruN -x '.moz*' -x .libs -x .deps -x dist -x 'config*' -x 'firefox*' -x '*a' -x '*so' -x '*o' -x build -x '*html' mozilla.orig/gfx/src/gtk/nsFontMetricsXft.h mozilla/gfx/src/gtk/nsFontMetricsXft.h
--- mozilla.orig/gfx/src/gtk/nsFontMetricsXft.h 2005-05-03 05:48:30.000000000 +0900
+++ mozilla/gfx/src/gtk/nsFontMetricsXft.h 2007-02-08 01:38:27.000000000 +0900
@@ -259,7 +259,13 @@ private:
void DoMatch (PRBool aMatchAll);
gint RawGetWidth (const PRUnichar* aString,
- PRUint32 aLength);
+ PRUint32 aLength,
+ PRUint32 aStart,
+ PRUint32 aEnd);
+ gint RawGetWidth (const char* aString,
+ PRUint32 aLength,
+ PRUint32 aStart,
+ PRUint32 aEnd);
nsresult SetupMiniFont (void);
nsresult DrawUnknownGlyph (FcChar32 aChar,
nscoord aX,
@@ -272,10 +278,14 @@ private:
void *aCallbackData);
nsresult EnumerateGlyphs (const char *aString,
PRUint32 aLen,
+ PRUint32 aStart,
+ PRUint32 aEnd,
GlyphEnumeratorCallback aCallback,
void *aCallbackData);
nsresult EnumerateGlyphs (const PRUnichar *aString,
PRUint32 aLen,
+ PRUint32 aStart,
+ PRUint32 aEnd,
GlyphEnumeratorCallback aCallback,
void *aCallbackData);
void PrepareToDraw (nsRenderingContextGTK *aContext,

View File

@ -1,19 +0,0 @@
Index: mozilla/layout/build/Makefile.in
===================================================================
RCS file: /cvsroot/mozilla/layout/build/Makefile.in,v
retrieving revision 1.127.8.7
diff -d -u -p -r1.127.8.7 Makefile.in
--- mozilla/layout/build/Makefile.in 17 Jul 2006 19:05:13 -0000 1.127.8.7
+++ mozilla/layout/build/Makefile.in 10 Oct 2006 04:29:16 -0000
@@ -240,6 +240,11 @@ EXTRA_DSO_LDOPTS += \
$(NULL)
endif
+# Add explicit X11 dependency when building against X11 toolkits
+ifneq (,$(filter gtk gtk2 qt xlib,$(MOZ_WIDGET_TOOLKIT)))
+EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) -lXrender
+endif
+
include $(topsrcdir)/config/rules.mk
LOCAL_INCLUDES += -I$(srcdir)/../base \

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,97 +0,0 @@
Index: mozilla/uriloader/exthandler/unix/nsOSHelperAppService.cpp
===================================================================
RCS file: /cvsroot/mozilla/uriloader/exthandler/unix/nsOSHelperAppService.cpp,v
retrieving revision 1.58.20.1
retrieving revision 1.58
diff -d -u -p -r1.58.20.1 -r1.58
--- mozilla/uriloader/exthandler/unix/nsOSHelperAppService.cpp 16 Apr 2007 18:54:53 -0000 1.58.20.1
+++ mozilla/uriloader/exthandler/unix/nsOSHelperAppService.cpp 25 Oct 2004 07:46:01 -0000 1.58
@@ -1506,8 +1506,13 @@ nsOSHelperAppService::GetFromType(const
nsDependentSubstring majorType(majorTypeStart, majorTypeEnd);
nsDependentSubstring minorType(minorTypeStart, minorTypeEnd);
+ nsAutoString extensions, mime_types_description;
+ LookUpExtensionsAndDescription(majorType,
+ minorType,
+ extensions,
+ mime_types_description);
+
- // First check the user's private mailcap file
nsAutoString mailcap_description, handler, mozillaFlags;
DoLookUpHandlerAndDescription(majorType,
minorType,
@@ -1516,46 +1521,23 @@ nsOSHelperAppService::GetFromType(const
mailcap_description,
mozillaFlags,
PR_TRUE);
-
- LOG(("Private Handler/Description results: handler='%s', description='%s'\n",
- NS_LossyConvertUTF16toASCII(handler).get(),
- NS_LossyConvertUTF16toASCII(mailcap_description).get()));
+
+ if (handler.IsEmpty() && extensions.IsEmpty() &&
+ mailcap_description.IsEmpty() && mime_types_description.IsEmpty()) {
+ // No useful data yet
+
#ifdef MOZ_WIDGET_GTK2
- nsMIMEInfoBase *gnomeInfo = nsnull;
- if (handler.IsEmpty()) {
- // No useful data yet. Check the GNOME registry. Unfortunately, newer
- // GNOME versions no longer have type-to-extension mappings, so we might
- // get back a MIMEInfo without any extensions set. In that case we'll have
- // to look in our mime.types files for the extensions.
LOG(("Looking in GNOME registry\n"));
- gnomeInfo = nsGNOMERegistry::GetFromType(aMIMEType.get()).get();
- if (gnomeInfo && gnomeInfo->HasExtensions()) {
- LOG(("Got MIMEInfo from GNOME registry, and it has extensions set\n"));
+ nsMIMEInfoBase *gnomeInfo = nsGNOMERegistry::GetFromType(aMIMEType.get()).get();
+ if (gnomeInfo) {
+ LOG(("Got MIMEInfo from GNOME registry\n"));
return gnomeInfo;
}
- }
#endif
-
- // Now look up our extensions
- nsAutoString extensions, mime_types_description;
- LookUpExtensionsAndDescription(majorType,
- minorType,
- extensions,
- mime_types_description);
-
-#ifdef MOZ_WIDGET_GTK2
- if (gnomeInfo) {
- LOG(("Got MIMEInfo from GNOME registry without extensions; setting them "
- "to %s\n", NS_LossyConvertUTF16toASCII(extensions).get()));
-
- NS_ASSERTION(!gnomeInfo->HasExtensions(), "How'd that happen?");
- gnomeInfo->SetFileExtensions(NS_ConvertUTF16toUTF8(extensions));
- return gnomeInfo;
}
-#endif
- if (handler.IsEmpty()) {
+ if (handler.IsEmpty() && mailcap_description.IsEmpty()) {
DoLookUpHandlerAndDescription(majorType,
minorType,
typeOptions,
@@ -1565,7 +1547,7 @@ nsOSHelperAppService::GetFromType(const
PR_FALSE);
}
- if (handler.IsEmpty()) {
+ if (handler.IsEmpty() && mailcap_description.IsEmpty()) {
DoLookUpHandlerAndDescription(majorType,
NS_LITERAL_STRING("*"),
typeOptions,
@@ -1575,7 +1557,7 @@ nsOSHelperAppService::GetFromType(const
PR_TRUE);
}
- if (handler.IsEmpty()) {
+ if (handler.IsEmpty() && mailcap_description.IsEmpty()) {
DoLookUpHandlerAndDescription(majorType,
NS_LITERAL_STRING("*"),
typeOptions,

View File

@ -1,2 +1,2 @@
1d131408b2338132a154700cc92a1d58 thunderbird-2.0.0.18-source.tar.bz2
0391bb2456dd3c8cb633152802279f4b thunderbird-langpacks-2.0.0.18-20081119.tar.bz2
91bcb8746641112642f043a81cb6d2f8 thunderbird-langpacks-3.0-20090302.tar.bz2
3a6a95040c4356139a02eab5d32b9ad1 thunderbird-3.0b2-source.tar.bz2

View File

@ -1,21 +0,0 @@
--- mozilla/uriloader/exthandler/unix/nsGNOMERegistry.cpp.foo 2004-01-05 18:38:48.000000000 -0500
+++ mozilla/uriloader/exthandler/unix/nsGNOMERegistry.cpp 2004-01-05 19:14:51.000000000 -0500
@@ -39,6 +39,7 @@
#include "nsGNOMERegistry.h"
#include "prlink.h"
#include "prmem.h"
+#include "prenv.h"
#include "nsString.h"
#include "nsIComponentManager.h"
#include "nsILocalFile.h"
@@ -137,6 +138,10 @@
} \
PR_END_MACRO
+ // Don't even use this code if an env var is set
+ if (PR_GetEnv("MOZ_DISABLE_GNOME"))
+ return;
+
// Attempt to open libgconf
gconfLib = LoadVersionedLibrary("gconf-2", ".4");
ENSURE_LIB(gconfLib);

View File

@ -1,28 +0,0 @@
--- mozilla/modules/libpref/src/init/all.js.foo 2004-06-18 13:16:32.000000000 -0400
+++ mozilla/modules/libpref/src/init/all.js 2004-06-18 13:17:28.000000000 -0400
@@ -1776,8 +1776,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.nativecode.ja", "euc-jp");
+pref("print.postscript.nativefont.ja", "Ryumin-Light-EUC-H");
+pref("print.postscript.nativecode.ko", "euc-kr");
+pref("print.postscript.nativefont.ko", "Baekmuk-Gulim-KSC-EUC-H");
pref("print.postscript.nativefont.th", "");
pref("print.postscript.nativefont.tr", "");
pref("print.postscript.nativefont.x-baltic", "");
@@ -1786,8 +1788,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.nativecode.zh-CN", "gb18030");
+pref("print.postscript.nativefont.zh-CN", "MSungGBK-Light-GBK2K-H");
+pref("print.postscript.nativecode.zh-TW", "big5");
+pref("print.postscript.nativefont.zh-TW", "ShanHeiSun-Light-B5-H");
pref("print.postscript.nativefont.zh-HK", "");
# XP_UNIX

View File

@ -1,73 +0,0 @@
Index: mozilla/mail/components/migration/src/nsProfileMigrator.cpp
===================================================================
RCS file: /cvsroot/mozilla/mail/components/migration/src/nsProfileMigrator.cpp,v
retrieving revision 1.9
diff -pu -r1.9 mozilla/mail/components/migration/src/nsProfileMigrator.cpp
--- mozilla/mail/components/migration/src/nsProfileMigrator.cpp
+++ mozilla/mail/components/migration/src/nsProfileMigrator.cpp
@@ -131,24 +131,55 @@ nsProfileMigrator::GetDefaultMailMigrato
// if we are being forced to migrate to a particular migration type, then create an instance of that migrator
// and return it.
+ NS_NAMED_LITERAL_CSTRING(migratorPrefix,
+ NS_MAILPROFILEMIGRATOR_CONTRACTID_PREFIX);
+ nsCAutoString migratorID;
if (forceMigrationType.get())
{
PRBool exists = PR_FALSE;
- nsCAutoString migratorID (NS_MAILPROFILEMIGRATOR_CONTRACTID_PREFIX);
+ migratorID = migratorPrefix;
migratorID.Append(forceMigrationType);
mailMigrator = do_CreateInstance(migratorID.get());
-
- if (mailMigrator)
+ if (!mailMigrator)
+ return NS_ERROR_NOT_AVAILABLE;
+
+ mailMigrator->GetSourceExists(&exists);
+ /* trying to force migration on a source which doesn't
+ * have any profiles.
+ */
+ if (!exists)
+ return NS_ERROR_NOT_AVAILABLE;
+ aKey = forceMigrationType;
+ return NS_OK;
+ }
+
+ #define MAX_SOURCE_LENGTH 10
+ const char sources[][MAX_SOURCE_LENGTH] = {
+ "seamonkey",
+ "oexpress",
+ "outlook",
+ "dogbert",
+ "eudora",
+ 0
+ };
+ for (PRUint32 i = 0; sources[i]; ++i)
+ {
+ migratorID = migratorPrefix;
+ migratorID.Append(sources[i]);
+ mailMigrator = do_CreateInstance(migratorID.get());
+ if (!mailMigrator)
+ continue;
+
+ PRBool exists = PR_FALSE;
+ mailMigrator->GetSourceExists(&exists);
+ if (exists)
{
- mailMigrator->GetSourceExists(&exists);
- if (exists)
- aKey = forceMigrationType;
- else
- rv = NS_ERROR_FAILURE; // trying to force migration on a source which does not have any profiles
+ mailMigrator = nsnull;
+ return NS_OK;
}
}
- return rv;
+ return NS_ERROR_NOT_AVAILABLE;
}
NS_IMETHODIMP

View File

@ -1,32 +0,0 @@
Index: mozilla/mail/components/shell/nsMailGNOMEIntegration.cpp
===================================================================
RCS file: /cvsroot/mozilla/mail/components/shell/nsMailGNOMEIntegration.cpp,v
retrieving revision 1.8.2.1
diff -d -u -p -r1.8.2.1 nsMailGNOMEIntegration.cpp
--- mozilla/mail/components/shell/nsMailGNOMEIntegration.cpp 23 Oct 2006 03:32:47 -0000 1.8.2.1
+++ mozilla/mail/components/shell/nsMailGNOMEIntegration.cpp 11 Apr 2007 18:50:02 -0000
@@ -69,7 +69,7 @@ static const char* const sFeedProtocols[
"feed"
};
-nsMailGNOMEIntegration::nsMailGNOMEIntegration(): mCheckedThisSession(PR_FALSE)
+nsMailGNOMEIntegration::nsMailGNOMEIntegration(): mCheckedThisSession(PR_TRUE)
{}
nsresult
Index: mozilla/mail/components/preferences/general.xul
===================================================================
RCS file: /cvsroot/mozilla/mail/components/preferences/general.xul,v
retrieving revision 1.4.2.9
diff -d -u -p -r1.4.2.9 general.xul
--- mozilla/mail/components/preferences/general.xul 18 Feb 2007 20:26:46 -0000 1.4.2.9
+++ mozilla/mail/components/preferences/general.xul 13 Apr 2007 19:34:19 -0000
@@ -70,7 +70,7 @@
<stringbundle id="bundlePreferences" src="chrome://messenger/locale/preferences/preferences.properties"/>
-#ifdef HAVE_SHELL_SERVICE
+#ifdef 0
<stringbundle id="bundleShell" src="chrome://messenger/locale/shellservice.properties"/>
<stringbundle id="bundleBrand" src="chrome://branding/locale/brand.properties"/>

View File

@ -1,12 +0,0 @@
diff -up mozilla/mail/app/Makefile.in.old mozilla/mail/app/Makefile.in
--- mozilla/mail/app/Makefile.in.old 2007-02-28 07:52:59.000000000 +0100
+++ mozilla/mail/app/Makefile.in 2007-09-26 16:53:51.000000000 +0200
@@ -257,7 +257,7 @@ libs:: thunderbird
$(INSTALL) $< $(DIST)/bin
install:: thunderbird
- $(SYSINSTALL) $< $(DESTDIR)$(bindir)
+ $(SYSINSTALL) $< $(DESTDIR)$(mozappdir)
GARBAGE += thunderbird
GARBAGE += $(addprefix $(DIST)/bin/defaults/pref/, all.js all-thunderbird.js channel-prefs.js mailnews.js)

View File

@ -1,61 +0,0 @@
---
security/manager/ssl/src/nsKeygenHandler.cpp | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
Index: mozilla/security/manager/ssl/src/nsKeygenHandler.cpp
===================================================================
--- mozilla.orig/security/manager/ssl/src/nsKeygenHandler.cpp 2005-07-20 21:31:22.000000000 +0200
+++ mozilla/security/manager/ssl/src/nsKeygenHandler.cpp 2008-02-02 00:08:05.000000000 +0100
@@ -70,16 +70,25 @@
//All possible key size choices.
static SECKeySizeChoiceInfo SECKeySizeChoiceList[] = {
{ nsnull, 2048 },
{ nsnull, 1024 },
{ nsnull, 0 },
};
+DERTemplate SECAlgorithmIDTemplate[] = {
+ { DER_SEQUENCE,
+ 0, NULL, sizeof(SECAlgorithmID) },
+ { DER_OBJECT_ID,
+ offsetof(SECAlgorithmID,algorithm), },
+ { DER_OPTIONAL | DER_ANY,
+ offsetof(SECAlgorithmID,parameters), },
+ { 0, }
+};
DERTemplate CERTSubjectPublicKeyInfoTemplate[] = {
{ DER_SEQUENCE,
0, nsnull, sizeof(CERTSubjectPublicKeyInfo) },
{ DER_INLINE,
offsetof(CERTSubjectPublicKeyInfo,algorithm),
SECAlgorithmIDTemplate, },
{ DER_BIT_STRING,
@@ -90,26 +99,16 @@
DERTemplate CERTPublicKeyAndChallengeTemplate[] =
{
{ DER_SEQUENCE, 0, nsnull, sizeof(CERTPublicKeyAndChallenge) },
{ DER_ANY, offsetof(CERTPublicKeyAndChallenge,spki), },
{ DER_IA5_STRING, offsetof(CERTPublicKeyAndChallenge,challenge), },
{ 0, }
};
-DERTemplate SECAlgorithmIDTemplate[] = {
- { DER_SEQUENCE,
- 0, NULL, sizeof(SECAlgorithmID) },
- { DER_OBJECT_ID,
- offsetof(SECAlgorithmID,algorithm), },
- { DER_OPTIONAL | DER_ANY,
- offsetof(SECAlgorithmID,parameters), },
- { 0, }
-};
-
const SEC_ASN1Template SECKEY_PQGParamsTemplate[] = {
{ SEC_ASN1_SEQUENCE, 0, NULL, sizeof(PQGParams) },
{ SEC_ASN1_INTEGER, offsetof(PQGParams,prime) },
{ SEC_ASN1_INTEGER, offsetof(PQGParams,subPrime) },
{ SEC_ASN1_INTEGER, offsetof(PQGParams,base) },
{ 0, }
};

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,9 @@
. $topsrcdir/mail/config/mozconfig
mk_add_options MOZ_CO_PROJECT=mail
ac_add_options --enable-application=mail
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir-tb/
mk_add_options AUTOCONF=autoconf-2.13
#ac_add_options --with-system-png
ac_add_options --prefix="$PREFIX"
ac_add_options --libdir="$LIBDIR"
@ -6,16 +11,16 @@ ac_add_options --with-system-nspr
ac_add_options --with-system-nss
ac_add_options --with-system-jpeg
ac_add_options --with-system-zlib
ac_add_options --with-system-png
ac_add_options --with-pthreads
ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --disable-installer
ac_add_options --enable-optimize="$RPM_OPT_FLAGS"
ac_add_options --enable-xinerama
ac_add_options --enable-default-toolkit=gtk2
ac_add_options --enable-default-toolkit=cairo-gtk2
ac_add_options --disable-xprint
ac_add_options --disable-strip
ac_add_options --disable-install-strip
ac_add_options --enable-pango
ac_add_options --enable-system-cairo
ac_add_options --enable-svg

View File

@ -7,18 +7,18 @@
Summary: Mozilla Thunderbird mail/newsgroup client
Name: thunderbird
Version: 2.0.0.18
Release: 3%{?dist}
Version: 3.0
Release: 1.beta2%{?dist}
URL: http://www.mozilla.org/projects/thunderbird/
License: MPLv1.1 or GPLv2+ or LGPLv2+
Group: Applications/Internet
%if %{official_branding}
%define tarball thunderbird-%{version}-source.tar.bz2
%define tarball thunderbird-%{version}b2-source.tar.bz2
%else
%define tarball thunderbird-2.0.0.0rc1-source.tar.bz2
%define tarball thunderbird-3.0b2-source.tar.bz2
%endif
Source0: %{tarball}
Source1: thunderbird-langpacks-%{version}-20081119.tar.bz2
Source1: thunderbird-langpacks-%{version}-20090302.tar.bz2
Source10: thunderbird-mozconfig
Source11: thunderbird-mozconfig-branded
Source12: thunderbird-redhat-default-prefs.js
@ -28,35 +28,8 @@ Source22: thunderbird.png
Source30: thunderbird-open-browser.sh
Source100: find-external-requires
# Build patches
Patch1: firefox-2.0-link-layout.patch
Patch2: firefox-1.0-prdtoa.patch
Patch10: thunderbird-0.7.3-psfonts.patch
Patch11: thunderbird-0.7.3-gnome-uriloader.patch
# customization patches
Patch24: thunderbird-2.0-default-applications.patch
# local bugfixes
Patch40: firefox-1.5-bullet-bill.patch
Patch41: firefox-2.0.0.4-undo-uriloader.patch
Patch42: firefox-1.1-uriloader.patch
# font system fixes
Patch83: firefox-1.5-pango-cursor-position.patch
Patch84: firefox-2.0-pango-printing.patch
Patch85: firefox-1.5-pango-cursor-position-more.patch
Patch86: firefox-1.5-pango-justified-range.patch
Patch87: firefox-1.5-pango-underline.patch
Patch88: firefox-1.5-xft-rangewidth.patch
Patch89: firefox-2.0-pango-ligatures.patch
# Other
Patch102: firefox-1.5-theme-change.patch
Patch103: thunderbird-1.5-profile-migrator.patch
Patch111: thunderbird-path.patch
Patch112: thunderbird-2.0-enable-debug.patch
Patch1: mozilla-jemalloc.patch
Patch2: thunderbird-shared-error.patch
%if %{official_branding}
# Required by Mozilla Corporation
@ -87,7 +60,7 @@ BuildRequires: libXt-devel
BuildRequires: libXrender-devel
Requires: desktop-file-utils >= %{desktop_file_utils_version}
%define mozappdir %{_libdir}/thunderbird-%{version}
%define mozappdir %{_libdir}/thunderbird-%{version}b2
AutoProv: 0
%define _use_internal_dependency_generator 0
@ -100,39 +73,10 @@ Mozilla Thunderbird is a standalone mail and newsgroup client.
%prep
%setup -q -c
cd mozilla
#cd mozilla
%patch1 -p1 -b .link-layout
%patch2 -p0
%patch10 -p1 -b .psfonts
%patch11 -p1 -b .gnome-uriloader
%patch24 -p1 -b .default-applications
%patch40 -p1
%patch41 -p1
%patch42 -p0
# font system fixes
%patch83 -p1 -b .pango-cursor-position
%patch84 -p0 -b .pango-printing
%patch85 -p1 -b .pango-cursor-position-more
%patch86 -p1 -b .pango-justified-range
%patch87 -p1 -b .pango-underline
%patch88 -p1 -b .nopangoxft2
%patch89 -p1 -b .pango-ligatures
pushd gfx/src/ps
# This sort of sucks, but it works for now.
ln -s ../gtk/nsFontMetricsPango.h .
ln -s ../gtk/nsFontMetricsPango.cpp .
ln -s ../gtk/mozilla-decoder.h .
ln -s ../gtk/mozilla-decoder.cpp .
popd
%patch102 -p0 -b .theme-change
%patch103 -p1 -b .profile-migrator
%patch111 -p1 -b .path
%patch112 -p1 -b .debug
%patch1 -p0 -b .jemalloc
%patch2 -p1 -b .shared-error
%if %{official_branding}
# Required by Mozilla Corporation
@ -154,7 +98,7 @@ popd
#===============================================================================
%build
cd mozilla
#cd mozilla
# Build with -Os as it helps the browser; also, don't override mozilla's warning
# level; they use -Wall but disable a few warnings that show up _everywhere_
@ -178,10 +122,12 @@ make -f client.mk build
%install
%{__rm} -rf $RPM_BUILD_ROOT
cd mozilla
#cd mozilla
cd objdir-tb
DESTDIR=$RPM_BUILD_ROOT make install
cd -
%{__mkdir_p} $RPM_BUILD_ROOT{%{_libdir},%{_bindir},%{_datadir}/applications,%{_datadir}/icons/hicolor/48x48/apps}
%{__install} -p -D %{SOURCE22} $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}.png
@ -192,20 +138,22 @@ desktop-file-install --vendor mozilla \
--add-category Email \
%{SOURCE20}
# set up the thunderbird start script
%{__cat} %{SOURCE21} | %{__sed} -e 's,TBIRD_VERSION,%{version},g' > \
rm -f $RPM_BUILD_ROOT/%{_bindir}/thunderbird
%{__cat} %{SOURCE21} | %{__sed} -e 's,TBIRD_VERSION,%{version}b2,g' > \
$RPM_BUILD_ROOT%{_bindir}/thunderbird
%{__chmod} 755 $RPM_BUILD_ROOT/%{_bindir}/thunderbird
install -m755 %{SOURCE30} $RPM_BUILD_ROOT/%{mozappdir}/open-browser.sh
install -Dm755 %{SOURCE30} $RPM_BUILD_ROOT/%{mozappdir}/open-browser.sh
%{__sed} -i -e 's|LIBDIR|%{_libdir}|g' $RPM_BUILD_ROOT/%{mozappdir}/open-browser.sh
# set up our default preferences
%{__cat} %{SOURCE12} | %{__sed} -e 's,THUNDERBIRD_RPM_VR,%{version}-%{release},g' \
-e 's,COMMAND,%{mozappdir}/open-browser.sh,g' > \
$RPM_BUILD_ROOT/rh-default-prefs
%{__cp} $RPM_BUILD_ROOT/rh-default-prefs $RPM_BUILD_ROOT/%{mozappdir}/greprefs/all-redhat.js
%{__cp} $RPM_BUILD_ROOT/rh-default-prefs $RPM_BUILD_ROOT/%{mozappdir}/defaults/pref/all-redhat.js
%{__install} -D $RPM_BUILD_ROOT/rh-default-prefs $RPM_BUILD_ROOT/%{mozappdir}/greprefs/all-redhat.js
%{__install} -D $RPM_BUILD_ROOT/rh-default-prefs $RPM_BUILD_ROOT/%{mozappdir}/defaults/pref/all-redhat.js
%{__rm} $RPM_BUILD_ROOT/rh-default-prefs
%{__rm} -f $RPM_BUILD_ROOT%{_bindir}/thunderbird-config
@ -217,6 +165,8 @@ cd -
%{__mkdir_p} $RPM_BUILD_ROOT%{mozappdir}/chrome/icons/default/
%{__cp} other-licenses/branding/%{name}/default.xpm \
$RPM_BUILD_ROOT%{mozappdir}/chrome/icons/default/
%{__mkdir_p} $RPM_BUILD_ROOT%{mozappdir}/icons/
%{__cp} other-licenses/branding/%{name}/default.xpm \
$RPM_BUILD_ROOT%{mozappdir}/icons/
@ -224,7 +174,9 @@ cd -
%{__mkdir_p} $RPM_BUILD_ROOT%{_libdir}/mozilla/plugins
# Install langpacks
touch ../%{name}.lang
%{__rm} -f %{name}.lang # Delete for --short-circuit option
touch %{name}.lang
%{__mkdir_p} $RPM_BUILD_ROOT%{mozappdir}/extensions
%{__tar} xjf %{SOURCE1}
for langpack in `ls thunderbird-langpacks/*.xpi`; do
@ -250,19 +202,22 @@ for langpack in `ls thunderbird-langpacks/*.xpi`; do
language=`echo $language | sed -e 's/-/_/g'`
extensiondir=`echo $extensiondir | sed -e "s,^$RPM_BUILD_ROOT,,"`
echo "%%lang($language) $extensiondir" >> ../%{name}.lang
echo "%%lang($language) $extensiondir" >> %{name}.lang
done
%{__rm} -rf thunderbird-langpacks
# Copy over the LICENSE
cd mozilla
install -c -m 644 LICENSE $RPM_BUILD_ROOT%{mozappdir}
cd -
# Use the system hunspell dictionaries
%{__rm} -rf $RPM_BUILD_ROOT/%{mozappdir}/dictionaries
ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{mozappdir}/dictionaries
# ghost files
%{__mkdir_p} $RPM_BUILD_ROOT%{mozappdir}/components
touch $RPM_BUILD_ROOT%{mozappdir}/components/compreg.dat
touch $RPM_BUILD_ROOT%{mozappdir}/components/xpti.dat
@ -304,31 +259,39 @@ fi
%{mozappdir}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
%{mozappdir}/greprefs
%{mozappdir}/icons
%{mozappdir}/init.d
%{mozappdir}/isp
%{mozappdir}/mozilla-xremote-client
%{mozappdir}/open-browser.sh
%{mozappdir}/regxpcom
%{mozappdir}/res
%{mozappdir}/run-mozilla.sh
%{mozappdir}/thunderbird-bin
%{mozappdir}/thunderbird
%{mozappdir}/updater
%{mozappdir}/*.so
%exclude %{_includedir}/%{name}-%{version}
%exclude %{_datadir}/idl/%{name}-%{version}
%exclude %{_libdir}/pkgconfig/*.pc
%exclude %{mozappdir}/TestGtkEmbed
%exclude %{mozappdir}/xpidl
%exclude %{mozappdir}/xpcshell
%exclude %{mozappdir}/xpt_dump
%exclude %{mozappdir}/xpt_link
%exclude %{mozappdir}/xpicleanup
%dir %{mozappdir}/modules
%{mozappdir}/modules/*.jsm
%{mozappdir}/modules/*.js
%dir %{mozappdir}/modules/gloda
%{mozappdir}/modules/gloda/*.js
%dir %{mozappdir}/modules/activity
%{mozappdir}/modules/activity/*.js
%{mozappdir}/README.txt
%{mozappdir}/platform.ini
%{mozappdir}/updater.ini
%{mozappdir}/application.ini
%exclude %{mozappdir}/LICENSE.txt
%exclude %{mozappdir}/license.html
%exclude %{mozappdir}/dependentlibs.list
%exclude %{mozappdir}/removed-files
#===============================================================================
%changelog
* Mon Mar 2 2009 Jan Horak <jhorak@redhat.com> - 3.0-1.beta2
- Update to 3.0 beta2
- Removed creation of thunderbird start script by rpmbuild
- Added Patch2 to build correctly when building with --enable-shared option
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0.18-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild