| 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 WillBeGarbageCollected, | 35 GarbageCollected, |
| 36 ] interface Selection { | 36 ] interface Selection { |
| 37 [MeasureAs=SelectionAnchorNode] readonly attribute Node? anchorNode; | 37 [MeasureAs=SelectionAnchorNode] readonly attribute Node? anchorNode; |
| 38 [MeasureAs=SelectionAnchorOffset] readonly attribute long anchorOffset; | 38 [MeasureAs=SelectionAnchorOffset] readonly attribute long anchorOffset; |
| 39 [MeasureAs=SelectionFocusNode] readonly attribute Node? focusNode; | 39 [MeasureAs=SelectionFocusNode] readonly attribute Node? focusNode; |
| 40 [MeasureAs=SelectionFocusOffset] readonly attribute long focusOffset; | 40 [MeasureAs=SelectionFocusOffset] readonly attribute long focusOffset; |
| 41 [MeasureAs=SelectionIsCollapsed] readonly attribute boolean isCollapsed; | 41 [MeasureAs=SelectionIsCollapsed] readonly attribute boolean isCollapsed; |
| 42 [MeasureAs=SelectionRangeCount] readonly attribute long rangeCount; | 42 [MeasureAs=SelectionRangeCount] readonly attribute long rangeCount; |
| 43 [MeasureAs=SelectionType] readonly attribute DOMString type; | 43 [MeasureAs=SelectionType] readonly attribute DOMString type; |
| 44 [MeasureAs=SelectionGetRangeAt, RaisesException] Range getRangeAt(long index
); | 44 [MeasureAs=SelectionGetRangeAt, RaisesException] Range getRangeAt(long index
); |
| 45 [MeasureAs=SelectionAddRange] void addRange(Range range); | 45 [MeasureAs=SelectionAddRange] void addRange(Range range); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 73 [MeasureAs=SelectionBaseNode] readonly attribute Node? baseNode; | 73 [MeasureAs=SelectionBaseNode] readonly attribute Node? baseNode; |
| 74 [MeasureAs=SelectionBaseOffset] readonly attribute long baseOffset; | 74 [MeasureAs=SelectionBaseOffset] readonly attribute long baseOffset; |
| 75 [MeasureAs=SelectionExtentNode] readonly attribute Node? extentNode; | 75 [MeasureAs=SelectionExtentNode] readonly attribute Node? extentNode; |
| 76 [MeasureAs=SelectionExtentOffset] readonly attribute long extentOffset; | 76 [MeasureAs=SelectionExtentOffset] readonly attribute long extentOffset; |
| 77 | 77 |
| 78 // https://github.com/w3c/selection-api/issues/37 | 78 // https://github.com/w3c/selection-api/issues/37 |
| 79 [MeasureAs=SelectionModify] void modify([Default=Undefined] optional DOMStri
ng alter, | 79 [MeasureAs=SelectionModify] void modify([Default=Undefined] optional DOMStri
ng alter, |
| 80 [Default=Undefined] optional DOMStri
ng direction, | 80 [Default=Undefined] optional DOMStri
ng direction, |
| 81 [Default=Undefined] optional DOMStri
ng granularity); | 81 [Default=Undefined] optional DOMStri
ng granularity); |
| 82 }; | 82 }; |
| OLD | NEW |