Fix the iOS build after <http://trac.webkit.org/changeset/178213>
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 Jan 2015 01:50:39 +0000 (01:50 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 Jan 2015 01:50:39 +0000 (01:50 +0000)
(https://bugs.webkit.org/show_bug.cgi?id=140310)

Patch by Daniel Bates <dabates@apple.com> on 2015-01-09

* platform/spi/cocoa/CoreTextSPI.h:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::systemFont):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/spi/cocoa/CoreTextSPI.h
Source/WebCore/rendering/RenderThemeIOS.mm

index ce17773..89ed65b 100644 (file)
@@ -1,3 +1,12 @@
+2015-01-09  Daniel Bates  <dabates@apple.com>
+
+        Fix the iOS build after <http://trac.webkit.org/changeset/178213>
+        (https://bugs.webkit.org/show_bug.cgi?id=140310)
+
+        * platform/spi/cocoa/CoreTextSPI.h:
+        * rendering/RenderThemeIOS.mm:
+        (WebCore::RenderThemeIOS::systemFont):
+
 2015-01-09  Chris Dumez  <cdumez@apple.com>
 
         Get rid of legacy StyleBuilder switch in StyleResolver.cpp
index d39b867..4c4a2a0 100644 (file)
@@ -88,6 +88,12 @@ extern const CFStringRef kCTUIFontTextStyleCaption2;
 extern const CFStringRef kCTFontDescriptorTextStyleEmphasized;
 #endif
 
+#if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED > 80200
+extern const CFStringRef kCTUIFontTextStyleTitle1;
+extern const CFStringRef kCTUIFontTextStyleTitle2;
+extern const CFStringRef kCTUIFontTextStyleTitle3;
+#endif
+
 CTFontRef CTFontCreatePhysicalFontForCharactersWithLanguage(CTFontRef, const UTF16Char* characters, CFIndex length, CFStringRef language, CFIndex* coveredLength);
 bool CTFontIsAppleColorEmoji(CTFontRef);
 bool CTFontDescriptorIsSystemUIFont(CTFontDescriptorRef);
index 2ac19dc..2e33d12 100644 (file)
@@ -1119,9 +1119,11 @@ void RenderThemeIOS::systemFont(CSSValueID valueID, FontDescription& fontDescrip
     static NeverDestroyed<FontDescription> shortFootnoteFont;
     static NeverDestroyed<FontDescription> shortCaption1Font;
     static NeverDestroyed<FontDescription> tallBodyFont;
+#if __IPHONE_OS_VERSION_MIN_REQUIRED > 80200
     static NeverDestroyed<FontDescription> title1Font;
     static NeverDestroyed<FontDescription> title2Font;
     static NeverDestroyed<FontDescription> title3Font;
+#endif
 
     static CFStringRef userTextSize = contentSizeCategory();
 
@@ -1158,6 +1160,7 @@ void RenderThemeIOS::systemFont(CSSValueID valueID, FontDescription& fontDescrip
         if (!bodyFont.get().isAbsoluteSize())
             fontDescriptor = adoptCF(CTFontDescriptorCreateWithTextStyle(textStyle, userTextSize, 0));
         break;
+#if __IPHONE_OS_VERSION_MIN_REQUIRED > 80200
     case CSSValueAppleSystemTitle1:
         cachedDesc = &title1Font.get();
         textStyle = kCTUIFontTextStyleTitle1;
@@ -1176,6 +1179,7 @@ void RenderThemeIOS::systemFont(CSSValueID valueID, FontDescription& fontDescrip
         if (!title3Font.get().isAbsoluteSize())
             fontDescriptor = adoptCF(CTFontDescriptorCreateWithTextStyle(textStyle, userTextSize, 0));
         break;
+#endif
     case CSSValueAppleSystemSubheadline:
         cachedDesc = &subheadlineFont.get();
         textStyle = kCTUIFontTextStyleSubhead;