[iOS] [OSX] Don't transcode WOFF on platforms that support it natively
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Jul 2014 00:35:27 +0000 (00:35 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Jul 2014 00:35:27 +0000 (00:35 +0000)
https://bugs.webkit.org/show_bug.cgi?id=134904

Reviewed by Andreas Kling.

No new tests because there is no behavior change.

* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::ensureCustomFontData):

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

Source/WebCore/ChangeLog
Source/WebCore/loader/cache/CachedFont.cpp

index 3aafc10b85adf5523835530c689cf06f1e043f8f..d022eeb376bfcfec2f6014d0b1e66278d3aed4bb 100644 (file)
@@ -1,3 +1,15 @@
+2014-07-22  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        [iOS] [OSX] Don't transcode WOFF on platforms that support it natively
+        https://bugs.webkit.org/show_bug.cgi?id=134904
+
+        Reviewed by Andreas Kling.
+
+        No new tests because there is no behavior change.
+
+        * loader/cache/CachedFont.cpp:
+        (WebCore::CachedFont::ensureCustomFontData):
+
 2014-07-22  peavo@outlook.com  <peavo@outlook.com>
 
         [Win] Crash after plugin is unloaded.
index 1d14665c8f10542a64474f1af36cc56301dab10e..13682fa2778dfdf61aced9c3b9504f667e737ff6 100644 (file)
@@ -98,9 +98,11 @@ bool CachedFont::ensureCustomFontData()
         SharedBuffer* buffer = m_data.get()->sharedBuffer();
         ASSERT(buffer);
 
+        bool fontIsWOFF = false;
+#if (!PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED <= 1090) && (!PLATFORM(IOS) || __IPHONE_OS_VERSION_MIN_REQUIRED < 80000)
         RefPtr<SharedBuffer> sfntBuffer;
 
-        bool fontIsWOFF = isWOFF(buffer);
+        fontIsWOFF = isWOFF(buffer);
         if (fontIsWOFF) {
             Vector<char> sfnt;
             if (convertWOFFToSfnt(buffer, sfnt)) {
@@ -109,6 +111,7 @@ bool CachedFont::ensureCustomFontData()
             } else
                 buffer = nullptr;
         }
+#endif
 
         m_fontData = buffer ? createFontCustomPlatformData(*buffer) : nullptr;
         if (m_fontData)