| Index: Source/core/html/HTMLTextFormControlElement.cpp
|
| diff --git a/Source/core/html/HTMLTextFormControlElement.cpp b/Source/core/html/HTMLTextFormControlElement.cpp
|
| index 51618f9869b0adcc8d1723052a7ace42d41a51db..030a06aa139132c9400c43dced3c5a77cba9e655 100644
|
| --- a/Source/core/html/HTMLTextFormControlElement.cpp
|
| +++ b/Source/core/html/HTMLTextFormControlElement.cpp
|
| @@ -208,7 +208,7 @@ void HTMLTextFormControlElement::dispatchFormControlChangeEvent()
|
|
|
| void HTMLTextFormControlElement::setRangeText(const String& replacement, ExceptionState& exceptionState)
|
| {
|
| - setRangeText(replacement, selectionStart(), selectionEnd(), String(), exceptionState);
|
| + setRangeText(replacement, selectionStart(), selectionEnd(), "preserve", exceptionState);
|
| }
|
|
|
| void HTMLTextFormControlElement::setRangeText(const String& replacement, unsigned start, unsigned end, const String& selectionMode, ExceptionState& exceptionState)
|
| @@ -242,15 +242,15 @@ void HTMLTextFormControlElement::setRangeText(const String& replacement, unsigne
|
|
|
| subtreeHasChanged();
|
|
|
| - if (equalIgnoringCase(selectionMode, "select")) {
|
| + if (selectionMode == "select") {
|
| newSelectionStart = start;
|
| newSelectionEnd = start + replacementLength;
|
| - } else if (equalIgnoringCase(selectionMode, "start")) {
|
| + } else if (selectionMode == "start") {
|
| newSelectionStart = newSelectionEnd = start;
|
| - } else if (equalIgnoringCase(selectionMode, "end")) {
|
| + } else if (selectionMode == "end") {
|
| newSelectionStart = newSelectionEnd = start + replacementLength;
|
| } else {
|
| - // Default is "preserve".
|
| + ASSERT(selectionMode == "preserve");
|
| long delta = replacementLength - (end - start);
|
|
|
| if (newSelectionStart > end)
|
|
|