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

Unified Diff: third_party/WebKit/Source/core/editing/EditingUtilities.cpp

Issue 2740823003: [PasswordGeneration] Makes generated passwords copyable (Closed)
Patch Set: Created 3 years, 9 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
Index: third_party/WebKit/Source/core/editing/EditingUtilities.cpp
diff --git a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
index b0e8ece823b4ac3478281ed9ddeb5c14bdf1f6fe..b9dd6d45c865b5a3ca66f63c331c581ee886a677 100644
--- a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
+++ b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
@@ -2081,6 +2081,15 @@ bool isInPasswordField(const Position& position) {
toHTMLInputElement(textControl)->type() == InputTypeNames::password;
}
+bool isInPasswordFieldWithUnrevealedPassword(const Position& position) {
yosin_UTC9 2017/03/10 03:48:52 Could you implement this function in Editor.cpp as
kolos1 2017/03/10 12:50:55 Done.
+ TextControlElement* textControl = enclosingTextControl(position);
+ if (!isHTMLInputElement(textControl))
+ return false;
+ HTMLInputElement* input = toHTMLInputElement(textControl);
+ return (input->type() == InputTypeNames::password) &&
+ !input->shouldRevealPassword();
+}
+
bool isTextSecurityNode(const Node* node) {
return node && node->layoutObject() &&
node->layoutObject()->style()->textSecurity() != TSNONE;

Powered by Google App Engine
This is Rietveld 408576698