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

Unified Diff: Source/core/loader/cache/CachedResourceLoader.cpp

Issue 16922002: Do not load deferred/disabled data uri images. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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
« no previous file with comments | « LayoutTests/fast/loader/data-images-with-images-disabled-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/cache/CachedResourceLoader.cpp
diff --git a/Source/core/loader/cache/CachedResourceLoader.cpp b/Source/core/loader/cache/CachedResourceLoader.cpp
index 4ecebcb10df71b98a01e79d4d9a4ead607f57456..2a3f01e2c3bd327e3e8c5e7ac851983e08a8d446 100644
--- a/Source/core/loader/cache/CachedResourceLoader.cpp
+++ b/Source/core/loader/cache/CachedResourceLoader.cpp
@@ -707,6 +707,11 @@ CachedResourceLoader::RevalidationPolicy CachedResourceLoader::determineRevalida
return Reload;
}
+ // Do not load from cache if images are not enabled. The load for this image will be blocked
+ // in CachedImage::load.
+ if (CachedResourceRequest::DeferredByClient == defer)
+ return Reload;
+
// Always use data uris.
// FIXME: Extend this to non-images.
if (type == CachedResource::ImageResource && request.url().protocolIsData())
abarth-chromium 2013/06/13 04:38:51 Ah, interesting.
@@ -721,11 +726,6 @@ CachedResourceLoader::RevalidationPolicy CachedResourceLoader::determineRevalida
if (request.isConditional())
return Reload;
- // Do not load from cache if images are not enabled. The load for this image will be blocked
- // in CachedImage::load.
- if (CachedResourceRequest::DeferredByClient == defer)
- return Reload;
-
// Don't reload resources while pasting.
if (m_allowStaleResources)
return Use;
« no previous file with comments | « LayoutTests/fast/loader/data-images-with-images-disabled-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698