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

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

Issue 392573002: HTMLTextAreaElement.setSelectionRange should not change focus. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rename FocusOption Created 6 years, 5 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: Source/core/html/HTMLTextFormControlElement.h
diff --git a/Source/core/html/HTMLTextFormControlElement.h b/Source/core/html/HTMLTextFormControlElement.h
index 403de83eea28b98e7b560dd8a8ed0336f897da55..666179d97901c5ab56f1f6c06755b62557428e42 100644
--- a/Source/core/html/HTMLTextFormControlElement.h
+++ b/Source/core/html/HTMLTextFormControlElement.h
@@ -42,6 +42,11 @@ class HTMLTextFormControlElement : public HTMLFormControlElementWithState {
public:
// Common flag for HTMLInputElement::tooLong() and HTMLTextAreaElement::tooLong().
enum NeedsToCheckDirtyFlag {CheckDirtyFlag, IgnoreDirtyFlag};
+ // Option of setSelectionRange.
+ enum FocusOption {
+ NotChangeFocus,
+ ChangeFocus
+ };
virtual ~HTMLTextFormControlElement();
@@ -69,7 +74,7 @@ public:
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);
- void setSelectionRange(int start, int end, TextFieldSelectionDirection = SelectionHasNoDirection);
+ void setSelectionRange(int start, int end, TextFieldSelectionDirection = SelectionHasNoDirection, FocusOption = NotChangeFocus);
PassRefPtrWillBeRawPtr<Range> selection() const;
virtual void dispatchFormControlChangeEvent() OVERRIDE FINAL;

Powered by Google App Engine
This is Rietveld 408576698