Add the following properties to the WKPreferences SPI: _allowsInlineMediaPlayback _applePayEnabled _avFoundationNSURLSessionEnabled _dnsPrefetchingEnabled _inlineMediaPlaybackRequiresPlaysInlineAttribute _invisibleMediaAutoplayNotPermitted _legacyEncryptedMediaAPIEnabled _lowPowerVideoAudioBufferSizeEnabled _mainContentUserGestureOverrideEnabled _mediaStreamEnabled _needsStorageAccessFromFileURLsQuirk _pdfPluginEnabled _requiresUserActionForAudioPlayback _requiresUserActionForVideoPlayback _serviceControlsEnabled _showsToolTipOverTruncatedText _textAreasAreResizable _useGiantTiles _wantsBalancedSetDefersLoadingBehavior _webAudioEnabled Some of these are exposed by the WKPreferencesRef C SPI, but some (like _lowPowerVideoAudioBufferSizeEnabled) are not and are being implicitly set by values in Safari's Defaults.plist. When using WKWebView, this will no longer work since WebKit won't read preferences from Safari's defaults, so they need to be exposed via WKPreferences.
<rdar://problem/37795169>
Correction, change _requiresUserActionForAudioPlayback to _requiresUserGestureForAudioPlayback and _requiresUserActionForVideoPlayback to _requiresUserGestureForVideoPlayback.
Created attachment 334486 [details] Patch
Comment on attachment 334486 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=334486&action=review > Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm:1091 > + WebCore::DeprecatedGlobalSettings::setLowPowerVideoAudioBufferSizeEnabled(enabled); This is probably setting a bool in the wrong process. > Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h:166 > +@property (nonatomic, setter=_setAVFoundationNSURLSessionEnabled:) BOOL _avFoundationNSURLSessionEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA)); This should always be enabled.
(In reply to Alex Christensen from comment #4) > Comment on attachment 334486 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=334486&action=review > > > Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm:1091 > > + WebCore::DeprecatedGlobalSettings::setLowPowerVideoAudioBufferSizeEnabled(enabled); > > This is probably setting a bool in the wrong process. Good point. I don't think we can easily change this from the UI process. I'll remove this and talk to Jer about what he wants to do, e.g. maybe this deprecated setting should default to true anyway. > > > Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h:166 > > +@property (nonatomic, setter=_setAVFoundationNSURLSessionEnabled:) BOOL _avFoundationNSURLSessionEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA)); > > This should always be enabled. OK, I'll remove this as well.
Created attachment 334537 [details] Patch
Comment on attachment 334537 [details] Patch Rejecting attachment 334537 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-01', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 334537, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: rdparty/autoinstalled/mechanize/_urllib2_fork.py", line 332, in _call_chain result = func(*args) File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_urllib2_fork.py", line 1170, in https_open return self.do_open(conn_factory, req) File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_urllib2_fork.py", line 1118, in do_open raise URLError(err) urllib2.URLError: <urlopen error [Errno 60] Operation timed out> Full output: http://webkit-queues.webkit.org/results/6816090
Committed <https://trac.webkit.org/changeset/229294/webkit>.