rpms/seamonkey/devel firefox-1.5-dnd-nograb.patch, NONE, 1.1 firefox-1.5-embedwindow-visibility.patch, NONE, 1.1 firefox-1.5-pango-cursor-position.patch, NONE, 1.1 firefox-1.5-theme-change.patch, NONE, 1.1 firefox-2.0-link-layout.patch, NONE, 1.1 firefox-2.0-pango-printing.patch, NONE, 1.1 mozilla-nspr-packages.patch, 1.1, 1.2 seamonkey-fedora-home-page.patch, 1.1, 1.2 seamonkey.spec, 1.15, 1.16

Kai Engert (kengert) fedora-extras-commits at redhat.com
Wed Feb 7 07:53:28 UTC 2007


Author: kengert

Update of /cvs/extras/rpms/seamonkey/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1422

Modified Files:
	mozilla-nspr-packages.patch seamonkey-fedora-home-page.patch 
	seamonkey.spec 
Added Files:
	firefox-1.5-dnd-nograb.patch 
	firefox-1.5-embedwindow-visibility.patch 
	firefox-1.5-pango-cursor-position.patch 
	firefox-1.5-theme-change.patch firefox-2.0-link-layout.patch 
	firefox-2.0-pango-printing.patch 
Log Message:
* Wed Feb 07 2007 Kai Engert <kengert at redhat.com> 1.1-1
- Update to SeaMonkey 1.1
- Pull in patches used by Firefox Fedora RPM package.
- Fix the DND implementation to not grab, so it works with new GTK+.
- Fix upgrade path from FC-5 by obsoleting the seamonkey subset
  packages which recently obsoleted mozilla in FC-5.


firefox-1.5-dnd-nograb.patch:

--- NEW FILE firefox-1.5-dnd-nograb.patch ---
See https://bugzilla.mozilla.org/show_bug.cgi?id=367203

Index: mozilla/widget/src/gtk2/nsDragService.cpp
===================================================================
RCS file: /cvsroot/mozilla/widget/src/gtk2/nsDragService.cpp,v
retrieving revision 1.9.10.1
diff -d -u -p -r1.9.10.1 nsDragService.cpp
--- mozilla/widget/src/gtk2/nsDragService.cpp	22 Jun 2006 21:37:45 -0000	1.9.10.1
+++ mozilla/widget/src/gtk2/nsDragService.cpp	31 Jan 2007 04:27:43 -0000
@@ -799,7 +799,6 @@ nsDragService::IsTargetContextList(void)
 void
 nsDragService::GetTargetDragData(GdkAtom aFlavor)
 {
-    gtk_grab_add(mHiddenWidget);
     PR_LOG(sDragLm, PR_LOG_DEBUG, ("getting data flavor %d\n", aFlavor));
     PR_LOG(sDragLm, PR_LOG_DEBUG, ("mLastWidget is %p and mLastContext is %p\n",
                                    mTargetWidget, mTargetDragContext));
@@ -817,7 +816,6 @@ nsDragService::GetTargetDragData(GdkAtom
         gtk_main_iteration();
     }
     PR_LOG(sDragLm, PR_LOG_DEBUG, ("finished inner iteration\n"));
-    gtk_grab_remove(mHiddenWidget);
 }
 
 void

firefox-1.5-embedwindow-visibility.patch:

--- NEW FILE firefox-1.5-embedwindow-visibility.patch ---
Index: embedding/browser/gtk/src/EmbedWindow.cpp
===================================================================
RCS file: /cvsroot/mozilla/embedding/browser/gtk/src/EmbedWindow.cpp,v
retrieving revision 1.31
diff -d -u -p -r1.31 EmbedWindow.cpp
--- embedding/browser/gtk/src/EmbedWindow.cpp     17 Jan 2005 17:19:39 -0000      1.31
+++ embedding/browser/gtk/src/EmbedWindow.cpp     27 Sep 2006 00:41:38 -0000
@@ -359,7 +359,14 @@ EmbedWindow::GetSiteWindow(void **aSiteW
 NS_IMETHODIMP
 EmbedWindow::GetVisibility(PRBool *aVisibility)
 {
-  *aVisibility = mVisibility;
+  // XXX See bug 312998
+  // Work around the problem that sometimes the window
+  // is already visible even though mVisibility isn't true
+  // yet.
+  *aVisibility = mVisibility ||
+                 (!mOwner->mIsChrome &&
+                  mOwner->mOwningWidget &&
+                  GTK_WIDGET_MAPPED(mOwner->mOwningWidget));
   return NS_OK;
 }
 

firefox-1.5-pango-cursor-position.patch:

--- NEW FILE firefox-1.5-pango-cursor-position.patch ---
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;

firefox-1.5-theme-change.patch:

--- NEW FILE firefox-1.5-theme-change.patch ---
Index: layout/base/nsPresContext.cpp
===================================================================
RCS file: /cvsroot/mozilla/layout/base/nsPresContext.cpp,v
retrieving revision 3.288.12.2.4.1
diff -d -u -p -r3.288.12.2.4.1 nsPresContext.cpp
--- layout/base/nsPresContext.cpp	21 Apr 2006 23:30:50 -0000	3.288.12.2.4.1
+++ layout/base/nsPresContext.cpp	26 Sep 2006 19:26:40 -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()
 {
@@ -709,6 +724,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();
 
@@ -1180,33 +1198,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.
@@ -1222,7 +1333,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.2
diff -d -u -p -r3.150.4.2 nsPresContext.h
--- layout/base/nsPresContext.h	29 Aug 2005 16:15:39 -0000	3.150.4.2
+++ layout/base/nsPresContext.h	26 Sep 2006 19:26:40 -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;
@@ -627,6 +629,14 @@ public:
   const nscoord* GetBorderWidthTable() { return mBorderWidthTable; }
 
 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();
 
@@ -654,6 +664,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
 
@@ -724,6 +735,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;

firefox-2.0-link-layout.patch:

--- NEW FILE firefox-2.0-link-layout.patch ---
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 \

firefox-2.0-pango-printing.patch:

--- NEW FILE firefox-2.0-pango-printing.patch ---
Patch for Firefox 1.5.0.7 to add support for printing via Pango.
This also implements printing MathML via Pango, and prints bitmap
fonts too.

Authors:
	Behdad Esfahbod
	Chris Blizzard
	Akira TAGOH

Index: gfx/src/freetype/nsFreeType.cpp
===================================================================
RCS file: /cvsroot/mozilla/gfx/src/freetype/nsFreeType.cpp,v
retrieving revision 1.28
diff -u -p -d -r1.28 nsFreeType.cpp
--- gfx/src/freetype/nsFreeType.cpp	13 Jul 2005 18:21:10 -0000	1.28
+++ gfx/src/freetype/nsFreeType.cpp	23 Oct 2006 17:37:09 -0000
@@ -123,6 +123,8 @@ FtFuncList nsFreeType2::FtFuncs [] = {
 // #endif
   {"FT_Get_First_Char",       NS_FT2_OFFSET(nsFT_Get_First_Char),       PR_FALSE},
   {"FT_Get_Next_Char",        NS_FT2_OFFSET(nsFT_Get_Next_Char),        PR_FALSE},
+  {"FT_Has_PS_Glyph_Names",   NS_FT2_OFFSET(nsFT_Has_PS_Glyph_Names),   PR_FALSE},
+  {"FT_Get_Glyph_Name",       NS_FT2_OFFSET(nsFT_Get_Glyph_Name),       PR_TRUE},
   {nsnull,                    0, 0}
 };
 
@@ -388,6 +390,22 @@ nsFreeType2::GetNextChar(FT_Face face, F
 } 
 
 NS_IMETHODIMP
+nsFreeType2::HasPSGlyphNames(FT_Face face, FT_Int *result)
+{
+  // call the FreeType2 function via the function pointer
+  *result = nsFT_Has_PS_Glyph_Names(face);
+  return NS_OK;
+}
+
+NS_IMETHODIMP
+nsFreeType2::GetGlyphName(FT_Face face, FT_UInt glyph_index, FT_Pointer buffer, FT_UInt buffer_max)
+{
+  // call the FreeType2 function via the function pointer
+  FT_Error error = nsFT_Get_Glyph_Name(face, glyph_index, buffer, buffer_max);
+  return error ? NS_ERROR_FAILURE : NS_OK;
+}
+
+NS_IMETHODIMP
 nsFreeType2::SupportsExtFunc(PRBool *res)
 { 
   *res = gHasExtFunc;
Index: gfx/src/freetype/nsFreeType.h
===================================================================
RCS file: /cvsroot/mozilla/gfx/src/freetype/nsFreeType.h,v
retrieving revision 1.18
diff -u -p -d -r1.18 nsFreeType.h
--- gfx/src/freetype/nsFreeType.h	1 May 2005 17:36:19 -0000	1.18
+++ gfx/src/freetype/nsFreeType.h	23 Oct 2006 17:37:09 -0000
@@ -52,6 +52,7 @@
 #include FT_CACHE_H
 #include FT_CACHE_IMAGE_H
 #include FT_TRUETYPE_TABLES_H
+#include FT_TYPE1_TABLES_H
 #include "nsIFreeType2.h"
 
 typedef struct FT_FaceRec_*  FT_Face;
@@ -138,6 +139,8 @@ typedef FT_Error (*FT_Glyph_To_Bitmap_t)
 
 typedef FT_ULong (*FT_Get_First_Char_t)(FT_Face, FT_UInt*);
 typedef FT_ULong (*FT_Get_Next_Char_t)(FT_Face, FT_ULong, FT_UInt*);
+typedef FT_Int   (*FT_Has_PS_Glyph_Names_t)(FT_Face);
+typedef FT_Error (*FT_Get_Glyph_Name_t)(FT_Face, FT_UInt, FT_Pointer, FT_UInt);
 
 class nsFreeTypeFace;
 
@@ -193,11 +196,13 @@ protected:
 // #endif
   FT_Get_First_Char_t       nsFT_Get_First_Char;
   FT_Get_Next_Char_t        nsFT_Get_Next_Char;
+  FT_Has_PS_Glyph_Names_t   nsFT_Has_PS_Glyph_Names;
+  FT_Get_Glyph_Name_t       nsFT_Get_Glyph_Name;
 
   // this array needs to be big enough to hold all the function pointers
   // plus one extra for the null at the end
 // #ifdef MOZ_SVG
-  static FtFuncList FtFuncs[24];
+  static FtFuncList FtFuncs[28];
 // #else
 //  static FtFuncList FtFuncs[20];
 // #endif
Index: gfx/src/ps/Makefile.in
===================================================================
RCS file: /cvsroot/mozilla/gfx/src/ps/Makefile.in,v
retrieving revision 1.57.8.1
diff -d -u -p -r1.57.8.1 Makefile.in
--- gfx/src/ps/Makefile.in	17 Jun 2006 15:16:14 -0000	1.57.8.1
+++ gfx/src/ps/Makefile.in	24 Oct 2006 18:36:45 -0000
@@ -98,6 +98,15 @@ EXTRA_DSO_LDOPTS = \
 		$(MOZ_UNICHARUTIL_LIBS) \
 		$(NULL)
 
+ifdef MOZ_ENABLE_PANGO
+CPPSRCS                += \
+               nsFontMetricsPSPango.cpp \
+               mozilla-ps-decoder.cpp
+EXTRA_DSO_LDOPTS += $(MOZ_PANGO_LIBS)
+CXXFLAGS       += $(MOZ_PANGO_CFLAGS)
+CFLAGS         += $(MOZ_PANGO_CFLAGS)
+endif
+
 ifdef MOZ_ENABLE_XFT
 EXTRA_DSO_LDOPTS += \
 		$(MOZ_XFT_LIBS) \
@@ -105,7 +114,7 @@ EXTRA_DSO_LDOPTS += \
 		$(NULL)
 endif
 
-ifneq (,$(MOZ_ENABLE_FREETYPE2)$(MOZ_ENABLE_XFT))
+ifneq (,$(MOZ_ENABLE_FREETYPE2)$(MOZ_ENABLE_XFT)$(MOZ_ENABLE_PANGO))
 CPPSRCS		+= \
 		nsType1.cpp \
 		$(NULL)
Index: gfx/src/ps/mozilla-ps-decoder.cpp
===================================================================
RCS file: gfx/src/ps/mozilla-ps-decoder.cpp
diff -N gfx/src/ps/mozilla-ps-decoder.cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gfx/src/ps/mozilla-ps-decoder.cpp	23 Oct 2006 17:37:10 -0000
@@ -0,0 +1,376 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* vim:expandtab:shiftwidth=4:tabstop=4:
+ */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Christopher Blizzard
+ * <blizzard at mozilla.org>.  Portions created by the Initial Developer
+ * are Copyright (C) 2004 the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#define PANGO_ENABLE_BACKEND
+#define PANGO_ENABLE_ENGINE
+
+#include "mozilla-ps-decoder.h"
+#include <pango/pangofc-fontmap.h>
+#include <pango/pangofc-font.h>
+
+#include "nsString.h"
+#include "nsIPersistentProperties2.h"
+#include "nsNetUtil.h"
+#include "nsReadableUtils.h"
+#include "nsICharsetConverterManager.h"
+#include "nsICharRepresentable.h"
+#include "nsCompressedCharMap.h"
+
+#undef DEBUG_CUSTOM_ENCODER
+
+G_DEFINE_TYPE (MozillaPSDecoder, mozilla_ps_decoder, PANGO_TYPE_FC_DECODER)
+
+MozillaPSDecoder *mozilla_ps_decoder_new      (void);
+
+static FcCharSet  *mozilla_ps_decoder_get_charset (PangoFcDecoder *decoder,
+                                                PangoFcFont    *fcfont);
+static PangoGlyph  mozilla_ps_decoder_get_glyph   (PangoFcDecoder *decoder,
+                                                PangoFcFont    *fcfont,
+                                                guint32         wc);
+
+static PangoFcDecoder *mozilla_find_ps_decoder    (FcPattern *pattern,
+                                                gpointer   user_data);
+
+typedef struct _MozillaPSDecoderPrivate MozillaPSDecoderPrivate;
+
+#define MOZILLA_PS_DECODER_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), MOZILLA_TYPE_DECODER, MozillaPSDecoderPrivate))
+
+struct _MozillaPSDecoderPrivate {
[...4195 lines suppressed...]
+
+  PRUint32 len = aLen;
+  PRUint32 i;
+
   if (len < 10) { 
     // Add a small set of characters to the subset of the user
     // defined font to produce to make sure the font ends up
@@ -584,25 +682,47 @@ outputType1SubFont(nsIFreeType2 *aFt2, F
     // XXX : need to check if this is true of type 1 fonts as well.
     // I suspect it's only the case of CID-keyed fonts (type 9) we used to
     // generate. 
-    charIDstr.AppendLiteral("1234567890"); 
+    for (i = 1; i <= 10; i++) {
+      glyphs.AppendValue(i);
+    }
     len += 10;
   }
   
-  const PRUnichar *charIDs = charIDstr.get();
-
-  PRUint32 i;
+  FT_Int has_glyph_name;
+#if defined (MOZ_ENABLE_XFT) || defined (MOZ_ENABLE_PANGO)
+  has_glyph_name = FT_Has_PS_Glyph_Names(aFace);
+#else
+  has_glyph_name = aFt2->hasPSGlyphNames(aFace);
+#endif
 
   // construct an Encoding vector : the 0th element
   // is /.notdef
-  fputs("/Encoding [\n/.notdef\n", aFile); 
-  for (i = 0; i < len; ++i) {
-      fprintf(aFile, "/uni%04X", charIDs[i]); 
-      if (i % 8 == 7) fputc('\n', aFile);
+  fputs("/Encoding [\n/.notdef", aFile); 
+  for (i = aOffset; i < aOffset + aLen; ++i) {
+      nsCString name;
+      char buffer[256];
+
+      if (glyphs.ValueAt(i) == 0) {
+        name = "/.notdef";
+      } else if (!has_glyph_name ||
+#if defined (MOZ_ENABLE_XFT) || defined (MOZ_ENABLE_PANGO)
+                 FT_Get_Glyph_Name(aFace, glyphs.ValueAt(i), buffer, 255) != FT_Err_Ok
+#else
+                 NS_FAILED(aFt2->getGlyphName(aFace, glyphs.ValueAt(i), buffer, 255))
+#endif
+      ) {
+        name = nsPrintfCString(256, "/idx%04X", glyphs.ValueAt(i));
+      } else {
+        name = nsPrintfCString(256, "/%s", buffer);
+      }
+      glyphnames.AppendCString(name);
+      fprintf(aFile, name.get());
+      if ((i-aOffset) % 8 == 6) fputc('\n', aFile);
   }
 
-  for (i = len; i < 255; ++i) {
+  for (i = PR_MAX (0, 255 - int(aLen)); i; --i) {
       fputs("/.notdef", aFile);
-      if (i % 8 == 7) fputc('\n', aFile);
+      if (i % 8 == 1) fputc('\n', aFile);
   }
   fputs("] def\n", aFile); 
 
@@ -630,23 +750,21 @@ outputType1SubFont(nsIFreeType2 *aFt2, F
   // get the maximum charstring length without actually filling up the buffer
   PRInt32 charStringLen;
   PRInt32 maxCharStringLen =
-#ifdef MOZ_ENABLE_XFT
+#if defined(MOZ_ENABLE_XFT) || defined(MOZ_ENABLE_PANGO)
     FT2GlyphToType1CharString(aFace, 0, aWmode, aLenIV, nsnull);
 #else
     FT2GlyphToType1CharString(aFt2, aFace, 0, aWmode, aLenIV, nsnull);
 #endif
 
-  PRUint32 glyphID;
-
-  for (i = 0; i < len; i++) {
-#ifdef MOZ_ENABLE_XFT
-    glyphID = FT_Get_Char_Index(aFace, charIDs[i]);
+  for (i = aOffset; i < aOffset + aLen; i++) {
+#if defined(MOZ_ENABLE_XFT) || defined(MOZ_ENABLE_PANGO)
     charStringLen =
-      FT2GlyphToType1CharString(aFace, glyphID, aWmode, aLenIV, nsnull);
+      FT2GlyphToType1CharString(aFace, glyphs.ValueAt(i), aWmode, aLenIV,
+                                nsnull);
 #else
-    aFt2->GetCharIndex(aFace, charIDs[i], &glyphID);
     charStringLen =
-      FT2GlyphToType1CharString(aFt2, aFace, glyphID, aWmode, aLenIV, nsnull);
+      FT2GlyphToType1CharString(aFt2, aFace, glyphs.ValueAt(i), aWmode, aLenIV,
+                                nsnull);
 #endif
 
     if (charStringLen > maxCharStringLen)
@@ -666,7 +784,7 @@ outputType1SubFont(nsIFreeType2 *aFt2, F
                                    len + 1).get()); 
 
   // output the notdef glyph
-#ifdef MOZ_ENABLE_XFT
+#if defined(MOZ_ENABLE_XFT) || defined(MOZ_ENABLE_PANGO)
   charStringLen = FT2GlyphToType1CharString(aFace, 0, aWmode, aLenIV,
                                             charString.get());
 #else
@@ -676,22 +794,20 @@ outputType1SubFont(nsIFreeType2 *aFt2, F
 
   // enclose charString with  "/.notdef RD .....  ND" 
   charStringOut(aFile, &pos, &key, NS_REINTERPRET_CAST(const char*, charString.get()),
-                charStringLen, 0); 
+                charStringLen, "/.notdef");
 
 
   // output the charstrings for each glyph in this sub font
-  for (i = 0; i < len; i++) {
-#ifdef MOZ_ENABLE_XFT
-    glyphID = FT_Get_Char_Index(aFace, charIDs[i]);
-    charStringLen = FT2GlyphToType1CharString(aFace, glyphID, aWmode,
+  for (i = aOffset; i < aOffset + aLen; i++) {
+#if defined(MOZ_ENABLE_XFT) || defined(MOZ_ENABLE_PANGO)
+    charStringLen = FT2GlyphToType1CharString(aFace, glyphs.ValueAt(i), aWmode,
                                               aLenIV, charString.get());
 #else
-    aFt2->GetCharIndex(aFace, charIDs[i], &glyphID);
-    charStringLen = FT2GlyphToType1CharString(aFt2, aFace, glyphID, aWmode,
-                                              aLenIV, charString.get());
+    charStringLen = FT2GlyphToType1CharString(aFt2, aFace, glyphs.ValueAt(i),
+                                              aWmode, aLenIV, charString.get());
 #endif
     charStringOut(aFile, &pos, &key, NS_REINTERPRET_CAST(const char*, charString.get()),
-                  charStringLen, charIDs[i]);
+                  charStringLen, glyphnames.CStringAt(i - aOffset)->get());
   }
 
   // wrap up the encrypted part of the font definition
@@ -753,15 +869,12 @@ void encryptAndHexOut(FILE *aFile, PRUin
 
 /* static */ 
 void charStringOut(FILE* aFile,  PRUint32* aPos, PRUint16* aKey, 
-                   const char *aStr, PRUint32 aLen, PRUnichar aId)
+                   const char *aStr, PRUint32 aLen, const char *aGlyphName)
 {
     // use a local buffer instead of nsPrintfCString to avoid alloc.
     char buf[30];
     int oLen;
-    if (aId == 0)
-      oLen = PR_snprintf(buf, 30, "/.notdef %d RD ", aLen); 
-    else 
-      oLen = PR_snprintf(buf, 30, "/uni%04X %d RD ", aId, aLen); 
+    oLen = PR_snprintf(buf, 30, "%s %d RD ", aGlyphName, aLen);
 
     if (oLen >= 30) {
       NS_WARNING("buffer size exceeded. charstring will be truncated");
Index: gfx/src/ps/nsType1.h
===================================================================
RCS file: /cvsroot/mozilla/gfx/src/ps/nsType1.h,v
retrieving revision 1.5
diff -u -p -d -r1.5 nsType1.h
--- gfx/src/ps/nsType1.h	4 Mar 2005 07:39:27 -0000	1.5
+++ gfx/src/ps/nsType1.h	23 Oct 2006 17:37:39 -0000
@@ -122,8 +122,9 @@ FT_Error FT2GlyphToType1CharString(nsIFr
 
 class nsString;
 class nsCString;
+class nsValueArray;
 
-PRBool FT2SubsetToType1FontSet(FT_Face aFace, const nsString& aSubset,
+PRBool FT2SubsetToType1FontSet(FT_Face aFace, nsValueArray *aGlyphSubset,
                                int aWmode,  FILE *aFile);
 nsresult FT2ToType1FontName(FT_Face aFace, int aWmode,
                             nsCString& aFontName);
Index: config/system-headers
===================================================================
--- config/system-headers	2006-10-26 12:21:39.000000000 -0400
+++ config/system-headers	2006-10-26 12:23:29.000000000 -0400
@@ -199,6 +199,7 @@
 freetype/ftoutln.h
 freetype/ttnameid.h
 freetype/tttables.h
+freetype/t1tables.h
 fribidi/fribidi.h
 FSp_fopen.h
 fstream.h
@@ -208,6 +209,7 @@
 gdk/gdkevents.h
 gdk/gdk.h
 gdk/gdkkeysyms.h
+gdk/gdkpango.h
 gdk/gdkprivate.h
 gdk/gdkregion.h
 gdk/gdkwindow.h
@@ -501,6 +503,7 @@
 pango/pangofc-fontmap.h
 pango/pango-fontmap.h
 pango/pango.h
+pango/pangoft2.h
 pango/pangoxft.h
 pango/pangox.h
 pango-types.h


mozilla-nspr-packages.patch:

Index: mozilla-nspr-packages.patch
===================================================================
RCS file: /cvs/extras/rpms/seamonkey/devel/mozilla-nspr-packages.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- mozilla-nspr-packages.patch	10 Apr 2006 21:58:25 -0000	1.1
+++ mozilla-nspr-packages.patch	7 Feb 2007 07:52:56 -0000	1.2
@@ -1,7 +1,10 @@
---- mozilla/xpinstall/packager/packages-unix.smp5	2005-12-22 16:29:39.000000000 +0100
-+++ mozilla/xpinstall/packager/packages-unix	2006-01-21 09:03:04.000000000 +0100
-@@ -45,9 +45,6 @@
+--- mozilla/xpinstall/packager/packages-unix.nsprpack	2007-02-07 04:21:44.000000000 +0100
++++ mozilla/xpinstall/packager/packages-unix	2007-02-07 04:29:55.000000000 +0100
+@@ -42,12 +42,8 @@
+ bin/defaults/messenger/SpamCatcher.sfd
+ bin/defaults/messenger/SpamPal.sfd
  
+-
  [xpcom]
  bin/libmozjs.so
 -bin/libnspr4.so
@@ -10,7 +13,19 @@
  bin/cpu/sparcv8plus/libnspr_flt4.so
  bin/libxpcom.so
  bin/libxpcom_core.so
-@@ -463,18 +460,13 @@
+@@ -58,6 +54,11 @@
+ bin/libxpcom_compat.so
+ bin/components/libxpcom_compat_c.so
+ 
++[nspr]
++bin/libnspr4.so
++bin/libplc4.so
++bin/libplds4.so
++
+ [browser]
+ bin/seamonkey
+ bin/seamonkey-bin
+@@ -469,13 +470,17 @@
  bin/components/talkback/*
  
  [psm]
@@ -21,29 +36,20 @@
  bin/components/pipnss.xpt
  bin/components/libpippki.so
  bin/components/pippki.xpt
--bin/libnss3.so
--bin/libsmime3.so
- bin/libsoftokn3.chk
--bin/libsoftokn3.so
--bin/libssl3.so
- bin/chrome/pipnss.jar
- bin/chrome/pippki.jar
- ; These are required for solaris 32-bit builds
-@@ -499,5 +491,17 @@
- bin/components/spellchecker.xpt
- bin/components/myspell/*
- 
-+[nspr]
-+bin/libnspr4.so
-+bin/libplc4.so
-+bin/libplds4.so
++bin/chrome/pipnss.jar
++bin/chrome/pippki.jar
 +
 +[nss]
 +bin/libnssckbi.so
-+bin/libnss3.so
-+bin/libsmime3.so
-+bin/libsoftokn3.so
-+bin/libssl3.so
-+
- [reporter]
- bin/chrome/reporter.jar
+ bin/libnss3.so
+ bin/libsmime3.so
+ bin/libsoftokn3.chk
+@@ -493,8 +498,6 @@
+ bin/libfreebl_64int_3.chk
+ bin/libfreebl_64int_3.so
+ bin/libssl3.so
+-bin/chrome/pipnss.jar
+-bin/chrome/pippki.jar
+ 
+ [inspector]
+ bin/components/inspector-cmdline.js

seamonkey-fedora-home-page.patch:

Index: seamonkey-fedora-home-page.patch
===================================================================
RCS file: /cvs/extras/rpms/seamonkey/devel/seamonkey-fedora-home-page.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- seamonkey-fedora-home-page.patch	10 Apr 2006 21:58:25 -0000	1.1
+++ seamonkey-fedora-home-page.patch	7 Feb 2007 07:52:56 -0000	1.2
@@ -1,13 +1,13 @@
---- mozilla/xpfe/browser/resources/locale/en-US/region.properties.smp4	2005-12-05 13:43:59.000000000 +0100
-+++ mozilla/xpfe/browser/resources/locale/en-US/region.properties	2006-01-21 08:58:49.000000000 +0100
+--- mozilla/xpfe/browser/resources/locale/en-US/region.properties.regprop	2007-02-07 04:51:18.000000000 +0100
++++ mozilla/xpfe/browser/resources/locale/en-US/region.properties	2007-02-07 04:52:01.000000000 +0100
 @@ -1,5 +1,5 @@
  # navigator.properties
 -homePageDefault=http://www.mozilla.org/
 +homePageDefault=file:///usr/share/doc/HTML/index.html
- shopKeyword=keyword:shop [Product]
- quoteKeyword=keyword:quote [Enter symbol here]
- localKeyword=keyword:zip [Your zip code]
-@@ -11,7 +11,7 @@
+ keywordList=http://home.netscape.com/escapes/keywords
+ webmailKeyword=http://webmail.netscape.com
+ fallbackDefaultSearchURL=http://www.google.com/search?q=
+@@ -7,7 +7,7 @@
  #
  # all.js
  #
@@ -16,7 +16,7 @@
  browser.throbber.url=http://www.mozilla.org/projects/seamonkey/
  browser.search.defaulturl=http://www.google.com/search?q=
  general.useragent.contentlocale=US
-@@ -21,4 +21,4 @@
+@@ -17,4 +17,4 @@
  
  #config.js
  #


Index: seamonkey.spec
===================================================================
RCS file: /cvs/extras/rpms/seamonkey/devel/seamonkey.spec,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- seamonkey.spec	23 Dec 2006 15:50:50 -0000	1.15
+++ seamonkey.spec	7 Feb 2007 07:52:56 -0000	1.16
@@ -10,7 +10,7 @@
 
 Name:           seamonkey
 Summary:        Web browser, e-mail, news, IRC client, HTML editor
-Version:        1.0.7
+Version:        1.1
 Release:        1%{?dist}
 URL:            http://www.mozilla.org/projects/seamonkey/
 License:        MPL
@@ -31,20 +31,19 @@
 Source100:      find-external-requires
 
 Patch1:         firefox-1.0-prdtoa.patch
-Patch3:         firefox-1.1-nss-system-nspr.patch
-Patch4:         firefox-1.5-with-system-nss.patch
-Patch5:         firefox-1.1-visibility.patch
-Patch6:         seamonkey-1.0.1-dumpstack.patch
+Patch2:         firefox-2.0-link-layout.patch
 Patch21:        firefox-0.7.3-default-plugin-less-annoying.patch
 Patch22:        firefox-0.7.3-psfonts.patch
 Patch42:        firefox-1.1-uriloader.patch
 Patch81:        firefox-1.5-nopangoxft.patch
-Patch82:        firefox-1.5-pango-mathml.patch
-Patch91 :       firefox-1.5-pango-ua.patch
-Patch101:       thunderbird-0.7.3-gnome-uriloader.patch
+Patch83:        firefox-1.5-pango-cursor-position.patch
+Patch84:        firefox-2.0-pango-printing.patch
+Patch91:        thunderbird-0.7.3-gnome-uriloader.patch
+Patch101:       firefox-1.5-embedwindow-visibility.patch
+Patch102:       firefox-1.5-theme-change.patch
+Patch103:       firefox-1.5-dnd-nograb.patch
 Patch220:       seamonkey-fedora-home-page.patch
 Patch225:       mozilla-nspr-packages.patch
-Patch227:       mozilla-1.4.1-ppc64.patch
 Patch301:       mozilla-1.7.3-gnome-vfs-default-app.patch
 Patch304:       mozilla-1.7.5-g-application-name.patch
 
@@ -71,6 +70,12 @@
 BuildRequires:  fileutils
 BuildRequires:  perl
 
+Obsoletes: seamonkey-chat
+Obsoletes: seamonkey-devel
+Obsoletes: seamonkey-dom-inspector
+Obsoletes: seamonkey-js-debugger
+Obsoletes: seamonkey-mail
+
 PreReq:         desktop-file-utils >= %{desktop_file_utils_version}
 
 %global nspr_build_time_version %(nspr-config --version)
@@ -106,27 +111,19 @@
 
 %setup -q -n mozilla
 %patch1  -p0
-%patch3  -p1
-%patch4  -p1
-
-# Pragma visibility is broken on most platforms for some reason.
-# It works on i386 so leave it alone there.  Disable elsewhere.
-# See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20297
-%ifnarch i386
-%patch5  -p0
-%endif
-
-%patch6 -p1
+%patch2  -p1
 %patch21 -p1
 %patch22 -p1
 %patch42 -p0
 %patch81 -p1
-%patch82 -p1
-%patch91 -p0
-%patch101 -p1 -b .gnome-uriloader
+%patch83 -p1
+%patch84 -p0
+%patch91 -p1 -b .gnome-uriloader
+%patch101 -p0 -b .embedwindow-visibility
+%patch102 -p0 -b .theme-change
+%patch103 -p1 -b .dnd-nograb
 %patch220 -p1
 %patch225 -p1
-%patch227 -p1
 %patch301 -p1
 %patch304 -p0
 
@@ -427,6 +424,12 @@
 
 
 %changelog
+* Wed Feb 07 2007 Kai Engert <kengert at redhat.com> 1.1-1
+- Update to SeaMonkey 1.1
+- Pull in patches used by Firefox Fedora RPM package.
+- Fix the DND implementation to not grab, so it works with new GTK+.
+- Fix upgrade path from FC-5 by obsoleting the seamonkey subset
+  packages which recently obsoleted mozilla in FC-5.
 * Sat Dec 23 2006 Kai Engert <kengert at redhat.com> 1.0.7-1
 - SeaMonkey 1.0.7
 * Fri Nov 10 2006 Kai Engert <kengert at redhat.com> 1.0.6-2




More information about the scm-commits mailing list