Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(690)

Unified Diff: third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp

Issue 1879793003: Remove DeferredByClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Resource_load
Patch Set: Add UpdateForcedReload check for the m_loadingImageDocument special case Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
index 3948e207db0502630466315551d47a537432a672..faaef173da3b3f53006d02a4086b5a5ed8ba82af 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
+++ b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
@@ -257,7 +257,8 @@ bool ResourceFetcher::isControlledByServiceWorker() const
bool ResourceFetcher::resourceNeedsLoad(Resource* resource, const FetchRequest& request, RevalidationPolicy policy)
{
- if (FetchRequest::DeferredByClient == request.defer())
+ // Defer a font load until it is actually needed unless this is a preload.
+ if (resource->getType() == Resource::Font && !request.forPreload())
return false;
if (resource->isImage() && shouldDeferImageLoad(resource->url()))
return false;
@@ -660,7 +661,7 @@ ResourceFetcher::RevalidationPolicy ResourceFetcher::determineRevalidationPolicy
// affected by m_imagesEnabled but not m_autoLoadImages, in order to
// allow for this differing behavior.
// TODO(japhet): Can we get rid of one of these settings?
- if (existingResource->isImage() && (FetchRequest::DeferredByClient == fetchRequest.defer() || !context().allowImage(m_imagesEnabled, existingResource->url())))
+ if (existingResource->isImage() && !context().allowImage(m_imagesEnabled, existingResource->url()))
return Reload;
// Never use cache entries for downloadToFile / useStreamOnResponse
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ImageResource.h ('k') | third_party/WebKit/Source/core/loader/ImageLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698