Auto merge of #10612 - autrilla:textdir, r=emilio

Implement HTMLTextArea.setSelectionRange (continuation of #10007)

Tests on `tests/wpt/web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange.html` all pass and the other tests don't panic due to double borrows anymore.

cc: @KiChjang

Fixes #9994.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10612)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-04-17 21:58:31 +05:30
commit b00c2740e3
7 changed files with 150 additions and 178 deletions

View file

@ -4836,24 +4836,12 @@
[HTMLTextAreaElement interface: operation select()]
expected: FAIL
[HTMLTextAreaElement interface: attribute selectionStart]
expected: FAIL
[HTMLTextAreaElement interface: attribute selectionEnd]
expected: FAIL
[HTMLTextAreaElement interface: attribute selectionDirection]
expected: FAIL
[HTMLTextAreaElement interface: operation setRangeText(DOMString)]
expected: FAIL
[HTMLTextAreaElement interface: operation setRangeText(DOMString,unsigned long,unsigned long,SelectionMode)]
expected: FAIL
[HTMLTextAreaElement interface: operation setSelectionRange(unsigned long,unsigned long,DOMString)]
expected: FAIL
[HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "autocomplete" with the proper type (0)]
expected: FAIL
@ -4899,15 +4887,6 @@
[HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "select" with the proper type (26)]
expected: FAIL
[HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "selectionStart" with the proper type (27)]
expected: FAIL
[HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "selectionEnd" with the proper type (28)]
expected: FAIL
[HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "selectionDirection" with the proper type (29)]
expected: FAIL
[HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "setRangeText" with the proper type (30)]
expected: FAIL
@ -4920,12 +4899,6 @@
[HTMLTextAreaElement interface: calling setRangeText(DOMString,unsigned long,unsigned long,SelectionMode) on document.createElement("textarea") with too few arguments must throw TypeError]
expected: FAIL
[HTMLTextAreaElement interface: document.createElement("textarea") must inherit property "setSelectionRange" with the proper type (32)]
expected: FAIL
[HTMLTextAreaElement interface: calling setSelectionRange(unsigned long,unsigned long,DOMString) on document.createElement("textarea") with too few arguments must throw TypeError]
expected: FAIL
[HTMLKeygenElement interface: existence and properties of interface object]
expected: FAIL

View file

@ -1,59 +0,0 @@
[textfieldselection-setSelectionRange.html]
type: testharness
[textarea typeof(input.setSelectionRange)']
expected: FAIL
[textarea setSelectionRange return void]
expected: FAIL
[textarea setSelectionRange(0,1)]
expected: FAIL
[textarea setSelectionRange(0,textarea.value.length+1)]
expected: FAIL
[textarea setSelectionRange(2,2)]
expected: FAIL
[textarea setSelectionRange(2,1)]
expected: FAIL
[textarea direction of setSelectionRange(0,1,"backward")]
expected: FAIL
[textarea direction of setSelectionRange(0,1,"forward")]
expected: FAIL
[textarea direction of setSelectionRange(0,1,"none")]
expected: FAIL
[textarea direction of setSelectionRange(0,1,"hoge")]
expected: FAIL
[textarea direction of setSelectionRange(0,1,"BACKWARD")]
expected: FAIL
[textarea direction of setSelectionRange(0,1)]
expected: FAIL
[textarea setSelectionRange("string",1)]
expected: FAIL
[textarea setSelectionRange(true,1)]
expected: FAIL
[textarea setSelectionRange([\],1)]
expected: FAIL
[textarea setSelectionRange({},1)]
expected: FAIL
[textarea setSelectionRange(NaN,1)]
expected: FAIL
[textarea setSelectionRange(null,1)]
expected: FAIL
[textarea setSelectionRange(undefined,1)]
expected: FAIL