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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 1112513005: Reload image bypassing the cache (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: WebNode instead of WebPoint Created 5 years, 8 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: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index 870913bbd6e4a9e2bfee1a1f3deac1a83680c753..fdf6a756e136f6f21c6d5758a4ce3386fa269998 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -59,6 +59,7 @@
#include "core/frame/Settings.h"
#include "core/frame/SmartClip.h"
#include "core/frame/TopControls.h"
+#include "core/html/HTMLImageElement.h"
#include "core/html/HTMLInputElement.h"
#include "core/html/HTMLMediaElement.h"
#include "core/html/HTMLPlugInElement.h"
@@ -3548,6 +3549,15 @@ void WebViewImpl::saveImageAt(const WebPoint& point)
m_client->saveImageFromDataURL(url);
}
+void WebViewImpl::reloadImageAt(const WebNode& webNode, bool bypassCache)
+{
+ const Node* node = webNode.constUnwrap<Node>();
+ if (isHTMLImageElement(*node)) {
+ const HTMLImageElement& imageElement = toHTMLImageElement(*node);
+ imageElement.imageLoader().updateFromElement(ImageLoader::UpdateIgnorePreviousError, bypassCache);
+ }
+}
+
void WebViewImpl::dragSourceEndedAt(
const WebPoint& clientPoint,
const WebPoint& screenPoint,

Powered by Google App Engine
This is Rietveld 408576698