| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 // TODO(yoichio): Implement removeRange. crbug.com/391673 | 46 // TODO(yoichio): Implement removeRange. crbug.com/391673 |
| 47 //void removeRange(Range range); | 47 //void removeRange(Range range); |
| 48 [MeasureAs=SelectionRemoveAllRanges] void removeAllRanges(); | 48 [MeasureAs=SelectionRemoveAllRanges] void removeAllRanges(); |
| 49 [MeasureAs=SelectionEmpty] void empty(); | 49 [MeasureAs=SelectionEmpty] void empty(); |
| 50 [MeasureAs=SelectionCollapse, RaisesException] void collapse(Node? node, opt
ional long offset = 0); | 50 [MeasureAs=SelectionCollapse, RaisesException] void collapse(Node? node, opt
ional long offset = 0); |
| 51 [ImplementedAs=collapse, MeasureAs=SelectionSetPosition, RaisesException] vo
id setPosition(Node? node, optional long offset = 0); | 51 [ImplementedAs=collapse, MeasureAs=SelectionSetPosition, RaisesException] vo
id setPosition(Node? node, optional long offset = 0); |
| 52 [MeasureAs=SelectionCollapseToStart, RaisesException] void collapseToStart()
; | 52 [MeasureAs=SelectionCollapseToStart, RaisesException] void collapseToStart()
; |
| 53 [MeasureAs=SelectionCollapseToEnd, RaisesException] void collapseToEnd(); | 53 [MeasureAs=SelectionCollapseToEnd, RaisesException] void collapseToEnd(); |
| 54 [MeasureAs=SelectionExtend, RaisesException] void extend(Node node, optional
long offset = 0); | 54 [MeasureAs=SelectionExtend, RaisesException] void extend(Node node, optional
long offset = 0); |
| 55 // TODO(philipj): The arguments should be anchorNode, anchorOffset, | 55 // TODO(philipj): The arguments should be anchorNode, anchorOffset, |
| 56 // focusNode and focusOffset, and none of them are optional or nullable in | 56 // focusNode and focusOffset, and none of them are nullable in the spec. |
| 57 // the spec. | 57 [MeasureAs=SelectionSetBaseAndExtent, RaisesException] void setBaseAndExtent
(Node? baseNode, long baseOffset, |
| 58 [MeasureAs=SelectionSetBaseAndExtent, RaisesException] void setBaseAndExtent
([Default=Undefined] optional Node? baseNode, | 58
Node? extentNode, long extentOffset); |
| 59
[Default=Undefined] optional long baseOffset, | |
| 60
[Default=Undefined] optional Node? extentNode, | |
| 61
[Default=Undefined] optional long extentOffset); | |
| 62 [MeasureAs=SelectionSelectAllChildren, RaisesException] void selectAllChildr
en(Node node); | 59 [MeasureAs=SelectionSelectAllChildren, RaisesException] void selectAllChildr
en(Node node); |
| 63 [MeasureAs=SelectionDeleteDromDocument, CustomElementCallbacks] void deleteF
romDocument(); | 60 [MeasureAs=SelectionDeleteDromDocument, CustomElementCallbacks] void deleteF
romDocument(); |
| 64 [MeasureAs=SelectionContainsNode] boolean containsNode(Node node, optional b
oolean allowPartialContainment = false); | 61 [MeasureAs=SelectionContainsNode] boolean containsNode(Node node, optional b
oolean allowPartialContainment = false); |
| 65 // TODO(philipj): The spec does not use [NotEnumerable]. See also: | 62 // TODO(philipj): The spec does not use [NotEnumerable]. See also: |
| 66 // https://codereview.chromium.org/345983004/ | 63 // https://codereview.chromium.org/345983004/ |
| 67 // https://www.w3.org/Bugs/Public/show_bug.cgi?id=26179 | 64 // https://www.w3.org/Bugs/Public/show_bug.cgi?id=26179 |
| 68 [MeasureAs=SelectionDOMString, NotEnumerable] stringifier DOMString(); | 65 [MeasureAs=SelectionDOMString, NotEnumerable] stringifier DOMString(); |
| 69 | 66 |
| 70 // Non-standard APIs | 67 // Non-standard APIs |
| 71 | 68 |
| 72 // https://github.com/w3c/selection-api/issues/34 | 69 // https://github.com/w3c/selection-api/issues/34 |
| 73 [MeasureAs=SelectionBaseNode] readonly attribute Node? baseNode; | 70 [MeasureAs=SelectionBaseNode] readonly attribute Node? baseNode; |
| 74 [MeasureAs=SelectionBaseOffset] readonly attribute long baseOffset; | 71 [MeasureAs=SelectionBaseOffset] readonly attribute long baseOffset; |
| 75 [MeasureAs=SelectionExtentNode] readonly attribute Node? extentNode; | 72 [MeasureAs=SelectionExtentNode] readonly attribute Node? extentNode; |
| 76 [MeasureAs=SelectionExtentOffset] readonly attribute long extentOffset; | 73 [MeasureAs=SelectionExtentOffset] readonly attribute long extentOffset; |
| 77 | 74 |
| 78 // https://github.com/w3c/selection-api/issues/37 | 75 // https://github.com/w3c/selection-api/issues/37 |
| 79 [MeasureAs=SelectionModify] void modify([Default=Undefined] optional DOMStri
ng alter, | 76 [MeasureAs=SelectionModify] void modify([Default=Undefined] optional DOMStri
ng alter, |
| 80 [Default=Undefined] optional DOMStri
ng direction, | 77 [Default=Undefined] optional DOMStri
ng direction, |
| 81 [Default=Undefined] optional DOMStri
ng granularity); | 78 [Default=Undefined] optional DOMStri
ng granularity); |
| 82 }; | 79 }; |
| OLD | NEW |