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

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

Issue 2735663002: Introduce isInPasswordField() (Closed)
Patch Set: 2017-03-06T16:21:23 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
« no previous file with comments | « third_party/WebKit/Source/core/editing/EditingUtilities.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/FrameSelection.cpp
diff --git a/third_party/WebKit/Source/core/editing/FrameSelection.cpp b/third_party/WebKit/Source/core/editing/FrameSelection.cpp
index 3a9f89299f25fca2abc03526488c89ae29662a54..f62642d4b7d531bf6e43ddeaf1ec1dd10f7c4200 100644
--- a/third_party/WebKit/Source/core/editing/FrameSelection.cpp
+++ b/third_party/WebKit/Source/core/editing/FrameSelection.cpp
@@ -27,7 +27,6 @@
#include "bindings/core/v8/ExceptionState.h"
#include "core/HTMLNames.h"
-#include "core/InputTypeNames.h"
#include "core/css/StylePropertySet.h"
#include "core/dom/AXObjectCache.h"
#include "core/dom/CharacterData.h"
@@ -702,10 +701,10 @@ Range* FrameSelection::firstRange() const {
}
bool FrameSelection::isInPasswordField() const {
- TextControlElement* textControl = enclosingTextControl(
- computeVisibleSelectionInDOMTreeDeprecated().start());
- return isHTMLInputElement(textControl) &&
- toHTMLInputElement(textControl)->type() == InputTypeNames::password;
+ // TODO(editing-dev): The use of updateStyleAndLayoutIgnorePendingStylesheets
+ // needs to be audited. See http://crbug.com/590369 for more details.
+ document().updateStyleAndLayoutIgnorePendingStylesheets();
+ return blink::isInPasswordField(computeVisibleSelectionInDOMTree().start());
}
void FrameSelection::notifyAccessibilityForSelectionChange() {
« no previous file with comments | « third_party/WebKit/Source/core/editing/EditingUtilities.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698