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

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: Fix tests 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
« no previous file with comments | « Source/core/html/HTMLTextAreaElement.cpp ('k') | Source/core/html/HTMLTextFormControlElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLTextFormControlElement.h
diff --git a/Source/core/html/HTMLTextFormControlElement.h b/Source/core/html/HTMLTextFormControlElement.h
index 6a36f2b5fbe8af6e6d6ff4d97051e3467f2c583a..e27eabcf5a3ad2b1c1a7b4c4d34982ab353d83d2 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 SelectionOption {
+ ChangeSelection,
+ NotChangeSelection
+ };
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, SelectionOption = ChangeSelection);
PassRefPtrWillBeRawPtr<Range> selection() const;
virtual void dispatchFormControlChangeEvent() OVERRIDE FINAL;
« no previous file with comments | « Source/core/html/HTMLTextAreaElement.cpp ('k') | Source/core/html/HTMLTextFormControlElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698