Index: Source/web/ContextMenuClientImpl.cpp |
diff --git a/Source/web/ContextMenuClientImpl.cpp b/Source/web/ContextMenuClientImpl.cpp |
index c0047ec9b457de7ff8ad39f145d835ed555adf01..96e43db764e362535df8d571a9ff8f59a0594388 100644 |
--- a/Source/web/ContextMenuClientImpl.cpp |
+++ b/Source/web/ContextMenuClientImpl.cpp |
@@ -395,6 +395,19 @@ void ContextMenuClientImpl::showContextMenu(const ContextMenu* defaultMenu) |
data.referrerPolicy = WebReferrerPolicyNever; |
} |
+ // Find the input field type. |
+ if (isHTMLInputElement(r.innerNode())) { |
+ HTMLInputElement* element = toHTMLInputElement(r.innerNode()); |
+ if (element->type() == InputTypeNames::password) |
Mike West
2015/05/19 12:58:35
Should we also take the `autocomplete` attribute i
msramek
2015/05/19 15:42:44
I thought about it a bit, and I would say that not
|
+ data.inputFieldType = WebContextMenuData::InputFieldTypePassword; |
+ else if (element->isTextField()) |
+ data.inputFieldType = WebContextMenuData::InputFieldTypePlainText; |
+ else |
+ data.inputFieldType = WebContextMenuData::InputFieldTypeOther; |
+ } else { |
+ data.inputFieldType = WebContextMenuData::InputFieldTypeNone; |
+ } |
+ |
data.node = r.innerNodeOrImageMapImage(); |
WebLocalFrameImpl* selectedWebFrame = WebLocalFrameImpl::fromFrame(selectedFrame); |