[BlackBerry] FontCacheBlackBerry: return PassRefPtr<SimpleFontData>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Mar 2013 15:00:04 +0000 (15:00 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Mar 2013 15:00:04 +0000 (15:00 +0000)
https://bugs.webkit.org/show_bug.cgi?id=112022

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-03-12
Reviewed by Rob Buis.

FontData functions return PassRefPtr since r130160.

* platform/graphics/blackberry/FontCacheBlackBerry.cpp:
(WebCore::FontCache::getFontDataForCharacters):
(WebCore::FontCache::getSimilarFontPlatformData):
(WebCore::FontCache::getLastResortFallbackFont):
* platform/graphics/blackberry/SimpleFontDataBlackBerry.cpp:
(WebCore::SimpleFontData::createScaledFontData):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/blackberry/FontCacheBlackBerry.cpp
Source/WebCore/platform/graphics/blackberry/SimpleFontDataBlackBerry.cpp

index d177235..1324cf6 100644 (file)
@@ -1,3 +1,19 @@
+2013-03-12  Alberto Garcia  <agarcia@igalia.com>
+
+        [BlackBerry] FontCacheBlackBerry: return PassRefPtr<SimpleFontData>
+        https://bugs.webkit.org/show_bug.cgi?id=112022
+
+        Reviewed by Rob Buis.
+
+        FontData functions return PassRefPtr since r130160.
+
+        * platform/graphics/blackberry/FontCacheBlackBerry.cpp:
+        (WebCore::FontCache::getFontDataForCharacters):
+        (WebCore::FontCache::getSimilarFontPlatformData):
+        (WebCore::FontCache::getLastResortFallbackFont):
+        * platform/graphics/blackberry/SimpleFontDataBlackBerry.cpp:
+        (WebCore::SimpleFontData::createScaledFontData):
+
 2013-03-12  Vsevolod Vlasov  <vsevik@chromium.org>
 
         Web Inspector: Fix checkContentUpdated behavior in UISourceCode.
index 08d2f11..2aec6a1 100644 (file)
@@ -50,7 +50,7 @@ void FontCache::platformInit()
         CRASH();
 }
 
-const SimpleFontData* FontCache::getFontDataForCharacters(const Font& font, const UChar* characters, int length)
+PassRefPtr<SimpleFontData> FontCache::getFontDataForCharacters(const Font& font, const UChar* characters, int length)
 {
     icu::Locale locale = icu::Locale::getDefault();
     PlatformSupport::FontFamily family;
@@ -87,12 +87,12 @@ const SimpleFontData* FontCache::getFontDataForCharacters(const Font& font, cons
     return getCachedFontData(&platformData, DoNotRetain);
 }
 
-SimpleFontData* FontCache::getSimilarFontPlatformData(const Font& font)
+PassRefPtr<SimpleFontData> FontCache::getSimilarFontPlatformData(const Font& font)
 {
     return 0;
 }
 
-SimpleFontData* FontCache::getLastResortFallbackFont(const FontDescription& description, ShouldRetain)
+PassRefPtr<SimpleFontData> FontCache::getLastResortFallbackFont(const FontDescription& description, ShouldRetain)
 {
     DEFINE_STATIC_LOCAL(const AtomicString, sansStr, ("Sans"));
     DEFINE_STATIC_LOCAL(const AtomicString, serifStr, ("Serif"));
index c67009b..6c5eebb 100644 (file)
@@ -107,10 +107,10 @@ void SimpleFontData::platformDestroy()
 {
 }
 
-PassOwnPtr<SimpleFontData> SimpleFontData::createScaledFontData(const FontDescription& fontDescription, float scaleFactor) const
+PassRefPtr<SimpleFontData> SimpleFontData::createScaledFontData(const FontDescription& fontDescription, float scaleFactor) const
 {
     const float scaledSize = lroundf(fontDescription.computedSize() * scaleFactor);
-    return adoptPtr(new SimpleFontData(
+    return adoptRef(new SimpleFontData(
         FontPlatformData(m_platformData.font()->cur_lfnt->name,
             scaledSize,
             m_platformData.syntheticBold(),