<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[196328] trunk/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/196328">196328</a></dd>
<dt>Author</dt> <dd>jer.noble@apple.com</dd>
<dt>Date</dt> <dd>2016-02-09 12:56:48 -0800 (Tue, 09 Feb 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>[Mac] Adopt NSURLSession properties in AVAssetResourceLoader
https://bugs.webkit.org/show_bug.cgi?id=153873
Reviewed by Eric Carlson.
Source/WebCore:
Adopt a new AVAssetResourceLoader API allowing clients to specify a NSURLSession object to
use for media loading, and control the use of this property with a new Setting.
* page/Settings.cpp:
(WebCore::Settings::setAVFoundationNSURLSessionEnabled):
* page/Settings.h:
(WebCore::Settings::isAVFoundationNSURLSessionEnabled):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
* platform/spi/mac/AVFoundationSPI.h:
Source/WebKit/mac:
Add a WebKit preference to control the WebCore isAVFoundationNSURLSessionEnabled()
setting.
* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences setAVFoundationNSURLSessionEnabled:]):
(-[WebPreferences isAVFoundationNSURLSessionEnabled]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):
Source/WebKit2:
Add a WebKit2 preference to control the WebCore isAVFoundationNSURLSessionEnabled()
setting.
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetAVFoundationNSURLSessionEnabled):
(WKPreferencesGetAVFoundationNSURLSessionEnabled):
* UIProcess/API/C/WKPreferencesRef.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepageSettingscpp">trunk/Source/WebCore/page/Settings.cpp</a></li>
<li><a href="#trunkSourceWebCorepageSettingsh">trunk/Source/WebCore/page/Settings.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateAVFoundationObjCmm">trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformspimacAVFoundationSPIh">trunk/Source/WebCore/platform/spi/mac/AVFoundationSPI.h</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebPreferenceKeysPrivateh">trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebPreferencesmm">trunk/Source/WebKit/mac/WebView/WebPreferences.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebPreferencesPrivateh">trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewmm">trunk/Source/WebKit/mac/WebView/WebView.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedWebPreferencesDefinitionsh">trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPreferencescpp">trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPreferencesRefh">trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRef.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (196327 => 196328)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-02-09 20:55:47 UTC (rev 196327)
+++ trunk/Source/WebCore/ChangeLog        2016-02-09 20:56:48 UTC (rev 196328)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2016-02-04 Jer Noble <jer.noble@apple.com>
+
+ [Mac] Adopt NSURLSession properties in AVAssetResourceLoader
+ https://bugs.webkit.org/show_bug.cgi?id=153873
+
+ Reviewed by Eric Carlson.
+
+ Adopt a new AVAssetResourceLoader API allowing clients to specify a NSURLSession object to
+ use for media loading, and control the use of this property with a new Setting.
+
+ * page/Settings.cpp:
+ (WebCore::Settings::setAVFoundationNSURLSessionEnabled):
+ * page/Settings.h:
+ (WebCore::Settings::isAVFoundationNSURLSessionEnabled):
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+ (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
+ * platform/spi/mac/AVFoundationSPI.h:
+
</ins><span class="cx"> 2016-02-09 Myles C. Maxfield <mmaxfield@apple.com>
</span><span class="cx">
</span><span class="cx"> Decouple font creation from font loading
</span></span></pre></div>
<a id="trunkSourceWebCorepageSettingscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Settings.cpp (196327 => 196328)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Settings.cpp        2016-02-09 20:55:47 UTC (rev 196327)
+++ trunk/Source/WebCore/page/Settings.cpp        2016-02-09 20:56:48 UTC (rev 196328)
</span><span class="lines">@@ -75,6 +75,7 @@
</span><span class="cx">
</span><span class="cx"> #if USE(AVFOUNDATION)
</span><span class="cx"> bool Settings::gAVFoundationEnabled = true;
</span><ins>+bool Settings::gAVFoundationNSURLSessionEnabled = false;
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="lines">@@ -589,6 +590,14 @@
</span><span class="cx"> gAVFoundationEnabled = enabled;
</span><span class="cx"> HTMLMediaElement::resetMediaEngines();
</span><span class="cx"> }
</span><ins>+
+void Settings::setAVFoundationNSURLSessionEnabled(bool enabled)
+{
+ if (gAVFoundationEnabled == enabled)
+ return;
+
+ gAVFoundationEnabled = enabled;
+}
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(COCOA)
</span></span></pre></div>
<a id="trunkSourceWebCorepageSettingsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Settings.h (196327 => 196328)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Settings.h        2016-02-09 20:55:47 UTC (rev 196327)
+++ trunk/Source/WebCore/page/Settings.h        2016-02-09 20:56:48 UTC (rev 196328)
</span><span class="lines">@@ -197,6 +197,8 @@
</span><span class="cx"> #if USE(AVFOUNDATION)
</span><span class="cx"> WEBCORE_EXPORT static void setAVFoundationEnabled(bool flag);
</span><span class="cx"> static bool isAVFoundationEnabled() { return gAVFoundationEnabled; }
</span><ins>+ WEBCORE_EXPORT static void setAVFoundationNSURLSessionEnabled(bool flag);
+ static bool isAVFoundationNSURLSessionEnabled() { return gAVFoundationNSURLSessionEnabled; }
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="lines">@@ -343,6 +345,7 @@
</span><span class="cx">
</span><span class="cx"> #if USE(AVFOUNDATION)
</span><span class="cx"> WEBCORE_EXPORT static bool gAVFoundationEnabled;
</span><ins>+ WEBCORE_EXPORT static bool gAVFoundationNSURLSessionEnabled;
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(COCOA)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateAVFoundationObjCmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (196327 => 196328)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm        2016-02-09 20:55:47 UTC (rev 196327)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm        2016-02-09 20:56:48 UTC (rev 196328)
</span><span class="lines">@@ -57,12 +57,14 @@
</span><span class="cx"> #import "QuartzCoreSPI.h"
</span><span class="cx"> #import "SecurityOrigin.h"
</span><span class="cx"> #import "SerializedPlatformRepresentationMac.h"
</span><ins>+#import "Settings.h"
</ins><span class="cx"> #import "TextEncoding.h"
</span><span class="cx"> #import "TextTrackRepresentation.h"
</span><span class="cx"> #import "UUID.h"
</span><span class="cx"> #import "VideoTrackPrivateAVFObjC.h"
</span><span class="cx"> #import "WebCoreAVFResourceLoader.h"
</span><span class="cx"> #import "WebCoreCALayerExtras.h"
</span><ins>+#import "WebCoreNSURLSession.h"
</ins><span class="cx"> #import "WebCoreSystemInterface.h"
</span><span class="cx"> #import <functional>
</span><span class="cx"> #import <map>
</span><span class="lines">@@ -912,9 +914,19 @@
</span><span class="cx"> m_avAsset = adoptNS([allocAVURLAssetInstance() initWithURL:cocoaURL options:options.get()]);
</span><span class="cx">
</span><span class="cx"> #if HAVE(AVFOUNDATION_LOADER_DELEGATE)
</span><del>- [[m_avAsset.get() resourceLoader] setDelegate:m_loaderDelegate.get() queue:globalLoaderDelegateQueue()];
</del><ins>+ AVAssetResourceLoader *resourceLoader = m_avAsset.get().resourceLoader;
+ [resourceLoader setDelegate:m_loaderDelegate.get() queue:globalLoaderDelegateQueue()];
+
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100
+ if (Settings::isAVFoundationNSURLSessionEnabled()
+ && [resourceLoader respondsToSelector:@selector(setURLSession:)]
+ && [resourceLoader respondsToSelector:@selector(URLSessionDataDelegate)]
+ && [resourceLoader respondsToSelector:@selector(URLSessionDataDelegateQueue)])
+ resourceLoader.URLSession = (NSURLSession *)[[[WebCoreNSURLSession alloc] initWithResourceLoader:*player()->cachedResourceLoader() delegate:resourceLoader.URLSessionDataDelegate delegateQueue:resourceLoader.URLSessionDataDelegateQueue] autorelease];
</ins><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#endif
+
</ins><span class="cx"> m_haveCheckedPlayability = false;
</span><span class="cx">
</span><span class="cx"> setDelayCallbacks(false);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformspimacAVFoundationSPIh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/spi/mac/AVFoundationSPI.h (196327 => 196328)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/spi/mac/AVFoundationSPI.h        2016-02-09 20:55:47 UTC (rev 196327)
+++ trunk/Source/WebCore/platform/spi/mac/AVFoundationSPI.h        2016-02-09 20:56:48 UTC (rev 196328)
</span><span class="lines">@@ -74,3 +74,15 @@
</span><span class="cx">
</span><span class="cx"> #endif // PLATFORM(IOS)
</span><span class="cx">
</span><ins>+// FIXME: Wrap in a #if USE(APPLE_INTERNAL_SDK) once this SPI lands
+#import <AVFoundation/AVAssetResourceLoader.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface AVAssetResourceLoader (AVAssetResourceLoaderPrivate)
+@property (nonatomic, readonly) id<NSURLSessionDataDelegate> URLSessionDataDelegate;
+@property (nonatomic, readonly) NSOperationQueue *URLSessionDataDelegateQueue;
+@property (nonatomic, nullable, retain) NSURLSession *URLSession;
+@end
+
+NS_ASSUME_NONNULL_END
</ins></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (196327 => 196328)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2016-02-09 20:55:47 UTC (rev 196327)
+++ trunk/Source/WebKit/mac/ChangeLog        2016-02-09 20:56:48 UTC (rev 196328)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2016-02-04 Jer Noble <jer.noble@apple.com>
+
+ [Mac] Adopt NSURLSession properties in AVAssetResourceLoader
+ https://bugs.webkit.org/show_bug.cgi?id=153873
+
+ Reviewed by Eric Carlson.
+
+ Add a WebKit preference to control the WebCore isAVFoundationNSURLSessionEnabled()
+ setting.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences setAVFoundationNSURLSessionEnabled:]):
+ (-[WebPreferences isAVFoundationNSURLSessionEnabled]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChanged:]):
+
</ins><span class="cx"> 2016-02-09 Eric Carlson <eric.carlson@apple.com>
</span><span class="cx">
</span><span class="cx"> checkValidity() sometimes asserts in WebUserMediaClient::pageDestroyed
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebPreferenceKeysPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h (196327 => 196328)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h        2016-02-09 20:55:47 UTC (rev 196327)
+++ trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h        2016-02-09 20:56:48 UTC (rev 196328)
</span><span class="lines">@@ -119,6 +119,7 @@
</span><span class="cx"> #define WebKitAsynchronousSpellCheckingEnabledPreferenceKey @"WebKitAsynchronousSpellCheckingEnabled"
</span><span class="cx"> #define WebKitHyperlinkAuditingEnabledPreferenceKey @"WebKitHyperlinkAuditingEnabled"
</span><span class="cx"> #define WebKitAVFoundationEnabledKey @"WebKitAVFoundationEnabled"
</span><ins>+#define WebKitAVFoundationNSURLSessionEnabledKey @"WebKitAVFoundationNSURLSessionEnabled"
</ins><span class="cx"> #define WebKitHixie76WebSocketProtocolEnabledKey @"WebKitHixie76WebSocketProtocolEnabled"
</span><span class="cx"> #define WebKitRequiresUserGestureForMediaPlaybackPreferenceKey @"WebKitMediaPlaybackRequiresUserGesture"
</span><span class="cx"> #define WebKitRequiresUserGestureForAudioPlaybackPreferenceKey @"WebKitAudioPlaybackRequiresUserGesture"
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebPreferencesmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebPreferences.mm (196327 => 196328)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebPreferences.mm        2016-02-09 20:55:47 UTC (rev 196327)
+++ trunk/Source/WebKit/mac/WebView/WebPreferences.mm        2016-02-09 20:56:48 UTC (rev 196328)
</span><span class="lines">@@ -517,6 +517,7 @@
</span><span class="cx"> [NSNumber numberWithBool:YES], WebKitHyperlinkAuditingEnabledPreferenceKey,
</span><span class="cx"> [NSNumber numberWithBool:NO], WebKitUsePreHTML5ParserQuirksKey,
</span><span class="cx"> [NSNumber numberWithBool:YES], WebKitAVFoundationEnabledKey,
</span><ins>+ [NSNumber numberWithBool:NO], WebKitAVFoundationNSURLSessionEnabledKey,
</ins><span class="cx"> [NSNumber numberWithBool:NO], WebKitSuppressesIncrementalRenderingKey,
</span><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx"> [NSNumber numberWithBool:NO], WebKitRequiresUserGestureForMediaPlaybackPreferenceKey,
</span><span class="lines">@@ -2068,6 +2069,16 @@
</span><span class="cx"> return [self _boolValueForKey:WebKitAVFoundationEnabledKey];
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+- (void)setAVFoundationNSURLSessionEnabled:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey:WebKitAVFoundationNSURLSessionEnabledKey];
+}
+
+- (BOOL)isAVFoundationNSURLSessionEnabled
+{
+ return [self _boolValueForKey:WebKitAVFoundationNSURLSessionEnabledKey];
+}
+
</ins><span class="cx"> - (void)setQTKitEnabled:(BOOL)flag
</span><span class="cx"> {
</span><span class="cx"> [self _setBoolValue:flag forKey:WebKitQTKitEnabledPreferenceKey];
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebPreferencesPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h (196327 => 196328)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h        2016-02-09 20:55:47 UTC (rev 196327)
+++ trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h        2016-02-09 20:56:48 UTC (rev 196328)
</span><span class="lines">@@ -370,6 +370,9 @@
</span><span class="cx"> - (void)setAVFoundationEnabled:(BOOL)flag;
</span><span class="cx"> - (BOOL)isAVFoundationEnabled;
</span><span class="cx">
</span><ins>+- (void)setAVFoundationNSURLSessionEnabled:(BOOL)flag;
+- (BOOL)isAVFoundationNSURLSessionEnabled;
+
</ins><span class="cx"> - (void)setQTKitEnabled:(BOOL)flag;
</span><span class="cx"> - (BOOL)isQTKitEnabled;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (196327 => 196328)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebView.mm        2016-02-09 20:55:47 UTC (rev 196327)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm        2016-02-09 20:56:48 UTC (rev 196328)
</span><span class="lines">@@ -2431,6 +2431,7 @@
</span><span class="cx">
</span><span class="cx"> #if USE(AVFOUNDATION)
</span><span class="cx"> settings.setAVFoundationEnabled([preferences isAVFoundationEnabled]);
</span><ins>+ settings.setAVFoundationNSURLSessionEnabled([preferences isAVFoundationNSURLSessionEnabled]);
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if ENABLE(MEDIA_STREAM)
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (196327 => 196328)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-02-09 20:55:47 UTC (rev 196327)
+++ trunk/Source/WebKit2/ChangeLog        2016-02-09 20:56:48 UTC (rev 196328)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2016-02-04 Jer Noble <jer.noble@apple.com>
+
+ [Mac] Adopt NSURLSession properties in AVAssetResourceLoader
+ https://bugs.webkit.org/show_bug.cgi?id=153873
+
+ Reviewed by Eric Carlson.
+
+ Add a WebKit2 preference to control the WebCore isAVFoundationNSURLSessionEnabled()
+ setting.
+
+ * Shared/WebPreferencesDefinitions.h:
+ * UIProcess/API/C/WKPreferences.cpp:
+ (WKPreferencesSetAVFoundationNSURLSessionEnabled):
+ (WKPreferencesGetAVFoundationNSURLSessionEnabled):
+ * UIProcess/API/C/WKPreferencesRef.h:
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::updatePreferences):
+
</ins><span class="cx"> 2016-02-09 Anders Carlsson <andersca@apple.com>
</span><span class="cx">
</span><span class="cx"> All 32-bit plug-ins should use the XPC service
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebPreferencesDefinitionsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h (196327 => 196328)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h        2016-02-09 20:55:47 UTC (rev 196327)
+++ trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h        2016-02-09 20:56:48 UTC (rev 196328)
</span><span class="lines">@@ -141,6 +141,7 @@
</span><span class="cx"> macro(AllowUniversalAccessFromFileURLs, allowUniversalAccessFromFileURLs, Bool, bool, false) \
</span><span class="cx"> macro(AllowFileAccessFromFileURLs, allowFileAccessFromFileURLs, Bool, bool, false) \
</span><span class="cx"> macro(AVFoundationEnabled, isAVFoundationEnabled, Bool, bool, true) \
</span><ins>+ macro(AVFoundationNSURLSessionEnabled, isAVFoundationNSURLSessionEnabled, Bool, bool, false) \
</ins><span class="cx"> macro(RequiresUserGestureForMediaPlayback, requiresUserGestureForMediaPlayback, Bool, bool, DEFAULT_REQUIRES_USER_GESTURE_FOR_MEDIA_PLAYBACK) \
</span><span class="cx"> macro(RequiresUserGestureForAudioPlayback, requiresUserGestureForAudioPlayback, Bool, bool, DEFAULT_REQUIRES_USER_GESTURE_FOR_AUDIO_PLAYBACK) \
</span><span class="cx"> macro(AllowsInlineMediaPlayback, allowsInlineMediaPlayback, Bool, bool, DEFAULT_ALLOWS_INLINE_MEDIA_PLAYBACK) \
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPreferencescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp (196327 => 196328)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp        2016-02-09 20:55:47 UTC (rev 196327)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp        2016-02-09 20:56:48 UTC (rev 196328)
</span><span class="lines">@@ -699,6 +699,16 @@
</span><span class="cx"> return toImpl(preferencesRef)->isAVFoundationEnabled();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void WKPreferencesSetAVFoundationNSURLSessionEnabled(WKPreferencesRef preferencesRef, bool enabled)
+{
+ toImpl(preferencesRef)->setAVFoundationNSURLSessionEnabled(enabled);
+}
+
+bool WKPreferencesGetAVFoundationNSURLSessionEnabled(WKPreferencesRef preferencesRef)
+{
+ return toImpl(preferencesRef)->isAVFoundationNSURLSessionEnabled();
+}
+
</ins><span class="cx"> void WKPreferencesSetWebSecurityEnabled(WKPreferencesRef preferencesRef, bool enabled)
</span><span class="cx"> {
</span><span class="cx"> toImpl(preferencesRef)->setWebSecurityEnabled(enabled);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPreferencesRefh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRef.h (196327 => 196328)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRef.h        2016-02-09 20:55:47 UTC (rev 196327)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRef.h        2016-02-09 20:56:48 UTC (rev 196328)
</span><span class="lines">@@ -182,6 +182,10 @@
</span><span class="cx"> WK_EXPORT void WKPreferencesSetAVFoundationEnabled(WKPreferencesRef preferencesRef, bool enabled);
</span><span class="cx"> WK_EXPORT bool WKPreferencesGetAVFoundationEnabled(WKPreferencesRef preferencesRef);
</span><span class="cx">
</span><ins>+// Defaults to false.
+WK_EXPORT void WKPreferencesSetAVFoundationNSURLSessionEnabled(WKPreferencesRef preferencesRef, bool enabled);
+WK_EXPORT bool WKPreferencesGetAVFoundationNSURLSessionEnabled(WKPreferencesRef preferencesRef);
+
</ins><span class="cx"> // Defaults to false
</span><span class="cx"> WK_EXPORT void WKPreferencesSetWebAudioEnabled(WKPreferencesRef preferencesRef, bool enabled);
</span><span class="cx"> WK_EXPORT bool WKPreferencesGetWebAudioEnabled(WKPreferencesRef preferencesRef);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (196327 => 196328)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-02-09 20:55:47 UTC (rev 196327)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-02-09 20:56:48 UTC (rev 196328)
</span><span class="lines">@@ -2838,6 +2838,7 @@
</span><span class="cx">
</span><span class="cx"> #if USE(AVFOUNDATION)
</span><span class="cx"> settings.setAVFoundationEnabled(store.getBoolValueForKey(WebPreferencesKey::isAVFoundationEnabledKey()));
</span><ins>+ settings.setAVFoundationNSURLSessionEnabled(store.getBoolValueForKey(WebPreferencesKey::isAVFoundationNSURLSessionEnabledKey()));
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(COCOA)
</span></span></pre>
</div>
</div>
</body>
</html>