[meego-commits] 5906: Changes to Trunk:Testing/chromium

Wei James james.wei at intel.com
Thu Jul 22 00:54:20 UTC 2010


Hi,
I have made the following changes to chromium in project Trunk:Testing. Please review and accept ASAP.

Thank You,
Wei James

[This message was auto-generated]

---

Request #5906:

  submit:   home:xwei1:branches:Trunk:Testing/chromium(r2)(cleanup) -> Trunk:Testing/chromium


Message:
    Sync with MeeGo 1.0 update

State:   new          2010-07-21T12:48:15 xwei1
Comment: None



changes files:
--------------
--- chromium.changes
+++ chromium.changes
@@ -0,0 +1,3 @@
+* Thu July 22 Wei James <james.wei at intel.com> - 6.0.417.0
+- Sync with MeeGo-1.0 update, add font rendering patch
+

new:
----
  chromium-webkit-droid-sans-fontconfig-fix.patch

spec files:
-----------
--- chromium.spec
+++ chromium.spec
@@ -143,6 +143,9 @@
 # Fix icon size cut off in MeeGo 1.0
 #Patch207:        chromium-fix-toolbar-icon-size.patch
 
+# Fix droid sans font rendering issue
+Patch208:		 chromium-webkit-droid-sans-fontconfig-fix.patch
+
 ################ patches for MeeGo integration ends
 
 
@@ -313,7 +316,7 @@
 %patch205 -p1
 %patch206 -p1
 #%patch207 -p1
-
+%patch208 -p1
 
 # Scrape out incorrect optflags and hack in the correct ones
 PARSED_OPT_FLAGS=`echo \'$RPM_OPT_FLAGS -DUSE_SYSTEM_LIBEVENT -fPIC -fno-strict-aliasing \' | sed "s/ /',/g" | sed "s/',/', '/g"`

other changes:
--------------

++++++ chromium-webkit-droid-sans-fontconfig-fix.patch (new)
--- chromium-webkit-droid-sans-fontconfig-fix.patch
+++ chromium-webkit-droid-sans-fontconfig-fix.patch
+diff -rupN chromium-6.0.417.0-20100526svn48276.orig/third_party/WebKit/WebCore/platform/graphics/chromium/FontCacheLinux.cpp chromium-6.0.417.0-20100526svn48276/third_party/WebKit/WebCore/platform/graphics/chromium/FontCacheLinux.cpp
+--- chromium-6.0.417.0-20100526svn48276.orig/third_party/WebKit/WebCore/platform/graphics/chromium/FontCacheLinux.cpp	2010-06-23 15:57:18.000000000 +0800
++++ chromium-6.0.417.0-20100526svn48276/third_party/WebKit/WebCore/platform/graphics/chromium/FontCacheLinux.cpp	2010-06-23 16:06:17.000000000 +0800
+@@ -58,12 +58,16 @@ const SimpleFontData* FontCache::getFont
+                                                           const UChar* characters,
+                                                           int length)
+ {
+-    String family = ChromiumBridge::getFontFamilyForCharacters(characters, length);
+-    if (family.isEmpty())
++    String familyAndFilename = ChromiumBridge::getFontFamilyForCharacters(characters, length);
++    if (familyAndFilename.isEmpty())
+         return 0;
+ 
+-    AtomicString atomicFamily(family);
+-    return getCachedFontData(getCachedFontPlatformData(font.fontDescription(), atomicFamily, false, characters, length));
++    Vector<String> results;
++    familyAndFilename.split(String(":"), results);
++
++    AtomicString atomicFamily(results[0]);
++    AtomicString atomicFilename(results[1]);
++    return getCachedFontData(getCachedFontPlatformData(font.fontDescription(), atomicFamily, false, characters, length, &atomicFilename));
+ }
+ 
+ SimpleFontData* FontCache::getSimilarFontPlatformData(const Font& font)
+diff -rupN chromium-6.0.417.0-20100526svn48276.orig/third_party/WebKit/WebCore/platform/graphics/chromium/FontCacheLinux.cpp.orig chromium-6.0.417.0-20100526svn48276/third_party/WebKit/WebCore/platform/graphics/chromium/FontCacheLinux.cpp.orig
+--- chromium-6.0.417.0-20100526svn48276.orig/third_party/WebKit/WebCore/platform/graphics/chromium/FontCacheLinux.cpp.orig	2010-05-27 00:24:21.000000000 +0800
++++ chromium-6.0.417.0-20100526svn48276/third_party/WebKit/WebCore/platform/graphics/chromium/FontCacheLinux.cpp.orig	2010-06-23 15:57:18.000000000 +0800
+@@ -63,7 +63,7 @@ const SimpleFontData* FontCache::getFont
+         return 0;
+ 
+     AtomicString atomicFamily(family);
+-    return getCachedFontData(getCachedFontPlatformData(font.fontDescription(), atomicFamily, false));
++    return getCachedFontData(getCachedFontPlatformData(font.fontDescription(), atomicFamily, false, characters, length));
+ }
+ 
+ SimpleFontData* FontCache::getSimilarFontPlatformData(const Font& font)
+@@ -102,7 +102,9 @@ void FontCache::getTraitsInFamily(const 
+ }
+ 
+ FontPlatformData* FontCache::createFontPlatformData(const FontDescription& fontDescription,
+-                                                    const AtomicString& family)
++                                                    const AtomicString& family,
++                                                    const UChar* characters,
++                                                    int length)
+ {
+     const char* name = 0;
+     CString s;
+@@ -142,7 +144,7 @@ FontPlatformData* FontCache::createFontP
+     if (fontDescription.italic())
+         style |= SkTypeface::kItalic;
+ 
+-    SkTypeface* tf = SkTypeface::CreateFromName(name, static_cast<SkTypeface::Style>(style));
++    SkTypeface* tf = SkTypeface::CreateFromNameAndChars(name, static_cast<SkTypeface::Style>(style), characters, length * 2);
+     if (!tf)
+         return 0;
+ 
+diff -rupN chromium-6.0.417.0-20100526svn48276.orig/third_party/WebKit/WebCore/platform/graphics/FontCache.cpp chromium-6.0.417.0-20100526svn48276/third_party/WebKit/WebCore/platform/graphics/FontCache.cpp
+--- chromium-6.0.417.0-20100526svn48276.orig/third_party/WebKit/WebCore/platform/graphics/FontCache.cpp	2010-06-23 15:57:18.000000000 +0800
++++ chromium-6.0.417.0-20100526svn48276/third_party/WebKit/WebCore/platform/graphics/FontCache.cpp	2010-06-23 16:01:15.000000000 +0800
+@@ -185,14 +185,21 @@ FontPlatformData* FontCache::getCachedFo
+                                                        const AtomicString& familyName,
+                                                        bool checkingAlternateName,
+                                                        const UChar* characters,
+-                                                       int length)
++                                                       int length,
++                                                       const AtomicString* fontFilename)
+ {
+     if (!gFontPlatformDataCache) {
+         gFontPlatformDataCache = new FontPlatformDataCache;
+         platformInit();
+     }
+ 
+-    FontPlatformDataCacheKey key(familyName, fontDescription.computedPixelSize(), fontDescription.weight(), fontDescription.italic(),
++    String nameKey(familyName.string());
++    if (fontFilename) {
++      nameKey += String(":");
++      nameKey += fontFilename->string();
++    }
++    AtomicString atomicNameKey(nameKey);
++    FontPlatformDataCacheKey key(nameKey, fontDescription.computedPixelSize(), fontDescription.weight(), fontDescription.italic(),
+                                  fontDescription.usePrinterFont(), fontDescription.renderingMode());
+     FontPlatformData* result = 0;
+     bool foundResult;
+diff -rupN chromium-6.0.417.0-20100526svn48276.orig/third_party/WebKit/WebCore/platform/graphics/FontCache.h chromium-6.0.417.0-20100526svn48276/third_party/WebKit/WebCore/platform/graphics/FontCache.h
+--- chromium-6.0.417.0-20100526svn48276.orig/third_party/WebKit/WebCore/platform/graphics/FontCache.h	2010-06-23 15:57:18.000000000 +0800
++++ chromium-6.0.417.0-20100526svn48276/third_party/WebKit/WebCore/platform/graphics/FontCache.h	2010-06-23 16:01:15.000000000 +0800
+@@ -100,7 +100,8 @@ private:
+                                                 const AtomicString& family,
+                                                 bool checkingAlternateName = false,
+                                                 const UChar* characters = NULL,
+-                                                int length = 0);
++                                                int length = 0,
++                                                const AtomicString* fontFilename = NULL);
+ 
+     // These methods are implemented by each platform.
+     SimpleFontData* getSimilarFontPlatformData(const Font&);
+diff -rupN chromium-6.0.417.0-20100526svn48276.orig/third_party/WebKit/WebKit/chromium/src/gtk/WebFontInfo.cpp chromium-6.0.417.0-20100526svn48276/third_party/WebKit/WebKit/chromium/src/gtk/WebFontInfo.cpp
+--- chromium-6.0.417.0-20100526svn48276.orig/third_party/WebKit/WebKit/chromium/src/gtk/WebFontInfo.cpp	2010-05-27 00:24:53.000000000 +0800
++++ chromium-6.0.417.0-20100526svn48276/third_party/WebKit/WebKit/chromium/src/gtk/WebFontInfo.cpp	2010-06-23 16:02:51.000000000 +0800
+@@ -35,6 +35,7 @@
+ #include <fontconfig/fontconfig.h>
+ #include <string.h>
+ #include <unicode/utf16.h>
++#include <string>
+ 
+ namespace WebKit {
+ 
+@@ -85,9 +86,12 @@ WebCString WebFontInfo::familyForChars(c
+ 
+         // fontconfig can also return fonts which are unreadable
+         FcChar8* cFilename;
++        const char* charFilename;
+         if (FcPatternGetString(current, FC_FILE, 0, &cFilename) != FcResultMatch)
+             continue;
+ 
++        std::string tmp_result(reinterpret_cast<char*>(cFilename));
++
+         if (access(reinterpret_cast<char*>(cFilename), R_OK))
+             continue;
+ 
+@@ -95,8 +99,10 @@ WebCString WebFontInfo::familyForChars(c
+         WebCString result;
+         if (FcPatternGetString(current, FC_FAMILY, 0, &family) == FcResultMatch) {
+             const char* charFamily = reinterpret_cast<char*>(family);
+-            result = WebCString(charFamily, strlen(charFamily));
++            tmp_result = std::string(charFamily) + ":" + tmp_result;
+         }
++
++        result = WebCString(tmp_result.c_str(), tmp_result.size());
+         FcFontSetDestroy(fontSet);
+         return result;
+     }



More information about the MeeGo-commits mailing list