Title: [269232] trunk/Source/WebCore
Revision
269232
Author
[email protected]
Date
2020-11-01 08:41:59 -0800 (Sun, 01 Nov 2020)

Log Message

AX: Provide build workaround while isSystemVoice is not in all SDKs
https://bugs.webkit.org/show_bug.cgi?id=218414

Reviewed by Tim Horton.

Source/WebCore:

* platform/ios/PlatformSpeechSynthesizerIOS.mm:
(WebCore::PlatformSpeechSynthesizer::initializeVoiceList):

Source/WebCore/PAL:

* pal/spi/cocoa/AXSpeechManagerSPI.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (269231 => 269232)


--- trunk/Source/WebCore/ChangeLog	2020-11-01 13:57:56 UTC (rev 269231)
+++ trunk/Source/WebCore/ChangeLog	2020-11-01 16:41:59 UTC (rev 269232)
@@ -1,3 +1,13 @@
+2020-11-01  Chris Fleizach  <[email protected]>
+
+        AX: Provide build workaround while isSystemVoice is not in all SDKs
+        https://bugs.webkit.org/show_bug.cgi?id=218414
+
+        Reviewed by Tim Horton.
+
+        * platform/ios/PlatformSpeechSynthesizerIOS.mm:
+        (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
+
 2020-11-01  Zalan Bujtas  <[email protected]>
 
         [LFC][IFC] InlineLevelBox logical rect should only be accessed through LineBox

Modified: trunk/Source/WebCore/PAL/ChangeLog (269231 => 269232)


--- trunk/Source/WebCore/PAL/ChangeLog	2020-11-01 13:57:56 UTC (rev 269231)
+++ trunk/Source/WebCore/PAL/ChangeLog	2020-11-01 16:41:59 UTC (rev 269232)
@@ -1,3 +1,12 @@
+2020-11-01  Chris Fleizach  <[email protected]>
+
+        AX: Provide build workaround while isSystemVoice is not in all SDKs
+        https://bugs.webkit.org/show_bug.cgi?id=218414
+
+        Reviewed by Tim Horton.
+
+        * pal/spi/cocoa/AXSpeechManagerSPI.h:
+
 2020-10-30  Myles C. Maxfield  <[email protected]>
 
         Fix internal watchOS and tvOS builds after r269211

Modified: trunk/Source/WebCore/PAL/pal/spi/cocoa/AXSpeechManagerSPI.h (269231 => 269232)


--- trunk/Source/WebCore/PAL/pal/spi/cocoa/AXSpeechManagerSPI.h	2020-11-01 13:57:56 UTC (rev 269231)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/AXSpeechManagerSPI.h	2020-11-01 16:41:59 UTC (rev 269232)
@@ -27,7 +27,8 @@
 
 #if PLATFORM(IOS_FAMILY)
 
-#if USE(APPLE_INTERNAL_SDK)
+// FIXME: Undo when isSystemVoice is available in all SDKs.
+#if USE(APPLE_INTERNAL_SDK) && 0
 
 #include <AXSpeechManager.h>
 
@@ -35,7 +36,7 @@
 
 #include <AVFoundation/AVFoundation.h>
 
-@interface AVSpeechSynthesizer (PrivateAttributes)
+@interface AVSpeechSynthesisVoice (PrivateAttributes)
 @property (nonatomic, readonly) BOOL isSystemVoice SPI_AVAILABLE(macos(11.3), ios(13.3), tvos(13.3), watchos(6.3));
 @end
 

Modified: trunk/Source/WebCore/platform/ios/PlatformSpeechSynthesizerIOS.mm (269231 => 269232)


--- trunk/Source/WebCore/platform/ios/PlatformSpeechSynthesizerIOS.mm	2020-11-01 13:57:56 UTC (rev 269231)
+++ trunk/Source/WebCore/platform/ios/PlatformSpeechSynthesizerIOS.mm	2020-11-01 16:41:59 UTC (rev 269232)
@@ -267,7 +267,13 @@
         
         // Only show built-in voices when requesting through WebKit to reduce fingerprinting surface area.
 #if HAVE(AVSPEECHSYNTHESIS_SYSTEMVOICE)
-        if (voice.isSystemVoice)
+        // FIXME: Remove respondsToSelector check when is available on all SDKs.
+        BOOL includeVoice = NO;
+        if ([voice respondsToSelector:@selector(isSystemVoice)])
+            includeVoice = voice.isSystemVoice;
+        else
+            includeVoice = voice.quality == AVSpeechSynthesisVoiceQualityDefault;
+        if (includeVoice)
 #else
         if (voice.quality == AVSpeechSynthesisVoiceQualityDefault)
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to