| 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 69c4a8318aa39f32b394c7b000264e0236600065..7f460d1cbd33193a2f5614bd94a902f82cca5996 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);
|
|
|
|
|