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

Unified Diff: third_party/WebKit/Source/core/loader/DocumentLoader.cpp

Issue 2795173002: Do not show image placeholders for CSS sprites (Closed)
Patch Set: rebased and addressed comments Created 3 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
Index: third_party/WebKit/Source/core/loader/DocumentLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
index 21220f9880a848be2d0b7627d78d93ce5b71dfa8..0d93cffd68a0cc62563a3bdb4309e7e8755bbb67 100644
--- a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
@@ -191,8 +191,10 @@ Resource* DocumentLoader::StartPreload(Resource::Type type,
Resource* resource = nullptr;
switch (type) {
case Resource::kImage:
- if (frame_)
+ if (frame_ && frame_->GetSettings() &&
+ frame_->GetSettings()->GetFetchImagePlaceholders()) {
sclittle 2017/06/13 00:28:27 Could you remove the Settings checks here? They're
rajendrant 2017/06/21 19:00:58 Done.
frame_->MaybeAllowImagePlaceholder(params);
+ }
resource = ImageResource::Fetch(params, Fetcher());
break;
case Resource::kScript:

Powered by Google App Engine
This is Rietveld 408576698