| Index: third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp b/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp
|
| index 2188479c816e790f20019a6b572d41add660c320..4526dafea7e8135c65944481f7f86018d20dc658 100644
|
| --- a/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp
|
| +++ b/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp
|
| @@ -419,7 +419,8 @@
|
| // that case, and nothing in the text field will be removed.
|
| unsigned selectionLength = 0;
|
| if (element().focused()) {
|
| - selectionLength = element().document().frame()->selection().selectedText().length();
|
| + const VisibleSelection& selection = element().document().frame()->selection().selection();
|
| + selectionLength = plainText(selection.toNormalizedEphemeralRange()).length();
|
| }
|
| ASSERT(oldLength >= selectionLength);
|
|
|
|
|