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

Unified Diff: Source/core/html/HTMLInputElement.idl

Issue 1229133004: Add SelectionMode enum for setRangeText() in HTMLInputElement and HTMLTextAreaElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix for failing tests Created 5 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/HTMLInputElement.idl
diff --git a/Source/core/html/HTMLInputElement.idl b/Source/core/html/HTMLInputElement.idl
index 95719d087bc693a2201df40f4b7de824ccd953cb..cdaed213535a8b7801884bb6f0918d0e3e3d12a3 100644
--- a/Source/core/html/HTMLInputElement.idl
+++ b/Source/core/html/HTMLInputElement.idl
@@ -21,6 +21,8 @@
// https://html.spec.whatwg.org/#the-input-element
+enum SelectionMode { "select", "start", "end", "preserve" };
+
interface HTMLInputElement : HTMLElement {
[Reflect] attribute DOMString accept;
[Reflect] attribute DOMString alt;
@@ -83,11 +85,10 @@ interface HTMLInputElement : HTMLElement {
[RaisesException, ImplementedAs=selectionEndForBinding] attribute long selectionEnd;
[RaisesException, ImplementedAs=selectionDirectionForBinding] attribute DOMString selectionDirection;
[RaisesException] void setRangeText(DOMString replacement);
- // FIXME: The selectionMode argument should be a SelectionMode enum.
[RaisesException] void setRangeText(DOMString replacement,
unsigned long start,
unsigned long end,
- optional DOMString selectionMode = "preserve");
+ optional SelectionMode selectionMode = "preserve");
// FIXME: The start and end arguments should be unsigned long and should not have [Default=Undefined].
[RaisesException, ImplementedAs=setSelectionRangeForBinding]
void setSelectionRange([Default=Undefined] optional long start,
« no previous file with comments | « LayoutTests/fast/forms/textarea/textarea-setrangetext-expected.txt ('k') | Source/core/html/HTMLTextAreaElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698