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

Unified Diff: third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp

Issue 2274103002: setSelectionRange() for INPUT and TEXTAREA should not set "none" direction on non-macOS platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/html/HTMLTextFormControlElement.h ('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/html/HTMLTextFormControlElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp b/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp
index 80514425502d354c84c85db764df903bbdfe8ee0..f65dd4c030df7a0137deda28a5d07d2f31518990 100644
--- a/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp
@@ -174,17 +174,17 @@ void HTMLTextFormControlElement::updatePlaceholderVisibility()
void HTMLTextFormControlElement::setSelectionStart(int start)
{
- setSelectionRange(start, std::max(start, selectionEnd()), selectionDirection());
+ setSelectionRangeForBinding(start, std::max(start, selectionEnd()), selectionDirection());
}
void HTMLTextFormControlElement::setSelectionEnd(int end)
{
- setSelectionRange(std::min(end, selectionStart()), end, selectionDirection());
+ setSelectionRangeForBinding(std::min(end, selectionStart()), end, selectionDirection());
}
void HTMLTextFormControlElement::setSelectionDirection(const String& direction)
{
- setSelectionRange(selectionStart(), selectionEnd(), direction);
+ setSelectionRangeForBinding(selectionStart(), selectionEnd(), direction);
}
void HTMLTextFormControlElement::select(NeedToDispatchSelectEvent eventBehaviour)
@@ -263,7 +263,7 @@ void HTMLTextFormControlElement::setRangeText(const String& replacement, unsigne
setSelectionRange(newSelectionStart, newSelectionEnd, SelectionHasNoDirection);
}
-void HTMLTextFormControlElement::setSelectionRange(int start, int end, const String& directionString)
+void HTMLTextFormControlElement::setSelectionRangeForBinding(int start, int end, const String& directionString)
{
TextFieldSelectionDirection direction = SelectionHasNoDirection;
if (directionString == "forward")
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLTextFormControlElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698