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) |