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

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

Issue 1151183005: Fix for force reloading an image that was from an ImageDocument (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Adding comment Created 5 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/ImageLoader.cpp
diff --git a/Source/core/loader/ImageLoader.cpp b/Source/core/loader/ImageLoader.cpp
index 2f3de8432e5486e89ccb02df53642ab1a99a2905..6dcc6393f82a1b435d5b2a43cc54a63910894d6a 100644
--- a/Source/core/loader/ImageLoader.cpp
+++ b/Source/core/loader/ImageLoader.cpp
@@ -291,8 +291,11 @@ void ImageLoader::doUpdateFromElement(BypassMainWorldBehavior bypassBehavior, Up
ResourceLoaderOptions resourceLoaderOptions = ResourceFetcher::defaultResourceOptions();
ResourceRequest resourceRequest(url);
resourceRequest.setFetchCredentialsMode(WebURLRequest::FetchCredentialsModeSameOrigin);
- if (updateBehavior == UpdateForcedReload)
+ if (updateBehavior == UpdateForcedReload) {
resourceRequest.setCachePolicy(ResourceRequestCachePolicy::ReloadBypassingCache);
+ // ImageLoader defers the load of images when in an ImageDocument. Don't defer this load on a forced reload.
+ m_loadingImageDocument = false;
+ }
if (isHTMLPictureElement(element()->parentNode()) || !element()->fastGetAttribute(HTMLNames::srcsetAttr).isNull())
resourceRequest.setRequestContext(WebURLRequest::RequestContextImageSet);
FetchRequest request(resourceRequest, element()->localName(), resourceLoaderOptions);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698