Chromium Code Reviews| Index: Source/web/WebViewImpl.cpp | 
| diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp | 
| index fe75efa439e4122e361ec150254cbce64f7698ea..1402991d2b3ad4b3f3c5b109e3c385e99694c093 100644 | 
| --- a/Source/web/WebViewImpl.cpp | 
| +++ b/Source/web/WebViewImpl.cpp | 
| @@ -3296,18 +3296,14 @@ void WebViewImpl::copyImageAt(const WebPoint& point) | 
| void WebViewImpl::saveImageAt(const WebPoint& point) | 
| { | 
| - if (!m_page) | 
| + if (!m_client) | 
| return; | 
| - KURL url = hitTestResultForWindowPos(point).absoluteImageURLIncludingCanvasDataURL(); | 
| - | 
| - if (url.isEmpty()) | 
| + Node* node = hitTestResultForWindowPos(point).innerNonSharedNode(); | 
| + if (!node || !(isHTMLCanvasElement(*node) || isHTMLImageElement(*node))) | 
| return; | 
| - ResourceRequest request(url); | 
| - request.setRequestContext(WebURLRequest::RequestContextDownload); | 
| - m_page->deprecatedLocalMainFrame()->loader().client()->loadURLExternally( | 
| - request, NavigationPolicyDownloadTo, WebString()); | 
| + m_client->saveImageFromDataURL(toElement(*node).imageSourceURL()); | 
| 
 
Justin Novosad
2014/09/03 16:55:29
The name "saveImageFromDataURL" is misleading. The
 
Ken Russell (switch to Gerrit)
2014/09/04 00:23:10
After considering the various alternatives I think
 
 | 
| } | 
| void WebViewImpl::dragSourceEndedAt( |