Fix the !ENABLE(SVG_FONTS) build after r176276
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Nov 2014 21:45:54 +0000 (21:45 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Nov 2014 21:45:54 +0000 (21:45 +0000)
https://bugs.webkit.org/show_bug.cgi?id=138924

Reviewed by Csaba Osztrogon√°c.

No new tests because there is no behavior change.

* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestFont):

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

Source/WebCore/ChangeLog
Source/WebCore/css/CSSFontFaceSource.cpp
Source/WebCore/loader/cache/CachedResourceLoader.cpp

index 662c54a7e24faa4e89e51ac5ef7cdc2d7df34fd2..1611ff4ad461816eb4f537ea531c39c689b9d9ff 100644 (file)
@@ -1,3 +1,17 @@
+2014-11-20  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        Fix the !ENABLE(SVG_FONTS) build after r176276
+        https://bugs.webkit.org/show_bug.cgi?id=138924
+
+        Reviewed by Csaba Osztrogon√°c.
+
+        No new tests because there is no behavior change.
+
+        * css/CSSFontFaceSource.cpp:
+        (WebCore::CSSFontFaceSource::getFontData):
+        * loader/cache/CachedResourceLoader.cpp:
+        (WebCore::CachedResourceLoader::requestFont):
+
 2014-11-19  Ada Chan  <adachan@apple.com>
 
         Add a way to mute an AudioContext.
index dbea2d62d70456ef5330362bcb13f387fc9a11f3..8394695dfe723902e982118b21918b3d1cae6220 100644 (file)
@@ -124,10 +124,14 @@ PassRefPtr<SimpleFontData> CSSFontFaceSource::getFontData(const FontDescription&
     if (isLoaded()) {
         if (m_font) {
             // Create new FontPlatformData from our CGFontRef, point size and ATSFontRef.
-            if (!m_font->ensureCustomFontData(m_hasExternalSVGFont))
+            bool hasExternalSVGFont = false;
+#if ENABLE(SVG_FONTS)
+            hasExternalSVGFont = m_hasExternalSVGFont;
+#endif
+            if (!m_font->ensureCustomFontData(hasExternalSVGFont))
                 return nullptr;
 
-            fontData = m_font->getFontData(fontDescription, m_string, syntheticBold, syntheticItalic, m_hasExternalSVGFont);
+            fontData = m_font->getFontData(fontDescription, m_string, syntheticBold, syntheticItalic, hasExternalSVGFont);
         } else {
 #if ENABLE(SVG_FONTS)
             // In-Document SVG Fonts
index 68c022ff0ac7a46e93d7667574b2f32e0de06214..3488de475fdfc081b5ac94804aff37ae0a152f0d 100644 (file)
@@ -182,8 +182,12 @@ CachedResourceHandle<CachedImage> CachedResourceLoader::requestImage(CachedResou
 
 CachedResourceHandle<CachedFont> CachedResourceLoader::requestFont(CachedResourceRequest& request, bool isSVG)
 {
+#if ENABLE(SVG_FONTS)
     if (isSVG)
         return downcast<CachedSVGFont>(requestResource(CachedResource::SVGFontResource, request).get());
+#else
+    UNUSED_PARAM(isSVG);
+#endif
     return downcast<CachedFont>(requestResource(CachedResource::FontResource, request).get());
 }