Fix an internal build failure after r239014
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Dec 2018 18:45:27 +0000 (18:45 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Dec 2018 18:45:27 +0000 (18:45 +0000)
https://bugs.webkit.org/show_bug.cgi?id=192205

* UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
(fontOfSize):
There's a system that doesn't have safe browsing or UIFontTextStyleLargeTitle.

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

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/Cocoa/WKSafeBrowsingWarning.mm

index 76a9feb..88a232b 100644 (file)
@@ -1,3 +1,12 @@
+2018-12-11  Alex Christensen  <achristensen@webkit.org>
+
+        Fix an internal build failure after r239014
+        https://bugs.webkit.org/show_bug.cgi?id=192205
+
+        * UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
+        (fontOfSize):
+        There's a system that doesn't have safe browsing or UIFontTextStyleLargeTitle.
+
 2018-12-11  Brian Burg  <bburg@apple.com>
 
         SimulatedInputDispatcher::transitionInputSourceToState() can reuse a moved-from completion handler
index d16db8f..c9a4039 100644 (file)
@@ -82,13 +82,15 @@ static FontType *fontOfSize(WarningTextSize size)
     case WarningTextSize::Body:
         return [NSFont systemFontOfSize:14];
     }
-#else
+#elif HAVE(SAFE_BROWSING)
     switch (size) {
     case WarningTextSize::Title:
         return [UIFont preferredFontForTextStyle:UIFontTextStyleLargeTitle];
     case WarningTextSize::Body:
         return [UIFont preferredFontForTextStyle:UIFontTextStyleBody];
     }
+#else
+    return nil;
 #endif
 }