Use the system string for telephone number menu
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 6 Dec 2014 01:01:48 +0000 (01:01 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 6 Dec 2014 01:01:48 +0000 (01:01 +0000)
https://bugs.webkit.org/show_bug.cgi?id=139324
<rdar://problem/18726471>

Reviewed by Anders Carlsson.

* Platform/mac/MenuUtilities.mm:
(WebKit::menuItemTitleForTelephoneNumberGroup):
Make use of the SPI to retrieve the string if it exists.

* WebCore.xcodeproj/project.pbxproj:
* platform/spi/mac/TUCallSPI.h: Added.
Add an SPI header.

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

Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebKit2/ChangeLog
Source/WebKit2/Platform/mac/MenuUtilities.mm

index 1b3c705..f1091a9 100644 (file)
@@ -1,3 +1,15 @@
+2014-12-05  Tim Horton  <timothy_horton@apple.com>
+
+        Use the system string for telephone number menu
+        https://bugs.webkit.org/show_bug.cgi?id=139324
+        <rdar://problem/18726471>
+
+        Reviewed by Anders Carlsson.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/spi/mac/TUCallSPI.h: Added.
+        Add an SPI header.
+
 2014-12-05  Jer Noble  <jer.noble@apple.com>
 
         [MSE][Mac] Return absolute value of error code from CDMSessionMediaSourceAVFObjC::update().
index e38c340..1dcb802 100644 (file)
                2BE8E2C912A58A0100FAD550 /* HTMLMetaCharsetParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2BE8E2C812A58A0100FAD550 /* HTMLMetaCharsetParser.cpp */; };
                2D0B4AAB18DA1CCD00434DE1 /* IOSurface.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D0B4AA918DA1CCD00434DE1 /* IOSurface.h */; settings = {ATTRIBUTES = (Private, ); }; };
                2D0B4AAC18DA1CCD00434DE1 /* IOSurface.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D0B4AAA18DA1CCD00434DE1 /* IOSurface.mm */; };
+               2D232C001A326F02006BF2DB /* TUCallSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D232BFF1A326EF9006BF2DB /* TUCallSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
                2D25396218CE7F6200270222 /* ImageControlsButtonElementMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D25396018CE7F6200270222 /* ImageControlsButtonElementMac.cpp */; };
                2D25396318CE7F6200270222 /* ImageControlsButtonElementMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D25396118CE7F6200270222 /* ImageControlsButtonElementMac.h */; };
                2D29ECC5192ECC8300984B78 /* DisplayRefreshMonitorClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D29ECC1192ECC8300984B78 /* DisplayRefreshMonitorClient.cpp */; };
                2BE8E2C812A58A0100FAD550 /* HTMLMetaCharsetParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLMetaCharsetParser.cpp; path = parser/HTMLMetaCharsetParser.cpp; sourceTree = "<group>"; };
                2D0B4AA918DA1CCD00434DE1 /* IOSurface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IOSurface.h; sourceTree = "<group>"; };
                2D0B4AAA18DA1CCD00434DE1 /* IOSurface.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = IOSurface.mm; sourceTree = "<group>"; };
+               2D232BFF1A326EF9006BF2DB /* TUCallSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TUCallSPI.h; sourceTree = "<group>"; };
                2D25396018CE7F6200270222 /* ImageControlsButtonElementMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImageControlsButtonElementMac.cpp; sourceTree = "<group>"; };
                2D25396118CE7F6200270222 /* ImageControlsButtonElementMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageControlsButtonElementMac.h; sourceTree = "<group>"; };
                2D29ECC1192ECC8300984B78 /* DisplayRefreshMonitorClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DisplayRefreshMonitorClient.cpp; sourceTree = "<group>"; };
                                2DCB837719F99BBA00A7FBE4 /* NSSharingServicePickerSPI.h */,
                                2DCB837819F99BBA00A7FBE4 /* NSSharingServiceSPI.h */,
                                9348428119F1A9190009D5AE /* NSViewSPI.h */,
+                               2D232BFF1A326EF9006BF2DB /* TUCallSPI.h */,
                                937F4CCB1A2D48C100BB39F5 /* QuickLookMacSPI.h */,
                        );
                        path = mac;
                                939885C408B7E3D100E707C4 /* EventNames.h in Headers */,
                                8F67561B1288B17B0047ACA3 /* EventQueue.h in Headers */,
                                E0FEF372B17C53EAC1C1FBEE /* EventSource.h in Headers */,
+                               2D232C001A326F02006BF2DB /* TUCallSPI.h in Headers */,
                                E12EDB7B0B308A78002704B6 /* EventTarget.h in Headers */,
                                97AA3CA5145237CC003E1DA6 /* EventTargetHeaders.h in Headers */,
                                97AA3CA6145237CC003E1DA6 /* EventTargetInterfaces.h in Headers */,
index 98b6828..f0c57b0 100644 (file)
 
 2014-12-05  Tim Horton  <timothy_horton@apple.com>
 
+        Use the system string for telephone number menu
+        https://bugs.webkit.org/show_bug.cgi?id=139324
+        <rdar://problem/18726471>
+
+        Reviewed by Anders Carlsson.
+
+        * Platform/mac/MenuUtilities.mm:
+        (WebKit::menuItemTitleForTelephoneNumberGroup):
+        Make use of the SPI to retrieve the string if it exists.
+
+2014-12-05  Tim Horton  <timothy_horton@apple.com>
+
         If the action menu hit test times out, a menu with a single separator appears
         https://bugs.webkit.org/show_bug.cgi?id=139320
         <rdar://problem/19158331>
index 6d750d9..d1e9532 100644 (file)
@@ -29,6 +29,7 @@
 #import "StringUtilities.h"
 #import <WebCore/LocalizedStrings.h>
 #import <WebCore/SoftLinking.h>
+#import <WebCore/TUCallSPI.h>
 #import <objc/runtime.h>
 
 #if ENABLE(TELEPHONE_NUMBER_DETECTION) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
@@ -55,6 +56,8 @@ namespace WebKit {
 
 NSString *menuItemTitleForTelephoneNumberGroup()
 {
+    if ([getTUCallClass() respondsToSelector:@selector(supplementalDialTelephonyCallString)])
+        return [getTUCallClass() supplementalDialTelephonyCallString];
     return WEB_UI_STRING("Call Using iPhone:", "menu item title for phone number");
 }