Index: Source/web/ContextMenuClientImpl.cpp |
diff --git a/Source/web/ContextMenuClientImpl.cpp b/Source/web/ContextMenuClientImpl.cpp |
index d470c88777afbf964dbad004d9d3aa68d4549a52..47256210e4466878931b3c25587c1d21938d0a34 100644 |
--- a/Source/web/ContextMenuClientImpl.cpp |
+++ b/Source/web/ContextMenuClientImpl.cpp |
@@ -221,6 +221,15 @@ void ContextMenuClientImpl::showContextMenu(const ContextMenu* defaultMenu) |
// all else. |
data.linkURL = r.absoluteLinkURL(); |
+ if (r.innerNode()->isHTMLElement()) { |
+ HTMLElement* htmlElement = toHTMLElement(r.innerNode()); |
+ if (!htmlElement->title().isEmpty()) { |
+ data.titleText = htmlElement->title(); |
+ } else { |
+ data.titleText = htmlElement->altText(); |
+ } |
+ } |
+ |
if (isHTMLCanvasElement(r.innerNode())) { |
data.mediaType = WebContextMenuData::MediaTypeCanvas; |
data.hasImageContents = true; |