Title: [280153] trunk/Source
Revision
280153
Author
cdu...@apple.com
Date
2021-07-21 12:26:52 -0700 (Wed, 21 Jul 2021)

Log Message

Unreviewed, reverting r280129.

Broke the internal Monterey build bots

Reverted changeset:

"GetIdentifierStringForPreferredVoiceInListWithLocale() is
deprecated in Monterey"
https://bugs.webkit.org/show_bug.cgi?id=228066
https://commits.webkit.org/r280129

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (280152 => 280153)


--- trunk/Source/WTF/ChangeLog	2021-07-21 18:51:17 UTC (rev 280152)
+++ trunk/Source/WTF/ChangeLog	2021-07-21 19:26:52 UTC (rev 280153)
@@ -1,3 +1,16 @@
+2021-07-21  Chris Dumez  <cdu...@apple.com>
+
+        Unreviewed, reverting r280129.
+
+        Broke the internal Monterey build bots
+
+        Reverted changeset:
+
+        "GetIdentifierStringForPreferredVoiceInListWithLocale() is
+        deprecated in Monterey"
+        https://bugs.webkit.org/show_bug.cgi?id=228066
+        https://commits.webkit.org/r280129
+
 2021-07-21  David Kilzer  <ddkil...@apple.com>
 
         GetIdentifierStringForPreferredVoiceInListWithLocale() is deprecated in Monterey

Modified: trunk/Source/WTF/wtf/PlatformHave.h (280152 => 280153)


--- trunk/Source/WTF/wtf/PlatformHave.h	2021-07-21 18:51:17 UTC (rev 280152)
+++ trunk/Source/WTF/wtf/PlatformHave.h	2021-07-21 19:26:52 UTC (rev 280153)
@@ -850,12 +850,6 @@
 #endif
 #endif
 
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000
-#if !defined(HAVE_SPEECHSYNTHESIS_MONTEREY_SPI)
-#define HAVE_SPEECHSYNTHESIS_MONTEREY_SPI 1
-#endif
-#endif
-
 #if PLATFORM(COCOA)
 #if !defined(HAVE_CG_CONTEXT_DRAW_PATH_DIRECT)
 #define HAVE_CG_CONTEXT_DRAW_PATH_DIRECT 1

Modified: trunk/Source/WebCore/ChangeLog (280152 => 280153)


--- trunk/Source/WebCore/ChangeLog	2021-07-21 18:51:17 UTC (rev 280152)
+++ trunk/Source/WebCore/ChangeLog	2021-07-21 19:26:52 UTC (rev 280153)
@@ -1,3 +1,16 @@
+2021-07-21  Chris Dumez  <cdu...@apple.com>
+
+        Unreviewed, reverting r280129.
+
+        Broke the internal Monterey build bots
+
+        Reverted changeset:
+
+        "GetIdentifierStringForPreferredVoiceInListWithLocale() is
+        deprecated in Monterey"
+        https://bugs.webkit.org/show_bug.cgi?id=228066
+        https://commits.webkit.org/r280129
+
 2021-07-01  Sergio Villar Senin  <svil...@igalia.com>
 
         Missing layouts when using simplified layout with OOF positioned elements

Modified: trunk/Source/WebCore/PAL/ChangeLog (280152 => 280153)


--- trunk/Source/WebCore/PAL/ChangeLog	2021-07-21 18:51:17 UTC (rev 280152)
+++ trunk/Source/WebCore/PAL/ChangeLog	2021-07-21 19:26:52 UTC (rev 280153)
@@ -1,3 +1,16 @@
+2021-07-21  Chris Dumez  <cdu...@apple.com>
+
+        Unreviewed, reverting r280129.
+
+        Broke the internal Monterey build bots
+
+        Reverted changeset:
+
+        "GetIdentifierStringForPreferredVoiceInListWithLocale() is
+        deprecated in Monterey"
+        https://bugs.webkit.org/show_bug.cgi?id=228066
+        https://commits.webkit.org/r280129
+
 2021-07-21  David Kilzer  <ddkil...@apple.com>
 
         GetIdentifierStringForPreferredVoiceInListWithLocale() is deprecated in Monterey

Modified: trunk/Source/WebCore/PAL/pal/spi/mac/SpeechSynthesisSPI.h (280152 => 280153)


--- trunk/Source/WebCore/PAL/pal/spi/mac/SpeechSynthesisSPI.h	2021-07-21 18:51:17 UTC (rev 280152)
+++ trunk/Source/WebCore/PAL/pal/spi/mac/SpeechSynthesisSPI.h	2021-07-21 19:26:52 UTC (rev 280153)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017-2021 Apple Inc. All rights reserved.
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -34,10 +34,6 @@
 WTF_EXTERN_C_BEGIN
 
 CFArrayRef CopySpeechSynthesisVoicesForMode(CFTypeRef mode);
-#if HAVE(SPEECHSYNTHESIS_MONTEREY_SPI)
-CFStringRef CopyIdentifierStringForPreferredVoiceInListWithLocale(CFArrayRef voices, CFLocaleRef);
-#else
 CFStringRef GetIdentifierStringForPreferredVoiceInListWithLocale(CFArrayRef voices, CFLocaleRef);
-#endif
 
 WTF_EXTERN_C_END

Modified: trunk/Source/WebCore/platform/mac/PlatformSpeechSynthesizerMac.mm (280152 => 280153)


--- trunk/Source/WebCore/platform/mac/PlatformSpeechSynthesizerMac.mm	2021-07-21 18:51:17 UTC (rev 280152)
+++ trunk/Source/WebCore/platform/mac/PlatformSpeechSynthesizerMac.mm	2021-07-21 19:26:52 UTC (rev 280153)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013-2021 Apple Inc.  All rights reserved.
+ * Copyright (C) 2013 Apple Inc.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -222,16 +222,15 @@
     return adoptCF(CopySpeechSynthesisVoicesForMode((__bridge CFArrayRef)@[ @"VoiceGroupDefault", @"VoiceGroupCompact" ]));
 }
 
-static RetainPtr<CFStringRef> speechSynthesisGetDefaultVoiceIdentifierForLocale(NSLocale *userLocale)
+static NSString *speechSynthesisGetDefaultVoiceIdentifierForLocale(NSLocale *userLocale)
 {
     if (!userLocale)
         return nil;
 
-#if HAVE(SPEECHSYNTHESIS_MONTEREY_SPI)
-    return adoptCF(CopyIdentifierStringForPreferredVoiceInListWithLocale(speechSynthesisGetVoiceIdentifiers().get(), (__bridge CFLocaleRef)userLocale));
-#else
-    return GetIdentifierStringForPreferredVoiceInListWithLocale(speechSynthesisGetVoiceIdentifiers().get(), (__bridge CFLocaleRef)userLocale);
-#endif
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+    return (__bridge NSString *)GetIdentifierStringForPreferredVoiceInListWithLocale(speechSynthesisGetVoiceIdentifiers().get(), (__bridge CFLocaleRef)userLocale);
+#pragma clang diagnostic pop
 }
 
 void PlatformSpeechSynthesizer::initializeVoiceList()
@@ -245,12 +244,12 @@
         NSString *voiceURI = [attributes objectForKey:NSVoiceIdentifier];
         NSString *name = [attributes objectForKey:NSVoiceName];
         NSString *language = [attributes objectForKey:NSVoiceLocaleIdentifier];
-        auto defaultVoiceURI = speechSynthesisGetDefaultVoiceIdentifierForLocale(adoptNS([[NSLocale alloc] initWithLocaleIdentifier:language]).get());
+        NSString *defaultVoiceURI = speechSynthesisGetDefaultVoiceIdentifierForLocale(adoptNS([[NSLocale alloc] initWithLocaleIdentifier:language]).get());
 
         // Change to BCP-47 format as defined by spec.
         language = [language stringByReplacingOccurrencesOfString:@"_" withString:@"-"];
 
-        bool isDefault = [(__bridge NSString *)defaultVoiceURI.get() isEqualToString:voiceURI];
+        bool isDefault = [defaultVoiceURI isEqualToString:voiceURI];
 
         m_voiceList.append(PlatformSpeechSynthesisVoice::create(voiceURI, name, language, true, isDefault));
     }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to