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

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

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
Index: third_party/WebKit/Source/core/html/HTMLTextFormControlElement.h
diff --git a/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.h b/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.h
index 55e3f2008a0723e4f33e0f242ebab0732b41bba0..b4e03dfba403de8dae408db3ade09efab1ee7c6e 100644
--- a/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.h
@@ -70,7 +70,11 @@ public:
void select(NeedToDispatchSelectEvent = DispatchSelectEvent);
virtual void setRangeText(const String& replacement, ExceptionState&);
virtual void setRangeText(const String& replacement, unsigned start, unsigned end, const String& selectionMode, ExceptionState&);
- void setSelectionRange(int start, int end, const String& direction);
+ // Web-exposed setSelectionRange() function. This translates "none"
+ // direction to "forward" if necessary.
+ void setSelectionRangeForBinding(int start, int end, const String& direction = "none");
+ // Blink-internal version of setSelectionRange(). This never translates
+ // "none" direction.
void setSelectionRange(int start, int end, TextFieldSelectionDirection = SelectionHasNoDirection, NeedToDispatchSelectEvent = DispatchSelectEvent);
Range* selection() const;

Powered by Google App Engine
This is Rietveld 408576698