[Chromium] Remove old getFontFamilyForCharacters() and familyForChars() APIs.
authorbashi@chromium.org <bashi@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Nov 2011 06:10:24 +0000 (06:10 +0000)
committerbashi@chromium.org <bashi@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Nov 2011 06:10:24 +0000 (06:10 +0000)
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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@100886 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/chromium-linux/fast/text/cg-fallback-bolding-expected.png
LayoutTests/platform/chromium-linux/fast/text/cg-fallback-bolding-expected.txt
LayoutTests/platform/chromium-linux/fast/text/international/khmer-selection-expected.png
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/FontCacheLinux.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/public/linux/WebFontInfo.h
Source/WebKit/chromium/public/linux/WebSandboxSupport.h
Source/WebKit/chromium/src/linux/WebFontInfo.cpp

index defc58bf30d0c561d2914248b07eb65129e56bbf..b28b7a7c4ce0efcd4d966c72fae0b47b9404f71a 100644 (file)
@@ -1,3 +1,16 @@
+2011-11-20  Kenichi Ishibashi  <bashi@chromium.org>
+
+        [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  <benwells@chromium.org>
 
         Rebaseline for border change in r100528
index c021ee6ff40553de62187e0da62a874437efe39f..04213667c3858eeaeda861ed0173061ba69183e1 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/text/cg-fallback-bolding-expected.png and b/LayoutTests/platform/chromium-linux/fast/text/cg-fallback-bolding-expected.png differ
index 6ab4f7dba4aee05a7eead2f18b6fe1cf975b6317..53c9ce5ba01271db1ea89fe5be9a131a9bac87d7 100644 (file)
@@ -13,5 +13,5 @@ layer at (0,0) size 800x600
           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}"
index 9eb5e4599be2f50f2eb1a09b9faff0aa95dd1f5d..8641161f401e47dc3f94ef3a292e45d6fa07a583 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/text/international/khmer-selection-expected.png and b/LayoutTests/platform/chromium-linux/fast/text/international/khmer-selection-expected.png differ
index 09ff2efc6790d7511fa49863fca628dafa304c24..d54a17c489463f6f5c2d1820aa56876a007d9ea9 100644 (file)
@@ -1,3 +1,15 @@
+2011-11-20  Kenichi Ishibashi  <bashi@chromium.org>
+
+        [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  <noel.gordon@gmail.com>
 
         [chromium] Remove qt/QtMobileWebStyle from the gyp projects
index eca7b03319d6cdc60a72d48fa968437c9ca1e950..67afd84580960e459e6c9047952bee2b54d6917c 100644 (file)
@@ -65,8 +65,6 @@ const SimpleFontData* FontCache::getFontDataForCharacters(const Font& font,
         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 @@ const SimpleFontData* FontCache::getFontDataForCharacters(const Font& font,
     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)
index d6214e9fd8407772f18e68d6284aded277811c8e..48a9e431409e8c04dae1311569448c7bac53ae04 100644 (file)
@@ -1,3 +1,16 @@
+2011-11-20  Kenichi Ishibashi  <bashi@chromium.org>
+
+        [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  <agomes@rim.com>
 
         Pass a Frame* parameter in EditorClient::respondToChangedSelection
index 9b3472b6cfc523a5d48461c3b2651cece88ce036..047564befb98d93c21e4f91f08caa42f68874b16 100644 (file)
@@ -51,8 +51,6 @@ public:
     //
     // 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*);
 
index 4283df371c6ad88d821be5b12b90bb01a682fec8..15450566276256afe8711f9c2014665d12a10e0d 100644 (file)
@@ -53,14 +53,9 @@ public:
     //
     // 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;
 };
index 4d303d24cc1a0c589cd860bada1349381f6a57b5..d384836163a62cd7ee9545d013a7f0d7e5c984ed 100644 (file)
 
 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();