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

Unified Diff: Source/core/editing/ReplaceSelectionCommand.cpp

Issue 557613002: Remove a part of type checking predicates of HTMLInputElement. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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
« no previous file with comments | « Source/core/editing/FrameSelection.cpp ('k') | Source/core/html/HTMLInputElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/ReplaceSelectionCommand.cpp
diff --git a/Source/core/editing/ReplaceSelectionCommand.cpp b/Source/core/editing/ReplaceSelectionCommand.cpp
index d4cf82ff5627b03daf140f65e103462bbe104915..b342aeae10f8314cc82c749ad00262908a48fb58 100644
--- a/Source/core/editing/ReplaceSelectionCommand.cpp
+++ b/Source/core/editing/ReplaceSelectionCommand.cpp
@@ -30,6 +30,7 @@
#include "bindings/core/v8/ExceptionStatePlaceholder.h"
#include "core/CSSPropertyNames.h"
#include "core/HTMLNames.h"
+#include "core/InputTypeNames.h"
#include "core/css/CSSStyleDeclaration.h"
#include "core/css/StylePropertySet.h"
#include "core/dom/Document.h"
@@ -1289,7 +1290,7 @@ bool ReplaceSelectionCommand::shouldPerformSmartReplace() const
return false;
HTMLTextFormControlElement* textControl = enclosingTextFormControl(positionAtStartOfInsertedContent().deepEquivalent());
- if (isHTMLInputElement(textControl) && toHTMLInputElement(textControl)->isPasswordField())
+ if (isHTMLInputElement(textControl) && toHTMLInputElement(textControl)->type() == InputTypeNames::password)
return false; // Disable smart replace for password fields.
return true;
« no previous file with comments | « Source/core/editing/FrameSelection.cpp ('k') | Source/core/html/HTMLInputElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698