Changeset 284822 in webkit
- Timestamp:
- Oct 25, 2021, 2:32:05 PM (5 years ago)
- Location:
- trunk/Source
- Files:
-
- 2 added
- 10 edited
- 1 moved
-
WTF/ChangeLog (modified) (1 diff)
-
WTF/wtf/PlatformHave.h (modified) (2 diffs)
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/PAL/ChangeLog (modified) (1 diff)
-
WebCore/PAL/PAL.xcodeproj/project.pbxproj (modified) (4 diffs)
-
WebCore/PAL/pal/cocoa/AVFoundationSoftLink.h (modified) (1 diff)
-
WebCore/PAL/pal/cocoa/AVFoundationSoftLink.mm (modified) (1 diff)
-
WebCore/PAL/pal/spi/cocoa/AXSpeechManagerSPI.h (modified) (2 diffs)
-
WebCore/PAL/pal/spi/mac/SpeechSynthesisSPI.h (added)
-
WebCore/SourcesCocoa.txt (modified) (3 diffs)
-
WebCore/WebCore.xcodeproj/project.pbxproj (modified) (7 diffs)
-
WebCore/platform/ios/PlatformSpeechSynthesizerIOS.mm (moved) (moved from trunk/Source/WebCore/platform/cocoa/PlatformSpeechSynthesizerCocoa.mm ) (7 diffs)
-
WebCore/platform/mac/PlatformSpeechSynthesizerMac.mm (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r284763 r284822 1 2021-10-25 Ayumi Kojima <ayumi_kojima@apple.com> 2 3 Unreviewed, reverting r284742. 4 5 Reverting because this commit may have casued a regression on 6 imported/w3c/web-platform-tests/speech-api/SpeechSynthesis- 7 speak-events.html 8 9 Reverted changeset: 10 11 "AX: Unify speech synthesizer platform usage for Mac/iOS" 12 https://bugs.webkit.org/show_bug.cgi?id=231895 13 https://commits.webkit.org/r284742 14 1 15 2021-10-24 Darin Adler <darin@apple.com> 2 16 -
trunk/Source/WTF/wtf/PlatformHave.h
r284742 r284822 761 761 #endif 762 762 763 #if ( (PLATFORM(IOS) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 140300) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED > 120000)763 #if (PLATFORM(IOS) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140300 764 764 #if !defined(HAVE_AVSPEECHSYNTHESIS_SYSTEMVOICE) 765 765 #define HAVE_AVSPEECHSYNTHESIS_SYSTEMVOICE 1 … … 770 770 #if !defined(HAVE_TCC_IOS_14_BIG_SUR_SPI) 771 771 #define HAVE_TCC_IOS_14_BIG_SUR_SPI 1 772 #endif 773 #endif 774 775 #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000 776 #if !defined(HAVE_SPEECHSYNTHESIS_MONTEREY_SPI) 777 #define HAVE_SPEECHSYNTHESIS_MONTEREY_SPI 1 772 778 #endif 773 779 #endif -
trunk/Source/WebCore/ChangeLog
r284821 r284822 1 2021-10-25 Ayumi Kojima <ayumi_kojima@apple.com> 2 3 Unreviewed, reverting r284742. 4 5 Reverting because this commit may have casued a regression on 6 imported/w3c/web-platform-tests/speech-api/SpeechSynthesis- 7 speak-events.html 8 9 Reverted changeset: 10 11 "AX: Unify speech synthesizer platform usage for Mac/iOS" 12 https://bugs.webkit.org/show_bug.cgi?id=231895 13 https://commits.webkit.org/r284742 14 1 15 2021-10-25 Chris Dumez <cdumez@apple.com> 2 16 -
trunk/Source/WebCore/PAL/ChangeLog
r284742 r284822 1 2021-10-25 Ayumi Kojima <ayumi_kojima@apple.com> 2 3 Unreviewed, reverting r284742. 4 5 Reverting because this commit may have casued a regression on 6 imported/w3c/web-platform-tests/speech-api/SpeechSynthesis- 7 speak-events.html 8 9 Reverted changeset: 10 11 "AX: Unify speech synthesizer platform usage for Mac/iOS" 12 https://bugs.webkit.org/show_bug.cgi?id=231895 13 https://commits.webkit.org/r284742 14 1 15 2021-10-23 Chris Fleizach <cfleizach@apple.com> 2 16 -
trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj
r284742 r284822 170 170 A10826FA1F576292004772AC /* WebPanel.mm in Sources */ = {isa = PBXBuildFile; fileRef = A10826F81F576292004772AC /* WebPanel.mm */; }; 171 171 A10826FE1F58A433004772AC /* NSGraphicsSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = A10826FD1F58A433004772AC /* NSGraphicsSPI.h */; }; 172 A1175B491F6AFF8E00C4B9F0 /* SpeechSynthesisSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = A1175B481F6AFF8E00C4B9F0 /* SpeechSynthesisSPI.h */; }; 172 173 A1175B4B1F6B2D7E00C4B9F0 /* NSCellSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = A1175B4A1F6B2D7E00C4B9F0 /* NSCellSPI.h */; }; 173 174 A1175B4E1F6B337300C4B9F0 /* PopupMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = A1175B4C1F6B337300C4B9F0 /* PopupMenu.h */; }; … … 396 397 A10826F81F576292004772AC /* WebPanel.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = WebPanel.mm; sourceTree = "<group>"; }; 397 398 A10826FD1F58A433004772AC /* NSGraphicsSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSGraphicsSPI.h; sourceTree = "<group>"; }; 399 A1175B481F6AFF8E00C4B9F0 /* SpeechSynthesisSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SpeechSynthesisSPI.h; sourceTree = "<group>"; }; 398 400 A1175B4A1F6B2D7E00C4B9F0 /* NSCellSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSCellSPI.h; sourceTree = "<group>"; }; 399 401 A1175B4C1F6B337300C4B9F0 /* PopupMenu.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PopupMenu.h; sourceTree = "<group>"; }; … … 642 644 0C7785851F45130F00F4EBB6 /* PIPSPI.h */, 643 645 0C7785871F45130F00F4EBB6 /* QuickLookMacSPI.h */, 646 A1175B481F6AFF8E00C4B9F0 /* SpeechSynthesisSPI.h */, 644 647 71B1141F26823ACD004D6701 /* SystemPreviewSPI.h */, 645 648 0C7785881F45130F00F4EBB6 /* TelephonyUtilitiesSPI.h */, … … 1010 1013 93B38EBE25821CB600198E63 /* SpeechSoftLink.h in Headers */, 1011 1014 93B38EC225821D2200198E63 /* SpeechSPI.h in Headers */, 1015 A1175B491F6AFF8E00C4B9F0 /* SpeechSynthesisSPI.h in Headers */, 1012 1016 0C5AF9211F43A4C7002EAC02 /* SQLite3SPI.h in Headers */, 1013 1017 71B1142026823ACD004D6701 /* SystemPreviewSPI.h in Headers */, -
trunk/Source/WebCore/PAL/pal/cocoa/AVFoundationSoftLink.h
r284742 r284822 77 77 SOFT_LINK_CLASS_FOR_HEADER(PAL, AVAudioSession) 78 78 SOFT_LINK_CLASS_FOR_HEADER(PAL, AVPersistableContentKeyRequest) 79 #endif80 81 #if PLATFORM(COCOA)82 79 SOFT_LINK_CLASS_FOR_HEADER(PAL, AVSpeechSynthesisVoice) 83 80 SOFT_LINK_CLASS_FOR_HEADER(PAL, AVSpeechSynthesizer) -
trunk/Source/WebCore/PAL/pal/cocoa/AVFoundationSoftLink.mm
r284742 r284822 103 103 SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, AVFoundation, AVAudioSession, PAL_EXPORT) 104 104 SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, AVFoundation, AVPersistableContentKeyRequest, PAL_EXPORT) 105 #endif106 107 #if PLATFORM(COCOA)108 105 SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, AVFoundation, AVSpeechSynthesisVoice, PAL_EXPORT) 109 106 SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, AVFoundation, AVSpeechSynthesizer, PAL_EXPORT) -
trunk/Source/WebCore/PAL/pal/spi/cocoa/AXSpeechManagerSPI.h
r284742 r284822 26 26 #pragma once 27 27 28 #if PLATFORM( COCOA)28 #if PLATFORM(IOS_FAMILY) 29 29 30 30 // FIXME: Undo when isSystemVoice is available in all SDKs. … … 43 43 #endif // USE(APPLE_INTERNAL_SDK) 44 44 45 #endif // PLATFORM( COCOA)45 #endif // PLATFORM(IOS_FAMILY) 46 46 -
trunk/Source/WebCore/SourcesCocoa.txt
r284742 r284822 257 257 platform/cocoa/PasteboardCustomDataCocoa.mm 258 258 platform/cocoa/PlatformPasteboardCocoa.mm 259 platform/cocoa/PlatformSpeechSynthesizerCocoa.mm @no-unify260 259 platform/cocoa/PlaybackSessionModelMediaElement.mm 261 260 platform/cocoa/PowerSourceNotifier.mm … … 441 440 platform/ios/PlatformPasteboardIOS.mm 442 441 platform/ios/PlatformScreenIOS.mm 442 platform/ios/PlatformSpeechSynthesizerIOS.mm @no-unify 443 443 platform/ios/PlaybackSessionInterfaceAVKit.mm @no-unify 444 444 platform/ios/PreviewConverterIOS.mm … … 487 487 platform/mac/PlatformPasteboardMac.mm 488 488 platform/mac/PlatformScreenMac.mm 489 platform/mac/PlatformSpeechSynthesizerMac.mm 489 490 platform/mac/PlaybackSessionInterfaceMac.mm @no-unify 490 491 platform/mac/PluginBlocklist.mm -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r284742 r284822 3711 3711 A9D248070D757E7D00FDF959 /* JSDOMMimeType.h in Headers */ = {isa = PBXBuildFile; fileRef = A9D248030D757E7D00FDF959 /* JSDOMMimeType.h */; }; 3712 3712 A9D248090D757E7D00FDF959 /* JSDOMMimeTypeArray.h in Headers */ = {isa = PBXBuildFile; fileRef = A9D248050D757E7D00FDF959 /* JSDOMMimeTypeArray.h */; }; 3713 AA12DF491743DF83004DAFDF /* PlatformSpeechSynthesizer Cocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = AAE3755D17429BCC006200C2 /* PlatformSpeechSynthesizerCocoa.mm */; };3713 AA12DF491743DF83004DAFDF /* PlatformSpeechSynthesizerIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = AAE3755D17429BCC006200C2 /* PlatformSpeechSynthesizerIOS.mm */; }; 3714 3714 AA21ECCD0ABF0FC6002B834C /* CSSCursorImageValue.h in Headers */ = {isa = PBXBuildFile; fileRef = AA0978EE0ABAA6E100874480 /* CSSCursorImageValue.h */; settings = {ATTRIBUTES = (Private, ); }; }; 3715 3715 AA2A5ACE16A485FD00975A25 /* SpeechSynthesisVoice.h in Headers */ = {isa = PBXBuildFile; fileRef = AA2A5AC716A485D500975A25 /* SpeechSynthesisVoice.h */; }; … … 7302 7302 29E04A27BED2F81F98E9022B /* JSBeforeUnloadEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSBeforeUnloadEvent.h; sourceTree = "<group>"; }; 7303 7303 29E4D8DF16B0940F00C84704 /* PlatformSpeechSynthesizer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PlatformSpeechSynthesizer.h; sourceTree = "<group>"; }; 7304 29E4D8E016B0959800C84704 /* PlatformSpeechSynthesizerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformSpeechSynthesizerMac.mm; sourceTree = "<group>"; }; 7304 7305 29FAF4B5195AB08900A522DC /* TextUndoInsertionMarkupMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextUndoInsertionMarkupMac.h; sourceTree = "<group>"; }; 7305 7306 2A4107A026CB66ED003BF797 /* CSSKeywordValue.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CSSKeywordValue.cpp; sourceTree = "<group>"; }; … … 13630 13631 AAE27B7416CBFC0D00623043 /* PlatformSpeechSynthesizerMock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformSpeechSynthesizerMock.cpp; sourceTree = "<group>"; }; 13631 13632 AAE27B7516CBFC0D00623043 /* PlatformSpeechSynthesizerMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformSpeechSynthesizerMock.h; sourceTree = "<group>"; }; 13632 AAE3755D17429BCC006200C2 /* PlatformSpeechSynthesizer Cocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformSpeechSynthesizerCocoa.mm; sourceTree = "<group>"; };13633 AAE3755D17429BCC006200C2 /* PlatformSpeechSynthesizerIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformSpeechSynthesizerIOS.mm; sourceTree = "<group>"; }; 13633 13634 AAF5B7B11524B4BD0004CB49 /* WebSocketFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebSocketFrame.cpp; sourceTree = "<group>"; }; 13634 13635 AB23A32509BBA7D00067CC53 /* BeforeTextInsertedEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BeforeTextInsertedEvent.cpp; sourceTree = "<group>"; }; … … 22391 22392 C5F765BA14E1ECF4006C899B /* PlatformPasteboardMac.mm */, 22392 22393 BC94D1070C274F88006BC617 /* PlatformScreenMac.mm */, 22394 29E4D8E016B0959800C84704 /* PlatformSpeechSynthesizerMac.mm */, 22393 22395 CDA29A151CBDA56C00901CCF /* PlaybackSessionInterfaceMac.h */, 22394 22396 CDA29A141CBDA56C00901CCF /* PlaybackSessionInterfaceMac.mm */, … … 25061 25063 C5278B0B17F212EA003A2998 /* PlatformPasteboardIOS.mm */, 25062 25064 E45390320EAFD637003695C8 /* PlatformScreenIOS.mm */, 25065 AAE3755D17429BCC006200C2 /* PlatformSpeechSynthesizerIOS.mm */, 25063 25066 CDA29A2E1CBF73FC00901CCF /* PlaybackSessionInterfaceAVKit.h */, 25064 25067 CDA29A2F1CBF73FC00901CCF /* PlaybackSessionInterfaceAVKit.mm */, … … 25219 25222 F4FB35002350C96200F0094A /* PasteboardCustomDataCocoa.mm */, 25220 25223 F4628A9E234D3BBF00BC884C /* PlatformPasteboardCocoa.mm */, 25221 AAE3755D17429BCC006200C2 /* PlatformSpeechSynthesizerCocoa.mm */,25222 25224 52B0D4BD1C57FD1E0077CE53 /* PlatformView.h */, 25223 25225 CDA29A0A1CBD9A7400901CCF /* PlaybackSessionModel.h */, … … 36892 36894 E16982601134636A00894115 /* ObjCRuntimeObject.mm in Sources */, 36893 36895 CEA284662141E84900E407E8 /* PlatformEventFactoryIOS.mm in Sources */, 36894 AA12DF491743DF83004DAFDF /* PlatformSpeechSynthesizer Cocoa.mm in Sources */,36896 AA12DF491743DF83004DAFDF /* PlatformSpeechSynthesizerIOS.mm in Sources */, 36895 36897 CDA29A301CBF74D400901CCF /* PlaybackSessionInterfaceAVKit.mm in Sources */, 36896 36898 CDA29A161CBDA56C00901CCF /* PlaybackSessionInterfaceMac.mm in Sources */, -
trunk/Source/WebCore/platform/ios/PlatformSpeechSynthesizerIOS.mm
r284821 r284822 26 26 #import "PlatformSpeechSynthesizer.h" 27 27 28 #if ENABLE(SPEECH_SYNTHESIS) && PLATFORM( COCOA)28 #if ENABLE(SPEECH_SYNTHESIS) && PLATFORM(IOS_FAMILY) 29 29 30 30 #import "PlatformSpeechSynthesisUtterance.h" 31 31 #import "PlatformSpeechSynthesisVoice.h" 32 33 #if __has_include(<AVFAudio/AVSpeechSynthesis.h>) 34 #import <AVFAudio/AVSpeechSynthesis.h> 35 #else 36 #import <AVFoundation/AVFoundation.h> 37 #endif 38 32 #import <AVFoundation/AVSpeechSynthesis.h> 39 33 #import <pal/spi/cocoa/AXSpeechManagerSPI.h> 40 34 #import <wtf/BlockObjCExceptions.h> … … 70 64 #define AVSpeechUtteranceMaximumSpeechRate getAVSpeechUtteranceMaximumSpeechRate() 71 65 72 @interface WebSpeechSynthesisWrapper : NSObject<AVSpeechSynthesizerDelegate> { 66 @interface WebSpeechSynthesisWrapper : NSObject<AVSpeechSynthesizerDelegate> 67 { 73 68 WebCore::PlatformSpeechSynthesizer* m_synthesizerObject; 74 69 // Hold a Ref to the utterance so that it won't disappear until the synth is done with it. … … 197 192 198 193 // Clear the m_utterance variable in case finish speaking kicks off a new speaking job immediately. 199 RefPtr<WebCore::PlatformSpeechSynthesisUtterance> p rotectedUtterance = m_utterance;194 RefPtr<WebCore::PlatformSpeechSynthesisUtterance> platformUtterance = m_utterance; 200 195 m_utterance = nullptr; 201 196 202 m_synthesizerObject->client()->didFinishSpeaking(*p rotectedUtterance);197 m_synthesizerObject->client()->didFinishSpeaking(*platformUtterance); 203 198 } 204 199 … … 231 226 232 227 // Clear the m_utterance variable in case finish speaking kicks off a new speaking job immediately. 233 RefPtr<WebCore::PlatformSpeechSynthesisUtterance> p rotectedUtterance = m_utterance;228 RefPtr<WebCore::PlatformSpeechSynthesisUtterance> platformUtterance = m_utterance; 234 229 m_utterance = nullptr; 235 230 236 m_synthesizerObject->client()->didFinishSpeaking(*p rotectedUtterance);231 m_synthesizerObject->client()->didFinishSpeaking(*platformUtterance); 237 232 } 238 233 … … 245 240 return; 246 241 247 // AVSpeechSynthesizeronly supports word boundaries.242 // iOS only supports word boundaries. 248 243 m_synthesizerObject->client()->boundaryEventOccurred(*m_utterance, WebCore::SpeechBoundary::SpeechWordBoundary, characterRange.location); 249 244 } … … 281 276 if (includeVoice) 282 277 #else 283 // AVSpeechSynthesis on macOS does not support quality property correctly. 284 if (voice.quality == AVSpeechSynthesisVoiceQualityDefault 285 || (TARGET_OS_OSX && ![voiceURI hasSuffix:@"premium"])) 278 if (voice.quality == AVSpeechSynthesisVoiceQualityDefault) 286 279 #endif 287 280 m_voiceList.append(PlatformSpeechSynthesisVoice::create(voiceURI, name, language, true, isDefault)); … … 320 313 } // namespace WebCore 321 314 322 #endif // ENABLE(SPEECH_SYNTHESIS) && PLATFORM( COCOA)315 #endif // ENABLE(SPEECH_SYNTHESIS) && PLATFORM(IOS_FAMILY)
Note:
See TracChangeset
for help on using the changeset viewer.