Auto merge of #9905 - saurvs:master, r=ecoal95

Implement input.setSelectionRange

Fixes https://github.com/servo/servo/issues/9862.

Passes all tests for `input` in `tests/wpt/web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange.html`.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9905)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-03-11 06:13:51 +05:30
commit eac68c523b
5 changed files with 130 additions and 91 deletions

View file

@ -62,13 +62,13 @@ interface HTMLInputElement : HTMLElement {
readonly attribute NodeList labels;
//void select();
// attribute unsigned long selectionStart;
// attribute unsigned long selectionEnd;
// attribute DOMString selectionDirection;
attribute unsigned long selectionStart;
attribute unsigned long selectionEnd;
attribute DOMString selectionDirection;
//void setRangeText(DOMString replacement);
//void setRangeText(DOMString replacement, unsigned long start, unsigned long end,
// optional SelectionMode selectionMode = "preserve");
//void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction);
void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction);
// also has obsolete members
};