Bug 1359387 - Support Selection.empty()/setPosition() r=masayuki,smaug

Blink, WebKit, and Edge already support these, and they're in the spec.
Tests submitted to wpt upstream.

MozReview-Commit-ID: 5NFBeClNN7y

--HG--
extra : rebase_source : ea073639904e1ae9449990827ad32626aa6267d9
This commit is contained in:
Aryeh Gregor 2017-04-25 15:49:27 +03:00
parent 055f41ca82
commit 99eb2c1bc7
2 changed files with 4 additions and 17 deletions

View File

@ -26,10 +26,12 @@ interface Selection {
void removeRange(Range range);
[Throws]
void removeAllRanges();
//void empty();
[Throws, BinaryName="RemoveAllRanges"]
void empty();
[Throws, BinaryName="collapseJS"]
void collapse(Node? node, optional unsigned long offset = 0);
//void setPosition(Node? node, optional unsigned long offset = 0);
[Throws, BinaryName="collapseJS"]
void setPosition(Node? node, optional unsigned long offset = 0);
[Throws, BinaryName="collapseToStartJS"]
void collapseToStart();
[Throws, BinaryName="collapseToEndJS"]

View File

@ -3,21 +3,6 @@
[Selection interface: attribute type]
expected: FAIL
[Selection interface: operation empty()]
expected: FAIL
[Selection interface: operation setPosition(Node,unsigned long)]
expected: FAIL
[Selection interface: getSelection() must inherit property "type" with the proper type (6)]
expected: FAIL
[Selection interface: getSelection() must inherit property "empty" with the proper type (11)]
expected: FAIL
[Selection interface: getSelection() must inherit property "setPosition" with the proper type (13)]
expected: FAIL
[Selection interface: calling setPosition(Node,unsigned long) on getSelection() with too few arguments must throw TypeError]
expected: FAIL