| 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 62ab5cfddfcc974b1760a5dcce07b6c0a671167a..1cf07fb32ad22a96369565bebfd49187bbf97f87 100644
|
| --- a/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp
|
| +++ b/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp
|
| @@ -419,8 +419,7 @@ void TextFieldInputType::handleBeforeTextInsertedEvent(BeforeTextInsertedEvent*
|
| // that case, and nothing in the text field will be removed.
|
| unsigned selectionLength = 0;
|
| if (element().focused()) {
|
| - const VisibleSelection& selection = element().document().frame()->selection().selection();
|
| - selectionLength = plainText(selection.toNormalizedEphemeralRange()).length();
|
| + selectionLength = element().document().frame()->selection().selectedText().length();
|
| }
|
| ASSERT(oldLength >= selectionLength);
|
|
|
|
|