RESOLVED FIXED183045
Expose still more WKPreferences SPI to match C SPI
https://bugs.webkit.org/show_bug.cgi?id=183045
Summary Expose still more WKPreferences SPI to match C SPI
Jeff Miller
Reported 2018-02-22 10:38:49 PST
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.
Attachments
Patch (13.29 KB, patch)
2018-02-22 16:58 PST, Jeff Miller
no flags
Patch (10.44 KB, patch)
2018-02-23 10:09 PST, Jeff Miller
achristensen: review+
commit-queue: commit-queue-
Radar WebKit Bug Importer
Comment 1 2018-02-22 11:26:54 PST
Jeff Miller
Comment 2 2018-02-22 16:29:45 PST
Correction, change _requiresUserActionForAudioPlayback to _requiresUserGestureForAudioPlayback and _requiresUserActionForVideoPlayback to _requiresUserGestureForVideoPlayback.
Jeff Miller
Comment 3 2018-02-22 16:58:21 PST
Alex Christensen
Comment 4 2018-02-23 09:32:43 PST
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.
Jeff Miller
Comment 5 2018-02-23 09:36:43 PST
(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.
Jeff Miller
Comment 6 2018-02-23 10:09:31 PST
WebKit Commit Bot
Comment 7 2018-03-05 13:38:32 PST
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
Jeff Miller
Comment 8 2018-03-05 15:20:51 PST
Note You need to log in before you can comment on or make changes to this bug.