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

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

Issue 2114213002: Fix loading placeholders for Lo-Fi (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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 | « content/renderer/render_frame_impl.cc ('k') | third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/fetch/ImageResource.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ImageResource.cpp b/third_party/WebKit/Source/core/fetch/ImageResource.cpp
index 18de9a4285356fd2ddb05e57b41507077369464a..908f97b764d68bf23455e2b879925283acc1ec1b 100644
--- a/third_party/WebKit/Source/core/fetch/ImageResource.cpp
+++ b/third_party/WebKit/Source/core/fetch/ImageResource.cpp
@@ -522,14 +522,17 @@ void ImageResource::updateImageAnimationPolicy()
void ImageResource::reloadIfLoFi(ResourceFetcher* fetcher)
{
- if (!m_response.httpHeaderField("chrome-proxy").contains("q=low"))
+ if (m_resourceRequest.loFiState() != WebURLRequest::LoFiOn)
+ return;
+ if (isLoaded() && !m_response.httpHeaderField("chrome-proxy").contains("q=low"))
return;
m_resourceRequest.setCachePolicy(WebCachePolicy::BypassingCache);
m_resourceRequest.setLoFiState(WebURLRequest::LoFiOff);
if (isLoading())
m_loader->cancel();
- else
- updateImageAndClearBuffer();
+ clear();
+ m_data.clear();
+ notifyObservers();
setStatus(NotStarted);
fetcher->startLoad(this);
}
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698