OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
3 * Copyright (C) 2009 Google Inc. All rights reserved. | 3 * Copyright (C) 2009 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 14 matching lines...) Expand all Loading... |
25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
28 */ | 28 */ |
29 | 29 |
30 // http://w3c.github.io/selection-api/#idl-def-Selection | 30 // http://w3c.github.io/selection-api/#idl-def-Selection |
31 | 31 |
32 // TODO(yoichio): All long types should be unsigned long. crbug.com/391673 | 32 // TODO(yoichio): All long types should be unsigned long. crbug.com/391673 |
33 [ | 33 [ |
34 ImplementedAs=DOMSelection, | 34 ImplementedAs=DOMSelection, |
35 GarbageCollected, | |
36 ] interface Selection { | 35 ] interface Selection { |
37 [MeasureAs=SelectionAnchorNode] readonly attribute Node? anchorNode; | 36 [MeasureAs=SelectionAnchorNode] readonly attribute Node? anchorNode; |
38 [MeasureAs=SelectionAnchorOffset] readonly attribute long anchorOffset; | 37 [MeasureAs=SelectionAnchorOffset] readonly attribute long anchorOffset; |
39 [MeasureAs=SelectionFocusNode] readonly attribute Node? focusNode; | 38 [MeasureAs=SelectionFocusNode] readonly attribute Node? focusNode; |
40 [MeasureAs=SelectionFocusOffset] readonly attribute long focusOffset; | 39 [MeasureAs=SelectionFocusOffset] readonly attribute long focusOffset; |
41 [MeasureAs=SelectionIsCollapsed] readonly attribute boolean isCollapsed; | 40 [MeasureAs=SelectionIsCollapsed] readonly attribute boolean isCollapsed; |
42 [MeasureAs=SelectionRangeCount] readonly attribute long rangeCount; | 41 [MeasureAs=SelectionRangeCount] readonly attribute long rangeCount; |
43 [MeasureAs=SelectionType] readonly attribute DOMString type; | 42 [MeasureAs=SelectionType] readonly attribute DOMString type; |
44 [MeasureAs=SelectionGetRangeAt, RaisesException] Range getRangeAt(long index
); | 43 [MeasureAs=SelectionGetRangeAt, RaisesException] Range getRangeAt(long index
); |
45 [MeasureAs=SelectionAddRange] void addRange(Range range); | 44 [MeasureAs=SelectionAddRange] void addRange(Range range); |
(...skipping 27 matching lines...) Expand all Loading... |
73 [MeasureAs=SelectionBaseNode] readonly attribute Node? baseNode; | 72 [MeasureAs=SelectionBaseNode] readonly attribute Node? baseNode; |
74 [MeasureAs=SelectionBaseOffset] readonly attribute long baseOffset; | 73 [MeasureAs=SelectionBaseOffset] readonly attribute long baseOffset; |
75 [MeasureAs=SelectionExtentNode] readonly attribute Node? extentNode; | 74 [MeasureAs=SelectionExtentNode] readonly attribute Node? extentNode; |
76 [MeasureAs=SelectionExtentOffset] readonly attribute long extentOffset; | 75 [MeasureAs=SelectionExtentOffset] readonly attribute long extentOffset; |
77 | 76 |
78 // https://github.com/w3c/selection-api/issues/37 | 77 // https://github.com/w3c/selection-api/issues/37 |
79 [MeasureAs=SelectionModify] void modify([Default=Undefined] optional DOMStri
ng alter, | 78 [MeasureAs=SelectionModify] void modify([Default=Undefined] optional DOMStri
ng alter, |
80 [Default=Undefined] optional DOMStri
ng direction, | 79 [Default=Undefined] optional DOMStri
ng direction, |
81 [Default=Undefined] optional DOMStri
ng granularity); | 80 [Default=Undefined] optional DOMStri
ng granularity); |
82 }; | 81 }; |
OLD | NEW |