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

Unified Diff: Source/web/ContextMenuClientImpl.cpp

Issue 255563004: Implement "Save image as" for canvas (blink side). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 | « Source/web/AssertMatchingEnums.cpp ('k') | Source/web/WebViewImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/ContextMenuClientImpl.cpp
diff --git a/Source/web/ContextMenuClientImpl.cpp b/Source/web/ContextMenuClientImpl.cpp
index 7c61f82c8776f749467000994126bee32227e65f..d1b49209c74095ab4657ae1c94ad65b1ed610740 100644
--- a/Source/web/ContextMenuClientImpl.cpp
+++ b/Source/web/ContextMenuClientImpl.cpp
@@ -215,7 +215,9 @@ void ContextMenuClientImpl::showContextMenu(const WebCore::ContextMenu* defaultM
// all else.
data.linkURL = r.absoluteLinkURL();
- if (!r.absoluteImageURL().isEmpty()) {
+ if (isHTMLCanvasElement(r.innerNonSharedNode())) {
+ data.mediaType = WebContextMenuData::MediaTypeCanvas;
+ } else if (!r.absoluteImageURL().isEmpty()) {
data.srcURL = r.absoluteImageURL();
data.mediaType = WebContextMenuData::MediaTypeImage;
data.mediaFlags |= WebContextMenuData::MediaCanPrint;
« no previous file with comments | « Source/web/AssertMatchingEnums.cpp ('k') | Source/web/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698