<!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>[189432] trunk/Source/WebCore</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/189432">189432</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2015-09-05 01:47:22 -0700 (Sat, 05 Sep 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Add a new ResourceLoaderOption to avoid page defers loading mechanisms for inspector
https://bugs.webkit.org/show_bug.cgi?id=148727
Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-09-05
Reviewed by Antti Koivisto.
This will be tested shortly by inspector tests.
* loader/ResourceLoaderOptions.h:
(WebCore::ResourceLoaderOptions::ResourceLoaderOptions):
(WebCore::ResourceLoaderOptions::defersLoadingPolicy):
(WebCore::ResourceLoaderOptions::setDefersLoadingPolicy):
Add a new policy for defers loading. The default is to allow defers loading.
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::ResourceLoader):
(WebCore::ResourceLoader::init):
(WebCore::ResourceLoader::setDefersLoading):
Respect the defers loading policy whenever we would set defers loading status.
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::loadResource):
Switch from incorrectly changing the defersLoading state of the loader
to setting an option to disallow defers loading entirely for the loader.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::startLoadingMainResource):
* loader/MediaResourceLoader.cpp:
(WebCore::MediaResourceLoader::start):
* loader/NetscapePlugInStreamLoader.cpp:
(WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::defaultCachedResourceOptions):
* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::startLoading):
* platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
(WebCore::WebCoreAVCFResourceLoader::startLoading):
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
(WebCore::WebCoreAVFResourceLoader::startLoading):
Add the new value to instance of the longhand ResourceLoaderOptions constructor.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorResourceAgentcpp">trunk/Source/WebCore/inspector/InspectorResourceAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderDocumentLoadercpp">trunk/Source/WebCore/loader/DocumentLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderMediaResourceLoadercpp">trunk/Source/WebCore/loader/MediaResourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderNetscapePlugInStreamLoadercpp">trunk/Source/WebCore/loader/NetscapePlugInStreamLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderResourceLoadercpp">trunk/Source/WebCore/loader/ResourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderResourceLoaderOptionsh">trunk/Source/WebCore/loader/ResourceLoaderOptions.h</a></li>
<li><a href="#trunkSourceWebCoreloadercacheCachedResourceLoadercpp">trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloadericonIconLoadercpp">trunk/Source/WebCore/loader/icon/IconLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationcfWebCoreAVCFResourceLoadercpp">trunk/Source/WebCore/platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationobjcWebCoreAVFResourceLoadermm">trunk/Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (189431 => 189432)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-09-05 07:44:35 UTC (rev 189431)
+++ trunk/Source/WebCore/ChangeLog        2015-09-05 08:47:22 UTC (rev 189432)
</span><span class="lines">@@ -1,3 +1,46 @@
</span><ins>+2015-09-05 Joseph Pecoraro <pecoraro@apple.com>
+
+ Add a new ResourceLoaderOption to avoid page defers loading mechanisms for inspector
+ https://bugs.webkit.org/show_bug.cgi?id=148727
+
+ Reviewed by Antti Koivisto.
+
+ This will be tested shortly by inspector tests.
+
+ * loader/ResourceLoaderOptions.h:
+ (WebCore::ResourceLoaderOptions::ResourceLoaderOptions):
+ (WebCore::ResourceLoaderOptions::defersLoadingPolicy):
+ (WebCore::ResourceLoaderOptions::setDefersLoadingPolicy):
+ Add a new policy for defers loading. The default is to allow defers loading.
+
+ * loader/ResourceLoader.cpp:
+ (WebCore::ResourceLoader::ResourceLoader):
+ (WebCore::ResourceLoader::init):
+ (WebCore::ResourceLoader::setDefersLoading):
+ Respect the defers loading policy whenever we would set defers loading status.
+
+ * inspector/InspectorResourceAgent.cpp:
+ (WebCore::InspectorResourceAgent::loadResource):
+ Switch from incorrectly changing the defersLoading state of the loader
+ to setting an option to disallow defers loading entirely for the loader.
+
+ * loader/DocumentLoader.cpp:
+ (WebCore::DocumentLoader::startLoadingMainResource):
+ * loader/MediaResourceLoader.cpp:
+ (WebCore::MediaResourceLoader::start):
+ * loader/NetscapePlugInStreamLoader.cpp:
+ (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
+ * loader/cache/CachedResourceLoader.cpp:
+ (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
+ (WebCore::CachedResourceLoader::defaultCachedResourceOptions):
+ * loader/icon/IconLoader.cpp:
+ (WebCore::IconLoader::startLoading):
+ * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
+ (WebCore::WebCoreAVCFResourceLoader::startLoading):
+ * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
+ (WebCore::WebCoreAVFResourceLoader::startLoading):
+ Add the new value to instance of the longhand ResourceLoaderOptions constructor.
+
</ins><span class="cx"> 2015-09-04 Myles C. Maxfield <mmaxfield@apple.com>
</span><span class="cx">
</span><span class="cx"> Rename members of CanvasRenderingContext2D::State
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorResourceAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorResourceAgent.cpp (189431 => 189432)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorResourceAgent.cpp        2015-09-05 07:44:35 UTC (rev 189431)
+++ trunk/Source/WebCore/inspector/InspectorResourceAgent.cpp        2015-09-05 08:47:22 UTC (rev 189432)
</span><span class="lines">@@ -704,6 +704,7 @@
</span><span class="cx"> ThreadableLoaderOptions options;
</span><span class="cx"> options.setSendLoadCallbacks(SendCallbacks); // So we remove this from m_hiddenRequestIdentifiers on completion.
</span><span class="cx"> options.setAllowCredentials(AllowStoredCredentials);
</span><ins>+ options.setDefersLoadingPolicy(DefersLoadingPolicy::DisallowDefersLoading); // So the request is never deferred.
</ins><span class="cx"> options.crossOriginRequestPolicy = AllowCrossOriginRequests;
</span><span class="cx">
</span><span class="cx"> // InspectorThreadableLoaderClient deletes itself when the load completes.
</span><span class="lines">@@ -715,8 +716,6 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- loader->setDefersLoading(false);
-
</del><span class="cx"> // If the load already completed, inspectorThreadableLoaderClient will have been deleted and we will have already called the callback.
</span><span class="cx"> if (!callback->isActive())
</span><span class="cx"> return;
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderDocumentLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/DocumentLoader.cpp (189431 => 189432)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/DocumentLoader.cpp        2015-09-05 07:44:35 UTC (rev 189431)
+++ trunk/Source/WebCore/loader/DocumentLoader.cpp        2015-09-05 08:47:22 UTC (rev 189432)
</span><span class="lines">@@ -1433,7 +1433,7 @@
</span><span class="cx"> // If this is a reload the cache layer might have made the previous request conditional. DocumentLoader can't handle 304 responses itself.
</span><span class="cx"> request.makeUnconditional();
</span><span class="cx">
</span><del>- static NeverDestroyed<ResourceLoaderOptions> mainResourceLoadOptions(SendCallbacks, SniffContent, BufferData, AllowStoredCredentials, AskClientForAllCredentials, SkipSecurityCheck, UseDefaultOriginRestrictionsForType, IncludeCertificateInfo, ContentSecurityPolicyImposition::DoPolicyCheck);
</del><ins>+ static NeverDestroyed<ResourceLoaderOptions> mainResourceLoadOptions(SendCallbacks, SniffContent, BufferData, AllowStoredCredentials, AskClientForAllCredentials, SkipSecurityCheck, UseDefaultOriginRestrictionsForType, IncludeCertificateInfo, ContentSecurityPolicyImposition::DoPolicyCheck, DefersLoadingPolicy::AllowDefersLoading);
</ins><span class="cx"> CachedResourceRequest cachedResourceRequest(request, mainResourceLoadOptions);
</span><span class="cx"> cachedResourceRequest.setInitiator(*this);
</span><span class="cx"> m_mainResource = m_cachedResourceLoader->requestMainResource(cachedResourceRequest);
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderMediaResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/MediaResourceLoader.cpp (189431 => 189432)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/MediaResourceLoader.cpp        2015-09-05 07:44:35 UTC (rev 189431)
+++ trunk/Source/WebCore/loader/MediaResourceLoader.cpp        2015-09-05 08:47:22 UTC (rev 189432)
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx"> StoredCredentials allowCredentials = m_crossOriginMode.isNull() || equalIgnoringCase(m_crossOriginMode, "use-credentials") ? AllowStoredCredentials : DoNotAllowStoredCredentials;
</span><span class="cx">
</span><span class="cx"> // ContentSecurityPolicyImposition::DoPolicyCheck is a placeholder value. It does not affect the request since Content Security Policy does not apply to raw resources.
</span><del>- CachedResourceRequest cacheRequest(request, ResourceLoaderOptions(SendCallbacks, DoNotSniffContent, bufferingPolicy, allowCredentials, DoNotAskClientForCrossOriginCredentials, DoSecurityCheck, corsPolicy, DoNotIncludeCertificateInfo, ContentSecurityPolicyImposition::DoPolicyCheck));
</del><ins>+ CachedResourceRequest cacheRequest(request, ResourceLoaderOptions(SendCallbacks, DoNotSniffContent, bufferingPolicy, allowCredentials, DoNotAskClientForCrossOriginCredentials, DoSecurityCheck, corsPolicy, DoNotIncludeCertificateInfo, ContentSecurityPolicyImposition::DoPolicyCheck, DefersLoadingPolicy::AllowDefersLoading));
</ins><span class="cx">
</span><span class="cx"> if (!m_crossOriginMode.isNull())
</span><span class="cx"> updateRequestForAccessControl(cacheRequest.mutableResourceRequest(), m_document.securityOrigin(), allowCredentials);
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderNetscapePlugInStreamLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/NetscapePlugInStreamLoader.cpp (189431 => 189432)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/NetscapePlugInStreamLoader.cpp        2015-09-05 07:44:35 UTC (rev 189431)
+++ trunk/Source/WebCore/loader/NetscapePlugInStreamLoader.cpp        2015-09-05 08:47:22 UTC (rev 189432)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx"> // FIXME: Skip Content Security Policy check when associated plugin element is in a user agent shadow tree.
</span><span class="cx"> // See <https://bugs.webkit.org/show_bug.cgi?id=146663>.
</span><span class="cx"> NetscapePlugInStreamLoader::NetscapePlugInStreamLoader(Frame* frame, NetscapePlugInStreamLoaderClient* client)
</span><del>- : ResourceLoader(frame, ResourceLoaderOptions(SendCallbacks, SniffContent, DoNotBufferData, AllowStoredCredentials, AskClientForAllCredentials, SkipSecurityCheck, UseDefaultOriginRestrictionsForType, DoNotIncludeCertificateInfo, ContentSecurityPolicyImposition::DoPolicyCheck))
</del><ins>+ : ResourceLoader(frame, ResourceLoaderOptions(SendCallbacks, SniffContent, DoNotBufferData, AllowStoredCredentials, AskClientForAllCredentials, SkipSecurityCheck, UseDefaultOriginRestrictionsForType, DoNotIncludeCertificateInfo, ContentSecurityPolicyImposition::DoPolicyCheck, DefersLoadingPolicy::AllowDefersLoading))
</ins><span class="cx"> , m_client(client)
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(CONTENT_EXTENSIONS)
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/ResourceLoader.cpp (189431 => 189432)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ResourceLoader.cpp        2015-09-05 07:44:35 UTC (rev 189431)
+++ trunk/Source/WebCore/loader/ResourceLoader.cpp        2015-09-05 08:47:22 UTC (rev 189432)
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx"> , m_reachedTerminalState(false)
</span><span class="cx"> , m_notifiedLoadComplete(false)
</span><span class="cx"> , m_cancellationStatus(NotCancelled)
</span><del>- , m_defersLoading(frame->page()->defersLoading())
</del><ins>+ , m_defersLoading(options.defersLoadingPolicy() == DefersLoadingPolicy::AllowDefersLoading && frame->page()->defersLoading())
</ins><span class="cx"> , m_options(options)
</span><span class="cx"> , m_isQuickLookResource(false)
</span><span class="cx"> #if ENABLE(CONTENT_EXTENSIONS)
</span><span class="lines">@@ -135,7 +135,8 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- m_defersLoading = m_frame->page()->defersLoading();
</del><ins>+ m_defersLoading = m_options.defersLoadingPolicy() == DefersLoadingPolicy::AllowDefersLoading && m_frame->page()->defersLoading();
+
</ins><span class="cx"> if (m_options.securityCheck() == DoSecurityCheck && !m_frame->document()->securityOrigin()->canDisplay(clientRequest.url())) {
</span><span class="cx"> FrameLoader::reportLocalLoadFailed(m_frame.get(), clientRequest.url().string());
</span><span class="cx"> releaseResources();
</span><span class="lines">@@ -220,6 +221,9 @@
</span><span class="cx">
</span><span class="cx"> void ResourceLoader::setDefersLoading(bool defers)
</span><span class="cx"> {
</span><ins>+ if (m_options.defersLoadingPolicy() == DefersLoadingPolicy::DisallowDefersLoading)
+ return;
+
</ins><span class="cx"> m_defersLoading = defers;
</span><span class="cx"> if (m_handle)
</span><span class="cx"> m_handle->setDefersLoading(defers);
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderResourceLoaderOptionsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/ResourceLoaderOptions.h (189431 => 189432)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ResourceLoaderOptions.h        2015-09-05 07:44:35 UTC (rev 189431)
+++ trunk/Source/WebCore/loader/ResourceLoaderOptions.h        2015-09-05 08:47:22 UTC (rev 189432)
</span><span class="lines">@@ -71,6 +71,11 @@
</span><span class="cx"> DoPolicyCheck
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+enum class DefersLoadingPolicy : uint8_t {
+ AllowDefersLoading,
+ DisallowDefersLoading
+};
+
</ins><span class="cx"> struct ResourceLoaderOptions {
</span><span class="cx"> ResourceLoaderOptions()
</span><span class="cx"> : m_sendLoadCallbacks(DoNotSendCallbacks)
</span><span class="lines">@@ -84,7 +89,7 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>- ResourceLoaderOptions(SendCallbackPolicy sendLoadCallbacks, ContentSniffingPolicy sniffContent, DataBufferingPolicy dataBufferingPolicy, StoredCredentials allowCredentials, ClientCredentialPolicy credentialPolicy, SecurityCheckPolicy securityCheck, RequestOriginPolicy requestOriginPolicy, CertificateInfoPolicy certificateInfoPolicy, ContentSecurityPolicyImposition contentSecurityPolicyImposition)
</del><ins>+ ResourceLoaderOptions(SendCallbackPolicy sendLoadCallbacks, ContentSniffingPolicy sniffContent, DataBufferingPolicy dataBufferingPolicy, StoredCredentials allowCredentials, ClientCredentialPolicy credentialPolicy, SecurityCheckPolicy securityCheck, RequestOriginPolicy requestOriginPolicy, CertificateInfoPolicy certificateInfoPolicy, ContentSecurityPolicyImposition contentSecurityPolicyImposition, DefersLoadingPolicy defersLoadingPolicy)
</ins><span class="cx"> : m_sendLoadCallbacks(sendLoadCallbacks)
</span><span class="cx"> , m_sniffContent(sniffContent)
</span><span class="cx"> , m_dataBufferingPolicy(dataBufferingPolicy)
</span><span class="lines">@@ -94,6 +99,7 @@
</span><span class="cx"> , m_requestOriginPolicy(requestOriginPolicy)
</span><span class="cx"> , m_certificateInfoPolicy(certificateInfoPolicy)
</span><span class="cx"> , m_contentSecurityPolicyImposition(contentSecurityPolicyImposition)
</span><ins>+ , m_defersLoadingPolicy(defersLoadingPolicy)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -115,6 +121,8 @@
</span><span class="cx"> void setCertificateInfoPolicy(CertificateInfoPolicy policy) { m_certificateInfoPolicy = policy; }
</span><span class="cx"> ContentSecurityPolicyImposition contentSecurityPolicyImposition() const { return m_contentSecurityPolicyImposition; }
</span><span class="cx"> void setContentSecurityPolicyImposition(ContentSecurityPolicyImposition imposition) { m_contentSecurityPolicyImposition = imposition; }
</span><ins>+ DefersLoadingPolicy defersLoadingPolicy() const { return m_defersLoadingPolicy; }
+ void setDefersLoadingPolicy(DefersLoadingPolicy defersLoadingPolicy) { m_defersLoadingPolicy = defersLoadingPolicy; }
</ins><span class="cx">
</span><span class="cx"> unsigned m_sendLoadCallbacks : 1;
</span><span class="cx"> unsigned m_sniffContent : 1;
</span><span class="lines">@@ -125,6 +133,7 @@
</span><span class="cx"> unsigned m_requestOriginPolicy : 2;
</span><span class="cx"> unsigned m_certificateInfoPolicy : 1; // Whether the response should include certificate info.
</span><span class="cx"> ContentSecurityPolicyImposition m_contentSecurityPolicyImposition { ContentSecurityPolicyImposition::DoPolicyCheck };
</span><ins>+ DefersLoadingPolicy m_defersLoadingPolicy { DefersLoadingPolicy::AllowDefersLoading };
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheCachedResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp (189431 => 189432)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp        2015-09-05 07:44:35 UTC (rev 189431)
+++ trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp        2015-09-05 08:47:22 UTC (rev 189432)
</span><span class="lines">@@ -233,7 +233,7 @@
</span><span class="cx"> memoryCache.add(*userSheet);
</span><span class="cx"> // FIXME: loadResource calls setOwningCachedResourceLoader() if the resource couldn't be added to cache. Does this function need to call it, too?
</span><span class="cx">
</span><del>- userSheet->load(*this, ResourceLoaderOptions(DoNotSendCallbacks, SniffContent, BufferData, AllowStoredCredentials, AskClientForAllCredentials, SkipSecurityCheck, UseDefaultOriginRestrictionsForType, DoNotIncludeCertificateInfo, ContentSecurityPolicyImposition::SkipPolicyCheck));
</del><ins>+ userSheet->load(*this, ResourceLoaderOptions(DoNotSendCallbacks, SniffContent, BufferData, AllowStoredCredentials, AskClientForAllCredentials, SkipSecurityCheck, UseDefaultOriginRestrictionsForType, DoNotIncludeCertificateInfo, ContentSecurityPolicyImposition::SkipPolicyCheck, DefersLoadingPolicy::AllowDefersLoading));
</ins><span class="cx">
</span><span class="cx"> return userSheet;
</span><span class="cx"> }
</span><span class="lines">@@ -1139,7 +1139,7 @@
</span><span class="cx">
</span><span class="cx"> const ResourceLoaderOptions& CachedResourceLoader::defaultCachedResourceOptions()
</span><span class="cx"> {
</span><del>- static ResourceLoaderOptions options(SendCallbacks, SniffContent, BufferData, AllowStoredCredentials, AskClientForAllCredentials, DoSecurityCheck, UseDefaultOriginRestrictionsForType, DoNotIncludeCertificateInfo, ContentSecurityPolicyImposition::DoPolicyCheck);
</del><ins>+ static ResourceLoaderOptions options(SendCallbacks, SniffContent, BufferData, AllowStoredCredentials, AskClientForAllCredentials, DoSecurityCheck, UseDefaultOriginRestrictionsForType, DoNotIncludeCertificateInfo, ContentSecurityPolicyImposition::DoPolicyCheck, DefersLoadingPolicy::AllowDefersLoading);
</ins><span class="cx"> return options;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreloadericonIconLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/icon/IconLoader.cpp (189431 => 189432)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/icon/IconLoader.cpp        2015-09-05 07:44:35 UTC (rev 189431)
+++ trunk/Source/WebCore/loader/icon/IconLoader.cpp        2015-09-05 08:47:22 UTC (rev 189432)
</span><span class="lines">@@ -59,7 +59,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> // ContentSecurityPolicyImposition::DoPolicyCheck is a placeholder value. It does not affect the request since Content Security Policy does not apply to raw resources.
</span><del>- CachedResourceRequest request(ResourceRequest(m_frame.loader().icon().url()), ResourceLoaderOptions(SendCallbacks, SniffContent, BufferData, DoNotAllowStoredCredentials, DoNotAskClientForAnyCredentials, DoSecurityCheck, UseDefaultOriginRestrictionsForType, DoNotIncludeCertificateInfo, ContentSecurityPolicyImposition::DoPolicyCheck));
</del><ins>+ CachedResourceRequest request(ResourceRequest(m_frame.loader().icon().url()), ResourceLoaderOptions(SendCallbacks, SniffContent, BufferData, DoNotAllowStoredCredentials, DoNotAskClientForAnyCredentials, DoSecurityCheck, UseDefaultOriginRestrictionsForType, DoNotIncludeCertificateInfo, ContentSecurityPolicyImposition::DoPolicyCheck, DefersLoadingPolicy::AllowDefersLoading));
</ins><span class="cx">
</span><span class="cx"> request.mutableResourceRequest().setPriority(ResourceLoadPriority::Low);
</span><span class="cx"> request.setInitiator(cachedResourceRequestInitiators().icon);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationcfWebCoreAVCFResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp (189431 => 189432)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp        2015-09-05 07:44:35 UTC (rev 189431)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp        2015-09-05 08:47:22 UTC (rev 189432)
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx"> URL requestURL = CFURLRequestGetURL(urlRequest.get());
</span><span class="cx">
</span><span class="cx"> // ContentSecurityPolicyImposition::DoPolicyCheck is a placeholder value. It does not affect the request since Content Security Policy does not apply to raw resources.
</span><del>- CachedResourceRequest request(ResourceRequest(requestURL), ResourceLoaderOptions(SendCallbacks, DoNotSniffContent, BufferData, DoNotAllowStoredCredentials, DoNotAskClientForCrossOriginCredentials, DoSecurityCheck, UseDefaultOriginRestrictionsForType, DoNotIncludeCertificateInfo, ContentSecurityPolicyImposition::DoPolicyCheck));
</del><ins>+ CachedResourceRequest request(ResourceRequest(requestURL), ResourceLoaderOptions(SendCallbacks, DoNotSniffContent, BufferData, DoNotAllowStoredCredentials, DoNotAskClientForCrossOriginCredentials, DoSecurityCheck, UseDefaultOriginRestrictionsForType, DoNotIncludeCertificateInfo, ContentSecurityPolicyImposition::DoPolicyCheck, DefersLoadingPolicy::AllowDefersLoading));
</ins><span class="cx">
</span><span class="cx"> request.mutableResourceRequest().setPriority(ResourceLoadPriority::Low);
</span><span class="cx"> CachedResourceLoader* loader = m_parent->player()->cachedResourceLoader();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationobjcWebCoreAVFResourceLoadermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm (189431 => 189432)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm        2015-09-05 07:44:35 UTC (rev 189431)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm        2015-09-05 08:47:22 UTC (rev 189432)
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx"> URL requestURL = [[m_avRequest.get() request] URL];
</span><span class="cx">
</span><span class="cx"> // ContentSecurityPolicyImposition::DoPolicyCheck is a placeholder value. It does not affect the request since Content Security Policy does not apply to raw resources.
</span><del>- CachedResourceRequest request(ResourceRequest(requestURL), ResourceLoaderOptions(SendCallbacks, DoNotSniffContent, BufferData, DoNotAllowStoredCredentials, DoNotAskClientForCrossOriginCredentials, DoSecurityCheck, UseDefaultOriginRestrictionsForType, DoNotIncludeCertificateInfo, ContentSecurityPolicyImposition::DoPolicyCheck));
</del><ins>+ CachedResourceRequest request(ResourceRequest(requestURL), ResourceLoaderOptions(SendCallbacks, DoNotSniffContent, BufferData, DoNotAllowStoredCredentials, DoNotAskClientForCrossOriginCredentials, DoSecurityCheck, UseDefaultOriginRestrictionsForType, DoNotIncludeCertificateInfo, ContentSecurityPolicyImposition::DoPolicyCheck, DefersLoadingPolicy::AllowDefersLoading));
</ins><span class="cx">
</span><span class="cx"> request.mutableResourceRequest().setPriority(ResourceLoadPriority::Low);
</span><span class="cx"> CachedResourceLoader* loader = m_parent->player()->cachedResourceLoader();
</span></span></pre>
</div>
</div>
</body>
</html>