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

Unified Diff: Source/core/rendering/HitTestResult.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/core/loader/NavigationPolicy.h ('k') | Source/web/AssertMatchingEnums.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/HitTestResult.cpp
diff --git a/Source/core/rendering/HitTestResult.cpp b/Source/core/rendering/HitTestResult.cpp
index 63f71c09e4fceeb2b6fd70a57a1efe9393783ba1..8df2b4251675947fb2f9a7d72b3795ee660cc853 100644
--- a/Source/core/rendering/HitTestResult.cpp
+++ b/Source/core/rendering/HitTestResult.cpp
@@ -279,11 +279,13 @@ KURL HitTestResult::absoluteImageURL() const
if (!m_innerNonSharedNode)
return KURL();
- if (!(m_innerNonSharedNode->renderer() && m_innerNonSharedNode->renderer()->isImage()))
+ RenderObject* renderer = m_innerNonSharedNode->renderer();
+ if (!(renderer && (renderer->isImage() || renderer->isCanvas())))
return KURL();
AtomicString urlString;
- if (isHTMLEmbedElement(*m_innerNonSharedNode)
+ if (isHTMLCanvasElement(*m_innerNonSharedNode)
+ || isHTMLEmbedElement(*m_innerNonSharedNode)
|| isHTMLImageElement(*m_innerNonSharedNode)
|| isHTMLInputElement(*m_innerNonSharedNode)
|| isHTMLObjectElement(*m_innerNonSharedNode)
« no previous file with comments | « Source/core/loader/NavigationPolicy.h ('k') | Source/web/AssertMatchingEnums.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698