WEB SPEECH: language support does not work as expected
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Apr 2013 00:27:56 +0000 (00:27 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Apr 2013 00:27:56 +0000 (00:27 +0000)
https://bugs.webkit.org/show_bug.cgi?id=115119

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Make the Mac platform synthesizer have access to all the voices installed on the system.

* WebCore.exp.in:
* platform/mac/PlatformSpeechSynthesizerMac.mm:
(WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:

Source/WebKit/mac:

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface):

Source/WebKit2:

* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):

WebKitLibraries:

* WebKitSystemInterface.h:

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

13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/platform/mac/PlatformSpeechSynthesizerMac.mm
Source/WebCore/platform/mac/WebCoreSystemInterface.h
Source/WebCore/platform/mac/WebCoreSystemInterface.mm
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm
WebKitLibraries/ChangeLog
WebKitLibraries/WebKitSystemInterface.h
WebKitLibraries/libWebKitSystemInterfaceLion.a
WebKitLibraries/libWebKitSystemInterfaceMountainLion.a

index 29b8283..c2a21ba 100644 (file)
@@ -1,5 +1,20 @@
 2013-04-25  Chris Fleizach  <cfleizach@apple.com>
 
+        WEB SPEECH: language support does not work as expected
+        https://bugs.webkit.org/show_bug.cgi?id=115119
+
+        Reviewed by Alexey Proskuryakov.
+
+        Make the Mac platform synthesizer have access to all the voices installed on the system.
+
+        * WebCore.exp.in:
+        * platform/mac/PlatformSpeechSynthesizerMac.mm:
+        (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
+        * platform/mac/WebCoreSystemInterface.h:
+        * platform/mac/WebCoreSystemInterface.mm:
+
+2013-04-25  Chris Fleizach  <cfleizach@apple.com>
+
         <meter> element not exposed to accessibility
         https://bugs.webkit.org/show_bug.cgi?id=109023
         rdar://problem/13658964
index 015c743..c784c2e 100644 (file)
@@ -1941,6 +1941,7 @@ _wkSetCGFontRenderingMode
 _wkSetDragImage
 _wkSetMetadataURL
 _wkSignedPublicKeyAndChallengeString
+_wkSpeechSynthesisGetVoiceIdentifiers
 _wkUnregisterUniqueIdForElement
 _wkWindowSetAlpha
 _wkWindowSetScaledFrame
index 77dde81..31e9c58 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "PlatformSpeechSynthesisUtterance.h"
 #include "PlatformSpeechSynthesisVoice.h"
+#include "WebCoreSystemInterface.h"
 #include <AppKit/NSSpeechSynthesizer.h>
 #include <wtf/PassRefPtr.h>
 #include <wtf/RetainPtr.h>
@@ -210,7 +211,7 @@ PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer()
 void PlatformSpeechSynthesizer::initializeVoiceList()
 {
     NSString *defaultVoiceURI = [NSSpeechSynthesizer defaultVoice];
-    NSArray *availableVoices = [NSSpeechSynthesizer availableVoices];
+    NSArray *availableVoices = wkSpeechSynthesisGetVoiceIdentifiers();
     NSUInteger count = [availableVoices count];
     for (NSUInteger k = 0; k < count; k++) {
         NSString *voiceName = [availableVoices objectAtIndex:k];
index b23b0ac..7b17bab 100644 (file)
@@ -273,6 +273,10 @@ extern NSURL *(*wkAVAssetResolvedURL)(AVAsset*);
 extern NSCursor *(*wkCursor)(const char*);
 
 #endif
+    
+#if PLATFORM(MAC)
+extern NSArray *(*wkSpeechSynthesisGetVoiceIdentifiers)(void);
+#endif
 
 extern void (*wkUnregisterUniqueIdForElement)(id element);
 extern void (*wkAccessibilityHandleFocusChanged)(void);    
index 8698db2..152ab03 100644 (file)
@@ -164,6 +164,10 @@ NSCursor *(*wkCursor)(const char*);
 
 #endif
 
+#if PLATFORM(MAC)
+NSArray *(*wkSpeechSynthesisGetVoiceIdentifiers)(void);
+#endif
+
 void (*wkUnregisterUniqueIdForElement)(id element);
 void (*wkAccessibilityHandleFocusChanged)(void);
 CFTypeID (*wkGetAXTextMarkerTypeID)(void);
index 9814ebe..fbd1586 100644 (file)
@@ -1,3 +1,13 @@
+2013-04-25  Chris Fleizach  <cfleizach@apple.com>
+
+        WEB SPEECH: language support does not work as expected
+        https://bugs.webkit.org/show_bug.cgi?id=115119
+
+        Reviewed by Alexey Proskuryakov.
+
+        * WebCoreSupport/WebSystemInterface.mm:
+        (InitWebCoreSystemInterface):
+
 2013-04-25  Simon Fraser  <simon.fraser@apple.com>
 
         Build fix for smart compliers.
index 7cdc987..9a95b5b 100644 (file)
@@ -154,6 +154,9 @@ void InitWebCoreSystemInterface(void)
     INIT(SetRequestStorageSession);
 #endif
 
+#if PLATFORM(MAC)
+    INIT(SpeechSynthesisGetVoiceIdentifiers);
+#endif
     INIT(GetAXTextMarkerTypeID);
     INIT(GetAXTextMarkerRangeTypeID);
     INIT(CreateAXTextMarker);
index 84b342c..de70868 100644 (file)
@@ -1,3 +1,13 @@
+2013-04-24  Chris Fleizach  <cfleizach@apple.com>
+
+        WEB SPEECH: language support does not work as expected
+        https://bugs.webkit.org/show_bug.cgi?id=115119
+
+        Reviewed by Alexey Proskuryakov.
+
+        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
+        (InitWebCoreSystemInterface):
+
 2013-04-25  Anders Carlsson  <andersca@apple.com>
 
         Rename DecidePolicyForResponse message to DecidePolicyForResponseSync
index f04491e..ab40a85 100644 (file)
@@ -142,6 +142,9 @@ void InitWebCoreSystemInterface(void)
         INIT(SetRequestStorageSession);
 #endif
 
+#if PLATFORM(MAC)
+        INIT(SpeechSynthesisGetVoiceIdentifiers);
+#endif
         INIT(GetAXTextMarkerTypeID);
         INIT(GetAXTextMarkerRangeTypeID);
         INIT(CreateAXTextMarker);
index 8998415..ae5594b 100644 (file)
@@ -1,3 +1,12 @@
+2013-04-25  Chris Fleizach  <cfleizach@apple.com>
+
+        WEB SPEECH: language support does not work as expected
+        https://bugs.webkit.org/show_bug.cgi?id=115119
+
+        Reviewed by Alexey Proskuryakov.
+
+        * WebKitSystemInterface.h:
+
 2013-04-24  Roger Fong  <roger_fong@apple.com>
 
         Have VS2010 WebKit solution look in WebKit_Libraries/lib32 for dependencies.
index d5dec34..bdb39af 100644 (file)
@@ -84,7 +84,9 @@ CFTypeRef WKCopyAXTextMarkerRangeEnd(CFTypeRef range);
 void WKAccessibilityHandleFocusChanged(void);
 AXUIElementRef WKCreateAXUIElementRef(id element);
 void WKUnregisterUniqueIdForElement(id element);
-
+    
+NSArray *WKSpeechSynthesisGetVoiceIdentifiers(void);
+    
 BOOL WKShouldBlockPlugin(NSString *bundleIdentifier, NSString *bundleVersionString);
 BOOL WKIsPluginUpdateAvailable(NSString *bundleIdentifier);
 
index 6dfd50a..897bc72 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceLion.a and b/WebKitLibraries/libWebKitSystemInterfaceLion.a differ
index 7e4e2f2..e8e37af 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceMountainLion.a and b/WebKitLibraries/libWebKitSystemInterfaceMountainLion.a differ