Index: content/renderer/context_menu_params_builder.cc |
diff --git a/content/renderer/context_menu_params_builder.cc b/content/renderer/context_menu_params_builder.cc |
index 1e4df2e7a4667cf934cdc5c3f481af7ca2757115..18e141c73ae2d334d6cbef9bc004dc368cedd50f 100644 |
--- a/content/renderer/context_menu_params_builder.cc |
+++ b/content/renderer/context_menu_params_builder.cc |
@@ -12,6 +12,7 @@ |
#include "content/renderer/history_serialization.h" |
#include "content/renderer/menu_item_builder.h" |
#include "third_party/WebKit/public/web/WebElement.h" |
+#include "third_party/WebKit/public/web/WebInputElement.h" |
#include "third_party/WebKit/public/web/WebNode.h" |
namespace content { |
@@ -83,6 +84,12 @@ ContextMenuParams ContextMenuParamsBuilder::Build( |
¶ms.security_info.signed_certificate_timestamp_ids); |
} |
+ // Find out if this node is a password field. |
msramek
2015/05/19 09:42:08
Is it OK to add a field to ContextMenuParams that
Mike West
2015/05/19 10:11:22
I'd suggest adding the logic to Blink first (you'l
msramek
2015/05/19 12:39:48
Done in https://codereview.chromium.org/1137733004
|
+ params.is_password_field = |
+ data.node.isElementNode() && |
+ data.node.toConst<blink::WebElement>().hasHTMLTagName("input") && |
+ data.node.toConst<blink::WebInputElement>().isPasswordField(); |
+ |
return params; |
} |