Do not use iOS specific telephone detection on macOS.
authorenrica@apple.com <enrica@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Jun 2016 18:52:56 +0000 (18:52 +0000)
committerenrica@apple.com <enrica@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Jun 2016 18:52:56 +0000 (18:52 +0000)
https://bugs.webkit.org/show_bug.cgi?id=159096
rdar://problem/25870571

Reviewed by Anders Carlsson.

Adding platform guard.

* platform/cocoa/TelephoneNumberDetectorCocoa.cpp:
(WebCore::TelephoneNumberDetector::phoneNumbersScanner):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/cocoa/TelephoneNumberDetectorCocoa.cpp

index 82ebe18..dd2d3bd 100644 (file)
@@ -1,3 +1,16 @@
+2016-06-24  Enrica Casucci  <enrica@apple.com>
+
+        Do not use iOS specific telephone detection on macOS.
+        https://bugs.webkit.org/show_bug.cgi?id=159096
+        rdar://problem/25870571
+
+        Reviewed by Anders Carlsson.
+
+        Adding platform guard.
+
+        * platform/cocoa/TelephoneNumberDetectorCocoa.cpp:
+        (WebCore::TelephoneNumberDetector::phoneNumbersScanner):
+
 2016-06-24  Jer Noble  <jer.noble@apple.com>
 
         Unreviewed build fix after r202429; AVStreamDataParser does not exist on iOS.
index e466e96..7fab165 100644 (file)
@@ -47,6 +47,7 @@ namespace TelephoneNumberDetector {
 
 static DDDFAScannerRef phoneNumbersScanner()
 {
+#if PLATFORM(IOS)
     if (!DataDetectorsCoreLibrary())
         return nullptr;
 
@@ -56,6 +57,9 @@ static DDDFAScannerRef phoneNumbersScanner()
 
     static DDDFAScannerRef scanner = DDDFAScannerCreateFromCache(cache);
     return scanner;
+#else
+    return nullptr;
+#endif
 }
 
 bool isSupported()