Changeset 271219 in webkit
- Timestamp:
- Jan 6, 2021, 4:16:30 PM (6 years ago)
- Location:
- trunk/Source
- Files:
-
- 29 edited
-
WTF/ChangeLog (modified) (1 diff)
-
WTF/Scripts/Preferences/WebPreferences.yaml (modified) (1 diff)
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/PAL/ChangeLog (modified) (1 diff)
-
WebCore/PAL/pal/cocoa/AVFoundationSoftLink.h (modified) (1 diff)
-
WebCore/PAL/pal/cocoa/AVFoundationSoftLink.mm (modified) (1 diff)
-
WebCore/html/HTMLMediaElement.cpp (modified) (1 diff)
-
WebCore/page/Settings.yaml (modified) (1 diff)
-
WebCore/page/SettingsBase.h (modified) (1 diff)
-
WebCore/platform/graphics/MediaPlayer.cpp (modified) (1 diff)
-
WebCore/platform/graphics/MediaPlayer.h (modified) (2 diffs)
-
WebCore/platform/graphics/MediaPlayerEnums.h (modified) (2 diffs)
-
WebCore/platform/graphics/MediaPlayerPrivate.h (modified) (1 diff)
-
WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h (modified) (1 diff)
-
WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (modified) (4 diffs)
-
WebKit/ChangeLog (modified) (1 diff)
-
WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp (modified) (1 diff)
-
WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h (modified) (1 diff)
-
WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in (modified) (1 diff)
-
WebKit/UIProcess/API/Cocoa/WKPreferences.mm (modified) (1 diff)
-
WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h (modified) (2 diffs)
-
WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp (modified) (1 diff)
-
WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h (modified) (1 diff)
-
WebKit/WebProcess/WebPage/WebPage.cpp (modified) (1 diff)
-
WebKitLegacy/mac/ChangeLog (modified) (1 diff)
-
WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h (modified) (1 diff)
-
WebKitLegacy/mac/WebView/WebPreferences.mm (modified) (2 diffs)
-
WebKitLegacy/mac/WebView/WebPreferencesPrivate.h (modified) (2 diffs)
-
WebKitLegacy/mac/WebView/WebView.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r271214 r271219 1 2021-01-06 Jer Noble <jer.noble@apple.com> 2 3 [Cocoa] Revert audioTimePitchAlgorithm to "TimeDomain" from "Spectral" 4 https://bugs.webkit.org/show_bug.cgi?id=220341 5 6 Reviewed by Youenn Fablet. 7 8 Add a private preference to control what pitch correction algorithm will be used by MediaPlayer. 9 10 * Scripts/Preferences/WebPreferences.yaml: 11 1 12 2021-01-06 Andy Estes <aestes@apple.com> 2 13 -
trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml
r270762 r271219 1718 1718 default: true 1719 1719 1720 PitchCorrectionAlgorithm: 1721 type: uint32_t 1722 webcoreBinding: custom 1723 defaultValue: 1724 WebKitLegacy: 1725 "PLATFORM(COCOA)": static_cast<uint32_t>(WebCore::MediaPlayerEnums::PitchCorrectionAlgorithm::BestForSpeech) 1726 default: static_cast<uint32_t>(WebCore::MediaPlayerEnums::PitchCorrectionAlgorithm::BestAllAround) 1727 WebKit: 1728 "PLATFORM(COCOA)": static_cast<uint32_t>(WebCore::MediaPlayerEnums::PitchCorrectionAlgorithm::BestForSpeech) 1729 default: static_cast<uint32_t>(WebCore::MediaPlayerEnums::PitchCorrectionAlgorithm::BestAllAround) 1730 1720 1731 PluginsEnabled: 1721 1732 type: bool -
trunk/Source/WebCore/ChangeLog
r271218 r271219 1 2021-01-06 Jer Noble <jer.noble@apple.com> 2 3 [Cocoa] Revert audioTimePitchAlgorithm to "TimeDomain" from "Spectral" 4 https://bugs.webkit.org/show_bug.cgi?id=220341 5 6 Reviewed by Youenn Fablet. 7 8 The "Spectral" pitch correction algorithm has notable deficiencies when applied to spoken 9 content; notably, transient propagation is missing, and the resulting audio sounds "robotic". 10 11 Revert to "TimeDomain", which is both more computationally inexpensive, and both propogates 12 transients and is optimized for non-harmonic content like speech. 13 14 Add a setting to allow clients to customize this behavior, e.g., if those clients would prefer 15 optimizing for music over speech. 16 17 Drive-by fix: re-apply the pitch algorithm after the AVPlayerItem reaches the "readyToPlay" 18 status to work around an AVFoundation bug. 19 20 * html/HTMLMediaElement.cpp: 21 (WebCore::HTMLMediaElement::loadResource): 22 * page/Settings.yaml: 23 * page/SettingsBase.h: 24 * platform/graphics/MediaPlayer.cpp: 25 (WebCore::MediaPlayer::setPitchCorrectionAlgorithm): 26 * platform/graphics/MediaPlayer.h: 27 * platform/graphics/MediaPlayerEnums.h: 28 * platform/graphics/MediaPlayerPrivate.h: 29 (WebCore::MediaPlayerPrivateInterface::setPitchCorrectionAlgorithm): 30 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: 31 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: 32 (WebCore::audioTimePitchAlgorithmForMediaPlayerPitchCorrectionAlgorithm): 33 (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): 34 (WebCore::MediaPlayerPrivateAVFoundationObjC::setPreservesPitch): 35 (WebCore::MediaPlayerPrivateAVFoundationObjC::setPitchCorrectionAlgorithm): 36 (WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatusDidChange): 37 1 38 2021-01-06 Aditya Keerthi <akeerthi@apple.com> 2 39 -
trunk/Source/WebCore/PAL/ChangeLog
r270872 r271219 1 2021-01-06 Jer Noble <jer.noble@apple.com> 2 3 [Cocoa] Revert audioTimePitchAlgorithm to "TimeDomain" from "Spectral" 4 https://bugs.webkit.org/show_bug.cgi?id=220341 5 6 Reviewed by Youenn Fablet. 7 8 * pal/cocoa/AVFoundationSoftLink.h: 9 * pal/cocoa/AVFoundationSoftLink.mm: 10 1 11 2020-12-15 Jer Noble <jer.noble@apple.com> 2 12 -
trunk/Source/WebCore/PAL/pal/cocoa/AVFoundationSoftLink.h
r268308 r271219 101 101 SOFT_LINK_CONSTANT_FOR_HEADER(PAL, AVFoundation, AVAudioTimePitchAlgorithmSpectral, NSString *) 102 102 #define AVAudioTimePitchAlgorithmSpectral PAL::get_AVFoundation_AVAudioTimePitchAlgorithmSpectral() 103 SOFT_LINK_CONSTANT_FOR_HEADER(PAL, AVFoundation, AVAudioTimePitchAlgorithmTimeDomain, NSString *) 104 #define AVAudioTimePitchAlgorithmTimeDomain PAL::get_AVFoundation_AVAudioTimePitchAlgorithmTimeDomain() 103 105 SOFT_LINK_CONSTANT_FOR_HEADER(PAL, AVFoundation, AVAudioTimePitchAlgorithmVarispeed, NSString *) 104 106 #define AVAudioTimePitchAlgorithmVarispeed PAL::get_AVFoundation_AVAudioTimePitchAlgorithmVarispeed() -
trunk/Source/WebCore/PAL/pal/cocoa/AVFoundationSoftLink.mm
r268308 r271219 127 127 SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(PAL, AVFoundation, AVAssetImageGeneratorApertureModeCleanAperture, NSString *, PAL_EXPORT) 128 128 SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(PAL, AVFoundation, AVAudioTimePitchAlgorithmSpectral, NSString *, PAL_EXPORT) 129 SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(PAL, AVFoundation, AVAudioTimePitchAlgorithmTimeDomain, NSString *, PAL_EXPORT) 129 130 SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(PAL, AVFoundation, AVAudioTimePitchAlgorithmVarispeed, NSString *, PAL_EXPORT) 130 131 SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(PAL, AVFoundation, AVCaptureDeviceWasConnectedNotification, NSString *, PAL_EXPORT) -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r270171 r271219 1448 1448 m_player->setPreload(m_mediaSession->effectivePreloadForElement()); 1449 1449 m_player->setPreservesPitch(m_webkitPreservesPitch); 1450 m_player->setPitchCorrectionAlgorithm(document().settings().pitchCorrectionAlgorithm()); 1450 1451 1451 1452 if (!m_explicitlyMuted) { -
trunk/Source/WebCore/page/Settings.yaml
r270823 r271219 411 411 default: false 412 412 413 PitchCorrectionAlgorithm: 414 type: uint32_t 415 refinedType: MediaPlayerEnums::PitchCorrectionAlgorithm 416 defaultValue: 417 WebCore: 418 default: MediaPlayerEnums::PitchCorrectionAlgorithm::BestAllAround 419 413 420 PDFImageCachingPolicy: 414 421 type: uint32_t -
trunk/Source/WebCore/page/SettingsBase.h
r270557 r271219 36 36 #include "FrameFlattening.h" 37 37 #include "HTMLParserScriptingFlagPolicy.h" 38 #include "MediaPlayerEnums.h" 38 39 #include "PDFImageCachingPolicy.h" 39 40 #include "StorageBlockingPolicy.h" -
trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp
r270586 r271219 932 932 } 933 933 934 void MediaPlayer::setPitchCorrectionAlgorithm(PitchCorrectionAlgorithm pitchCorrectionAlgorithm) 935 { 936 if (m_pitchCorrectionAlgorithm == pitchCorrectionAlgorithm) 937 return; 938 939 m_pitchCorrectionAlgorithm = pitchCorrectionAlgorithm; 940 m_private->setPitchCorrectionAlgorithm(pitchCorrectionAlgorithm); 941 } 942 934 943 std::unique_ptr<PlatformTimeRanges> MediaPlayer::buffered() 935 944 { -
trunk/Source/WebCore/platform/graphics/MediaPlayer.h
r269850 r271219 399 399 void setPreservesPitch(bool); 400 400 401 void setPitchCorrectionAlgorithm(PitchCorrectionAlgorithm); 402 PitchCorrectionAlgorithm pitchCorrectionAlgorithm() const { return m_pitchCorrectionAlgorithm; } 403 401 404 std::unique_ptr<PlatformTimeRanges> buffered(); 402 405 std::unique_ptr<PlatformTimeRanges> seekable(); … … 672 675 bool m_initializingMediaEngine { false }; 673 676 DynamicRangeMode m_preferredDynamicRangeMode { DynamicRangeMode::Standard }; 677 PitchCorrectionAlgorithm m_pitchCorrectionAlgorithm { PitchCorrectionAlgorithm::BestAllAround }; 674 678 675 679 #if ENABLE(MEDIA_SOURCE) -
trunk/Source/WebCore/platform/graphics/MediaPlayerEnums.h
r257711 r271219 107 107 }; 108 108 109 enum class PitchCorrectionAlgorithm : uint8_t { 110 BestAllAround, 111 BestForMusic, 112 BestForSpeech, 113 }; 109 114 }; 110 115 … … 241 246 }; 242 247 248 template<> struct EnumTraits<WebCore::MediaPlayerEnums::PitchCorrectionAlgorithm> { 249 using values = EnumValues< 250 WebCore::MediaPlayerEnums::PitchCorrectionAlgorithm, 251 WebCore::MediaPlayerEnums::PitchCorrectionAlgorithm::BestAllAround, 252 WebCore::MediaPlayerEnums::PitchCorrectionAlgorithm::BestForMusic, 253 WebCore::MediaPlayerEnums::PitchCorrectionAlgorithm::BestForSpeech 254 >; 255 }; 256 243 257 }; // namespace WTF -
trunk/Source/WebCore/platform/graphics/MediaPlayerPrivate.h
r269907 r271219 124 124 125 125 virtual void setPreservesPitch(bool) { } 126 virtual void setPitchCorrectionAlgorithm(MediaPlayer::PitchCorrectionAlgorithm) { } 126 127 127 128 virtual bool paused() const = 0; -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h
r269850 r271219 199 199 double rate() const final; 200 200 void setPreservesPitch(bool) final; 201 void setPitchCorrectionAlgorithm(MediaPlayer::PitchCorrectionAlgorithm) final; 201 202 void seekToTime(const MediaTime&, const MediaTime& negativeTolerance, const MediaTime& positiveTolerance) final; 202 203 unsigned long long totalBytes() const final; -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
r271214 r271219 1036 1036 } 1037 1037 1038 static NSString* audioTimePitchAlgorithmForMediaPlayerPitchCorrectionAlgorithm(MediaPlayer::PitchCorrectionAlgorithm pitchCorrectionAlgorithm, bool preservesPitch) 1039 { 1040 if (!preservesPitch) 1041 return AVAudioTimePitchAlgorithmVarispeed; 1042 1043 switch (pitchCorrectionAlgorithm) { 1044 case MediaPlayer::PitchCorrectionAlgorithm::BestAllAround: 1045 case MediaPlayer::PitchCorrectionAlgorithm::BestForMusic: 1046 return AVAudioTimePitchAlgorithmSpectral; 1047 case MediaPlayer::PitchCorrectionAlgorithm::BestForSpeech: 1048 return AVAudioTimePitchAlgorithmTimeDomain; 1049 } 1050 } 1051 1038 1052 void MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem() 1039 1053 { … … 1054 1068 [m_avPlayerItem.get() addObserver:m_objcObserver.get() forKeyPath:keyName options:options context:(void *)MediaPlayerAVFoundationObservationContextPlayerItem]; 1055 1069 1056 [m_avPlayerItem setAudioTimePitchAlgorithm: (player()->preservesPitch() ? AVAudioTimePitchAlgorithmSpectral : AVAudioTimePitchAlgorithmVarispeed)];1070 [m_avPlayerItem setAudioTimePitchAlgorithm:audioTimePitchAlgorithmForMediaPlayerPitchCorrectionAlgorithm(player()->pitchCorrectionAlgorithm(), player()->preservesPitch())]; 1057 1071 1058 1072 if (m_avPlayer) … … 1462 1476 { 1463 1477 if (m_avPlayerItem) 1464 [m_avPlayerItem setAudioTimePitchAlgorithm:(preservesPitch ? AVAudioTimePitchAlgorithmSpectral : AVAudioTimePitchAlgorithmVarispeed)]; 1478 [m_avPlayerItem setAudioTimePitchAlgorithm:audioTimePitchAlgorithmForMediaPlayerPitchCorrectionAlgorithm(player()->pitchCorrectionAlgorithm(), preservesPitch)]; 1479 } 1480 1481 void MediaPlayerPrivateAVFoundationObjC::setPitchCorrectionAlgorithm(MediaPlayer::PitchCorrectionAlgorithm pitchCorrectionAlgorithm) 1482 { 1483 if (m_avPlayerItem) 1484 [m_avPlayerItem setAudioTimePitchAlgorithm:audioTimePitchAlgorithmForMediaPlayerPitchCorrectionAlgorithm(pitchCorrectionAlgorithm, player()->preservesPitch())]; 1465 1485 } 1466 1486 … … 2948 2968 m_cachedItemStatus = status; 2949 2969 2970 // FIXME(rdar://72829354): Remove after AVFoundation radar is fixed. 2971 if (status == AVPlayerItemStatusReadyToPlay) 2972 [m_avPlayerItem setAudioTimePitchAlgorithm:audioTimePitchAlgorithmForMediaPlayerPitchCorrectionAlgorithm(player()->pitchCorrectionAlgorithm(), player()->preservesPitch())]; 2973 2950 2974 updateStates(); 2951 2975 } -
trunk/Source/WebKit/ChangeLog
r271217 r271219 1 2021-01-06 Jer Noble <jer.noble@apple.com> 2 3 [Cocoa] Revert audioTimePitchAlgorithm to "TimeDomain" from "Spectral" 4 https://bugs.webkit.org/show_bug.cgi?id=220341 5 6 Reviewed by Youenn Fablet. 7 8 Add a private preference to control what pitch correction algorithm will be used by MediaPlayer. 9 10 * GPUProcess/media/RemoteMediaPlayerProxy.cpp: 11 (WebKit::RemoteMediaPlayerProxy::setPitchCorrectionAlgorithm): 12 * GPUProcess/media/RemoteMediaPlayerProxy.h: 13 * GPUProcess/media/RemoteMediaPlayerProxy.messages.in: 14 * UIProcess/API/Cocoa/WKPreferences.mm: 15 (-[WKPreferences _pitchCorrectionAlgorithm]): 16 (-[WKPreferences _setPitchCorrectionAlgorithm:]): 17 * UIProcess/API/Cocoa/WKPreferencesPrivate.h: 18 * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: 19 (WebKit::MediaPlayerPrivateRemote::setPitchCorrectionAlgorithm): 20 * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: 21 * WebProcess/WebPage/WebPage.cpp: 22 (WebKit::WebPage::updatePreferences): 23 1 24 2021-01-06 Yusuke Suzuki <ysuzuki@apple.com> 2 25 -
trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp
r271076 r271219 207 207 } 208 208 209 void RemoteMediaPlayerProxy::setPitchCorrectionAlgorithm(WebCore::MediaPlayer::PitchCorrectionAlgorithm algorithm) 210 { 211 m_player->setPitchCorrectionAlgorithm(algorithm); 212 } 213 209 214 void RemoteMediaPlayerProxy::prepareForRendering() 210 215 { -
trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h
r271076 r271219 134 134 void setPrivateBrowsingMode(bool); 135 135 void setPreservesPitch(bool); 136 void setPitchCorrectionAlgorithm(WebCore::MediaPlayer::PitchCorrectionAlgorithm); 136 137 137 138 void setVisible(bool); -
trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in
r270805 r271219 47 47 SetPrivateBrowsingMode(bool privateMode) 48 48 SetPreservesPitch(bool preservesPitch) 49 SetPitchCorrectionAlgorithm(WebCore::MediaPlayer::PitchCorrectionAlgorithm algorithm) 49 50 50 51 PrepareForRendering() -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
r271032 r271219 1470 1470 } 1471 1471 1472 - (_WKPitchCorrectionAlgorithm)_pitchCorrectionAlgorithm 1473 { 1474 return static_cast<_WKPitchCorrectionAlgorithm>(_preferences->pitchCorrectionAlgorithm()); 1475 } 1476 1477 - (void)_setPitchCorrectionAlgorithm:(_WKPitchCorrectionAlgorithm)pitchCorrectionAlgorithm 1478 { 1479 _preferences->setPitchCorrectionAlgorithm(pitchCorrectionAlgorithm); 1480 } 1481 1472 1482 @end 1473 1483 -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h
r270710 r271219 52 52 } WK_API_AVAILABLE(macos(10.13.4), ios(11.3)); 53 53 54 typedef NS_ENUM(NSInteger, _WKPitchCorrectionAlgorithm) { 55 _WKPitchCorrectionAlgorithmBestAllAround, 56 _WKPitchCorrectionAlgorithmBestForMusic, 57 _WKPitchCorrectionAlgorithmBestForSpeech, 58 } WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)); 59 54 60 @class _WKExperimentalFeature; 55 61 @class _WKInternalDebugFeature; … … 164 170 @property (nonatomic, setter=_setSpeechRecognitionEnabled:) BOOL _speechRecognitionEnabled WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)); 165 171 @property (nonatomic, setter=_setPrivateClickMeasurementEnabled:) BOOL _privateClickMeasurementEnabled WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)); 172 @property (nonatomic, setter=_setPitchCorrectionAlgorithm:) _WKPitchCorrectionAlgorithm _pitchCorrectionAlgorithm WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)); 166 173 167 174 #if !TARGET_OS_IPHONE -
trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp
r270987 r271219 214 214 } 215 215 216 void MediaPlayerPrivateRemote::setPitchCorrectionAlgorithm(WebCore::MediaPlayer::PitchCorrectionAlgorithm algorithm) 217 { 218 connection().send(Messages::RemoteMediaPlayerProxy::SetPitchCorrectionAlgorithm(algorithm), m_id); 219 } 220 216 221 void MediaPlayerPrivateRemote::setVolumeDouble(double volume) 217 222 { -
trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h
r270563 r271219 207 207 void setPrivateBrowsingMode(bool) final; 208 208 void setPreservesPitch(bool) final; 209 void setPitchCorrectionAlgorithm(WebCore::MediaPlayer::PitchCorrectionAlgorithm) final; 209 210 210 211 bool shouldIgnoreIntrinsicSize() final; -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r271214 r271219 3756 3756 settings.setDataDetectorTypes(static_cast<DataDetectorType>(store.getUInt32ValueForKey(WebPreferencesKey::dataDetectorTypesKey()))); 3757 3757 #endif 3758 settings.setPitchCorrectionAlgorithm(static_cast<MediaPlayerEnums::PitchCorrectionAlgorithm>(store.getUInt32ValueForKey(WebPreferencesKey::pitchCorrectionAlgorithmKey()))); 3758 3759 3759 3760 DatabaseManager::singleton().setIsAvailable(store.getBoolValueForKey(WebPreferencesKey::databasesEnabledKey())); -
trunk/Source/WebKitLegacy/mac/ChangeLog
r271131 r271219 1 2021-01-06 Jer Noble <jer.noble@apple.com> 2 3 [Cocoa] Revert audioTimePitchAlgorithm to "TimeDomain" from "Spectral" 4 https://bugs.webkit.org/show_bug.cgi?id=220341 5 6 Reviewed by Youenn Fablet. 7 8 Add a private preference to control what pitch correction algorithm will be used by MediaPlayer. 9 10 * WebView/WebPreferenceKeysPrivate.h: 11 * WebView/WebPreferences.mm: 12 (-[WebPreferences _pitchCorrectionAlgorithm]): 13 (-[WebPreferences _setPitchCorrectionAlgorithm:]): 14 * WebView/WebPreferencesPrivate.h: 15 * WebView/WebView.mm: 16 (-[WebView _preferencesChanged:]): 17 1 18 2021-01-04 Jeff Miller <jeffm@apple.com> 2 19 -
trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h
r269726 r271219 289 289 #define WebKitContactPickerAPIEnabledPreferenceKey @"WebKitContactPickerAPIEnabled" 290 290 #define WebKitSpeechRecognitionEnabledPreferenceKey @"WebKitSpeechRecognitionEnabled" 291 #define WebKitPitchCorrectionAlgorithmPreferenceKey @"WebKitPitchCorrectionAlgorithm" 291 292 292 293 // The preference keys below this point are deprecated and have no effect. They should -
trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm
r269785 r271219 46 46 #import <WebCore/AudioSession.h> 47 47 #import <WebCore/DeprecatedGlobalSettings.h> 48 #import <WebCore/MediaPlayerEnums.h> 48 49 #import <WebCore/NetworkStorageSession.h> 49 50 #import <WebCore/RuntimeApplicationChecks.h> … … 3379 3380 } 3380 3381 3382 - (WebKitPitchCorrectionAlgorithm)_pitchCorrectionAlgorithm 3383 { 3384 return static_cast<WebKitPitchCorrectionAlgorithm>([self _unsignedIntValueForKey:WebKitPitchCorrectionAlgorithmPreferenceKey]); 3385 } 3386 3387 - (void)_setPitchCorrectionAlgorithm:(WebKitPitchCorrectionAlgorithm)pitchCorrectionAlgorithm 3388 { 3389 [self _setUnsignedIntValue:pitchCorrectionAlgorithm forKey:WebKitPitchCorrectionAlgorithmPreferenceKey]; 3390 } 3391 3381 3392 @end 3382 3393 -
trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h
r269726 r271219 73 73 WebKitAudioSessionCategoryAudioProcessing = 'proc', 74 74 } WebKitAudioSessionCategory; 75 76 typedef enum { 77 WebKitPitchCorrectionAlgorithmBestAllAround = 0, 78 WebKitPitchCorrectionAlgorithmBestForMusic, 79 WebKitPitchCorrectionAlgorithmBestForSpeech, 80 } WebKitPitchCorrectionAlgorithm; 75 81 76 82 extern NSString *WebPreferencesChangedNotification WEBKIT_DEPRECATED_MAC(10_3, 10_14); … … 351 357 @property (nonatomic) BOOL contactPickerAPIEnabled; 352 358 @property (nonatomic, setter=_setSpeechRecognitionEnabled:) BOOL _speechRecognitionEnabled; 359 @property (nonatomic, setter=_setPitchCorrectionAlgorithm:) WebKitPitchCorrectionAlgorithm _pitchCorrectionAlgorithm; 353 360 @end 354 361 -
trunk/Source/WebKitLegacy/mac/WebView/WebView.mm
r270932 r271219 2925 2925 settings.setTextDirectionSubmenuInclusionBehavior(core([preferences textDirectionSubmenuInclusionBehavior])); 2926 2926 settings.setBackForwardCacheExpirationInterval(Seconds { [preferences _backForwardCacheExpirationInterval] }); 2927 settings.setPitchCorrectionAlgorithm(static_cast<WebCore::MediaPlayerEnums::PitchCorrectionAlgorithm>([preferences _pitchCorrectionAlgorithm])); 2927 2928 2928 2929 BOOL mediaPlaybackRequiresUserGesture = [preferences mediaPlaybackRequiresUserGesture];
Note:
See TracChangeset
for help on using the changeset viewer.