<!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>[206900] 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/206900">206900</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-10-06 23:00:10 -0700 (Thu, 06 Oct 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>CachedResourceRequest should not need to store defer and preload options
https://bugs.webkit.org/show_bug.cgi?id=163004
Patch by Youenn Fablet <youenn@apple.com> on 2016-10-06
Reviewed by Alex Christensen.
No change of behavior.
Removing CachedResourceRequest defer and preload fields.
These fields are computed inside CachedResourceLoader instead.
Updated setting of priority from CachedResourceRequest to CachedResource.
Priority is set for any new resource (this covers all cases where no cached resource can be reused from the memory cache).
Priority is set for a cached resource if the request is not a preload request.
* loader/LinkLoader.cpp:
(WebCore::LinkLoader::preloadIfNeeded):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestImage):
(WebCore::CachedResourceLoader::canRequest):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::determineRevalidationPolicy):
(WebCore::CachedResourceLoader::requestPreload):
* loader/cache/CachedResourceLoader.h:
* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::CachedResourceRequest):
* loader/cache/CachedResourceRequest.h:
(WebCore::CachedResourceRequest::priority):
(WebCore::CachedResourceRequest::forPreload): Deleted.
(WebCore::CachedResourceRequest::setForPreload): Deleted.
(WebCore::CachedResourceRequest::defer): Deleted.
(WebCore::CachedResourceRequest::setDefer): Deleted.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreloaderLinkLoadercpp">trunk/Source/WebCore/loader/LinkLoader.cpp</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="#trunkSourceWebCoreloadercacheCachedResourceLoaderh">trunk/Source/WebCore/loader/cache/CachedResourceLoader.h</a></li>
<li><a href="#trunkSourceWebCoreloadercacheCachedResourceRequestcpp">trunk/Source/WebCore/loader/cache/CachedResourceRequest.cpp</a></li>
<li><a href="#trunkSourceWebCoreloadercacheCachedResourceRequesth">trunk/Source/WebCore/loader/cache/CachedResourceRequest.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (206899 => 206900)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-07 05:07:13 UTC (rev 206899)
+++ trunk/Source/WebCore/ChangeLog        2016-10-07 06:00:10 UTC (rev 206900)
</span><span class="lines">@@ -1,3 +1,39 @@
</span><ins>+2016-10-06 Youenn Fablet <youenn@apple.com>
+
+ CachedResourceRequest should not need to store defer and preload options
+ https://bugs.webkit.org/show_bug.cgi?id=163004
+
+ Reviewed by Alex Christensen.
+
+ No change of behavior.
+
+ Removing CachedResourceRequest defer and preload fields.
+ These fields are computed inside CachedResourceLoader instead.
+
+ Updated setting of priority from CachedResourceRequest to CachedResource.
+ Priority is set for any new resource (this covers all cases where no cached resource can be reused from the memory cache).
+ Priority is set for a cached resource if the request is not a preload request.
+
+ * loader/LinkLoader.cpp:
+ (WebCore::LinkLoader::preloadIfNeeded):
+ * loader/cache/CachedResource.cpp:
+ (WebCore::CachedResource::CachedResource):
+ * loader/cache/CachedResourceLoader.cpp:
+ (WebCore::CachedResourceLoader::requestImage):
+ (WebCore::CachedResourceLoader::canRequest):
+ (WebCore::CachedResourceLoader::requestResource):
+ (WebCore::CachedResourceLoader::determineRevalidationPolicy):
+ (WebCore::CachedResourceLoader::requestPreload):
+ * loader/cache/CachedResourceLoader.h:
+ * loader/cache/CachedResourceRequest.cpp:
+ (WebCore::CachedResourceRequest::CachedResourceRequest):
+ * loader/cache/CachedResourceRequest.h:
+ (WebCore::CachedResourceRequest::priority):
+ (WebCore::CachedResourceRequest::forPreload): Deleted.
+ (WebCore::CachedResourceRequest::setForPreload): Deleted.
+ (WebCore::CachedResourceRequest::defer): Deleted.
+ (WebCore::CachedResourceRequest::setDefer): Deleted.
+
</ins><span class="cx"> 2016-10-06 Myles C. Maxfield <mmaxfield@apple.com>
</span><span class="cx">
</span><span class="cx"> Variation fonts don't affect glyph advances
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderLinkLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/LinkLoader.cpp (206899 => 206900)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/LinkLoader.cpp        2016-10-07 05:07:13 UTC (rev 206899)
+++ trunk/Source/WebCore/loader/LinkLoader.cpp        2016-10-07 06:00:10 UTC (rev 206900)
</span><span class="lines">@@ -162,7 +162,6 @@
</span><span class="cx"> linkRequest.setInitiator("link");
</span><span class="cx">
</span><span class="cx"> linkRequest.setAsPotentiallyCrossOrigin(crossOriginMode, document);
</span><del>- linkRequest.setForPreload(true);
</del><span class="cx"> CachedResourceHandle<CachedResource> cachedLinkResource = document.cachedResourceLoader().preload(type.value(), WTFMove(linkRequest), CachedResourceLoader::ExplicitPreload);
</span><span class="cx">
</span><span class="cx"> if (cachedLinkResource)
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheCachedResourcecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/CachedResource.cpp (206899 => 206900)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedResource.cpp        2016-10-07 05:07:13 UTC (rev 206899)
+++ trunk/Source/WebCore/loader/cache/CachedResource.cpp        2016-10-07 06:00:10 UTC (rev 206900)
</span><span class="lines">@@ -125,6 +125,8 @@
</span><span class="cx"> , m_type(type)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(sessionID.isValid());
</span><ins>+
+ setLoadPriority(request.priority());
</ins><span class="cx"> finishRequestInitialization();
</span><span class="cx">
</span><span class="cx"> // FIXME: We should have a better way of checking for Navigation loads, maybe FetchMode::Options::Navigate.
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheCachedResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp (206899 => 206900)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp        2016-10-07 05:07:13 UTC (rev 206899)
+++ trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp        2016-10-07 06:00:10 UTC (rev 206900)
</span><span class="lines">@@ -183,14 +183,14 @@
</span><span class="cx"> if (Document* document = frame->document())
</span><span class="cx"> document->contentSecurityPolicy()->upgradeInsecureRequestIfNeeded(request.mutableResourceRequest(), ContentSecurityPolicy::InsecureRequestType::Load);
</span><span class="cx"> URL requestURL = request.resourceRequest().url();
</span><del>- if (requestURL.isValid() && canRequest(CachedResource::ImageResource, requestURL, request))
</del><ins>+ if (requestURL.isValid() && canRequest(CachedResource::ImageResource, requestURL, request, ForPreload::No))
</ins><span class="cx"> PingLoader::loadImage(*frame, requestURL);
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- request.setDefer(clientDefersImage(request.resourceRequest().url()) ? CachedResourceRequest::DeferredByClient : CachedResourceRequest::NoDefer);
- return downcast<CachedImage>(requestResource(CachedResource::ImageResource, WTFMove(request)).get());
</del><ins>+ auto defer = clientDefersImage(request.resourceRequest().url()) ? DeferOption::DeferredByClient : DeferOption::NoDefer;
+ return downcast<CachedImage>(requestResource(CachedResource::ImageResource, WTFMove(request), ForPreload::No, defer).get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> CachedResourceHandle<CachedFont> CachedResourceLoader::requestFont(CachedResourceRequest&& request, bool isSVG)
</span><span class="lines">@@ -437,12 +437,12 @@
</span><span class="cx"> return url.protocolIsData() && options.sameOriginDataURLFlag == SameOriginDataURLFlag::Set;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool CachedResourceLoader::canRequest(CachedResource::Type type, const URL& url, const CachedResourceRequest& request)
</del><ins>+bool CachedResourceLoader::canRequest(CachedResource::Type type, const URL& url, const CachedResourceRequest& request, ForPreload forPreload)
</ins><span class="cx"> {
</span><span class="cx"> auto& options = request.options();
</span><span class="cx">
</span><span class="cx"> if (document() && !document()->securityOrigin()->canDisplay(url)) {
</span><del>- if (!request.forPreload())
</del><ins>+ if (forPreload == ForPreload::No)
</ins><span class="cx"> FrameLoader::reportLocalLoadFailed(frame(), url.stringCenterEllipsizedToLength());
</span><span class="cx"> LOG(ResourceLoading, "CachedResourceLoader::requestResource URL was not allowed by SecurityOrigin::canDisplay");
</span><span class="cx"> return false;
</span><span class="lines">@@ -634,7 +634,7 @@
</span><span class="cx"> // FIXME: Decide whether to support client hints
</span><span class="cx"> }
</span><span class="cx">
</span><del>-CachedResourceHandle<CachedResource> CachedResourceLoader::requestResource(CachedResource::Type type, CachedResourceRequest&& request)
</del><ins>+CachedResourceHandle<CachedResource> CachedResourceLoader::requestResource(CachedResource::Type type, CachedResourceRequest&& request, ForPreload forPreload, DeferOption defer)
</ins><span class="cx"> {
</span><span class="cx"> if (Document* document = this->document())
</span><span class="cx"> document->contentSecurityPolicy()->upgradeInsecureRequestIfNeeded(request.mutableResourceRequest(), ContentSecurityPolicy::InsecureRequestType::Load);
</span><span class="lines">@@ -641,7 +641,7 @@
</span><span class="cx">
</span><span class="cx"> URL url = request.resourceRequest().url();
</span><span class="cx">
</span><del>- LOG(ResourceLoading, "CachedResourceLoader::requestResource '%s', charset '%s', priority=%d, forPreload=%u", url.stringCenterEllipsizedToLength().latin1().data(), request.charset().latin1().data(), request.priority() ? static_cast<int>(request.priority().value()) : -1, request.forPreload());
</del><ins>+ LOG(ResourceLoading, "CachedResourceLoader::requestResource '%s', charset '%s', priority=%d, forPreload=%u", url.stringCenterEllipsizedToLength().latin1().data(), request.charset().latin1().data(), request.priority() ? static_cast<int>(request.priority().value()) : -1, forPreload == ForPreload::Yes);
</ins><span class="cx">
</span><span class="cx"> // If only the fragment identifiers differ, it is the same resource.
</span><span class="cx"> url = MemoryCache::removeFragmentIdentifierIfNeeded(url);
</span><span class="lines">@@ -654,7 +654,7 @@
</span><span class="cx"> prepareFetch(type, request);
</span><span class="cx">
</span><span class="cx"> // We are passing url as well as request, as request url may contain a fragment identifier.
</span><del>- if (!canRequest(type, url, request)) {
</del><ins>+ if (!canRequest(type, url, request, forPreload)) {
</ins><span class="cx"> RELEASE_LOG_IF_ALLOWED("requestResource: Not allowed to request resource (frame = %p)", frame());
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="lines">@@ -712,13 +712,7 @@
</span><span class="cx">
</span><span class="cx"> logMemoryCacheResourceRequest(frame(), resource ? DiagnosticLoggingKeys::inMemoryCacheKey() : DiagnosticLoggingKeys::notInMemoryCacheKey());
</span><span class="cx">
</span><del>- // These 3 fields will be used below after request is moved.
- // FIXME: We can rearrange the code to not require storing all 3 fields.
- auto forPreload = request.forPreload();
- auto defer = request.defer();
- auto priority = request.priority();
-
- RevalidationPolicy policy = determineRevalidationPolicy(type, request, resource.get());
</del><ins>+ RevalidationPolicy policy = determineRevalidationPolicy(type, request, resource.get(), forPreload, defer);
</ins><span class="cx"> switch (policy) {
</span><span class="cx"> case Reload:
</span><span class="cx"> memoryCache.remove(*resource);
</span><span class="lines">@@ -753,6 +747,8 @@
</span><span class="cx"> m_resourceTimingInfo.addResourceTiming(resource.get(), *document(), loadTiming);
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><ins>+ if (forPreload == ForPreload::No)
+ resource->setLoadPriority(request.priority());
</ins><span class="cx"> }
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="lines">@@ -760,15 +756,12 @@
</span><span class="cx"> if (!resource)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- if (!forPreload || policy != Use)
- resource->setLoadPriority(priority);
-
- if (!forPreload && resource->loader() && resource->resourceRequest().ignoreForRequestCount()) {
</del><ins>+ if (forPreload == ForPreload::No && resource->loader() && resource->resourceRequest().ignoreForRequestCount()) {
</ins><span class="cx"> resource->resourceRequest().setIgnoreForRequestCount(false);
</span><span class="cx"> incrementRequestCount(*resource);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if ((policy != Use || resource->stillNeedsLoad()) && CachedResourceRequest::NoDefer == defer) {
</del><ins>+ if ((policy != Use || resource->stillNeedsLoad()) && defer == DeferOption::NoDefer) {
</ins><span class="cx"> resource->load(*this);
</span><span class="cx">
</span><span class="cx"> // We don't support immediate loads, but we do support immediate failure.
</span><span class="lines">@@ -868,7 +861,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-CachedResourceLoader::RevalidationPolicy CachedResourceLoader::determineRevalidationPolicy(CachedResource::Type type, CachedResourceRequest& cachedResourceRequest, CachedResource* existingResource) const
</del><ins>+CachedResourceLoader::RevalidationPolicy CachedResourceLoader::determineRevalidationPolicy(CachedResource::Type type, CachedResourceRequest& cachedResourceRequest, CachedResource* existingResource, ForPreload forPreload, DeferOption defer) const
</ins><span class="cx"> {
</span><span class="cx"> auto& request = cachedResourceRequest.resourceRequest();
</span><span class="cx">
</span><span class="lines">@@ -876,7 +869,7 @@
</span><span class="cx"> return Load;
</span><span class="cx">
</span><span class="cx"> // We already have a preload going for this URL.
</span><del>- if (cachedResourceRequest.forPreload() && existingResource->isPreloaded())
</del><ins>+ if (forPreload == ForPreload::Yes && existingResource->isPreloaded())
</ins><span class="cx"> return Use;
</span><span class="cx">
</span><span class="cx"> // If the same URL has been loaded as a different type, we need to reload.
</span><span class="lines">@@ -905,9 +898,8 @@
</span><span class="cx"> // Conditional requests should have failed canReuse check.
</span><span class="cx"> ASSERT(!request.isConditional());
</span><span class="cx">
</span><del>- // Do not load from cache if images are not enabled. The load for this image will be blocked
- // in CachedImage::load.
- if (cachedResourceRequest.defer() == CachedResourceRequest::DeferredByClient)
</del><ins>+ // Do not load from cache if images are not enabled. The load for this image will be blocked in CachedImage::load.
+ if (defer == DeferOption::DeferredByClient)
</ins><span class="cx"> return Reload;
</span><span class="cx">
</span><span class="cx"> // Don't reload resources while pasting.
</span><span class="lines">@@ -1224,9 +1216,8 @@
</span><span class="cx"> {
</span><span class="cx"> if (request.charset().isEmpty() && (type == CachedResource::Script || type == CachedResource::CSSStyleSheet))
</span><span class="cx"> request.setCharset(m_document->charset());
</span><del>- request.setForPreload(true);
</del><span class="cx">
</span><del>- CachedResourceHandle<CachedResource> resource = requestResource(type, WTFMove(request));
</del><ins>+ CachedResourceHandle<CachedResource> resource = requestResource(type, WTFMove(request), ForPreload::Yes);
</ins><span class="cx"> if (!resource || (m_preloads && m_preloads->contains(resource.get())))
</span><span class="cx"> return nullptr;
</span><span class="cx"> // Fonts need special treatment since just creating the resource doesn't trigger a load.
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheCachedResourceLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/CachedResourceLoader.h (206899 => 206900)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedResourceLoader.h        2016-10-07 05:07:13 UTC (rev 206899)
+++ trunk/Source/WebCore/loader/cache/CachedResourceLoader.h        2016-10-07 06:00:10 UTC (rev 206900)
</span><span class="lines">@@ -136,7 +136,6 @@
</span><span class="cx"> void checkForPendingPreloads();
</span><span class="cx"> void printPreloadStats();
</span><span class="cx">
</span><del>- bool canRequest(CachedResource::Type, const URL&, const CachedResourceRequest&);
</del><span class="cx"> bool canRequestAfterRedirection(CachedResource::Type, const URL&, const ResourceLoaderOptions&);
</span><span class="cx">
</span><span class="cx"> static const ResourceLoaderOptions& defaultCachedResourceOptions();
</span><span class="lines">@@ -152,14 +151,19 @@
</span><span class="cx"> private:
</span><span class="cx"> explicit CachedResourceLoader(DocumentLoader*);
</span><span class="cx">
</span><del>- CachedResourceHandle<CachedResource> requestResource(CachedResource::Type, CachedResourceRequest&&);
</del><ins>+ enum class ForPreload { Yes, No };
+ enum class DeferOption { NoDefer, DeferredByClient };
+
+ CachedResourceHandle<CachedResource> requestResource(CachedResource::Type, CachedResourceRequest&&, ForPreload = ForPreload::No, DeferOption = DeferOption::NoDefer);
</ins><span class="cx"> void prepareFetch(CachedResource::Type, CachedResourceRequest&);
</span><span class="cx"> CachedResourceHandle<CachedResource> revalidateResource(CachedResourceRequest&&, CachedResource&);
</span><span class="cx"> CachedResourceHandle<CachedResource> loadResource(CachedResource::Type, CachedResourceRequest&&);
</span><span class="cx"> CachedResourceHandle<CachedResource> requestPreload(CachedResource::Type, CachedResourceRequest&&);
</span><span class="cx">
</span><ins>+ bool canRequest(CachedResource::Type, const URL&, const CachedResourceRequest&, ForPreload);
+
</ins><span class="cx"> enum RevalidationPolicy { Use, Revalidate, Reload, Load };
</span><del>- RevalidationPolicy determineRevalidationPolicy(CachedResource::Type, CachedResourceRequest&, CachedResource* existingResource) const;
</del><ins>+ RevalidationPolicy determineRevalidationPolicy(CachedResource::Type, CachedResourceRequest&, CachedResource* existingResource, ForPreload, DeferOption) const;
</ins><span class="cx">
</span><span class="cx"> bool shouldUpdateCachedResourceWithCurrentRequest(const CachedResource&, const CachedResourceRequest&);
</span><span class="cx"> CachedResourceHandle<CachedResource> updateCachedResourceWithCurrentRequest(const CachedResource&, CachedResourceRequest&&);
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheCachedResourceRequestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/CachedResourceRequest.cpp (206899 => 206900)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedResourceRequest.cpp        2016-10-07 05:07:13 UTC (rev 206899)
+++ trunk/Source/WebCore/loader/cache/CachedResourceRequest.cpp        2016-10-07 06:00:10 UTC (rev 206900)
</span><span class="lines">@@ -39,8 +39,6 @@
</span><span class="cx"> , m_charset(charset)
</span><span class="cx"> , m_options(CachedResourceLoader::defaultCachedResourceOptions())
</span><span class="cx"> , m_priority(priority)
</span><del>- , m_forPreload(false)
- , m_defer(NoDefer)
</del><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -48,8 +46,6 @@
</span><span class="cx"> : m_resourceRequest(WTFMove(resourceRequest))
</span><span class="cx"> , m_options(options)
</span><span class="cx"> , m_priority(priority)
</span><del>- , m_forPreload(false)
- , m_defer(NoDefer)
</del><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheCachedResourceRequesth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/CachedResourceRequest.h (206899 => 206900)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedResourceRequest.h        2016-10-07 05:07:13 UTC (rev 206899)
+++ trunk/Source/WebCore/loader/cache/CachedResourceRequest.h        2016-10-07 06:00:10 UTC (rev 206900)
</span><span class="lines">@@ -40,8 +40,6 @@
</span><span class="cx">
</span><span class="cx"> class CachedResourceRequest {
</span><span class="cx"> public:
</span><del>- enum DeferOption { NoDefer, DeferredByClient };
-
</del><span class="cx"> explicit CachedResourceRequest(const ResourceRequest&, const String& charset = String(), Optional<ResourceLoadPriority> = Nullopt);
</span><span class="cx"> CachedResourceRequest(ResourceRequest&&, const ResourceLoaderOptions&, Optional<ResourceLoadPriority> = Nullopt);
</span><span class="cx">
</span><span class="lines">@@ -52,10 +50,6 @@
</span><span class="cx"> const ResourceLoaderOptions& options() const { return m_options; }
</span><span class="cx"> void setOptions(const ResourceLoaderOptions& options) { m_options = options; }
</span><span class="cx"> const Optional<ResourceLoadPriority>& priority() const { return m_priority; }
</span><del>- bool forPreload() const { return m_forPreload; }
- void setForPreload(bool forPreload) { m_forPreload = forPreload; }
- DeferOption defer() const { return m_defer; }
- void setDefer(DeferOption defer) { m_defer = defer; }
</del><span class="cx"> void setInitiator(PassRefPtr<Element>);
</span><span class="cx"> void setInitiator(const AtomicString& name);
</span><span class="cx"> const AtomicString& initiatorName() const;
</span><span class="lines">@@ -72,8 +66,6 @@
</span><span class="cx"> String m_charset;
</span><span class="cx"> ResourceLoaderOptions m_options;
</span><span class="cx"> Optional<ResourceLoadPriority> m_priority;
</span><del>- bool m_forPreload;
- DeferOption m_defer;
</del><span class="cx"> RefPtr<Element> m_initiatorElement;
</span><span class="cx"> AtomicString m_initiatorName;
</span><span class="cx"> RefPtr<SecurityOrigin> m_origin;
</span></span></pre>
</div>
</div>
</body>
</html>