<!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>[192995] 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/192995">192995</a></dd>
<dt>Author</dt> <dd>antti@apple.com</dd>
<dt>Date</dt> <dd>2015-12-03 04:51:17 -0800 (Thu, 03 Dec 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Move ResourceLoadScheduler to WebKit1
https://bugs.webkit.org/show_bug.cgi?id=151743
Reviewed by Alex Christensen.
Source/WebCore:
It is no longer used by WebKit2. Simplify the WebKit/WebCore interface.
* WebCore.xcodeproj/project.pbxproj:
* dom/ContainerNode.cpp:
* dom/Document.cpp:
(WebCore::Document::styleForElementIgnoringPendingStylesheets):
* dom/Document.h:
* loader/DocumentLoader.h:
* loader/LoaderStrategy.cpp:
(WebCore::LoaderStrategy::~LoaderStrategy):
(WebCore::ResourceLoadSuspender::ResourceLoadSuspender):
(WebCore::ResourceLoadSuspender::~ResourceLoadSuspender):
(WebCore::LoaderStrategy::resourceLoadScheduler): Deleted.
(WebCore::LoaderStrategy::loadResourceSynchronously): Deleted.
(WebCore::LoaderStrategy::createBlobRegistry): Deleted.
(WebCore::LoaderStrategy::createPingHandle): Deleted.
* loader/LoaderStrategy.h:
Loading functions implemented on WebKit side move to pure virtual LoaderStrategy.
* loader/ResourceLoadScheduler.cpp: Removed.
* loader/ResourceLoadScheduler.h: Removed.
ResourceLoadScheduler moves to WebKit1 as WebResourceLoadScheduler.
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::finishNetworkLoad):
(WebCore::ResourceLoader::setDefersLoading):
(WebCore::ResourceLoader::frameLoader):
(WebCore::ResourceLoader::willSwitchToSubstituteResource):
(WebCore::ResourceLoader::willSendRequestInternal):
* loader/archive/ArchiveResourceCollection.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::load):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::performPostLoadActions):
(WebCore::CachedResourceLoader::incrementRequestCount):
* platform/PlatformStrategies.h:
(WebCore::PlatformStrategies::pluginStrategy):
(WebCore::PlatformStrategies::blobRegistry):
Move BlobRegistry factory function here from LoaderStrategy as this allows network process to have null loaderStrategy.
(it could be renamed BlobStrategy for consistency later).
(WebCore::PlatformStrategies::PlatformStrategies):
* platform/network/BlobRegistry.cpp:
(WebCore::blobRegistry):
(WebCore::BlobRegistry::~BlobRegistry):
* platform/network/ResourceRequestBase.h:
* style/StyleResolveTree.cpp:
(WebCore::Style::PostResolutionCallbackDisabler::PostResolutionCallbackDisabler):
(WebCore::Style::PostResolutionCallbackDisabler::~PostResolutionCallbackDisabler):
Source/WebKit:
* WebCoreSupport/WebResourceLoadScheduler.cpp: Copied from Source/WebCore/loader/ResourceLoadScheduler.cpp.
(webResourceLoadScheduler):
(WebResourceLoadScheduler::hostForURL):
(WebResourceLoadScheduler::WebResourceLoadScheduler):
(WebResourceLoadScheduler::~WebResourceLoadScheduler):
(WebResourceLoadScheduler::scheduleSubresourceLoad):
(WebResourceLoadScheduler::loadResourceSynchronously):
(WebResourceLoadScheduler::schedulePluginStreamLoad):
(WebResourceLoadScheduler::scheduleLoad):
(WebResourceLoadScheduler::remove):
(WebResourceLoadScheduler::setDefersLoading):
(WebResourceLoadScheduler::crossOriginRedirectReceived):
(WebResourceLoadScheduler::servePendingRequests):
(WebResourceLoadScheduler::suspendPendingRequests):
(WebResourceLoadScheduler::resumePendingRequests):
(WebResourceLoadScheduler::scheduleServePendingRequests):
(WebResourceLoadScheduler::requestTimerFired):
(WebResourceLoadScheduler::HostInformation::HostInformation):
(WebResourceLoadScheduler::HostInformation::~HostInformation):
(WebResourceLoadScheduler::HostInformation::priorityToIndex):
(WebResourceLoadScheduler::HostInformation::schedule):
(WebResourceLoadScheduler::HostInformation::addLoadInProgress):
(WebResourceLoadScheduler::HostInformation::remove):
(WebResourceLoadScheduler::HostInformation::hasRequests):
(WebResourceLoadScheduler::HostInformation::limitRequests):
(WebResourceLoadScheduler::createPingHandle):
(WebCore::ResourceLoadScheduler::hostForURL): Deleted.
(WebCore::resourceLoadScheduler): Deleted.
(WebCore::ResourceLoadScheduler::ResourceLoadScheduler): Deleted.
(WebCore::ResourceLoadScheduler::~ResourceLoadScheduler): Deleted.
(WebCore::ResourceLoadScheduler::scheduleSubresourceLoad): Deleted.
(WebCore::ResourceLoadScheduler::schedulePluginStreamLoad): Deleted.
(WebCore::ResourceLoadScheduler::scheduleLoad): Deleted.
(WebCore::ResourceLoadScheduler::remove): Deleted.
(WebCore::ResourceLoadScheduler::setDefersLoading): Deleted.
(WebCore::ResourceLoadScheduler::crossOriginRedirectReceived): Deleted.
(WebCore::ResourceLoadScheduler::servePendingRequests): Deleted.
(WebCore::ResourceLoadScheduler::suspendPendingRequests): Deleted.
(WebCore::ResourceLoadScheduler::resumePendingRequests): Deleted.
(WebCore::ResourceLoadScheduler::scheduleServePendingRequests): Deleted.
(WebCore::ResourceLoadScheduler::requestTimerFired): Deleted.
(WebCore::ResourceLoadScheduler::HostInformation::HostInformation): Deleted.
(WebCore::ResourceLoadScheduler::HostInformation::~HostInformation): Deleted.
(WebCore::ResourceLoadScheduler::HostInformation::priorityToIndex): Deleted.
(WebCore::ResourceLoadScheduler::HostInformation::schedule): Deleted.
(WebCore::ResourceLoadScheduler::HostInformation::addLoadInProgress): Deleted.
(WebCore::ResourceLoadScheduler::HostInformation::remove): Deleted.
(WebCore::ResourceLoadScheduler::HostInformation::hasRequests): Deleted.
(WebCore::ResourceLoadScheduler::HostInformation::limitRequests): Deleted.
* WebCoreSupport/WebResourceLoadScheduler.h: Copied from Source/WebCore/loader/ResourceLoadScheduler.h.
(WebResourceLoadScheduler::isSerialLoadingEnabled):
(WebResourceLoadScheduler::setSerialLoadingEnabled):
(WebResourceLoadScheduler::HostInformation::name):
(WebResourceLoadScheduler::HostInformation::requestsPending):
(WebCore::ResourceLoadScheduler::isSerialLoadingEnabled): Deleted.
(WebCore::ResourceLoadScheduler::setSerialLoadingEnabled): Deleted.
(WebCore::ResourceLoadScheduler::Suspender::Suspender): Deleted.
(WebCore::ResourceLoadScheduler::Suspender::~Suspender): Deleted.
(WebCore::ResourceLoadScheduler::HostInformation::name): Deleted.
(WebCore::ResourceLoadScheduler::HostInformation::requestsPending): Deleted.
* WebKit.xcodeproj/project.pbxproj:
Source/WebKit/mac:
* Plugins/Hosted/HostedNetscapePluginStream.mm:
(WebKit::HostedNetscapePluginStream::start):
(WebKit::HostedNetscapePluginStream::stop):
* Plugins/WebNetscapePluginStream.mm:
(WebNetscapePluginStream::start):
(WebNetscapePluginStream::stop):
* WebCoreSupport/WebPlatformStrategies.h:
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::createLoaderStrategy):
(WebPlatformStrategies::createPasteboardStrategy):
(WebPlatformStrategies::createPluginStrategy):
(WebPlatformStrategies::createBlobRegistry):
(WebPlatformStrategies::cookiesForDOM):
* WebView/WebView.mm:
(-[WebView _dispatchPendingLoadRequests]):
(+[WebView _setLoadResourcesSerially:]):
(+[WebView _HTTPPipeliningEnabled]):
Source/WebKit2:
* NetworkProcess/NetworkProcessPlatformStrategies.cpp:
(WebKit::NetworkProcessPlatformStrategies::createCookiesStrategy):
(WebKit::NetworkProcessPlatformStrategies::createLoaderStrategy):
(WebKit::NetworkProcessPlatformStrategies::createPasteboardStrategy):
(WebKit::NetworkProcessPlatformStrategies::createPluginStrategy):
(WebKit::NetworkProcessPlatformStrategies::createBlobRegistry):
(WebKit::NetworkProcessPlatformStrategies::resourceLoadScheduler): Deleted.
(WebKit::NetworkProcessPlatformStrategies::loadResourceSynchronously): Deleted.
* NetworkProcess/NetworkProcessPlatformStrategies.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::~WebResourceLoadScheduler):
(WebKit::WebResourceLoadScheduler::loadResource):
(WebKit::WebResourceLoadScheduler::resumePendingRequests):
(WebKit::WebResourceLoadScheduler::networkProcessCrashed):
(WebKit::WebResourceLoadScheduler::loadResourceSynchronously):
(WebKit::WebResourceLoadScheduler::createPingHandle):
(WebKit::WebResourceLoadScheduler::scheduleSubresourceLoad): Deleted.
(WebKit::WebResourceLoadScheduler::setSerialLoadingEnabled): Deleted.
* WebProcess/Network/WebResourceLoadScheduler.h:
(WebKit::WebResourceLoadScheduler::webResourceLoaderForIdentifier):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::Stream::start):
(WebKit::PluginView::Stream::cancel):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::createLoaderStrategy):
(WebKit::WebPlatformStrategies::createPasteboardStrategy):
(WebKit::WebPlatformStrategies::createPluginStrategy):
(WebKit::WebPlatformStrategies::createBlobRegistry):
(WebKit::WebPlatformStrategies::cookiesForDOM):
(WebKit::WebPlatformStrategies::deleteCookie):
(WebKit::WebPlatformStrategies::refreshPlugins):
(WebKit::WebPlatformStrategies::resourceLoadScheduler): Deleted.
(WebKit::WebPlatformStrategies::loadResourceSynchronously): Deleted.
(WebKit::WebPlatformStrategies::createPingHandle): Deleted.
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoredomContainerNodecpp">trunk/Source/WebCore/dom/ContainerNode.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumenth">trunk/Source/WebCore/dom/Document.h</a></li>
<li><a href="#trunkSourceWebCoreloaderDocumentLoaderh">trunk/Source/WebCore/loader/DocumentLoader.h</a></li>
<li><a href="#trunkSourceWebCoreloaderLoaderStrategycpp">trunk/Source/WebCore/loader/LoaderStrategy.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderLoaderStrategyh">trunk/Source/WebCore/loader/LoaderStrategy.h</a></li>
<li><a href="#trunkSourceWebCoreloaderResourceLoadercpp">trunk/Source/WebCore/loader/ResourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderarchiveArchiveResourceCollectionh">trunk/Source/WebCore/loader/archive/ArchiveResourceCollection.h</a></li>
<li><a href="#trunkSourceWebCoreloadercacheCachedResourcecpp">trunk/Source/WebCore/loader/cache/CachedResource.cpp</a></li>
<li><a href="#trunkSourceWebCoreloadercacheCachedResourceLoadercpp">trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformPlatformStrategiesh">trunk/Source/WebCore/platform/PlatformStrategies.h</a></li>
<li><a href="#trunkSourceWebCoreplatformRuntimeApplicationChecksIOSh">trunk/Source/WebCore/platform/RuntimeApplicationChecksIOS.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkBlobRegistrycpp">trunk/Source/WebCore/platform/network/BlobRegistry.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkResourceRequestBaseh">trunk/Source/WebCore/platform/network/ResourceRequestBase.h</a></li>
<li><a href="#trunkSourceWebCorestyleStyleResolveTreecpp">trunk/Source/WebCore/style/StyleResolveTree.cpp</a></li>
<li><a href="#trunkSourceWebKitCMakeListstxt">trunk/Source/WebKit/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitWebKitvcxprojWebKitWebKitvcxproj">trunk/Source/WebKit/WebKit.vcxproj/WebKit/WebKit.vcxproj</a></li>
<li><a href="#trunkSourceWebKitWebKitvcxprojWebKitWebKitvcxprojfilters">trunk/Source/WebKit/WebKit.vcxproj/WebKit/WebKit.vcxproj.filters</a></li>
<li><a href="#trunkSourceWebKitWebKitxcodeprojprojectpbxproj">trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacPluginsHostedHostedNetscapePluginStreammm">trunk/Source/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm</a></li>
<li><a href="#trunkSourceWebKitmacPluginsWebNetscapePluginStreammm">trunk/Source/WebKit/mac/Plugins/WebNetscapePluginStream.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebPlatformStrategiesh">trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebPlatformStrategiesmm">trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewmm">trunk/Source/WebKit/mac/WebView/WebView.mm</a></li>
<li><a href="#trunkSourceWebKitwinPluginsPluginStreamcpp">trunk/Source/WebKit/win/Plugins/PluginStream.cpp</a></li>
<li><a href="#trunkSourceWebKitwinWebCoreSupportWebPlatformStrategiescpp">trunk/Source/WebKit/win/WebCoreSupport/WebPlatformStrategies.cpp</a></li>
<li><a href="#trunkSourceWebKitwinWebCoreSupportWebPlatformStrategiesh">trunk/Source/WebKit/win/WebCoreSupport/WebPlatformStrategies.h</a></li>
<li><a href="#trunkSourceWebKitwinWebViewcpp">trunk/Source/WebKit/win/WebView.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkProcessPlatformStrategiescpp">trunk/Source/WebKit2/NetworkProcess/NetworkProcessPlatformStrategies.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkProcessPlatformStrategiesh">trunk/Source/WebKit2/NetworkProcess/NetworkProcessPlatformStrategies.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleInjectedBundlecpp">trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessNetworkWebResourceLoadSchedulercpp">trunk/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessNetworkWebResourceLoadSchedulerh">trunk/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessPluginsPluginViewcpp">trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebPlatformStrategiescpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebPlatformStrategiesh">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKitWebCoreSupportWebResourceLoadSchedulercpp">trunk/Source/WebKit/WebCoreSupport/WebResourceLoadScheduler.cpp</a></li>
<li><a href="#trunkSourceWebKitWebCoreSupportWebResourceLoadSchedulerh">trunk/Source/WebKit/WebCoreSupport/WebResourceLoadScheduler.h</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreloaderResourceLoadSchedulercpp">trunk/Source/WebCore/loader/ResourceLoadScheduler.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderResourceLoadSchedulerh">trunk/Source/WebCore/loader/ResourceLoadScheduler.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebCore/CMakeLists.txt        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -1951,7 +1951,6 @@
</span><span class="cx"> loader/PolicyChecker.cpp
</span><span class="cx"> loader/ProgressTracker.cpp
</span><span class="cx"> loader/ResourceLoadNotifier.cpp
</span><del>- loader/ResourceLoadScheduler.cpp
</del><span class="cx"> loader/ResourceLoader.cpp
</span><span class="cx"> loader/SinkDocument.cpp
</span><span class="cx"> loader/SubframeLoader.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebCore/ChangeLog        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -1,3 +1,63 @@
</span><ins>+2015-12-02 Antti Koivisto <antti@apple.com>
+
+ Move ResourceLoadScheduler to WebKit1
+ https://bugs.webkit.org/show_bug.cgi?id=151743
+
+ Reviewed by Alex Christensen.
+
+ It is no longer used by WebKit2. Simplify the WebKit/WebCore interface.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * dom/ContainerNode.cpp:
+ * dom/Document.cpp:
+ (WebCore::Document::styleForElementIgnoringPendingStylesheets):
+ * dom/Document.h:
+ * loader/DocumentLoader.h:
+ * loader/LoaderStrategy.cpp:
+ (WebCore::LoaderStrategy::~LoaderStrategy):
+ (WebCore::ResourceLoadSuspender::ResourceLoadSuspender):
+ (WebCore::ResourceLoadSuspender::~ResourceLoadSuspender):
+ (WebCore::LoaderStrategy::resourceLoadScheduler): Deleted.
+ (WebCore::LoaderStrategy::loadResourceSynchronously): Deleted.
+ (WebCore::LoaderStrategy::createBlobRegistry): Deleted.
+ (WebCore::LoaderStrategy::createPingHandle): Deleted.
+ * loader/LoaderStrategy.h:
+
+ Loading functions implemented on WebKit side move to pure virtual LoaderStrategy.
+
+ * loader/ResourceLoadScheduler.cpp: Removed.
+ * loader/ResourceLoadScheduler.h: Removed.
+
+ ResourceLoadScheduler moves to WebKit1 as WebResourceLoadScheduler.
+
+ * loader/ResourceLoader.cpp:
+ (WebCore::ResourceLoader::finishNetworkLoad):
+ (WebCore::ResourceLoader::setDefersLoading):
+ (WebCore::ResourceLoader::frameLoader):
+ (WebCore::ResourceLoader::willSwitchToSubstituteResource):
+ (WebCore::ResourceLoader::willSendRequestInternal):
+ * loader/archive/ArchiveResourceCollection.h:
+ * loader/cache/CachedResource.cpp:
+ (WebCore::CachedResource::load):
+ * loader/cache/CachedResourceLoader.cpp:
+ (WebCore::CachedResourceLoader::performPostLoadActions):
+ (WebCore::CachedResourceLoader::incrementRequestCount):
+ * platform/PlatformStrategies.h:
+ (WebCore::PlatformStrategies::pluginStrategy):
+ (WebCore::PlatformStrategies::blobRegistry):
+
+ Move BlobRegistry factory function here from LoaderStrategy as this allows network process to have null loaderStrategy.
+ (it could be renamed BlobStrategy for consistency later).
+
+ (WebCore::PlatformStrategies::PlatformStrategies):
+ * platform/network/BlobRegistry.cpp:
+ (WebCore::blobRegistry):
+ (WebCore::BlobRegistry::~BlobRegistry):
+ * platform/network/ResourceRequestBase.h:
+ * style/StyleResolveTree.cpp:
+ (WebCore::Style::PostResolutionCallbackDisabler::PostResolutionCallbackDisabler):
+ (WebCore::Style::PostResolutionCallbackDisabler::~PostResolutionCallbackDisabler):
+
</ins><span class="cx"> 2015-12-02 Myles C. Maxfield <mmaxfield@apple.com>
</span><span class="cx">
</span><span class="cx"> Unify font-variant-* with font-variant shorthand
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -7418,7 +7418,6 @@
</span><span class="cx"> <ClCompile Include="..\loader\ResourceLoader.cpp" />
</span><span class="cx"> <ClCompile Include="..\loader\cf\ResourceLoaderCFNet.cpp" />
</span><span class="cx"> <ClCompile Include="..\loader\ResourceLoadNotifier.cpp" />
</span><del>- <ClCompile Include="..\loader\ResourceLoadScheduler.cpp" />
</del><span class="cx"> <ClCompile Include="..\loader\SinkDocument.cpp" />
</span><span class="cx"> <ClCompile Include="..\loader\SubframeLoader.cpp" />
</span><span class="cx"> <ClCompile Include="..\loader\SubresourceLoader.cpp" />
</span><span class="lines">@@ -20839,7 +20838,6 @@
</span><span class="cx"> <ClInclude Include="..\loader\ResourceLoader.h" />
</span><span class="cx"> <ClInclude Include="..\loader\ResourceLoaderOptions.h" />
</span><span class="cx"> <ClInclude Include="..\loader\ResourceLoadNotifier.h" />
</span><del>- <ClInclude Include="..\loader\ResourceLoadScheduler.h" />
</del><span class="cx"> <ClInclude Include="..\loader\SinkDocument.h" />
</span><span class="cx"> <ClInclude Include="..\loader\SubframeLoader.h" />
</span><span class="cx"> <ClInclude Include="..\loader\SubresourceLoader.h" />
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -6171,8 +6171,6 @@
</span><span class="cx">                 D0BC54491443AC4A00E105DA /* CachedStyleSheetClient.h in Headers */ = {isa = PBXBuildFile; fileRef = D0BC54481443AC4A00E105DA /* CachedStyleSheetClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 D0BD4F5C1408850F006839B6 /* DictationCommandIOS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0BD4F5A1408850F006839B6 /* DictationCommandIOS.cpp */; };
</span><span class="cx">                 D0BD4F5D1408850F006839B6 /* DictationCommandIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = D0BD4F5B1408850F006839B6 /* DictationCommandIOS.h */; };
</span><del>-                D0CE58F8125E4CC200F3F199 /* ResourceLoadScheduler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0CE58F6125E4CC200F3F199 /* ResourceLoadScheduler.cpp */; };
-                D0CE58F9125E4CC200F3F199 /* ResourceLoadScheduler.h in Headers */ = {isa = PBXBuildFile; fileRef = D0CE58F7125E4CC200F3F199 /* ResourceLoadScheduler.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">                 D0EDA774143E303C0028E383 /* CachedRawResource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0EDA772143E303C0028E383 /* CachedRawResource.cpp */; };
</span><span class="cx">                 D0EDA775143E303C0028E383 /* CachedRawResource.h in Headers */ = {isa = PBXBuildFile; fileRef = D0EDA773143E303C0028E383 /* CachedRawResource.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 D0FF2A5D11F8C45A007E74E0 /* PingLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0FF2A5B11F8C45A007E74E0 /* PingLoader.cpp */; };
</span><span class="lines">@@ -14070,8 +14068,6 @@
</span><span class="cx">                 D0BC54481443AC4A00E105DA /* CachedStyleSheetClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedStyleSheetClient.h; sourceTree = "<group>"; };
</span><span class="cx">                 D0BD4F5A1408850F006839B6 /* DictationCommandIOS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DictationCommandIOS.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 D0BD4F5B1408850F006839B6 /* DictationCommandIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DictationCommandIOS.h; sourceTree = "<group>"; };
</span><del>-                D0CE58F6125E4CC200F3F199 /* ResourceLoadScheduler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceLoadScheduler.cpp; sourceTree = "<group>"; };
-                D0CE58F7125E4CC200F3F199 /* ResourceLoadScheduler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceLoadScheduler.h; sourceTree = "<group>"; };
</del><span class="cx">                 D0EDA772143E303C0028E383 /* CachedRawResource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CachedRawResource.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 D0EDA773143E303C0028E383 /* CachedRawResource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedRawResource.h; sourceTree = "<group>"; };
</span><span class="cx">                 D0FF2A5B11F8C45A007E74E0 /* PingLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PingLoader.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -22464,8 +22460,6 @@
</span><span class="cx">                                 51EE7B371AA50B0500F92B21 /* ResourceLoadInfo.h */,
</span><span class="cx">                                 973E325410883B7C005BC493 /* ResourceLoadNotifier.cpp */,
</span><span class="cx">                                 973E325510883B7C005BC493 /* ResourceLoadNotifier.h */,
</span><del>-                                D0CE58F6125E4CC200F3F199 /* ResourceLoadScheduler.cpp */,
-                                D0CE58F7125E4CC200F3F199 /* ResourceLoadScheduler.h */,
</del><span class="cx">                                 51327D5F11A33A2B004F9D65 /* SinkDocument.cpp */,
</span><span class="cx">                                 51327D5E11A33A2B004F9D65 /* SinkDocument.h */,
</span><span class="cx">                                 D000ED2511C1B9CD00C47726 /* SubframeLoader.cpp */,
</span><span class="lines">@@ -27291,7 +27285,6 @@
</span><span class="cx">                                 51EE7B381AA50B0500F92B21 /* ResourceLoadInfo.h in Headers */,
</span><span class="cx">                                 973E325710883B7C005BC493 /* ResourceLoadNotifier.h in Headers */,
</span><span class="cx">                                 E4295FA412B0614E00D1ACE0 /* ResourceLoadPriority.h in Headers */,
</span><del>-                                D0CE58F9125E4CC200F3F199 /* ResourceLoadScheduler.h in Headers */,
</del><span class="cx">                                 8A81BF8511DCFD9000DA2B98 /* ResourceLoadTiming.h in Headers */,
</span><span class="cx">                                 7EE6846D12D26E3800E79415 /* ResourceRequest.h in Headers */,
</span><span class="cx">                                 514C767D0CE923A1007EF3CD /* ResourceRequestBase.h in Headers */,
</span><span class="lines">@@ -30869,7 +30862,6 @@
</span><span class="cx">                                 51AA3F6F0BD5AA9E00892971 /* ResourceLoaderMac.mm in Sources */,
</span><span class="cx">                                 51EE7B3A1AA5123100F92B21 /* ResourceLoadInfo.cpp in Sources */,
</span><span class="cx">                                 973E325610883B7C005BC493 /* ResourceLoadNotifier.cpp in Sources */,
</span><del>-                                D0CE58F8125E4CC200F3F199 /* ResourceLoadScheduler.cpp in Sources */,
</del><span class="cx">                                 514C767C0CE923A1007EF3CD /* ResourceRequestBase.cpp in Sources */,
</span><span class="cx">                                 7EE6846E12D26E3800E79415 /* ResourceRequestCFNet.cpp in Sources */,
</span><span class="cx">                                 7E7DE1FD195CEF260035363B /* ResourceRequestCocoa.mm in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoredomContainerNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ContainerNode.cpp (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ContainerNode.cpp        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebCore/dom/ContainerNode.cpp        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -49,7 +49,6 @@
</span><span class="cx"> #include "RenderBox.h"
</span><span class="cx"> #include "RenderTheme.h"
</span><span class="cx"> #include "RenderWidget.h"
</span><del>-#include "ResourceLoadScheduler.h"
</del><span class="cx"> #include "RootInlineBox.h"
</span><span class="cx"> #include "SVGDocumentExtensions.h"
</span><span class="cx"> #include "SVGElement.h"
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebCore/dom/Document.cpp        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -126,7 +126,6 @@
</span><span class="cx"> #include "RenderLayerCompositor.h"
</span><span class="cx"> #include "RenderView.h"
</span><span class="cx"> #include "RenderWidget.h"
</span><del>-#include "ResourceLoadScheduler.h"
</del><span class="cx"> #include "RuntimeEnabledFeatures.h"
</span><span class="cx"> #include "SVGDocumentExtensions.h"
</span><span class="cx"> #include "SVGElement.h"
</span><span class="lines">@@ -1959,7 +1958,7 @@
</span><span class="cx"> ASSERT(&element.document() == this);
</span><span class="cx">
</span><span class="cx"> // On iOS request delegates called during styleForElement may result in re-entering WebKit and killing the style resolver.
</span><del>- ResourceLoadScheduler::Suspender suspender(*platformStrategies()->loaderStrategy()->resourceLoadScheduler());
</del><ins>+ ResourceLoadSuspender suspender;
</ins><span class="cx">
</span><span class="cx"> TemporaryChange<bool> change(m_ignorePendingStylesheets, true);
</span><span class="cx"> return element.resolveStyle(parentStyle);
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.h (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.h        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebCore/dom/Document.h        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -511,7 +511,7 @@
</span><span class="cx">
</span><span class="cx"> void notifyRemovePendingSheetIfNeeded();
</span><span class="cx">
</span><del>- bool haveStylesheetsLoaded() const;
</del><ins>+ WEBCORE_EXPORT bool haveStylesheetsLoaded() const;
</ins><span class="cx">
</span><span class="cx"> // This is a DOM function.
</span><span class="cx"> StyleSheetList& styleSheets();
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderDocumentLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/DocumentLoader.h (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/DocumentLoader.h        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebCore/loader/DocumentLoader.h        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -161,7 +161,7 @@
</span><span class="cx"> void scheduleSubstituteResourceLoad(ResourceLoader&, SubstituteResource&);
</span><span class="cx">
</span><span class="cx"> // Return the ArchiveResource for the URL only when loading an Archive
</span><del>- ArchiveResource* archiveResourceForURL(const URL&) const;
</del><ins>+ WEBCORE_EXPORT ArchiveResource* archiveResourceForURL(const URL&) const;
</ins><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT PassRefPtr<ArchiveResource> mainResource() const;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderLoaderStrategycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/LoaderStrategy.cpp (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/LoaderStrategy.cpp        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebCore/loader/LoaderStrategy.cpp        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2012 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2012, 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -26,32 +26,24 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "LoaderStrategy.h"
</span><span class="cx">
</span><del>-#include "BlobRegistryImpl.h"
-#include "PingHandle.h"
-#include "ResourceHandle.h"
-#include "ResourceLoadScheduler.h"
</del><ins>+#include "PlatformStrategies.h"
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-ResourceLoadScheduler* LoaderStrategy::resourceLoadScheduler()
</del><ins>+LoaderStrategy::~LoaderStrategy()
</ins><span class="cx"> {
</span><del>- return WebCore::resourceLoadScheduler();
</del><span class="cx"> }
</span><span class="cx">
</span><del>-void LoaderStrategy::loadResourceSynchronously(NetworkingContext* context, unsigned long, const ResourceRequest& request, StoredCredentials storedCredentials, ClientCredentialPolicy, ResourceError& error, ResourceResponse& response, Vector<char>& data)
</del><ins>+ResourceLoadSuspender::ResourceLoadSuspender()
</ins><span class="cx"> {
</span><del>- ResourceHandle::loadResourceSynchronously(context, request, storedCredentials, error, response, data);
</del><ins>+ platformStrategies()->loaderStrategy()->suspendPendingRequests();
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-BlobRegistry* LoaderStrategy::createBlobRegistry()
</del><ins>+ResourceLoadSuspender::~ResourceLoadSuspender()
</ins><span class="cx"> {
</span><del>- return new BlobRegistryImpl;
</del><ins>+ platformStrategies()->loaderStrategy()->resumePendingRequests();
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void LoaderStrategy::createPingHandle(NetworkingContext* networkingContext, ResourceRequest& request, bool shouldUseCredentialStorage)
-{
- // PingHandle manages its own lifetime, deleting itself when its purpose has been fulfilled.
- new PingHandle(networkingContext, request, shouldUseCredentialStorage, PingHandle::UsesAsyncCallbacks::No);
-}
-
</del><span class="cx"> } // namespace WebCore
</span><ins>+
+
</ins></span></pre></div>
<a id="trunkSourceWebCoreloaderLoaderStrategyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/LoaderStrategy.h (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/LoaderStrategy.h        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebCore/loader/LoaderStrategy.h        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2012 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2012, 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -27,34 +27,50 @@
</span><span class="cx"> #define LoaderStrategy_h
</span><span class="cx">
</span><span class="cx"> #include "ResourceHandleTypes.h"
</span><ins>+#include "ResourceLoadPriority.h"
+#include "ResourceLoaderOptions.h"
</ins><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> class BlobRegistry;
</span><ins>+class CachedResource;
</ins><span class="cx"> class Frame;
</span><ins>+class NetscapePlugInStreamLoader;
+class NetscapePlugInStreamLoaderClient;
</ins><span class="cx"> class NetworkingContext;
</span><span class="cx"> class ResourceError;
</span><del>-class ResourceLoadScheduler;
</del><ins>+class ResourceLoader;
</ins><span class="cx"> class ResourceRequest;
</span><span class="cx"> class ResourceResponse;
</span><ins>+class SubresourceLoader;
+class URL;
</ins><span class="cx">
</span><span class="cx"> class WEBCORE_EXPORT LoaderStrategy {
</span><span class="cx"> public:
</span><del>- virtual ResourceLoadScheduler* resourceLoadScheduler();
</del><ins>+ virtual RefPtr<SubresourceLoader> loadResource(Frame*, CachedResource*, const ResourceRequest&, const ResourceLoaderOptions&) = 0;
+ virtual void loadResourceSynchronously(NetworkingContext*, unsigned long identifier, const ResourceRequest&, StoredCredentials, ClientCredentialPolicy, ResourceError&, ResourceResponse&, Vector<char>& data) = 0;
</ins><span class="cx">
</span><del>- virtual void loadResourceSynchronously(NetworkingContext*, unsigned long identifier, const ResourceRequest&, StoredCredentials, ClientCredentialPolicy, ResourceError&, ResourceResponse&, Vector<char>& data);
</del><ins>+ virtual void remove(ResourceLoader*) = 0;
+ virtual void setDefersLoading(ResourceLoader*, bool) = 0;
+ virtual void crossOriginRedirectReceived(ResourceLoader*, const URL& redirectURL) = 0;
</ins><span class="cx">
</span><del>- virtual BlobRegistry* createBlobRegistry();
</del><ins>+ virtual void servePendingRequests(ResourceLoadPriority minimumPriority = ResourceLoadPriority::VeryLow) = 0;
+ virtual void suspendPendingRequests() = 0;
+ virtual void resumePendingRequests() = 0;
</ins><span class="cx">
</span><del>- virtual void createPingHandle(NetworkingContext*, ResourceRequest&, bool shouldUseCredentialStorage);
</del><ins>+ virtual void createPingHandle(NetworkingContext*, ResourceRequest&, bool shouldUseCredentialStorage) = 0;
</ins><span class="cx">
</span><span class="cx"> protected:
</span><del>- virtual ~LoaderStrategy()
- {
- }
</del><ins>+ virtual ~LoaderStrategy();
</ins><span class="cx"> };
</span><span class="cx">
</span><ins>+class ResourceLoadSuspender {
+public:
+ ResourceLoadSuspender();
+ ~ResourceLoadSuspender();
+};
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> #endif // LoaderStrategy_h
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderResourceLoadSchedulercpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/loader/ResourceLoadScheduler.cpp (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ResourceLoadScheduler.cpp        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebCore/loader/ResourceLoadScheduler.cpp        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -1,392 +0,0 @@
</span><del>-/*
- Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
- Copyright (C) 2001 Dirk Mueller (mueller@kde.org)
- Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
- Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
- Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
- Copyright (C) 2010 Google Inc. All rights reserved.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "ResourceLoadScheduler.h"
-
-#include "Document.h"
-#include "DocumentLoader.h"
-#include "Frame.h"
-#include "FrameLoader.h"
-#include "LoaderStrategy.h"
-#include "Logging.h"
-#include "NetscapePlugInStreamLoader.h"
-#include "PlatformStrategies.h"
-#include "ResourceLoader.h"
-#include "ResourceRequest.h"
-#include "SubresourceLoader.h"
-#include "URL.h"
-#include <wtf/MainThread.h>
-#include <wtf/TemporaryChange.h>
-#include <wtf/text/CString.h>
-
-#if PLATFORM(IOS)
-#include <RuntimeApplicationChecksIOS.h>
-#endif
-
-#if USE(QUICK_LOOK)
-#include "QuickLook.h"
-#endif
-
-namespace WebCore {
-
-// Match the parallel connection count used by the networking layer.
-static unsigned maxRequestsInFlightPerHost;
-#if !PLATFORM(IOS)
-static const unsigned maxRequestsInFlightForNonHTTPProtocols = 20;
-#else
-// Limiting this seems to regress performance in some local cases so let's just make it large.
-static const unsigned maxRequestsInFlightForNonHTTPProtocols = 10000;
-#endif
-
-ResourceLoadScheduler::HostInformation* ResourceLoadScheduler::hostForURL(const URL& url, CreateHostPolicy createHostPolicy)
-{
- if (!url.protocolIsInHTTPFamily())
- return m_nonHTTPProtocolHost;
-
- m_hosts.checkConsistency();
- String hostName = url.host();
- HostInformation* host = m_hosts.get(hostName);
- if (!host && createHostPolicy == CreateIfNotFound) {
- host = new HostInformation(hostName, maxRequestsInFlightPerHost);
- m_hosts.add(hostName, host);
- }
- return host;
-}
-
-ResourceLoadScheduler* resourceLoadScheduler()
-{
- ASSERT(isMainThread());
- static ResourceLoadScheduler* globalScheduler = nullptr;
-
- if (!globalScheduler) {
- static bool isCallingOutToStrategy = false;
-
- // If we're re-entering resourceLoadScheduler() while calling out to the LoaderStrategy,
- // then the LoaderStrategy is trying to use the default resourceLoadScheduler.
- // So we'll create it here and start using it.
- if (isCallingOutToStrategy) {
- globalScheduler = new ResourceLoadScheduler;
- return globalScheduler;
- }
-
- TemporaryChange<bool> recursionGuard(isCallingOutToStrategy, true);
- globalScheduler = platformStrategies()->loaderStrategy()->resourceLoadScheduler();
- }
-
- return globalScheduler;
-}
-
-ResourceLoadScheduler::ResourceLoadScheduler()
- : m_nonHTTPProtocolHost(new HostInformation(String(), maxRequestsInFlightForNonHTTPProtocols))
- , m_requestTimer(*this, &ResourceLoadScheduler::requestTimerFired)
- , m_suspendPendingRequestsCount(0)
- , m_isSerialLoadingEnabled(false)
-{
- maxRequestsInFlightPerHost = initializeMaximumHTTPConnectionCountPerHost();
-}
-
-ResourceLoadScheduler::~ResourceLoadScheduler()
-{
-}
-
-RefPtr<SubresourceLoader> ResourceLoadScheduler::scheduleSubresourceLoad(Frame* frame, CachedResource* resource, const ResourceRequest& request, const ResourceLoaderOptions& options)
-{
- RefPtr<SubresourceLoader> loader = SubresourceLoader::create(frame, resource, request, options);
- if (loader)
- scheduleLoad(loader.get());
-#if PLATFORM(IOS)
- // Since we defer loader initialization until scheduling on iOS, the frame
- // load delegate that would be called in SubresourceLoader::create() on
- // other ports might be called in scheduleLoad() instead. Our contract to
- // callers of this method is that a null loader is returned if the load was
- // cancelled by a frame load delegate.
- if (!loader || loader->reachedTerminalState())
- return nullptr;
-#endif
- return loader;
-}
-
-RefPtr<NetscapePlugInStreamLoader> ResourceLoadScheduler::schedulePluginStreamLoad(Frame* frame, NetscapePlugInStreamLoaderClient* client, const ResourceRequest& request)
-{
- RefPtr<NetscapePlugInStreamLoader> loader = NetscapePlugInStreamLoader::create(frame, client, request);
- if (loader)
- scheduleLoad(loader.get());
- return loader;
-}
-
-void ResourceLoadScheduler::scheduleLoad(ResourceLoader* resourceLoader)
-{
- ASSERT(resourceLoader);
-
- LOG(ResourceLoading, "ResourceLoadScheduler::load resource %p '%s'", resourceLoader, resourceLoader->url().string().latin1().data());
-
-#if PLATFORM(IOS)
- // If there's a web archive resource for this URL, we don't need to schedule the load since it will never touch the network.
- if (!isSuspendingPendingRequests() && resourceLoader->documentLoader()->archiveResourceForURL(resourceLoader->iOSOriginalRequest().url())) {
- resourceLoader->startLoading();
- return;
- }
-#else
- if (resourceLoader->documentLoader()->archiveResourceForURL(resourceLoader->request().url())) {
- resourceLoader->start();
- return;
- }
-#endif
-
-#if PLATFORM(IOS)
- HostInformation* host = hostForURL(resourceLoader->iOSOriginalRequest().url(), CreateIfNotFound);
-#else
- HostInformation* host = hostForURL(resourceLoader->url(), CreateIfNotFound);
-#endif
-
- ResourceLoadPriority priority = resourceLoader->request().priority();
-
- bool hadRequests = host->hasRequests();
- host->schedule(resourceLoader, priority);
-
-#if PLATFORM(COCOA) || USE(CFNETWORK)
- if (ResourceRequest::resourcePrioritiesEnabled() && !isSuspendingPendingRequests()) {
- // Serve all requests at once to keep the pipeline full at the network layer.
- // FIXME: Does this code do anything useful, given that we also set maxRequestsInFlightPerHost to effectively unlimited on these platforms?
- servePendingRequests(host, ResourceLoadPriority::VeryLow);
- return;
- }
-#endif
-
-#if PLATFORM(IOS)
- if ((priority > ResourceLoadPriority::Low || !resourceLoader->iOSOriginalRequest().url().protocolIsInHTTPFamily() || (priority == ResourceLoadPriority::Low && !hadRequests)) && !isSuspendingPendingRequests()) {
- // Try to request important resources immediately.
- servePendingRequests(host, priority);
- return;
- }
-#else
- if (priority > ResourceLoadPriority::Low || !resourceLoader->url().protocolIsInHTTPFamily() || (priority == ResourceLoadPriority::Low && !hadRequests)) {
- // Try to request important resources immediately.
- servePendingRequests(host, priority);
- return;
- }
-#endif
-
- // Handle asynchronously so early low priority requests don't
- // get scheduled before later high priority ones.
- scheduleServePendingRequests();
-}
-
-void ResourceLoadScheduler::remove(ResourceLoader* resourceLoader)
-{
- ASSERT(resourceLoader);
-
- HostInformation* host = hostForURL(resourceLoader->url());
- if (host)
- host->remove(resourceLoader);
-#if PLATFORM(IOS)
- // ResourceLoader::url() doesn't start returning the correct value until the load starts. If we get canceled before that, we need to look for originalRequest url instead.
- // FIXME: ResourceLoader::url() should be made to return a sensible value at all times.
- if (!resourceLoader->iOSOriginalRequest().isNull()) {
- HostInformation* originalHost = hostForURL(resourceLoader->iOSOriginalRequest().url());
- if (originalHost && originalHost != host)
- originalHost->remove(resourceLoader);
- }
-#endif
- scheduleServePendingRequests();
-}
-
-void ResourceLoadScheduler::setDefersLoading(ResourceLoader*, bool)
-{
-}
-
-void ResourceLoadScheduler::crossOriginRedirectReceived(ResourceLoader* resourceLoader, const URL& redirectURL)
-{
- HostInformation* oldHost = hostForURL(resourceLoader->url());
- ASSERT(oldHost);
- if (!oldHost)
- return;
-
- HostInformation* newHost = hostForURL(redirectURL, CreateIfNotFound);
-
- if (oldHost->name() == newHost->name())
- return;
-
- newHost->addLoadInProgress(resourceLoader);
- oldHost->remove(resourceLoader);
-}
-
-void ResourceLoadScheduler::servePendingRequests(ResourceLoadPriority minimumPriority)
-{
- LOG(ResourceLoading, "ResourceLoadScheduler::servePendingRequests. m_suspendPendingRequestsCount=%d", m_suspendPendingRequestsCount);
- if (isSuspendingPendingRequests())
- return;
-
- m_requestTimer.stop();
-
- servePendingRequests(m_nonHTTPProtocolHost, minimumPriority);
-
- Vector<HostInformation*> hostsToServe;
- copyValuesToVector(m_hosts, hostsToServe);
-
- for (auto* host : hostsToServe) {
- if (host->hasRequests())
- servePendingRequests(host, minimumPriority);
- else
- delete m_hosts.take(host->name());
- }
-}
-
-void ResourceLoadScheduler::servePendingRequests(HostInformation* host, ResourceLoadPriority minimumPriority)
-{
- LOG(ResourceLoading, "ResourceLoadScheduler::servePendingRequests HostInformation.m_name='%s'", host->name().latin1().data());
-
- auto priority = ResourceLoadPriority::Highest;
- while (true) {
- auto& requestsPending = host->requestsPending(priority);
- while (!requestsPending.isEmpty()) {
- RefPtr<ResourceLoader> resourceLoader = requestsPending.first();
-
- // For named hosts - which are only http(s) hosts - we should always enforce the connection limit.
- // For non-named hosts - everything but http(s) - we should only enforce the limit if the document isn't done parsing
- // and we don't know all stylesheets yet.
- Document* document = resourceLoader->frameLoader() ? resourceLoader->frameLoader()->frame().document() : 0;
- bool shouldLimitRequests = !host->name().isNull() || (document && (document->parsing() || !document->haveStylesheetsLoaded()));
- if (shouldLimitRequests && host->limitRequests(priority))
- return;
-
- requestsPending.removeFirst();
- host->addLoadInProgress(resourceLoader.get());
-#if PLATFORM(IOS)
- if (!applicationIsWebProcess()) {
- resourceLoader->startLoading();
- return;
- }
-#endif
- resourceLoader->start();
- }
- if (priority == minimumPriority)
- return;
- --priority;
- }
-}
-
-void ResourceLoadScheduler::suspendPendingRequests()
-{
- ++m_suspendPendingRequestsCount;
-}
-
-void ResourceLoadScheduler::resumePendingRequests()
-{
- ASSERT(m_suspendPendingRequestsCount);
- --m_suspendPendingRequestsCount;
- if (m_suspendPendingRequestsCount)
- return;
- if (!m_hosts.isEmpty() || m_nonHTTPProtocolHost->hasRequests())
- scheduleServePendingRequests();
-}
-
-void ResourceLoadScheduler::scheduleServePendingRequests()
-{
- LOG(ResourceLoading, "ResourceLoadScheduler::scheduleServePendingRequests, m_requestTimer.isActive()=%u", m_requestTimer.isActive());
- if (!m_requestTimer.isActive())
- m_requestTimer.startOneShot(0);
-}
-
-void ResourceLoadScheduler::requestTimerFired()
-{
- LOG(ResourceLoading, "ResourceLoadScheduler::requestTimerFired\n");
- servePendingRequests();
-}
-
-ResourceLoadScheduler::HostInformation::HostInformation(const String& name, unsigned maxRequestsInFlight)
- : m_name(name)
- , m_maxRequestsInFlight(maxRequestsInFlight)
-{
-}
-
-ResourceLoadScheduler::HostInformation::~HostInformation()
-{
- ASSERT(!hasRequests());
-}
-
-unsigned ResourceLoadScheduler::HostInformation::priorityToIndex(ResourceLoadPriority priority)
-{
- switch (priority) {
- case ResourceLoadPriority::VeryLow:
- return 0;
- case ResourceLoadPriority::Low:
- return 1;
- case ResourceLoadPriority::Medium:
- return 2;
- case ResourceLoadPriority::High:
- return 3;
- case ResourceLoadPriority::VeryHigh:
- return 4;
- }
- ASSERT_NOT_REACHED();
- return 0;
-}
-
-void ResourceLoadScheduler::HostInformation::schedule(ResourceLoader* resourceLoader, ResourceLoadPriority priority)
-{
- m_requestsPending[priorityToIndex(priority)].append(resourceLoader);
-}
-
-void ResourceLoadScheduler::HostInformation::addLoadInProgress(ResourceLoader* resourceLoader)
-{
- LOG(ResourceLoading, "HostInformation '%s' loading '%s'. Current count %d", m_name.latin1().data(), resourceLoader->url().string().latin1().data(), m_requestsLoading.size());
- m_requestsLoading.add(resourceLoader);
-}
-
-void ResourceLoadScheduler::HostInformation::remove(ResourceLoader* resourceLoader)
-{
- if (m_requestsLoading.remove(resourceLoader))
- return;
-
- for (auto& requestQueue : m_requestsPending) {
- for (auto it = requestQueue.begin(), end = requestQueue.end(); it != end; ++it) {
- if (*it == resourceLoader) {
- requestQueue.remove(it);
- return;
- }
- }
- }
-}
-
-bool ResourceLoadScheduler::HostInformation::hasRequests() const
-{
- if (!m_requestsLoading.isEmpty())
- return true;
- for (auto& requestQueue : m_requestsPending) {
- if (!requestQueue.isEmpty())
- return true;
- }
- return false;
-}
-
-bool ResourceLoadScheduler::HostInformation::limitRequests(ResourceLoadPriority priority) const
-{
- if (priority == ResourceLoadPriority::VeryLow && !m_requestsLoading.isEmpty())
- return true;
- return m_requestsLoading.size() >= (resourceLoadScheduler()->isSerialLoadingEnabled() ? 1 : m_maxRequestsInFlight);
-}
-
-} // namespace WebCore
</del></span></pre></div>
<a id="trunkSourceWebCoreloaderResourceLoadSchedulerh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/loader/ResourceLoadScheduler.h (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ResourceLoadScheduler.h        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebCore/loader/ResourceLoadScheduler.h        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -1,134 +0,0 @@
</span><del>-/*
- Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
- Copyright (C) 2001 Dirk Mueller <mueller@kde.org>
- Copyright (C) 2004, 2006, 2007, 2008 Apple Inc. All rights reserved.
- Copyright (C) 2010 Google Inc. All rights reserved.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
- */
-
-#ifndef ResourceLoadScheduler_h
-#define ResourceLoadScheduler_h
-
-#include "FrameLoaderTypes.h"
-#include "ResourceLoaderOptions.h"
-#include "ResourceLoadPriority.h"
-#include "Timer.h"
-#include <array>
-#include <wtf/Deque.h>
-#include <wtf/HashMap.h>
-#include <wtf/HashSet.h>
-#include <wtf/Noncopyable.h>
-#include <wtf/text/StringHash.h>
-#include <wtf/text/WTFString.h>
-
-namespace WebCore {
-
-class CachedResource;
-class Frame;
-class URL;
-class NetscapePlugInStreamLoader;
-class NetscapePlugInStreamLoaderClient;
-class ResourceLoader;
-class ResourceRequest;
-class SubresourceLoader;
-
-class ResourceLoadScheduler {
- WTF_MAKE_NONCOPYABLE(ResourceLoadScheduler); WTF_MAKE_FAST_ALLOCATED;
-public:
- WEBCORE_EXPORT friend ResourceLoadScheduler* resourceLoadScheduler();
-
- WEBCORE_EXPORT virtual RefPtr<SubresourceLoader> scheduleSubresourceLoad(Frame*, CachedResource*, const ResourceRequest&, const ResourceLoaderOptions&);
- WEBCORE_EXPORT virtual RefPtr<NetscapePlugInStreamLoader> schedulePluginStreamLoad(Frame*, NetscapePlugInStreamLoaderClient*, const ResourceRequest&);
- WEBCORE_EXPORT virtual void remove(ResourceLoader*);
- virtual void setDefersLoading(ResourceLoader*, bool);
- virtual void crossOriginRedirectReceived(ResourceLoader*, const URL& redirectURL);
-
- WEBCORE_EXPORT virtual void servePendingRequests(ResourceLoadPriority minimumPriority = ResourceLoadPriority::VeryLow);
- WEBCORE_EXPORT virtual void suspendPendingRequests();
- WEBCORE_EXPORT virtual void resumePendingRequests();
-
- bool isSerialLoadingEnabled() const { return m_isSerialLoadingEnabled; }
- virtual void setSerialLoadingEnabled(bool b) { m_isSerialLoadingEnabled = b; }
-
- class Suspender {
- public:
- explicit Suspender(ResourceLoadScheduler& scheduler) : m_scheduler(scheduler) { m_scheduler.suspendPendingRequests(); }
- ~Suspender() { m_scheduler.resumePendingRequests(); }
- private:
- ResourceLoadScheduler& m_scheduler;
- };
-
-protected:
- WEBCORE_EXPORT ResourceLoadScheduler();
- WEBCORE_EXPORT virtual ~ResourceLoadScheduler();
-
-private:
- void scheduleLoad(ResourceLoader*);
- void scheduleServePendingRequests();
- void requestTimerFired();
-
- bool isSuspendingPendingRequests() const { return !!m_suspendPendingRequestsCount; }
-
- class HostInformation {
- WTF_MAKE_NONCOPYABLE(HostInformation); WTF_MAKE_FAST_ALLOCATED;
- public:
- HostInformation(const String&, unsigned);
- ~HostInformation();
-
- const String& name() const { return m_name; }
- void schedule(ResourceLoader*, ResourceLoadPriority = ResourceLoadPriority::VeryLow);
- void addLoadInProgress(ResourceLoader*);
- void remove(ResourceLoader*);
- bool hasRequests() const;
- bool limitRequests(ResourceLoadPriority) const;
-
- typedef Deque<RefPtr<ResourceLoader>> RequestQueue;
- RequestQueue& requestsPending(ResourceLoadPriority priority) { return m_requestsPending[priorityToIndex(priority)]; }
-
- private:
- static unsigned priorityToIndex(ResourceLoadPriority);
-
- std::array<RequestQueue, resourceLoadPriorityCount> m_requestsPending;
- typedef HashSet<RefPtr<ResourceLoader>> RequestMap;
- RequestMap m_requestsLoading;
- const String m_name;
- const unsigned m_maxRequestsInFlight;
- };
-
- enum CreateHostPolicy {
- CreateIfNotFound,
- FindOnly
- };
-
- HostInformation* hostForURL(const URL&, CreateHostPolicy = FindOnly);
- WEBCORE_EXPORT void servePendingRequests(HostInformation*, ResourceLoadPriority);
-
- typedef HashMap<String, HostInformation*, StringHash> HostMap;
- HostMap m_hosts;
- HostInformation* m_nonHTTPProtocolHost;
-
- Timer m_requestTimer;
-
- unsigned m_suspendPendingRequestsCount;
- bool m_isSerialLoadingEnabled;
-};
-
-WEBCORE_EXPORT ResourceLoadScheduler* resourceLoadScheduler();
-
-}
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCoreloaderResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/ResourceLoader.cpp (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ResourceLoader.cpp        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebCore/loader/ResourceLoader.cpp        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -47,7 +47,6 @@
</span><span class="cx"> #include "ProgressTracker.h"
</span><span class="cx"> #include "ResourceError.h"
</span><span class="cx"> #include "ResourceHandle.h"
</span><del>-#include "ResourceLoadScheduler.h"
</del><span class="cx"> #include "SecurityOrigin.h"
</span><span class="cx"> #include "Settings.h"
</span><span class="cx"> #include "SharedBuffer.h"
</span><span class="lines">@@ -83,7 +82,7 @@
</span><span class="cx">
</span><span class="cx"> void ResourceLoader::finishNetworkLoad()
</span><span class="cx"> {
</span><del>- platformStrategies()->loaderStrategy()->resourceLoadScheduler()->remove(this);
</del><ins>+ platformStrategies()->loaderStrategy()->remove(this);
</ins><span class="cx">
</span><span class="cx"> if (m_handle) {
</span><span class="cx"> ASSERT(m_handle->client() == this);
</span><span class="lines">@@ -233,7 +232,7 @@
</span><span class="cx"> start();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- platformStrategies()->loaderStrategy()->resourceLoadScheduler()->setDefersLoading(this, defers);
</del><ins>+ platformStrategies()->loaderStrategy()->setDefersLoading(this, defers);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> FrameLoader* ResourceLoader::frameLoader() const
</span><span class="lines">@@ -289,7 +288,7 @@
</span><span class="cx"> void ResourceLoader::willSwitchToSubstituteResource()
</span><span class="cx"> {
</span><span class="cx"> ASSERT(!m_documentLoader->isSubstituteLoadPending(this));
</span><del>- platformStrategies()->loaderStrategy()->resourceLoadScheduler()->remove(this);
</del><ins>+ platformStrategies()->loaderStrategy()->remove(this);
</ins><span class="cx"> if (m_handle)
</span><span class="cx"> m_handle->cancel();
</span><span class="cx"> }
</span><span class="lines">@@ -376,7 +375,7 @@
</span><span class="cx">
</span><span class="cx"> bool isRedirect = !redirectResponse.isNull();
</span><span class="cx"> if (isRedirect)
</span><del>- platformStrategies()->loaderStrategy()->resourceLoadScheduler()->crossOriginRedirectReceived(this, request.url());
</del><ins>+ platformStrategies()->loaderStrategy()->crossOriginRedirectReceived(this, request.url());
</ins><span class="cx">
</span><span class="cx"> m_request = request;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderarchiveArchiveResourceCollectionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/archive/ArchiveResourceCollection.h (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/archive/ArchiveResourceCollection.h        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebCore/loader/archive/ArchiveResourceCollection.h        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx"> void addResource(PassRefPtr<ArchiveResource>);
</span><span class="cx"> void addAllResources(Archive*);
</span><span class="cx">
</span><del>- ArchiveResource* archiveResourceForURL(const URL&);
</del><ins>+ WEBCORE_EXPORT ArchiveResource* archiveResourceForURL(const URL&);
</ins><span class="cx"> PassRefPtr<Archive> popSubframeArchive(const String& frameName, const URL&);
</span><span class="cx">
</span><span class="cx"> private:
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheCachedResourcecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/CachedResource.cpp (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedResource.cpp        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebCore/loader/cache/CachedResource.cpp        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -44,7 +44,6 @@
</span><span class="cx"> #include "MemoryCache.h"
</span><span class="cx"> #include "PlatformStrategies.h"
</span><span class="cx"> #include "ResourceHandle.h"
</span><del>-#include "ResourceLoadScheduler.h"
</del><span class="cx"> #include "SchemeRegistry.h"
</span><span class="cx"> #include "SecurityOrigin.h"
</span><span class="cx"> #include "SecurityPolicy.h"
</span><span class="lines">@@ -278,7 +277,7 @@
</span><span class="cx"> m_fragmentIdentifierForRequest = String();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- m_loader = platformStrategies()->loaderStrategy()->resourceLoadScheduler()->scheduleSubresourceLoad(cachedResourceLoader.frame(), this, request, options);
</del><ins>+ m_loader = platformStrategies()->loaderStrategy()->loadResource(cachedResourceLoader.frame(), this, request, options);
</ins><span class="cx"> if (!m_loader) {
</span><span class="cx"> failBeforeStarting();
</span><span class="cx"> return;
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheCachedResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -61,7 +61,6 @@
</span><span class="cx"> #include "PlatformStrategies.h"
</span><span class="cx"> #include "RenderElement.h"
</span><span class="cx"> #include "ResourceLoadInfo.h"
</span><del>-#include "ResourceLoadScheduler.h"
</del><span class="cx"> #include "ScriptController.h"
</span><span class="cx"> #include "SecurityOrigin.h"
</span><span class="cx"> #include "SessionID.h"
</span><span class="lines">@@ -967,7 +966,7 @@
</span><span class="cx"> {
</span><span class="cx"> checkForPendingPreloads();
</span><span class="cx">
</span><del>- platformStrategies()->loaderStrategy()->resourceLoadScheduler()->servePendingRequests();
</del><ins>+ platformStrategies()->loaderStrategy()->servePendingRequests();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CachedResourceLoader::incrementRequestCount(const CachedResource* res)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformPlatformStrategiesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/PlatformStrategies.h (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/PlatformStrategies.h        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebCore/platform/PlatformStrategies.h        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><ins>+class BlobRegistry;
</ins><span class="cx"> class CookiesStrategy;
</span><span class="cx"> class LoaderStrategy;
</span><span class="cx"> class PasteboardStrategy;
</span><span class="lines">@@ -63,12 +64,15 @@
</span><span class="cx"> return m_pluginStrategy;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ BlobRegistry* blobRegistry()
+ {
+ if (!m_blobRegistry)
+ m_blobRegistry = createBlobRegistry();
+ return m_blobRegistry;
+ }
+
</ins><span class="cx"> protected:
</span><span class="cx"> PlatformStrategies()
</span><del>- : m_cookiesStrategy(nullptr)
- , m_loaderStrategy(nullptr)
- , m_pasteboardStrategy(nullptr)
- , m_pluginStrategy(nullptr)
</del><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -81,11 +85,13 @@
</span><span class="cx"> virtual LoaderStrategy* createLoaderStrategy() = 0;
</span><span class="cx"> virtual PasteboardStrategy* createPasteboardStrategy() = 0;
</span><span class="cx"> virtual PluginStrategy* createPluginStrategy() = 0;
</span><ins>+ virtual BlobRegistry* createBlobRegistry() = 0;
</ins><span class="cx">
</span><del>- CookiesStrategy* m_cookiesStrategy;
- LoaderStrategy* m_loaderStrategy;
- PasteboardStrategy* m_pasteboardStrategy;
- PluginStrategy* m_pluginStrategy;
</del><ins>+ CookiesStrategy* m_cookiesStrategy { };
+ LoaderStrategy* m_loaderStrategy { };
+ PasteboardStrategy* m_pasteboardStrategy { };
+ PluginStrategy* m_pluginStrategy { };
+ BlobRegistry* m_blobRegistry { };
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT PlatformStrategies* platformStrategies();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformRuntimeApplicationChecksIOSh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/RuntimeApplicationChecksIOS.h (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/RuntimeApplicationChecksIOS.h        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebCore/platform/RuntimeApplicationChecksIOS.h        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx"> WEBCORE_EXPORT bool applicationIsDaijisenDictionary();
</span><span class="cx"> bool applicationIsNASAHD();
</span><span class="cx"> WEBCORE_EXPORT bool applicationIsTheEconomistOnIPhone();
</span><del>-bool applicationIsWebProcess();
</del><ins>+WEBCORE_EXPORT bool applicationIsWebProcess();
</ins><span class="cx"> bool applicationIsIBooksOnIOS();
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkBlobRegistrycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/BlobRegistry.cpp (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/BlobRegistry.cpp        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebCore/platform/network/BlobRegistry.cpp        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -40,9 +40,7 @@
</span><span class="cx"> BlobRegistry& blobRegistry()
</span><span class="cx"> {
</span><span class="cx"> ASSERT(isMainThread());
</span><del>-
- static BlobRegistry& instance = *platformStrategies()->loaderStrategy()->createBlobRegistry();
- return instance;
</del><ins>+ return *platformStrategies()->blobRegistry();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> BlobRegistry::~BlobRegistry()
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceRequestBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceRequestBase.h (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceRequestBase.h        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebCore/platform/network/ResourceRequestBase.h        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -244,7 +244,7 @@
</span><span class="cx"> ResourceRequestBase::Requester requester;
</span><span class="cx"> };
</span><span class="cx">
</span><del>- unsigned initializeMaximumHTTPConnectionCountPerHost();
</del><ins>+ WEBCORE_EXPORT unsigned initializeMaximumHTTPConnectionCountPerHost();
</ins><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> WEBCORE_EXPORT void initializeHTTPConnectionSettingsOnStartup();
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorestyleStyleResolveTreecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/style/StyleResolveTree.cpp (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/StyleResolveTree.cpp        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebCore/style/StyleResolveTree.cpp        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -47,7 +47,6 @@
</span><span class="cx"> #include "RenderText.h"
</span><span class="cx"> #include "RenderTreePosition.h"
</span><span class="cx"> #include "RenderWidget.h"
</span><del>-#include "ResourceLoadScheduler.h"
</del><span class="cx"> #include "Settings.h"
</span><span class="cx"> #include "ShadowRoot.h"
</span><span class="cx"> #include "StyleResolveForDocument.h"
</span><span class="lines">@@ -944,7 +943,7 @@
</span><span class="cx"> ++resolutionNestingDepth;
</span><span class="cx">
</span><span class="cx"> if (resolutionNestingDepth == 1)
</span><del>- platformStrategies()->loaderStrategy()->resourceLoadScheduler()->suspendPendingRequests();
</del><ins>+ platformStrategies()->loaderStrategy()->suspendPendingRequests();
</ins><span class="cx">
</span><span class="cx"> // FIXME: It's strange to build this into the disabler.
</span><span class="cx"> suspendMemoryCacheClientCalls(document);
</span><span class="lines">@@ -959,7 +958,7 @@
</span><span class="cx"> queue[i]();
</span><span class="cx"> queue.clear();
</span><span class="cx">
</span><del>- platformStrategies()->loaderStrategy()->resourceLoadScheduler()->resumePendingRequests();
</del><ins>+ platformStrategies()->loaderStrategy()->resumePendingRequests();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> --resolutionNestingDepth;
</span></span></pre></div>
<a id="trunkSourceWebKitCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/CMakeLists.txt (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/CMakeLists.txt        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebKit/CMakeLists.txt        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -2,6 +2,7 @@
</span><span class="cx"> include(WebKitCommon)
</span><span class="cx">
</span><span class="cx"> set(WebKit_SOURCES
</span><ins>+ WebCoreSupport/WebResourceLoadScheduler.cpp
</ins><span class="cx"> WebCoreSupport/WebViewGroup.cpp
</span><span class="cx"> )
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebKit/ChangeLog        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -1,3 +1,72 @@
</span><ins>+2015-12-02 Antti Koivisto <antti@apple.com>
+
+ Move ResourceLoadScheduler to WebKit1
+ https://bugs.webkit.org/show_bug.cgi?id=151743
+
+ Reviewed by Alex Christensen.
+
+ * WebCoreSupport/WebResourceLoadScheduler.cpp: Copied from Source/WebCore/loader/ResourceLoadScheduler.cpp.
+ (webResourceLoadScheduler):
+ (WebResourceLoadScheduler::hostForURL):
+ (WebResourceLoadScheduler::WebResourceLoadScheduler):
+ (WebResourceLoadScheduler::~WebResourceLoadScheduler):
+ (WebResourceLoadScheduler::scheduleSubresourceLoad):
+ (WebResourceLoadScheduler::loadResourceSynchronously):
+ (WebResourceLoadScheduler::schedulePluginStreamLoad):
+ (WebResourceLoadScheduler::scheduleLoad):
+ (WebResourceLoadScheduler::remove):
+ (WebResourceLoadScheduler::setDefersLoading):
+ (WebResourceLoadScheduler::crossOriginRedirectReceived):
+ (WebResourceLoadScheduler::servePendingRequests):
+ (WebResourceLoadScheduler::suspendPendingRequests):
+ (WebResourceLoadScheduler::resumePendingRequests):
+ (WebResourceLoadScheduler::scheduleServePendingRequests):
+ (WebResourceLoadScheduler::requestTimerFired):
+ (WebResourceLoadScheduler::HostInformation::HostInformation):
+ (WebResourceLoadScheduler::HostInformation::~HostInformation):
+ (WebResourceLoadScheduler::HostInformation::priorityToIndex):
+ (WebResourceLoadScheduler::HostInformation::schedule):
+ (WebResourceLoadScheduler::HostInformation::addLoadInProgress):
+ (WebResourceLoadScheduler::HostInformation::remove):
+ (WebResourceLoadScheduler::HostInformation::hasRequests):
+ (WebResourceLoadScheduler::HostInformation::limitRequests):
+ (WebResourceLoadScheduler::createPingHandle):
+ (WebCore::ResourceLoadScheduler::hostForURL): Deleted.
+ (WebCore::resourceLoadScheduler): Deleted.
+ (WebCore::ResourceLoadScheduler::ResourceLoadScheduler): Deleted.
+ (WebCore::ResourceLoadScheduler::~ResourceLoadScheduler): Deleted.
+ (WebCore::ResourceLoadScheduler::scheduleSubresourceLoad): Deleted.
+ (WebCore::ResourceLoadScheduler::schedulePluginStreamLoad): Deleted.
+ (WebCore::ResourceLoadScheduler::scheduleLoad): Deleted.
+ (WebCore::ResourceLoadScheduler::remove): Deleted.
+ (WebCore::ResourceLoadScheduler::setDefersLoading): Deleted.
+ (WebCore::ResourceLoadScheduler::crossOriginRedirectReceived): Deleted.
+ (WebCore::ResourceLoadScheduler::servePendingRequests): Deleted.
+ (WebCore::ResourceLoadScheduler::suspendPendingRequests): Deleted.
+ (WebCore::ResourceLoadScheduler::resumePendingRequests): Deleted.
+ (WebCore::ResourceLoadScheduler::scheduleServePendingRequests): Deleted.
+ (WebCore::ResourceLoadScheduler::requestTimerFired): Deleted.
+ (WebCore::ResourceLoadScheduler::HostInformation::HostInformation): Deleted.
+ (WebCore::ResourceLoadScheduler::HostInformation::~HostInformation): Deleted.
+ (WebCore::ResourceLoadScheduler::HostInformation::priorityToIndex): Deleted.
+ (WebCore::ResourceLoadScheduler::HostInformation::schedule): Deleted.
+ (WebCore::ResourceLoadScheduler::HostInformation::addLoadInProgress): Deleted.
+ (WebCore::ResourceLoadScheduler::HostInformation::remove): Deleted.
+ (WebCore::ResourceLoadScheduler::HostInformation::hasRequests): Deleted.
+ (WebCore::ResourceLoadScheduler::HostInformation::limitRequests): Deleted.
+ * WebCoreSupport/WebResourceLoadScheduler.h: Copied from Source/WebCore/loader/ResourceLoadScheduler.h.
+ (WebResourceLoadScheduler::isSerialLoadingEnabled):
+ (WebResourceLoadScheduler::setSerialLoadingEnabled):
+ (WebResourceLoadScheduler::HostInformation::name):
+ (WebResourceLoadScheduler::HostInformation::requestsPending):
+ (WebCore::ResourceLoadScheduler::isSerialLoadingEnabled): Deleted.
+ (WebCore::ResourceLoadScheduler::setSerialLoadingEnabled): Deleted.
+ (WebCore::ResourceLoadScheduler::Suspender::Suspender): Deleted.
+ (WebCore::ResourceLoadScheduler::Suspender::~Suspender): Deleted.
+ (WebCore::ResourceLoadScheduler::HostInformation::name): Deleted.
+ (WebCore::ResourceLoadScheduler::HostInformation::requestsPending): Deleted.
+ * WebKit.xcodeproj/project.pbxproj:
+
</ins><span class="cx"> 2015-10-29 Alex Christensen <achristensen@webkit.org>
</span><span class="cx">
</span><span class="cx"> Make WebCore a framework in Mac CMake build
</span></span></pre></div>
<a id="trunkSourceWebKitWebCoreSupportWebResourceLoadSchedulercppfromrev192880trunkSourceWebCoreloaderResourceLoadSchedulercpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit/WebCoreSupport/WebResourceLoadScheduler.cpp (from rev 192880, trunk/Source/WebCore/loader/ResourceLoadScheduler.cpp) (0 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebCoreSupport/WebResourceLoadScheduler.cpp         (rev 0)
+++ trunk/Source/WebKit/WebCoreSupport/WebResourceLoadScheduler.cpp        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -0,0 +1,383 @@
</span><ins>+/*
+ Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
+ Copyright (C) 2001 Dirk Mueller (mueller@kde.org)
+ Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
+ Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
+ Copyright (C) 2004-2008, 2015 Apple Inc. All rights reserved.
+ Copyright (C) 2010 Google Inc. All rights reserved.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+ */
+
+#include "WebResourceLoadScheduler.h"
+
+#include <WebCore/Document.h>
+#include <WebCore/DocumentLoader.h>
+#include <WebCore/Frame.h>
+#include <WebCore/FrameLoader.h>
+#include <WebCore/Logging.h>
+#include <WebCore/NetscapePlugInStreamLoader.h>
+#include <WebCore/PingHandle.h>
+#include <WebCore/PlatformStrategies.h>
+#include <WebCore/ResourceHandle.h>
+#include <WebCore/ResourceRequest.h>
+#include <WebCore/SubresourceLoader.h>
+#include <WebCore/URL.h>
+#include <wtf/MainThread.h>
+#include <wtf/TemporaryChange.h>
+#include <wtf/text/CString.h>
+
+#if PLATFORM(IOS)
+#include <WebCore/RuntimeApplicationChecksIOS.h>
+#endif
+
+#if USE(QUICK_LOOK)
+#include <WebCore/QuickLook.h>
+#endif
+
+// Match the parallel connection count used by the networking layer.
+static unsigned maxRequestsInFlightPerHost;
+#if !PLATFORM(IOS)
+static const unsigned maxRequestsInFlightForNonHTTPProtocols = 20;
+#else
+// Limiting this seems to regress performance in some local cases so let's just make it large.
+static const unsigned maxRequestsInFlightForNonHTTPProtocols = 10000;
+#endif
+
+using namespace WebCore;
+
+WebResourceLoadScheduler& webResourceLoadScheduler()
+{
+ return static_cast<WebResourceLoadScheduler&>(*platformStrategies()->loaderStrategy());
+}
+
+WebResourceLoadScheduler::HostInformation* WebResourceLoadScheduler::hostForURL(const URL& url, CreateHostPolicy createHostPolicy)
+{
+ if (!url.protocolIsInHTTPFamily())
+ return m_nonHTTPProtocolHost;
+
+ m_hosts.checkConsistency();
+ String hostName = url.host();
+ HostInformation* host = m_hosts.get(hostName);
+ if (!host && createHostPolicy == CreateIfNotFound) {
+ host = new HostInformation(hostName, maxRequestsInFlightPerHost);
+ m_hosts.add(hostName, host);
+ }
+ return host;
+}
+
+WebResourceLoadScheduler::WebResourceLoadScheduler()
+ : m_nonHTTPProtocolHost(new HostInformation(String(), maxRequestsInFlightForNonHTTPProtocols))
+ , m_requestTimer(*this, &WebResourceLoadScheduler::requestTimerFired)
+ , m_suspendPendingRequestsCount(0)
+ , m_isSerialLoadingEnabled(false)
+{
+ maxRequestsInFlightPerHost = initializeMaximumHTTPConnectionCountPerHost();
+}
+
+WebResourceLoadScheduler::~WebResourceLoadScheduler()
+{
+}
+
+RefPtr<SubresourceLoader> WebResourceLoadScheduler::loadResource(Frame* frame, CachedResource* resource, const ResourceRequest& request, const ResourceLoaderOptions& options)
+{
+ RefPtr<SubresourceLoader> loader = SubresourceLoader::create(frame, resource, request, options);
+ if (loader)
+ scheduleLoad(loader.get());
+#if PLATFORM(IOS)
+ // Since we defer loader initialization until scheduling on iOS, the frame
+ // load delegate that would be called in SubresourceLoader::create() on
+ // other ports might be called in scheduleLoad() instead. Our contract to
+ // callers of this method is that a null loader is returned if the load was
+ // cancelled by a frame load delegate.
+ if (!loader || loader->reachedTerminalState())
+ return nullptr;
+#endif
+ return loader;
+}
+
+void WebResourceLoadScheduler::loadResourceSynchronously(NetworkingContext* context, unsigned long, const ResourceRequest& request, StoredCredentials storedCredentials, ClientCredentialPolicy, ResourceError& error, ResourceResponse& response, Vector<char>& data)
+{
+ ResourceHandle::loadResourceSynchronously(context, request, storedCredentials, error, response, data);
+}
+
+RefPtr<NetscapePlugInStreamLoader> WebResourceLoadScheduler::schedulePluginStreamLoad(Frame* frame, NetscapePlugInStreamLoaderClient* client, const ResourceRequest& request)
+{
+ RefPtr<NetscapePlugInStreamLoader> loader = NetscapePlugInStreamLoader::create(frame, client, request);
+ if (loader)
+ scheduleLoad(loader.get());
+ return loader;
+}
+
+void WebResourceLoadScheduler::scheduleLoad(ResourceLoader* resourceLoader)
+{
+ ASSERT(resourceLoader);
+
+ LOG(ResourceLoading, "WebResourceLoadScheduler::load resource %p '%s'", resourceLoader, resourceLoader->url().string().latin1().data());
+
+#if PLATFORM(IOS)
+ // If there's a web archive resource for this URL, we don't need to schedule the load since it will never touch the network.
+ if (!isSuspendingPendingRequests() && resourceLoader->documentLoader()->archiveResourceForURL(resourceLoader->iOSOriginalRequest().url())) {
+ resourceLoader->startLoading();
+ return;
+ }
+#else
+ if (resourceLoader->documentLoader()->archiveResourceForURL(resourceLoader->request().url())) {
+ resourceLoader->start();
+ return;
+ }
+#endif
+
+#if PLATFORM(IOS)
+ HostInformation* host = hostForURL(resourceLoader->iOSOriginalRequest().url(), CreateIfNotFound);
+#else
+ HostInformation* host = hostForURL(resourceLoader->url(), CreateIfNotFound);
+#endif
+
+ ResourceLoadPriority priority = resourceLoader->request().priority();
+
+ bool hadRequests = host->hasRequests();
+ host->schedule(resourceLoader, priority);
+
+#if PLATFORM(COCOA) || USE(CFNETWORK)
+ if (ResourceRequest::resourcePrioritiesEnabled() && !isSuspendingPendingRequests()) {
+ // Serve all requests at once to keep the pipeline full at the network layer.
+ // FIXME: Does this code do anything useful, given that we also set maxRequestsInFlightPerHost to effectively unlimited on these platforms?
+ servePendingRequests(host, ResourceLoadPriority::VeryLow);
+ return;
+ }
+#endif
+
+#if PLATFORM(IOS)
+ if ((priority > ResourceLoadPriority::Low || !resourceLoader->iOSOriginalRequest().url().protocolIsInHTTPFamily() || (priority == ResourceLoadPriority::Low && !hadRequests)) && !isSuspendingPendingRequests()) {
+ // Try to request important resources immediately.
+ servePendingRequests(host, priority);
+ return;
+ }
+#else
+ if (priority > ResourceLoadPriority::Low || !resourceLoader->url().protocolIsInHTTPFamily() || (priority == ResourceLoadPriority::Low && !hadRequests)) {
+ // Try to request important resources immediately.
+ servePendingRequests(host, priority);
+ return;
+ }
+#endif
+
+ // Handle asynchronously so early low priority requests don't
+ // get scheduled before later high priority ones.
+ scheduleServePendingRequests();
+}
+
+void WebResourceLoadScheduler::remove(ResourceLoader* resourceLoader)
+{
+ ASSERT(resourceLoader);
+
+ HostInformation* host = hostForURL(resourceLoader->url());
+ if (host)
+ host->remove(resourceLoader);
+#if PLATFORM(IOS)
+ // ResourceLoader::url() doesn't start returning the correct value until the load starts. If we get canceled before that, we need to look for originalRequest url instead.
+ // FIXME: ResourceLoader::url() should be made to return a sensible value at all times.
+ if (!resourceLoader->iOSOriginalRequest().isNull()) {
+ HostInformation* originalHost = hostForURL(resourceLoader->iOSOriginalRequest().url());
+ if (originalHost && originalHost != host)
+ originalHost->remove(resourceLoader);
+ }
+#endif
+ scheduleServePendingRequests();
+}
+
+void WebResourceLoadScheduler::setDefersLoading(ResourceLoader*, bool)
+{
+}
+
+void WebResourceLoadScheduler::crossOriginRedirectReceived(ResourceLoader* resourceLoader, const URL& redirectURL)
+{
+ HostInformation* oldHost = hostForURL(resourceLoader->url());
+ ASSERT(oldHost);
+ if (!oldHost)
+ return;
+
+ HostInformation* newHost = hostForURL(redirectURL, CreateIfNotFound);
+
+ if (oldHost->name() == newHost->name())
+ return;
+
+ newHost->addLoadInProgress(resourceLoader);
+ oldHost->remove(resourceLoader);
+}
+
+void WebResourceLoadScheduler::servePendingRequests(ResourceLoadPriority minimumPriority)
+{
+ LOG(ResourceLoading, "WebResourceLoadScheduler::servePendingRequests. m_suspendPendingRequestsCount=%d", m_suspendPendingRequestsCount);
+ if (isSuspendingPendingRequests())
+ return;
+
+ m_requestTimer.stop();
+
+ servePendingRequests(m_nonHTTPProtocolHost, minimumPriority);
+
+ Vector<HostInformation*> hostsToServe;
+ copyValuesToVector(m_hosts, hostsToServe);
+
+ for (auto* host : hostsToServe) {
+ if (host->hasRequests())
+ servePendingRequests(host, minimumPriority);
+ else
+ delete m_hosts.take(host->name());
+ }
+}
+
+void WebResourceLoadScheduler::servePendingRequests(HostInformation* host, ResourceLoadPriority minimumPriority)
+{
+ LOG(ResourceLoading, "WebResourceLoadScheduler::servePendingRequests HostInformation.m_name='%s'", host->name().latin1().data());
+
+ auto priority = ResourceLoadPriority::Highest;
+ while (true) {
+ auto& requestsPending = host->requestsPending(priority);
+ while (!requestsPending.isEmpty()) {
+ RefPtr<ResourceLoader> resourceLoader = requestsPending.first();
+
+ // For named hosts - which are only http(s) hosts - we should always enforce the connection limit.
+ // For non-named hosts - everything but http(s) - we should only enforce the limit if the document isn't done parsing
+ // and we don't know all stylesheets yet.
+ Document* document = resourceLoader->frameLoader() ? resourceLoader->frameLoader()->frame().document() : 0;
+ bool shouldLimitRequests = !host->name().isNull() || (document && (document->parsing() || !document->haveStylesheetsLoaded()));
+ if (shouldLimitRequests && host->limitRequests(priority))
+ return;
+
+ requestsPending.removeFirst();
+ host->addLoadInProgress(resourceLoader.get());
+#if PLATFORM(IOS)
+ if (!applicationIsWebProcess()) {
+ resourceLoader->startLoading();
+ return;
+ }
+#endif
+ resourceLoader->start();
+ }
+ if (priority == minimumPriority)
+ return;
+ --priority;
+ }
+}
+
+void WebResourceLoadScheduler::suspendPendingRequests()
+{
+ ++m_suspendPendingRequestsCount;
+}
+
+void WebResourceLoadScheduler::resumePendingRequests()
+{
+ ASSERT(m_suspendPendingRequestsCount);
+ --m_suspendPendingRequestsCount;
+ if (m_suspendPendingRequestsCount)
+ return;
+ if (!m_hosts.isEmpty() || m_nonHTTPProtocolHost->hasRequests())
+ scheduleServePendingRequests();
+}
+
+void WebResourceLoadScheduler::scheduleServePendingRequests()
+{
+ LOG(ResourceLoading, "WebResourceLoadScheduler::scheduleServePendingRequests, m_requestTimer.isActive()=%u", m_requestTimer.isActive());
+ if (!m_requestTimer.isActive())
+ m_requestTimer.startOneShot(0);
+}
+
+void WebResourceLoadScheduler::requestTimerFired()
+{
+ LOG(ResourceLoading, "WebResourceLoadScheduler::requestTimerFired\n");
+ servePendingRequests();
+}
+
+WebResourceLoadScheduler::HostInformation::HostInformation(const String& name, unsigned maxRequestsInFlight)
+ : m_name(name)
+ , m_maxRequestsInFlight(maxRequestsInFlight)
+{
+}
+
+WebResourceLoadScheduler::HostInformation::~HostInformation()
+{
+ ASSERT(!hasRequests());
+}
+
+unsigned WebResourceLoadScheduler::HostInformation::priorityToIndex(ResourceLoadPriority priority)
+{
+ switch (priority) {
+ case ResourceLoadPriority::VeryLow:
+ return 0;
+ case ResourceLoadPriority::Low:
+ return 1;
+ case ResourceLoadPriority::Medium:
+ return 2;
+ case ResourceLoadPriority::High:
+ return 3;
+ case ResourceLoadPriority::VeryHigh:
+ return 4;
+ }
+ ASSERT_NOT_REACHED();
+ return 0;
+}
+
+void WebResourceLoadScheduler::HostInformation::schedule(ResourceLoader* resourceLoader, ResourceLoadPriority priority)
+{
+ m_requestsPending[priorityToIndex(priority)].append(resourceLoader);
+}
+
+void WebResourceLoadScheduler::HostInformation::addLoadInProgress(ResourceLoader* resourceLoader)
+{
+ LOG(ResourceLoading, "HostInformation '%s' loading '%s'. Current count %d", m_name.latin1().data(), resourceLoader->url().string().latin1().data(), m_requestsLoading.size());
+ m_requestsLoading.add(resourceLoader);
+}
+
+void WebResourceLoadScheduler::HostInformation::remove(ResourceLoader* resourceLoader)
+{
+ if (m_requestsLoading.remove(resourceLoader))
+ return;
+
+ for (auto& requestQueue : m_requestsPending) {
+ for (auto it = requestQueue.begin(), end = requestQueue.end(); it != end; ++it) {
+ if (*it == resourceLoader) {
+ requestQueue.remove(it);
+ return;
+ }
+ }
+ }
+}
+
+bool WebResourceLoadScheduler::HostInformation::hasRequests() const
+{
+ if (!m_requestsLoading.isEmpty())
+ return true;
+ for (auto& requestQueue : m_requestsPending) {
+ if (!requestQueue.isEmpty())
+ return true;
+ }
+ return false;
+}
+
+bool WebResourceLoadScheduler::HostInformation::limitRequests(ResourceLoadPriority priority) const
+{
+ if (priority == ResourceLoadPriority::VeryLow && !m_requestsLoading.isEmpty())
+ return true;
+ return m_requestsLoading.size() >= (webResourceLoadScheduler().isSerialLoadingEnabled() ? 1 : m_maxRequestsInFlight);
+}
+
+void WebResourceLoadScheduler::createPingHandle(NetworkingContext* networkingContext, ResourceRequest& request, bool shouldUseCredentialStorage)
+{
+ // PingHandle manages its own lifetime, deleting itself when its purpose has been fulfilled.
+ new PingHandle(networkingContext, request, shouldUseCredentialStorage, PingHandle::UsesAsyncCallbacks::No);
+}
+
</ins></span></pre></div>
<a id="trunkSourceWebKitWebCoreSupportWebResourceLoadSchedulerhfromrev192880trunkSourceWebCoreloaderResourceLoadSchedulerh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit/WebCoreSupport/WebResourceLoadScheduler.h (from rev 192880, trunk/Source/WebCore/loader/ResourceLoadScheduler.h) (0 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebCoreSupport/WebResourceLoadScheduler.h         (rev 0)
+++ trunk/Source/WebKit/WebCoreSupport/WebResourceLoadScheduler.h        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -0,0 +1,119 @@
</span><ins>+/*
+ Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
+ Copyright (C) 2001 Dirk Mueller <mueller@kde.org>
+ Copyright (C) 2004, 2006-2008, 2015 Apple Inc. All rights reserved.
+ Copyright (C) 2010 Google Inc. All rights reserved.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+ */
+
+#ifndef WebResourceLoadScheduler_h
+#define WebResourceLoadScheduler_h
+
+#include <WebCore/FrameLoaderTypes.h>
+#include <WebCore/LoaderStrategy.h>
+#include <WebCore/ResourceLoadPriority.h>
+#include <WebCore/ResourceLoaderOptions.h>
+#include <WebCore/Timer.h>
+#include <array>
+#include <wtf/Deque.h>
+#include <wtf/HashMap.h>
+#include <wtf/HashSet.h>
+#include <wtf/Noncopyable.h>
+#include <wtf/text/StringHash.h>
+#include <wtf/text/WTFString.h>
+
+class WebResourceLoadScheduler;
+
+WebResourceLoadScheduler& webResourceLoadScheduler();
+
+class WebResourceLoadScheduler : public WebCore::LoaderStrategy {
+ WTF_MAKE_NONCOPYABLE(WebResourceLoadScheduler); WTF_MAKE_FAST_ALLOCATED;
+public:
+ WebResourceLoadScheduler();
+
+ RefPtr<WebCore::SubresourceLoader> loadResource(WebCore::Frame*, WebCore::CachedResource*, const WebCore::ResourceRequest&, const WebCore::ResourceLoaderOptions&) override;
+ void loadResourceSynchronously(WebCore::NetworkingContext*, unsigned long, const WebCore::ResourceRequest&, WebCore::StoredCredentials, WebCore::ClientCredentialPolicy, WebCore::ResourceError&, WebCore::ResourceResponse&, Vector<char>&) override;
+ void remove(WebCore::ResourceLoader*) override;
+ void setDefersLoading(WebCore::ResourceLoader*, bool) override;
+ void crossOriginRedirectReceived(WebCore::ResourceLoader*, const WebCore::URL& redirectURL) override;
+
+ void servePendingRequests(WebCore::ResourceLoadPriority minimumPriority = WebCore::ResourceLoadPriority::VeryLow) override;
+ void suspendPendingRequests() override;
+ void resumePendingRequests() override;
+
+ void createPingHandle(WebCore::NetworkingContext*, WebCore::ResourceRequest&, bool shouldUseCredentialStorage) override;
+
+ bool isSerialLoadingEnabled() const { return m_isSerialLoadingEnabled; }
+ void setSerialLoadingEnabled(bool b) { m_isSerialLoadingEnabled = b; }
+
+ RefPtr<WebCore::NetscapePlugInStreamLoader> schedulePluginStreamLoad(WebCore::Frame*, WebCore::NetscapePlugInStreamLoaderClient*, const WebCore::ResourceRequest&);
+
+protected:
+ virtual ~WebResourceLoadScheduler();
+
+private:
+ void scheduleLoad(WebCore::ResourceLoader*);
+ void scheduleServePendingRequests();
+ void requestTimerFired();
+
+ bool isSuspendingPendingRequests() const { return !!m_suspendPendingRequestsCount; }
+
+ class HostInformation {
+ WTF_MAKE_NONCOPYABLE(HostInformation); WTF_MAKE_FAST_ALLOCATED;
+ public:
+ HostInformation(const String&, unsigned);
+ ~HostInformation();
+
+ const String& name() const { return m_name; }
+ void schedule(WebCore::ResourceLoader*, WebCore::ResourceLoadPriority = WebCore::ResourceLoadPriority::VeryLow);
+ void addLoadInProgress(WebCore::ResourceLoader*);
+ void remove(WebCore::ResourceLoader*);
+ bool hasRequests() const;
+ bool limitRequests(WebCore::ResourceLoadPriority) const;
+
+ typedef Deque<RefPtr<WebCore::ResourceLoader>> RequestQueue;
+ RequestQueue& requestsPending(WebCore::ResourceLoadPriority priority) { return m_requestsPending[priorityToIndex(priority)]; }
+
+ private:
+ static unsigned priorityToIndex(WebCore::ResourceLoadPriority);
+
+ std::array<RequestQueue, WebCore::resourceLoadPriorityCount> m_requestsPending;
+ typedef HashSet<RefPtr<WebCore::ResourceLoader>> RequestMap;
+ RequestMap m_requestsLoading;
+ const String m_name;
+ const unsigned m_maxRequestsInFlight;
+ };
+
+ enum CreateHostPolicy {
+ CreateIfNotFound,
+ FindOnly
+ };
+
+ HostInformation* hostForURL(const WebCore::URL&, CreateHostPolicy = FindOnly);
+ WEBCORE_EXPORT void servePendingRequests(HostInformation*, WebCore::ResourceLoadPriority);
+
+ typedef HashMap<String, HostInformation*, StringHash> HostMap;
+ HostMap m_hosts;
+ HostInformation* m_nonHTTPProtocolHost;
+
+ WebCore::Timer m_requestTimer;
+
+ unsigned m_suspendPendingRequestsCount;
+ bool m_isSerialLoadingEnabled;
+};
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebKitWebKitvcxprojWebKitWebKitvcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebKit.vcxproj/WebKit/WebKit.vcxproj (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebKit.vcxproj/WebKit/WebKit.vcxproj        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebKit/WebKit.vcxproj/WebKit/WebKit.vcxproj        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -314,6 +314,7 @@
</span><span class="cx"> <ClCompile Include="..\..\Storage\WebStorageNamespaceProvider.cpp" />
</span><span class="cx"> <ClCompile Include="..\..\cf\WebCoreSupport\WebInspectorClientCF.cpp" />
</span><span class="cx"> <ClCompile Include="..\..\WebCoreSupport\WebViewGroup.cpp" />
</span><ins>+ <ClCompile Include="..\..\WebCoreSupport\WebResourceLoadScheduler.cpp" />
</ins><span class="cx"> <ClCompile Include="..\..\win\Plugins\npapi.cpp" />
</span><span class="cx"> <ClCompile Include="..\..\win\Plugins\PluginDatabase.cpp" />
</span><span class="cx"> <ClCompile Include="..\..\win\Plugins\PluginDebug.cpp" />
</span><span class="lines">@@ -469,6 +470,7 @@
</span><span class="cx"> <ClInclude Include="..\..\Storage\WebDatabaseProvider.h" />
</span><span class="cx"> <ClInclude Include="..\..\Storage\WebStorageNamespaceProvider.h" />
</span><span class="cx"> <ClInclude Include="..\..\WebCoreSupport\WebViewGroup.h" />
</span><ins>+ <ClInclude Include="..\..\WebCoreSupport\WebResourceLoadScheduler.h" />
</ins><span class="cx"> <ClInclude Include="..\..\win\Plugins\PluginDatabase.h" />
</span><span class="cx"> <ClInclude Include="..\..\win\Plugins\PluginDebug.h" />
</span><span class="cx"> <ClInclude Include="..\..\win\Plugins\PluginPackage.h" />
</span></span></pre></div>
<a id="trunkSourceWebKitWebKitvcxprojWebKitWebKitvcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebKit.vcxproj/WebKit/WebKit.vcxproj.filters (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebKit.vcxproj/WebKit/WebKit.vcxproj.filters        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebKit/WebKit.vcxproj/WebKit/WebKit.vcxproj.filters        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -338,6 +338,9 @@
</span><span class="cx"> <ClCompile Include="..\..\WebCoreSupport\WebViewGroup.cpp">
</span><span class="cx"> <Filter>Sources</Filter>
</span><span class="cx"> </ClCompile>
</span><ins>+ <ClCompile Include="..\..\WebCoreSupport\WebResourceLoadScheduler.cpp">
+ <Filter>Sources</Filter>
+ </ClCompile>
</ins><span class="cx"> <ClCompile Include="..\..\win\WebCoreSupport\WebVisitedLinkStore.cpp">
</span><span class="cx"> <Filter>WebCoreSupport</Filter>
</span><span class="cx"> </ClCompile>
</span><span class="lines">@@ -668,6 +671,9 @@
</span><span class="cx"> <ClInclude Include="..\..\WebCoreSupport\WebViewGroup.h">
</span><span class="cx"> <Filter>Header Files</Filter>
</span><span class="cx"> </ClInclude>
</span><ins>+ <ClInclude Include="..\..\WebCoreSupport\WebResourceLoadScheduler.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ins><span class="cx"> </ItemGroup>
</span><span class="cx"> <ItemGroup>
</span><span class="cx"> <None Include="WebKitPostBuild.cmd" />
</span></span></pre></div>
<a id="trunkSourceWebKitWebKitxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -455,6 +455,8 @@
</span><span class="cx">                 E15663190FB61C1F00C199CA /* WebDownload.mm in Sources */ = {isa = PBXBuildFile; fileRef = E15663180FB61C1F00C199CA /* WebDownload.mm */; };
</span><span class="cx">                 E169836211346D1B00894115 /* ProxyRuntimeObject.h in Headers */ = {isa = PBXBuildFile; fileRef = E169836111346D1B00894115 /* ProxyRuntimeObject.h */; };
</span><span class="cx">                 E169836C11346D5600894115 /* ProxyRuntimeObject.mm in Sources */ = {isa = PBXBuildFile; fileRef = E169836B11346D5600894115 /* ProxyRuntimeObject.mm */; };
</span><ins>+                E4AEF97B1C0DF4BC00B01727 /* WebResourceLoadScheduler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4AEF9791C0DF4BC00B01727 /* WebResourceLoadScheduler.cpp */; };
+                E4AEF97C1C0DF4BC00B01727 /* WebResourceLoadScheduler.h in Headers */ = {isa = PBXBuildFile; fileRef = E4AEF97A1C0DF4BC00B01727 /* WebResourceLoadScheduler.h */; };
</ins><span class="cx">                 ED5B9524111B725A00472298 /* WebLocalizableStrings.mm in Sources */ = {isa = PBXBuildFile; fileRef = ED5B9523111B725A00472298 /* WebLocalizableStrings.mm */; };
</span><span class="cx">                 ED7F6D8B0980683500C235ED /* WebNSDataExtrasPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = ED7F6D8A0980683500C235ED /* WebNSDataExtrasPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 F834AAD70E64B1C700E2737C /* WebTextIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = F834AAD50E64B1C700E2737C /* WebTextIterator.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -868,6 +870,8 @@
</span><span class="cx">                 E15663180FB61C1F00C199CA /* WebDownload.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebDownload.mm; sourceTree = "<group>"; };
</span><span class="cx">                 E169836111346D1B00894115 /* ProxyRuntimeObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProxyRuntimeObject.h; sourceTree = "<group>"; };
</span><span class="cx">                 E169836B11346D5600894115 /* ProxyRuntimeObject.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ProxyRuntimeObject.mm; sourceTree = "<group>"; };
</span><ins>+                E4AEF9791C0DF4BC00B01727 /* WebResourceLoadScheduler.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; name = WebResourceLoadScheduler.cpp; path = WebCoreSupport/WebResourceLoadScheduler.cpp; sourceTree = SOURCE_ROOT; };
+                E4AEF97A1C0DF4BC00B01727 /* WebResourceLoadScheduler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebResourceLoadScheduler.h; path = WebCoreSupport/WebResourceLoadScheduler.h; sourceTree = SOURCE_ROOT; };
</ins><span class="cx">                 ED21B9810528F7AA003299AC /* WebDocumentInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebDocumentInternal.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
</span><span class="cx">                 ED2B2474033A2DA800C1A526 /* WebNSPasteboardExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebNSPasteboardExtras.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
</span><span class="cx">                 ED2B2475033A2DA800C1A526 /* WebNSPasteboardExtras.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebNSPasteboardExtras.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
</span><span class="lines">@@ -1595,6 +1599,8 @@
</span><span class="cx">                                 1AA879B511CBE9BF003C664F /* WebPlatformStrategies.mm */,
</span><span class="cx">                                 1A6A208C1886154600E50F5F /* WebProgressTrackerClient.h */,
</span><span class="cx">                                 1A6A208B1886154600E50F5F /* WebProgressTrackerClient.mm */,
</span><ins>+                                E4AEF9791C0DF4BC00B01727 /* WebResourceLoadScheduler.cpp */,
+                                E4AEF97A1C0DF4BC00B01727 /* WebResourceLoadScheduler.h */,
</ins><span class="cx">                                 A5DEFC0711D5331C00885273 /* WebSecurityOrigin.mm */,
</span><span class="cx">                                 A5DEFC0811D5331C00885273 /* WebSecurityOriginInternal.h */,
</span><span class="cx">                                 A5DEFC0911D5331C00885273 /* WebSecurityOriginPrivate.h */,
</span><span class="lines">@@ -1888,6 +1894,7 @@
</span><span class="cx">                                 A10C1D3C18202FC50036883A /* WebNSStringExtrasIPhone.h in Headers */,
</span><span class="cx">                                 9398107E0824BF01008DF038 /* WebNSURLExtras.h in Headers */,
</span><span class="cx">                                 65E0F88408500917007E5CB9 /* WebNSURLRequestExtras.h in Headers */,
</span><ins>+                                E4AEF97C1C0DF4BC00B01727 /* WebResourceLoadScheduler.h in Headers */,
</ins><span class="cx">                                 65E0F9E608500F23007E5CB9 /* WebNSUserDefaultsExtras.h in Headers */,
</span><span class="cx">                                 939810240824BF01008DF038 /* WebNSViewExtras.h in Headers */,
</span><span class="cx">                                 939810250824BF01008DF038 /* WebNSWindowExtras.h in Headers */,
</span><span class="lines">@@ -2236,6 +2243,7 @@
</span><span class="cx">                                 BC7F889F10C9D30C00D6133D /* WebGeolocationPosition.mm in Sources */,
</span><span class="cx">                                 A10C1D3718202FC50036883A /* WebGeolocationProviderIOS.mm in Sources */,
</span><span class="cx">                                 939811130824BF01008DF038 /* WebHistory.mm in Sources */,
</span><ins>+                                E4AEF97B1C0DF4BC00B01727 /* WebResourceLoadScheduler.cpp in Sources */,
</ins><span class="cx">                                 939810BD0824BF01008DF038 /* WebHistoryItem.mm in Sources */,
</span><span class="cx">                                 1AAF5FC00EDE3A92008D883D /* WebHostedNetscapePluginView.mm in Sources */,
</span><span class="cx">                                 939810F30824BF01008DF038 /* WebHTMLRepresentation.mm in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebKit/mac/ChangeLog        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2015-12-02 Antti Koivisto <antti@apple.com>
+
+ Move ResourceLoadScheduler to WebKit1
+ https://bugs.webkit.org/show_bug.cgi?id=151743
+
+ Reviewed by Alex Christensen.
+
+ * Plugins/Hosted/HostedNetscapePluginStream.mm:
+ (WebKit::HostedNetscapePluginStream::start):
+ (WebKit::HostedNetscapePluginStream::stop):
+ * Plugins/WebNetscapePluginStream.mm:
+ (WebNetscapePluginStream::start):
+ (WebNetscapePluginStream::stop):
+ * WebCoreSupport/WebPlatformStrategies.h:
+ * WebCoreSupport/WebPlatformStrategies.mm:
+ (WebPlatformStrategies::createLoaderStrategy):
+ (WebPlatformStrategies::createPasteboardStrategy):
+ (WebPlatformStrategies::createPluginStrategy):
+ (WebPlatformStrategies::createBlobRegistry):
+ (WebPlatformStrategies::cookiesForDOM):
+ * WebView/WebView.mm:
+ (-[WebView _dispatchPendingLoadRequests]):
+ (+[WebView _setLoadResourcesSerially:]):
+ (+[WebView _HTTPPipeliningEnabled]):
+
</ins><span class="cx"> 2015-12-01 Yusuke Suzuki <utatane.tea@gmail.com>
</span><span class="cx">
</span><span class="cx"> [ES6] Implement LLInt/Baseline Support for ES6 Generators and enable this feature
</span></span></pre></div>
<a id="trunkSourceWebKitmacPluginsHostedHostedNetscapePluginStreammm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -36,11 +36,12 @@
</span><span class="cx"> #import "WebKitSystemInterface.h"
</span><span class="cx"> #import "WebNSURLExtras.h"
</span><span class="cx"> #import "WebNSURLRequestExtras.h"
</span><ins>+#import "WebResourceLoadScheduler.h"
</ins><span class="cx"> #import <WebCore/Document.h>
</span><span class="cx"> #import <WebCore/DocumentLoader.h>
</span><span class="cx"> #import <WebCore/Frame.h>
</span><span class="cx"> #import <WebCore/FrameLoader.h>
</span><del>-#import <WebCore/ResourceLoadScheduler.h>
</del><ins>+#import <WebCore/PlatformStrategies.h>
</ins><span class="cx"> #import <WebCore/SecurityOrigin.h>
</span><span class="cx"> #import <WebCore/SecurityPolicy.h>
</span><span class="cx"> #import <WebCore/WebCoreURLResponse.h>
</span><span class="lines">@@ -220,8 +221,8 @@
</span><span class="cx"> ASSERT(m_request);
</span><span class="cx"> ASSERT(!m_frameLoader);
</span><span class="cx"> ASSERT(!m_loader);
</span><del>-
- m_loader = resourceLoadScheduler()->schedulePluginStreamLoad(core([m_instance->pluginView() webFrame]), this, m_request.get());
</del><ins>+
+ m_loader = webResourceLoadScheduler().schedulePluginStreamLoad(core([m_instance->pluginView() webFrame]), this, m_request.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void HostedNetscapePluginStream::stop()
</span></span></pre></div>
<a id="trunkSourceWebKitmacPluginsWebNetscapePluginStreammm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/Plugins/WebNetscapePluginStream.mm (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/Plugins/WebNetscapePluginStream.mm        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebKit/mac/Plugins/WebNetscapePluginStream.mm        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -37,13 +37,15 @@
</span><span class="cx"> #import "WebNSURLRequestExtras.h"
</span><span class="cx"> #import "WebNetscapePluginPackage.h"
</span><span class="cx"> #import "WebNetscapePluginView.h"
</span><ins>+#import "WebResourceLoadScheduler.h"
</ins><span class="cx"> #import <Foundation/NSURLResponse.h>
</span><span class="cx"> #import <WebCore/Document.h>
</span><span class="cx"> #import <WebCore/DocumentLoader.h>
</span><span class="cx"> #import <WebCore/Frame.h>
</span><span class="cx"> #import <WebCore/FrameLoader.h>
</span><span class="cx"> #import <WebCore/JSDOMWindowBase.h>
</span><del>-#import <WebCore/ResourceLoadScheduler.h>
</del><ins>+#import <WebCore/LoaderStrategy.h>
+#import <WebCore/PlatformStrategies.h>
</ins><span class="cx"> #import <WebCore/SecurityOrigin.h>
</span><span class="cx"> #import <WebCore/SecurityPolicy.h>
</span><span class="cx"> #import <WebCore/WebCoreObjCExtras.h>
</span><span class="lines">@@ -285,8 +287,8 @@
</span><span class="cx"> ASSERT(m_request);
</span><span class="cx"> ASSERT(!m_frameLoader);
</span><span class="cx"> ASSERT(!m_loader);
</span><del>-
- m_loader = resourceLoadScheduler()->schedulePluginStreamLoad(core([m_pluginView.get() webFrame]), this, m_request.get());
</del><ins>+
+ m_loader = webResourceLoadScheduler().schedulePluginStreamLoad(core([m_pluginView.get() webFrame]), this, m_request.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebNetscapePluginStream::stop()
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebPlatformStrategiesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> struct PasteboardImage;
</span><span class="cx"> struct PasteboardWebContent;
</span><span class="cx">
</span><del>-class WebPlatformStrategies : public WebCore::PlatformStrategies, private WebCore::CookiesStrategy, private WebCore::LoaderStrategy, private WebCore::PasteboardStrategy, private WebCore::PluginStrategy {
</del><ins>+class WebPlatformStrategies : public WebCore::PlatformStrategies, private WebCore::CookiesStrategy, private WebCore::PasteboardStrategy, private WebCore::PluginStrategy {
</ins><span class="cx"> public:
</span><span class="cx"> static void initializeIfNecessary();
</span><span class="cx">
</span><span class="lines">@@ -47,6 +47,7 @@
</span><span class="cx"> virtual WebCore::LoaderStrategy* createLoaderStrategy() override;
</span><span class="cx"> virtual WebCore::PasteboardStrategy* createPasteboardStrategy() override;
</span><span class="cx"> virtual WebCore::PluginStrategy* createPluginStrategy() override;
</span><ins>+ virtual WebCore::BlobRegistry* createBlobRegistry() override;
</ins><span class="cx">
</span><span class="cx"> // WebCore::CookiesStrategy
</span><span class="cx"> virtual String cookiesForDOM(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&) override;
</span><span class="lines">@@ -56,8 +57,6 @@
</span><span class="cx"> virtual bool getRawCookies(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&, Vector<WebCore::Cookie>&) override;
</span><span class="cx"> virtual void deleteCookie(const WebCore::NetworkStorageSession&, const WebCore::URL&, const String&) override;
</span><span class="cx">
</span><del>- // WebCore::LoaderStrategy
- // - Using default implementation.
</del><span class="cx">
</span><span class="cx"> // WebCore::PluginStrategy
</span><span class="cx"> virtual void refreshPlugins() override;
</span><span class="lines">@@ -68,9 +67,6 @@
</span><span class="cx"> virtual void clearPluginClientPolicies() override;
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- // WebCore::LoaderStrategy
- // - Using default implementation.
-
</del><span class="cx"> // WebCore::PasteboardStrategy
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> virtual void writeToPasteboard(const WebCore::PasteboardWebContent&) override;
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebPlatformStrategiesmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -28,6 +28,8 @@
</span><span class="cx"> #import "WebFrameNetworkingContext.h"
</span><span class="cx"> #import "WebPluginDatabase.h"
</span><span class="cx"> #import "WebPluginPackage.h"
</span><ins>+#import "WebResourceLoadScheduler.h"
+#import <WebCore/BlobRegistryImpl.h>
</ins><span class="cx"> #import <WebCore/BlockExceptions.h>
</span><span class="cx"> #import <WebCore/Color.h>
</span><span class="cx"> #import <WebCore/MainFrame.h>
</span><span class="lines">@@ -62,7 +64,7 @@
</span><span class="cx">
</span><span class="cx"> LoaderStrategy* WebPlatformStrategies::createLoaderStrategy()
</span><span class="cx"> {
</span><del>- return this;
</del><ins>+ return new WebResourceLoadScheduler;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> PasteboardStrategy* WebPlatformStrategies::createPasteboardStrategy()
</span><span class="lines">@@ -75,6 +77,11 @@
</span><span class="cx"> return this;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+BlobRegistry* WebPlatformStrategies::createBlobRegistry()
+{
+ return new WebCore::BlobRegistryImpl;
+}
+
</ins><span class="cx"> String WebPlatformStrategies::cookiesForDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
</span><span class="cx"> {
</span><span class="cx"> return WebCore::cookiesForDOM(session, firstParty, url);
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebView.mm        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -95,6 +95,7 @@
</span><span class="cx"> #import "WebPreferenceKeysPrivate.h"
</span><span class="cx"> #import "WebPreferencesPrivate.h"
</span><span class="cx"> #import "WebProgressTrackerClient.h"
</span><ins>+#import "WebResourceLoadScheduler.h"
</ins><span class="cx"> #import "WebScriptDebugDelegate.h"
</span><span class="cx"> #import "WebScriptWorldInternal.h"
</span><span class="cx"> #import "WebSelectionServiceController.h"
</span><span class="lines">@@ -167,7 +168,6 @@
</span><span class="cx"> #import <WebCore/RenderView.h>
</span><span class="cx"> #import <WebCore/RenderWidget.h>
</span><span class="cx"> #import <WebCore/ResourceHandle.h>
</span><del>-#import <WebCore/ResourceLoadScheduler.h>
</del><span class="cx"> #import <WebCore/ResourceRequest.h>
</span><span class="cx"> #import <WebCore/RuntimeApplicationChecks.h>
</span><span class="cx"> #import <WebCore/RuntimeEnabledFeatures.h>
</span><span class="lines">@@ -761,7 +761,7 @@
</span><span class="cx">
</span><span class="cx"> - (void)_dispatchPendingLoadRequests
</span><span class="cx"> {
</span><del>- resourceLoadScheduler()->servePendingRequests();
</del><ins>+ webResourceLoadScheduler().servePendingRequests();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if !PLATFORM(IOS)
</span><span class="lines">@@ -1616,9 +1616,9 @@
</span><span class="cx"> - (void)_setResourceLoadSchedulerSuspended:(BOOL)suspend
</span><span class="cx"> {
</span><span class="cx"> if (suspend)
</span><del>- resourceLoadScheduler()->suspendPendingRequests();
</del><ins>+ webResourceLoadScheduler().suspendPendingRequests();
</ins><span class="cx"> else
</span><del>- resourceLoadScheduler()->resumePendingRequests();
</del><ins>+ webResourceLoadScheduler().resumePendingRequests();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> + (void)_setAllowCookies:(BOOL)allow
</span><span class="lines">@@ -4482,7 +4482,8 @@
</span><span class="cx"> + (void)_setLoadResourcesSerially:(BOOL)serialize
</span><span class="cx"> {
</span><span class="cx"> WebPlatformStrategies::initializeIfNecessary();
</span><del>- resourceLoadScheduler()->setSerialLoadingEnabled(serialize);
</del><ins>+
+ webResourceLoadScheduler().setSerialLoadingEnabled(serialize);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> + (BOOL)_HTTPPipeliningEnabled
</span></span></pre></div>
<a id="trunkSourceWebKitwinPluginsPluginStreamcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/Plugins/PluginStream.cpp (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/Plugins/PluginStream.cpp        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebKit/win/Plugins/PluginStream.cpp        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -32,9 +32,9 @@
</span><span class="cx"> #include "FrameLoader.h"
</span><span class="cx"> #include "HTTPHeaderNames.h"
</span><span class="cx"> #include "PluginDebug.h"
</span><del>-#include "ResourceLoadScheduler.h"
</del><span class="cx"> #include "SharedBuffer.h"
</span><span class="cx"> #include "SubresourceLoader.h"
</span><ins>+#include "WebResourceLoadScheduler.h"
</ins><span class="cx"> #include <wtf/StringExtras.h>
</span><span class="cx"> #include <wtf/text/CString.h>
</span><span class="cx"> #include <wtf/text/StringBuilder.h>
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx"> void PluginStream::start()
</span><span class="cx"> {
</span><span class="cx"> ASSERT(!m_loadManually);
</span><del>- m_loader = resourceLoadScheduler()->schedulePluginStreamLoad(m_frame, this, m_resourceRequest);
</del><ins>+ m_loader = webResourceLoadScheduler().schedulePluginStreamLoad(m_frame, this, m_resourceRequest);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void PluginStream::stop()
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebCoreSupportWebPlatformStrategiescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebCoreSupport/WebPlatformStrategies.cpp (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebCoreSupport/WebPlatformStrategies.cpp        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebPlatformStrategies.cpp        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -28,6 +28,8 @@
</span><span class="cx"> #include "FrameLoader.h"
</span><span class="cx"> #include "PluginDatabase.h"
</span><span class="cx"> #include "WebFrameNetworkingContext.h"
</span><ins>+#include "WebResourceLoadScheduler.h"
+#include <WebCore/BlobRegistryImpl.h>
</ins><span class="cx"> #include <WebCore/Page.h>
</span><span class="cx"> #include <WebCore/PageGroup.h>
</span><span class="cx"> #include <WebCore/PlatformCookieJar.h>
</span><span class="lines">@@ -54,7 +56,7 @@
</span><span class="cx">
</span><span class="cx"> LoaderStrategy* WebPlatformStrategies::createLoaderStrategy()
</span><span class="cx"> {
</span><del>- return this;
</del><ins>+ return new WebResourceLoadScheduler;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> PasteboardStrategy* WebPlatformStrategies::createPasteboardStrategy()
</span><span class="lines">@@ -67,6 +69,11 @@
</span><span class="cx"> return this;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+BlobRegistry* WebPlatformStrategies::createBlobRegistry()
+{
+ return new BlobRegistryImpl;
+}
+
</ins><span class="cx"> String WebPlatformStrategies::cookiesForDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
</span><span class="cx"> {
</span><span class="cx"> return WebCore::cookiesForDOM(session, firstParty, url);
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebCoreSupportWebPlatformStrategiesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebCoreSupport/WebPlatformStrategies.h (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebCoreSupport/WebPlatformStrategies.h        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebPlatformStrategies.h        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx"> #include <WebCore/PlatformStrategies.h>
</span><span class="cx"> #include <WebCore/PluginStrategy.h>
</span><span class="cx">
</span><del>-class WebPlatformStrategies : public WebCore::PlatformStrategies, private WebCore::CookiesStrategy, private WebCore::LoaderStrategy, private WebCore::PluginStrategy {
</del><ins>+class WebPlatformStrategies : public WebCore::PlatformStrategies, private WebCore::CookiesStrategy, private WebCore::PluginStrategy {
</ins><span class="cx"> public:
</span><span class="cx"> static void initialize();
</span><span class="cx">
</span><span class="lines">@@ -43,6 +43,7 @@
</span><span class="cx"> virtual WebCore::LoaderStrategy* createLoaderStrategy();
</span><span class="cx"> virtual WebCore::PasteboardStrategy* createPasteboardStrategy();
</span><span class="cx"> virtual WebCore::PluginStrategy* createPluginStrategy();
</span><ins>+ virtual WebCore::BlobRegistry* createBlobRegistry();
</ins><span class="cx">
</span><span class="cx"> // WebCore::CookiesStrategy
</span><span class="cx"> virtual String cookiesForDOM(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&);
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebView.cpp (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebView.cpp        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebKit/win/WebView.cpp        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -34,7 +34,6 @@
</span><span class="cx"> #include "MarshallingHelpers.h"
</span><span class="cx"> #include "PluginDatabase.h"
</span><span class="cx"> #include "PluginView.h"
</span><del>-#include "ResourceLoadScheduler.h"
</del><span class="cx"> #include "SoftLinking.h"
</span><span class="cx"> #include "SubframeLoader.h"
</span><span class="cx"> #include "TextIterator.h"
</span><span class="lines">@@ -67,6 +66,7 @@
</span><span class="cx"> #include "WebNotificationCenter.h"
</span><span class="cx"> #include "WebPlatformStrategies.h"
</span><span class="cx"> #include "WebPreferences.h"
</span><ins>+#include "WebResourceLoadScheduler.h"
</ins><span class="cx"> #include "WebScriptWorld.h"
</span><span class="cx"> #include "WebStorageNamespaceProvider.h"
</span><span class="cx"> #include "WebViewGroup.h"
</span><span class="lines">@@ -7487,7 +7487,7 @@
</span><span class="cx"> HRESULT WebView::setLoadResourcesSerially(BOOL serialize)
</span><span class="cx"> {
</span><span class="cx"> WebPlatformStrategies::initialize();
</span><del>- resourceLoadScheduler()->setSerialLoadingEnabled(serialize);
</del><ins>+ webResourceLoadScheduler().setSerialLoadingEnabled(serialize);
</ins><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -7503,7 +7503,7 @@
</span><span class="cx">
</span><span class="cx"> HRESULT WebView::dispatchPendingLoadRequests()
</span><span class="cx"> {
</span><del>- resourceLoadScheduler()->servePendingRequests();
</del><ins>+ webResourceLoadScheduler().servePendingRequests();
</ins><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebKit2/ChangeLog        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -1,3 +1,47 @@
</span><ins>+2015-12-02 Antti Koivisto <antti@apple.com>
+
+ Move ResourceLoadScheduler to WebKit1
+ https://bugs.webkit.org/show_bug.cgi?id=151743
+
+ Reviewed by Alex Christensen.
+
+ * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
+ (WebKit::NetworkProcessPlatformStrategies::createCookiesStrategy):
+ (WebKit::NetworkProcessPlatformStrategies::createLoaderStrategy):
+ (WebKit::NetworkProcessPlatformStrategies::createPasteboardStrategy):
+ (WebKit::NetworkProcessPlatformStrategies::createPluginStrategy):
+ (WebKit::NetworkProcessPlatformStrategies::createBlobRegistry):
+ (WebKit::NetworkProcessPlatformStrategies::resourceLoadScheduler): Deleted.
+ (WebKit::NetworkProcessPlatformStrategies::loadResourceSynchronously): Deleted.
+ * NetworkProcess/NetworkProcessPlatformStrategies.h:
+ * WebProcess/InjectedBundle/InjectedBundle.cpp:
+ * WebProcess/Network/WebResourceLoadScheduler.cpp:
+ (WebKit::WebResourceLoadScheduler::~WebResourceLoadScheduler):
+ (WebKit::WebResourceLoadScheduler::loadResource):
+ (WebKit::WebResourceLoadScheduler::resumePendingRequests):
+ (WebKit::WebResourceLoadScheduler::networkProcessCrashed):
+ (WebKit::WebResourceLoadScheduler::loadResourceSynchronously):
+ (WebKit::WebResourceLoadScheduler::createPingHandle):
+ (WebKit::WebResourceLoadScheduler::scheduleSubresourceLoad): Deleted.
+ (WebKit::WebResourceLoadScheduler::setSerialLoadingEnabled): Deleted.
+ * WebProcess/Network/WebResourceLoadScheduler.h:
+ (WebKit::WebResourceLoadScheduler::webResourceLoaderForIdentifier):
+ * WebProcess/Plugins/PluginView.cpp:
+ (WebKit::PluginView::Stream::start):
+ (WebKit::PluginView::Stream::cancel):
+ * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
+ (WebKit::WebPlatformStrategies::createLoaderStrategy):
+ (WebKit::WebPlatformStrategies::createPasteboardStrategy):
+ (WebKit::WebPlatformStrategies::createPluginStrategy):
+ (WebKit::WebPlatformStrategies::createBlobRegistry):
+ (WebKit::WebPlatformStrategies::cookiesForDOM):
+ (WebKit::WebPlatformStrategies::deleteCookie):
+ (WebKit::WebPlatformStrategies::refreshPlugins):
+ (WebKit::WebPlatformStrategies::resourceLoadScheduler): Deleted.
+ (WebKit::WebPlatformStrategies::loadResourceSynchronously): Deleted.
+ (WebKit::WebPlatformStrategies::createPingHandle): Deleted.
+ * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
+
</ins><span class="cx"> 2015-12-02 Alex Christensen <achristensen@webkit.org>
</span><span class="cx">
</span><span class="cx"> Fix authentication requests with NetworkSession and canHandleHTTPSServerTrustEvaluation true
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkProcessPlatformStrategiescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkProcessPlatformStrategies.cpp (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkProcessPlatformStrategies.cpp        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkProcessPlatformStrategies.cpp        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -41,35 +41,24 @@
</span><span class="cx">
</span><span class="cx"> CookiesStrategy* NetworkProcessPlatformStrategies::createCookiesStrategy()
</span><span class="cx"> {
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> LoaderStrategy* NetworkProcessPlatformStrategies::createLoaderStrategy()
</span><span class="cx"> {
</span><del>- return this;
</del><ins>+ return nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> PasteboardStrategy* NetworkProcessPlatformStrategies::createPasteboardStrategy()
</span><span class="cx"> {
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> PluginStrategy* NetworkProcessPlatformStrategies::createPluginStrategy()
</span><span class="cx"> {
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-ResourceLoadScheduler* NetworkProcessPlatformStrategies::resourceLoadScheduler()
-{
- ASSERT_NOT_REACHED();
- return 0;
-}
-
-void NetworkProcessPlatformStrategies::loadResourceSynchronously(NetworkingContext*, unsigned long, const ResourceRequest&, StoredCredentials, ClientCredentialPolicy, ResourceError&, ResourceResponse&, Vector<char>&)
-{
- ASSERT_NOT_REACHED();
-}
-
</del><span class="cx"> BlobRegistry* NetworkProcessPlatformStrategies::createBlobRegistry()
</span><span class="cx"> {
</span><span class="cx"> return new BlobRegistryImpl;
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkProcessPlatformStrategiesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkProcessPlatformStrategies.h (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkProcessPlatformStrategies.h        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkProcessPlatformStrategies.h        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -31,21 +31,17 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-class NetworkProcessPlatformStrategies : public WebCore::PlatformStrategies, private WebCore::LoaderStrategy {
</del><ins>+class NetworkProcessPlatformStrategies : public WebCore::PlatformStrategies {
</ins><span class="cx"> public:
</span><span class="cx"> static void initialize();
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> // WebCore::PlatformStrategies
</span><del>- virtual WebCore::CookiesStrategy* createCookiesStrategy() override;
- virtual WebCore::LoaderStrategy* createLoaderStrategy() override;
- virtual WebCore::PasteboardStrategy* createPasteboardStrategy() override;
- virtual WebCore::PluginStrategy* createPluginStrategy() override;
-
- // WebCore::LoaderStrategy
- virtual WebCore::ResourceLoadScheduler* resourceLoadScheduler() override;
- virtual void loadResourceSynchronously(WebCore::NetworkingContext*, unsigned long resourceLoadIdentifier, const WebCore::ResourceRequest&, WebCore::StoredCredentials, WebCore::ClientCredentialPolicy, WebCore::ResourceError&, WebCore::ResourceResponse&, Vector<char>& data) override;
- virtual WebCore::BlobRegistry* createBlobRegistry() override;
</del><ins>+ WebCore::CookiesStrategy* createCookiesStrategy() override;
+ WebCore::LoaderStrategy* createLoaderStrategy() override;
+ WebCore::PasteboardStrategy* createPasteboardStrategy() override;
+ WebCore::PluginStrategy* createPluginStrategy() override;
+ WebCore::BlobRegistry* createBlobRegistry() override;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleInjectedBundlecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -66,7 +66,6 @@
</span><span class="cx"> #include <WebCore/PageGroup.h>
</span><span class="cx"> #include <WebCore/PrintContext.h>
</span><span class="cx"> #include <WebCore/ResourceHandle.h>
</span><del>-#include <WebCore/ResourceLoadScheduler.h>
</del><span class="cx"> #include <WebCore/ScriptController.h>
</span><span class="cx"> #include <WebCore/SecurityOrigin.h>
</span><span class="cx"> #include <WebCore/SecurityPolicy.h>
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessNetworkWebResourceLoadSchedulercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "WebResourceLoadScheduler.h"
</span><span class="cx">
</span><ins>+#include "HangDetectionDisabler.h"
</ins><span class="cx"> #include "Logging.h"
</span><span class="cx"> #include "NetworkConnectionToWebProcessMessages.h"
</span><span class="cx"> #include "NetworkProcessConnection.h"
</span><span class="lines">@@ -35,6 +36,7 @@
</span><span class="cx"> #include "WebErrors.h"
</span><span class="cx"> #include "WebFrame.h"
</span><span class="cx"> #include "WebFrameLoaderClient.h"
</span><ins>+#include "WebFrameNetworkingContext.h"
</ins><span class="cx"> #include "WebPage.h"
</span><span class="cx"> #include "WebProcess.h"
</span><span class="cx"> #include "WebResourceLoader.h"
</span><span class="lines">@@ -45,6 +47,7 @@
</span><span class="cx"> #include <WebCore/Frame.h>
</span><span class="cx"> #include <WebCore/FrameLoader.h>
</span><span class="cx"> #include <WebCore/NetscapePlugInStreamLoader.h>
</span><ins>+#include <WebCore/PlatformStrategies.h>
</ins><span class="cx"> #include <WebCore/ReferrerPolicy.h>
</span><span class="cx"> #include <WebCore/ResourceLoader.h>
</span><span class="cx"> #include <WebCore/SessionID.h>
</span><span class="lines">@@ -65,7 +68,7 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<SubresourceLoader> WebResourceLoadScheduler::scheduleSubresourceLoad(Frame* frame, CachedResource* resource, const ResourceRequest& request, const ResourceLoaderOptions& options)
</del><ins>+RefPtr<SubresourceLoader> WebResourceLoadScheduler::loadResource(Frame* frame, CachedResource* resource, const ResourceRequest& request, const ResourceLoaderOptions& options)
</ins><span class="cx"> {
</span><span class="cx"> RefPtr<SubresourceLoader> loader = SubresourceLoader::create(frame, resource, request, options);
</span><span class="cx"> if (loader)
</span><span class="lines">@@ -269,11 +272,6 @@
</span><span class="cx"> // Network process does keep requests in pending state.
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebResourceLoadScheduler::setSerialLoadingEnabled(bool)
-{
- // Network process does not reorder loads.
-}
-
</del><span class="cx"> void WebResourceLoadScheduler::networkProcessCrashed()
</span><span class="cx"> {
</span><span class="cx"> HashMap<unsigned long, RefPtr<WebResourceLoader>>::iterator end = m_webResourceLoaders.end();
</span><span class="lines">@@ -283,4 +281,57 @@
</span><span class="cx"> m_webResourceLoaders.clear();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void WebResourceLoadScheduler::loadResourceSynchronously(NetworkingContext* context, unsigned long resourceLoadIdentifier, const ResourceRequest& request, StoredCredentials storedCredentials, ClientCredentialPolicy clientCredentialPolicy, ResourceError& error, ResourceResponse& response, Vector<char>& data)
+{
+ WebFrameNetworkingContext* webContext = static_cast<WebFrameNetworkingContext*>(context);
+ // FIXME: Some entities in WebCore use WebCore's "EmptyFrameLoaderClient" instead of having a proper WebFrameLoaderClient.
+ // EmptyFrameLoaderClient shouldn't exist and everything should be using a WebFrameLoaderClient,
+ // but in the meantime we have to make sure not to mis-cast.
+ WebFrameLoaderClient* webFrameLoaderClient = webContext->webFrameLoaderClient();
+ WebFrame* webFrame = webFrameLoaderClient ? webFrameLoaderClient->webFrame() : 0;
+ WebPage* webPage = webFrame ? webFrame->page() : 0;
+
+ NetworkResourceLoadParameters loadParameters;
+ loadParameters.identifier = resourceLoadIdentifier;
+ loadParameters.webPageID = webPage ? webPage->pageID() : 0;
+ loadParameters.webFrameID = webFrame ? webFrame->frameID() : 0;
+ loadParameters.sessionID = webPage ? webPage->sessionID() : SessionID::defaultSessionID();
+ loadParameters.request = request;
+ loadParameters.contentSniffingPolicy = SniffContent;
+ loadParameters.allowStoredCredentials = storedCredentials;
+ loadParameters.clientCredentialPolicy = clientCredentialPolicy;
+ loadParameters.shouldClearReferrerOnHTTPSToHTTPRedirect = context->shouldClearReferrerOnHTTPSToHTTPRedirect();
+
+ data.resize(0);
+
+ HangDetectionDisabler hangDetectionDisabler;
+
+ if (!WebProcess::singleton().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad(loadParameters), Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad::Reply(error, response, data), 0)) {
+ response = ResourceResponse();
+ error = internalError(request.url());
+ }
+}
+
+void WebResourceLoadScheduler::createPingHandle(NetworkingContext* networkingContext, ResourceRequest& request, bool shouldUseCredentialStorage)
+{
+ // It's possible that call to createPingHandle might be made during initial empty Document creation before a NetworkingContext exists.
+ // It is not clear that we should send ping loads during that process anyways.
+ if (!networkingContext)
+ return;
+
+ WebFrameNetworkingContext* webContext = static_cast<WebFrameNetworkingContext*>(networkingContext);
+ WebFrameLoaderClient* webFrameLoaderClient = webContext->webFrameLoaderClient();
+ WebFrame* webFrame = webFrameLoaderClient ? webFrameLoaderClient->webFrame() : nullptr;
+ WebPage* webPage = webFrame ? webFrame->page() : nullptr;
+
+ NetworkResourceLoadParameters loadParameters;
+ loadParameters.request = request;
+ loadParameters.sessionID = webPage ? webPage->sessionID() : SessionID::defaultSessionID();
+ loadParameters.allowStoredCredentials = shouldUseCredentialStorage ? AllowStoredCredentials : DoNotAllowStoredCredentials;
+ loadParameters.shouldClearReferrerOnHTTPSToHTTPRedirect = networkingContext->shouldClearReferrerOnHTTPSToHTTPRedirect();
+
+ WebProcess::singleton().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::LoadPing(loadParameters), 0);
+}
+
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessNetworkWebResourceLoadSchedulerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.h (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.h        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.h        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -27,25 +27,26 @@
</span><span class="cx"> #define WebResourceLoadScheduler_h
</span><span class="cx">
</span><span class="cx"> #include "WebResourceLoader.h"
</span><del>-#include <WebCore/ResourceLoadPriority.h>
-#include <WebCore/ResourceLoadScheduler.h>
</del><ins>+#include <WebCore/LoaderStrategy.h>
</ins><span class="cx"> #include <WebCore/ResourceLoader.h>
</span><ins>+#include <wtf/HashSet.h>
</ins><span class="cx"> #include <wtf/RunLoop.h>
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><span class="cx"> class NetworkProcessConnection;
</span><ins>+class WebResourceLoadScheduler;
</ins><span class="cx"> typedef uint64_t ResourceLoadIdentifier;
</span><span class="cx">
</span><del>-class WebResourceLoadScheduler : public WebCore::ResourceLoadScheduler {
</del><ins>+class WebResourceLoadScheduler : public WebCore::LoaderStrategy {
</ins><span class="cx"> WTF_MAKE_NONCOPYABLE(WebResourceLoadScheduler); WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><span class="cx"> WebResourceLoadScheduler();
</span><span class="cx"> virtual ~WebResourceLoadScheduler();
</span><span class="cx">
</span><del>- virtual RefPtr<WebCore::SubresourceLoader> scheduleSubresourceLoad(WebCore::Frame*, WebCore::CachedResource*, const WebCore::ResourceRequest&, const WebCore::ResourceLoaderOptions&) override;
- virtual RefPtr<WebCore::NetscapePlugInStreamLoader> schedulePluginStreamLoad(WebCore::Frame*, WebCore::NetscapePlugInStreamLoaderClient*, const WebCore::ResourceRequest&) override;
-
</del><ins>+ virtual RefPtr<WebCore::SubresourceLoader> loadResource(WebCore::Frame*, WebCore::CachedResource*, const WebCore::ResourceRequest&, const WebCore::ResourceLoaderOptions&) override;
+ virtual void loadResourceSynchronously(WebCore::NetworkingContext*, unsigned long resourceLoadIdentifier, const WebCore::ResourceRequest&, WebCore::StoredCredentials, WebCore::ClientCredentialPolicy, WebCore::ResourceError&, WebCore::ResourceResponse&, Vector<char>& data) override;
+
</ins><span class="cx"> virtual void remove(WebCore::ResourceLoader*) override;
</span><span class="cx"> virtual void setDefersLoading(WebCore::ResourceLoader*, bool) override;
</span><span class="cx"> virtual void crossOriginRedirectReceived(WebCore::ResourceLoader*, const WebCore::URL& redirectURL) override;
</span><span class="lines">@@ -55,9 +56,10 @@
</span><span class="cx"> virtual void suspendPendingRequests() override;
</span><span class="cx"> virtual void resumePendingRequests() override;
</span><span class="cx">
</span><del>- virtual void setSerialLoadingEnabled(bool) override;
</del><ins>+ virtual void createPingHandle(WebCore::NetworkingContext*, WebCore::ResourceRequest&, bool shouldUseCredentialStorage) override;
</ins><span class="cx">
</span><span class="cx"> WebResourceLoader* webResourceLoaderForIdentifier(ResourceLoadIdentifier identifier) const { return m_webResourceLoaders.get(identifier); }
</span><ins>+ RefPtr<WebCore::NetscapePlugInStreamLoader> schedulePluginStreamLoad(WebCore::Frame*, WebCore::NetscapePlugInStreamLoaderClient*, const WebCore::ResourceRequest&);
</ins><span class="cx">
</span><span class="cx"> void networkProcessCrashed();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessPluginsPluginViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> #include "WebPage.h"
</span><span class="cx"> #include "WebPageProxyMessages.h"
</span><span class="cx"> #include "WebProcess.h"
</span><ins>+#include "WebResourceLoadScheduler.h"
</ins><span class="cx"> #include <WebCore/BitmapImage.h>
</span><span class="cx"> #include <WebCore/Chrome.h>
</span><span class="cx"> #include <WebCore/CookieJar.h>
</span><span class="lines">@@ -62,7 +63,6 @@
</span><span class="cx"> #include <WebCore/ProtectionSpace.h>
</span><span class="cx"> #include <WebCore/ProxyServer.h>
</span><span class="cx"> #include <WebCore/RenderEmbeddedObject.h>
</span><del>-#include <WebCore/ResourceLoadScheduler.h>
</del><span class="cx"> #include <WebCore/ScriptController.h>
</span><span class="cx"> #include <WebCore/ScrollView.h>
</span><span class="cx"> #include <WebCore/SecurityOrigin.h>
</span><span class="lines">@@ -160,7 +160,7 @@
</span><span class="cx"> Frame* frame = m_pluginView->m_pluginElement->document().frame();
</span><span class="cx"> ASSERT(frame);
</span><span class="cx">
</span><del>- m_loader = resourceLoadScheduler()->schedulePluginStreamLoad(frame, this, m_request);
</del><ins>+ m_loader = WebProcess::singleton().webResourceLoadScheduler().schedulePluginStreamLoad(frame, this, m_request);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void PluginView::Stream::cancel()
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebPlatformStrategiescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -40,7 +40,6 @@
</span><span class="cx"> #include "WebErrors.h"
</span><span class="cx"> #include "WebFrame.h"
</span><span class="cx"> #include "WebFrameLoaderClient.h"
</span><del>-#include "WebFrameNetworkingContext.h"
</del><span class="cx"> #include "WebIDBFactoryBackend.h"
</span><span class="cx"> #include "WebPage.h"
</span><span class="cx"> #include "WebPasteboardOverrides.h"
</span><span class="lines">@@ -92,7 +91,7 @@
</span><span class="cx">
</span><span class="cx"> LoaderStrategy* WebPlatformStrategies::createLoaderStrategy()
</span><span class="cx"> {
</span><del>- return this;
</del><ins>+ return &WebProcess::singleton().webResourceLoadScheduler();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> PasteboardStrategy* WebPlatformStrategies::createPasteboardStrategy()
</span><span class="lines">@@ -105,6 +104,11 @@
</span><span class="cx"> return this;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+BlobRegistry* WebPlatformStrategies::createBlobRegistry()
+{
+ return new BlobRegistryProxy;
+}
+
</ins><span class="cx"> // CookiesStrategy
</span><span class="cx">
</span><span class="cx"> String WebPlatformStrategies::cookiesForDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
</span><span class="lines">@@ -148,70 +152,6 @@
</span><span class="cx"> WebProcess::singleton().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::DeleteCookie(SessionTracker::sessionID(session), url, cookieName), 0);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-// LoaderStrategy
-
-ResourceLoadScheduler* WebPlatformStrategies::resourceLoadScheduler()
-{
- return &WebProcess::singleton().webResourceLoadScheduler();
-}
-
-void WebPlatformStrategies::loadResourceSynchronously(NetworkingContext* context, unsigned long resourceLoadIdentifier, const ResourceRequest& request, StoredCredentials storedCredentials, ClientCredentialPolicy clientCredentialPolicy, ResourceError& error, ResourceResponse& response, Vector<char>& data)
-{
- WebFrameNetworkingContext* webContext = static_cast<WebFrameNetworkingContext*>(context);
- // FIXME: Some entities in WebCore use WebCore's "EmptyFrameLoaderClient" instead of having a proper WebFrameLoaderClient.
- // EmptyFrameLoaderClient shouldn't exist and everything should be using a WebFrameLoaderClient,
- // but in the meantime we have to make sure not to mis-cast.
- WebFrameLoaderClient* webFrameLoaderClient = webContext->webFrameLoaderClient();
- WebFrame* webFrame = webFrameLoaderClient ? webFrameLoaderClient->webFrame() : 0;
- WebPage* webPage = webFrame ? webFrame->page() : 0;
-
- NetworkResourceLoadParameters loadParameters;
- loadParameters.identifier = resourceLoadIdentifier;
- loadParameters.webPageID = webPage ? webPage->pageID() : 0;
- loadParameters.webFrameID = webFrame ? webFrame->frameID() : 0;
- loadParameters.sessionID = webPage ? webPage->sessionID() : SessionID::defaultSessionID();
- loadParameters.request = request;
- loadParameters.contentSniffingPolicy = SniffContent;
- loadParameters.allowStoredCredentials = storedCredentials;
- loadParameters.clientCredentialPolicy = clientCredentialPolicy;
- loadParameters.shouldClearReferrerOnHTTPSToHTTPRedirect = context->shouldClearReferrerOnHTTPSToHTTPRedirect();
-
- data.resize(0);
-
- HangDetectionDisabler hangDetectionDisabler;
-
- if (!WebProcess::singleton().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad(loadParameters), Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad::Reply(error, response, data), 0)) {
- response = ResourceResponse();
- error = internalError(request.url());
- }
-}
-
-void WebPlatformStrategies::createPingHandle(NetworkingContext* networkingContext, ResourceRequest& request, bool shouldUseCredentialStorage)
-{
- // It's possible that call to createPingHandle might be made during initial empty Document creation before a NetworkingContext exists.
- // It is not clear that we should send ping loads during that process anyways.
- if (!networkingContext)
- return;
-
- WebFrameNetworkingContext* webContext = static_cast<WebFrameNetworkingContext*>(networkingContext);
- WebFrameLoaderClient* webFrameLoaderClient = webContext->webFrameLoaderClient();
- WebFrame* webFrame = webFrameLoaderClient ? webFrameLoaderClient->webFrame() : nullptr;
- WebPage* webPage = webFrame ? webFrame->page() : nullptr;
-
- NetworkResourceLoadParameters loadParameters;
- loadParameters.request = request;
- loadParameters.sessionID = webPage ? webPage->sessionID() : SessionID::defaultSessionID();
- loadParameters.allowStoredCredentials = shouldUseCredentialStorage ? AllowStoredCredentials : DoNotAllowStoredCredentials;
- loadParameters.shouldClearReferrerOnHTTPSToHTTPRedirect = networkingContext->shouldClearReferrerOnHTTPSToHTTPRedirect();
-
- WebProcess::singleton().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::LoadPing(loadParameters), 0);
-}
-
-BlobRegistry* WebPlatformStrategies::createBlobRegistry()
-{
- return new BlobRegistryProxy;
-}
-
</del><span class="cx"> // PluginStrategy
</span><span class="cx">
</span><span class="cx"> void WebPlatformStrategies::refreshPlugins()
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebPlatformStrategiesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h (192994 => 192995)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h        2015-12-03 08:07:34 UTC (rev 192994)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h        2015-12-03 12:51:17 UTC (rev 192995)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-class WebPlatformStrategies : public WebCore::PlatformStrategies, private WebCore::CookiesStrategy, private WebCore::LoaderStrategy, private WebCore::PasteboardStrategy, private WebCore::PluginStrategy {
</del><ins>+class WebPlatformStrategies : public WebCore::PlatformStrategies, private WebCore::CookiesStrategy, private WebCore::PasteboardStrategy, private WebCore::PluginStrategy {
</ins><span class="cx"> friend class NeverDestroyed<WebPlatformStrategies>;
</span><span class="cx"> public:
</span><span class="cx"> static void initialize();
</span><span class="lines">@@ -49,6 +49,7 @@
</span><span class="cx"> virtual WebCore::LoaderStrategy* createLoaderStrategy() override;
</span><span class="cx"> virtual WebCore::PasteboardStrategy* createPasteboardStrategy() override;
</span><span class="cx"> virtual WebCore::PluginStrategy* createPluginStrategy() override;
</span><ins>+ virtual WebCore::BlobRegistry* createBlobRegistry() override;
</ins><span class="cx">
</span><span class="cx"> // WebCore::CookiesStrategy
</span><span class="cx"> virtual String cookiesForDOM(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&) override;
</span><span class="lines">@@ -58,12 +59,6 @@
</span><span class="cx"> virtual bool getRawCookies(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&, Vector<WebCore::Cookie>&) override;
</span><span class="cx"> virtual void deleteCookie(const WebCore::NetworkStorageSession&, const WebCore::URL&, const String&) override;
</span><span class="cx">
</span><del>- // WebCore::LoaderStrategy
- virtual WebCore::ResourceLoadScheduler* resourceLoadScheduler() override;
- virtual void loadResourceSynchronously(WebCore::NetworkingContext*, unsigned long resourceLoadIdentifier, const WebCore::ResourceRequest&, WebCore::StoredCredentials, WebCore::ClientCredentialPolicy, WebCore::ResourceError&, WebCore::ResourceResponse&, Vector<char>& data) override;
- virtual WebCore::BlobRegistry* createBlobRegistry() override;
- virtual void createPingHandle(WebCore::NetworkingContext*, WebCore::ResourceRequest&, bool shouldUseCredentialStorage) override;
-
</del><span class="cx"> // WebCore::PluginStrategy
</span><span class="cx"> virtual void refreshPlugins() override;
</span><span class="cx"> virtual void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&) override;
</span></span></pre>
</div>
</div>
</body>
</html>