Title: [100886] trunk
Revision
100886
Author
[email protected]
Date
2011-11-20 22:10:24 -0800 (Sun, 20 Nov 2011)

Log Message

[Chromium] Remove old getFontFamilyForCharacters() and familyForChars() APIs.
https://bugs.webkit.org/show_bug.cgi?id=72844

Source/WebCore:

Respects bold and italic properties that is given by fontconfig.

Reviewed by Darin Fisher.

* platform/graphics/chromium/FontCacheLinux.cpp:
(WebCore::FontCache::getFontDataForCharacters): Removed #if and old logic.

Source/WebKit/chromium:

Removes old APIs for getting font family for given characters.

Reviewed by Darin Fisher.

* public/linux/WebFontInfo.h: Removed old familyForChars().
* public/linux/WebSandboxSupport.h: Removed old getFontFamilyForCharacters() and changed new getFontFamilyForCharacters() to be a pure virtual function.
* src/linux/WebFontInfo.cpp: Removes old familyForChars().

LayoutTests:

Font selection mechanism of Chromium Linux port has been improved. Rebaselines affected tests.

Reviewed by Darin Fisher.

* platform/chromium-linux/fast/text/cg-fallback-bolding-expected.png:
* platform/chromium-linux/fast/text/cg-fallback-bolding-expected.txt:
* platform/chromium-linux/fast/text/international/khmer-selection-expected.png:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (100885 => 100886)


--- trunk/LayoutTests/ChangeLog	2011-11-21 05:37:24 UTC (rev 100885)
+++ trunk/LayoutTests/ChangeLog	2011-11-21 06:10:24 UTC (rev 100886)
@@ -1,3 +1,16 @@
+2011-11-20  Kenichi Ishibashi  <[email protected]>
+
+        [Chromium] Remove old getFontFamilyForCharacters() and familyForChars() APIs.
+        https://bugs.webkit.org/show_bug.cgi?id=72844
+
+        Font selection mechanism of Chromium Linux port has been improved. Rebaselines affected tests.
+
+        Reviewed by Darin Fisher.
+
+        * platform/chromium-linux/fast/text/cg-fallback-bolding-expected.png:
+        * platform/chromium-linux/fast/text/cg-fallback-bolding-expected.txt:
+        * platform/chromium-linux/fast/text/international/khmer-selection-expected.png:
+
 2011-11-20  Ben Wells  <[email protected]>
 
         Rebaseline for border change in r100528

Modified: trunk/LayoutTests/platform/chromium-linux/fast/text/cg-fallback-bolding-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/fast/text/cg-fallback-bolding-expected.txt (100885 => 100886)


--- trunk/LayoutTests/platform/chromium-linux/fast/text/cg-fallback-bolding-expected.txt	2011-11-21 05:37:24 UTC (rev 100885)
+++ trunk/LayoutTests/platform/chromium-linux/fast/text/cg-fallback-bolding-expected.txt	2011-11-21 06:10:24 UTC (rev 100886)
@@ -13,5 +13,5 @@
           text run at (35,40) width 749: "This test is making sure we don't make incorrect assumptions based off the fact that we would have to synthesize bold for the"
           text run at (0,60) width 109: "first font in the list."
       RenderBlock {P} at (0,208) size 784x128
-        RenderText {#text} at (0,0) size 75x128
-          text run at (0,0) width 75 RTL: "\x{5D0}"
+        RenderText {#text} at (0,0) size 72x128
+          text run at (0,0) width 72 RTL: "\x{5D0}"

Modified: trunk/LayoutTests/platform/chromium-linux/fast/text/international/khmer-selection-expected.png


(Binary files differ)

Modified: trunk/Source/WebCore/ChangeLog (100885 => 100886)


--- trunk/Source/WebCore/ChangeLog	2011-11-21 05:37:24 UTC (rev 100885)
+++ trunk/Source/WebCore/ChangeLog	2011-11-21 06:10:24 UTC (rev 100886)
@@ -1,3 +1,15 @@
+2011-11-20  Kenichi Ishibashi  <[email protected]>
+
+        [Chromium] Remove old getFontFamilyForCharacters() and familyForChars() APIs.
+        https://bugs.webkit.org/show_bug.cgi?id=72844
+
+        Respects bold and italic properties that is given by fontconfig.
+
+        Reviewed by Darin Fisher.
+
+        * platform/graphics/chromium/FontCacheLinux.cpp:
+        (WebCore::FontCache::getFontDataForCharacters): Removed #if and old logic.
+
 2011-11-20  Noel Gordon  <[email protected]>
 
         [chromium] Remove qt/QtMobileWebStyle from the gyp projects

Modified: trunk/Source/WebCore/platform/graphics/chromium/FontCacheLinux.cpp (100885 => 100886)


--- trunk/Source/WebCore/platform/graphics/chromium/FontCacheLinux.cpp	2011-11-21 05:37:24 UTC (rev 100885)
+++ trunk/Source/WebCore/platform/graphics/chromium/FontCacheLinux.cpp	2011-11-21 06:10:24 UTC (rev 100886)
@@ -65,8 +65,6 @@
         return 0;
 
     AtomicString atomicFamily(family.name);
-    // FIXME: Remove this #if after API transition complete.
-#if 0
     // Changes weight and/or italic of given FontDescription depends on
     // the result of fontconfig so that keeping the correct font mapping
     // of the given characters. See http://crbug.com/32109 for details.
@@ -90,9 +88,6 @@
     platformData.setFakeBold(shouldSetFakeBold);
     platformData.setFakeItalic(shouldSetFakeItalic);
     return getCachedFontData(&platformData, DoNotRetain);
-#else
-    return getCachedFontData(getCachedFontPlatformData(font.fontDescription(), atomicFamily, DoNotRetain), DoNotRetain);
-#endif
 }
 
 SimpleFontData* FontCache::getSimilarFontPlatformData(const Font& font)

Modified: trunk/Source/WebKit/chromium/ChangeLog (100885 => 100886)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-11-21 05:37:24 UTC (rev 100885)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-11-21 06:10:24 UTC (rev 100886)
@@ -1,3 +1,16 @@
+2011-11-20  Kenichi Ishibashi  <[email protected]>
+
+        [Chromium] Remove old getFontFamilyForCharacters() and familyForChars() APIs.
+        https://bugs.webkit.org/show_bug.cgi?id=72844
+
+        Removes old APIs for getting font family for given characters.
+
+        Reviewed by Darin Fisher.
+
+        * public/linux/WebFontInfo.h: Removed old familyForChars().
+        * public/linux/WebSandboxSupport.h: Removed old getFontFamilyForCharacters() and changed new getFontFamilyForCharacters() to be a pure virtual function.
+        * src/linux/WebFontInfo.cpp: Removes old familyForChars().
+
 2011-10-17  Antonio Gomes  <[email protected]>
 
         Pass a Frame* parameter in EditorClient::respondToChangedSelection

Modified: trunk/Source/WebKit/chromium/public/linux/WebFontInfo.h (100885 => 100886)


--- trunk/Source/WebKit/chromium/public/linux/WebFontInfo.h	2011-11-21 05:37:24 UTC (rev 100885)
+++ trunk/Source/WebKit/chromium/public/linux/WebFontInfo.h	2011-11-21 06:10:24 UTC (rev 100886)
@@ -51,8 +51,6 @@
     //
     // Returns: the font family or an empty string if the request could not be
     // satisfied.
-    // FIXME: Depreciated API. Remove later.
-    WEBKIT_EXPORT static WebCString familyForChars(const WebUChar* characters, size_t numCharacters, const char* preferredLocale);
     // Returns: the font family instance. The instance has an empty font name if the request could not be satisfied.
     WEBKIT_EXPORT static void familyForChars(const WebUChar* characters, size_t numCharacters, const char* preferredLocale, WebFontFamily*);
 

Modified: trunk/Source/WebKit/chromium/public/linux/WebSandboxSupport.h (100885 => 100886)


--- trunk/Source/WebKit/chromium/public/linux/WebSandboxSupport.h	2011-11-21 05:37:24 UTC (rev 100885)
+++ trunk/Source/WebKit/chromium/public/linux/WebSandboxSupport.h	2011-11-21 06:10:24 UTC (rev 100886)
@@ -53,14 +53,9 @@
     //
     // Returns a string with the font family on an empty string if the
     // request cannot be satisfied.
-    // FIXME: Depreciated API. Remove later.
-    virtual WebString getFontFamilyForCharacters(const WebUChar* characters, size_t numCharacters, const char* preferredLocale) { return WebString(); }
     // Returns a WebFontFamily instance with the font name. The instance has empty font name if the request cannot be satisfied.
     // FIXME: Make this to be a pure virtual function after transition.
-    virtual void getFontFamilyForCharacters(const WebUChar* characters, size_t numCharacters, const char* preferredLocale, WebFontFamily* family)
-    {
-        family->name = getFontFamilyForCharacters(characters, numCharacters, preferredLocale).utf8();
-    }
+    virtual void getFontFamilyForCharacters(const WebUChar* characters, size_t numCharacters, const char* preferredLocale, WebFontFamily*) = 0;
 
     virtual void getRenderStyleForStrike(const char* family, int sizeAndStyle, WebFontRenderStyle* style) = 0;
 };

Modified: trunk/Source/WebKit/chromium/src/linux/WebFontInfo.cpp (100885 => 100886)


--- trunk/Source/WebKit/chromium/src/linux/WebFontInfo.cpp	2011-11-21 05:37:24 UTC (rev 100885)
+++ trunk/Source/WebKit/chromium/src/linux/WebFontInfo.cpp	2011-11-21 06:10:24 UTC (rev 100886)
@@ -40,14 +40,6 @@
 
 namespace WebKit {
 
-// FIXME: Depreciated API. Remove later.
-WebCString WebFontInfo::familyForChars(const WebUChar* characters, size_t numCharacters, const char* preferredLocale)
-{
-    WebFontFamily family;
-    familyForChars(characters, numCharacters, preferredLocale, &family);
-    return family.name;
-}
-
 void WebFontInfo::familyForChars(const WebUChar* characters, size_t numCharacters, const char* preferredLocale, WebFontFamily* family)
 {
     FcCharSet* cset = FcCharSetCreate();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to