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

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

Issue 2710113002: DO NOT SUBMIT really old prototype of sprite recognition for image replacement
Patch Set: Created 3 years, 10 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 | « third_party/WebKit/Source/core/loader/DocumentLoader.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/ImageLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/ImageLoader.cpp b/third_party/WebKit/Source/core/loader/ImageLoader.cpp
index 8a67a4c86411afc5534c94a6808313ccf1e0a00d..961c06c18cf185e2cac5cdd527dfd668df69ebd7 100644
--- a/third_party/WebKit/Source/core/loader/ImageLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/ImageLoader.cpp
@@ -292,7 +292,10 @@ void ImageLoader::doUpdateFromElement(BypassMainWorldBehavior bypassBehavior, Up
FetchRequest request(resourceRequest, element()->localName(), resourceLoaderOptions);
configureRequest(request, bypassBehavior, *m_element, document.clientHintsPreferences());
- newImage = ImageResource::fetch(request, document.fetcher());
+ ImageResource::PlaceholderRequestType placeholderRequestType = document.settings() && document.settings()->fetchImagePlaceholders() && updateBehavior != UpdateForcedReload
+ ? ImageResource::PlaceholderRequestType::AllowPlaceholder
+ : ImageResource::PlaceholderRequestType::DisallowPlaceholder;
+ newImage = ImageResource::fetch(request, document.fetcher(), placeholderRequestType);
if (!newImage && !pageIsBeingDismissed(&document)) {
crossSiteOrCSPViolationOccurred(imageSourceURL);
« no previous file with comments | « third_party/WebKit/Source/core/loader/DocumentLoader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698