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 27 matching lines...) Expand all Loading... |
38 [ | 38 [ |
39 ImplementedAs=DOMSelection, | 39 ImplementedAs=DOMSelection, |
40 WillBeGarbageCollected, | 40 WillBeGarbageCollected, |
41 ] interface Selection { | 41 ] interface Selection { |
42 readonly attribute Node anchorNode; | 42 readonly attribute Node anchorNode; |
43 readonly attribute long anchorOffset; | 43 readonly attribute long anchorOffset; |
44 readonly attribute Node focusNode; | 44 readonly attribute Node focusNode; |
45 readonly attribute long focusOffset; | 45 readonly attribute long focusOffset; |
46 | 46 |
47 readonly attribute boolean isCollapsed; | 47 readonly attribute boolean isCollapsed; |
48 [RaisesException, TypeChecking=Interface] void collapse(Node node, optional
long offset); | 48 [RaisesException, TypeChecking=Interface] void collapse(Node node, optional
long offset = 0); |
49 [RaisesException] void collapseToStart(); | 49 [RaisesException] void collapseToStart(); |
50 [RaisesException] void collapseToEnd(); | 50 [RaisesException] void collapseToEnd(); |
51 | 51 |
52 // FIXME: should be: optional long offset = 0 http://crbug.com/258153 | |
53 // We mark offset as optional, defaulting to 0; this differs from spec. | 52 // We mark offset as optional, defaulting to 0; this differs from spec. |
54 // http://crbug.com/384966 | 53 // http://crbug.com/384966 |
55 [RaisesException, TypeChecking=Interface] void extend(Node node, optional lo
ng offset); | 54 [RaisesException, TypeChecking=Interface] void extend(Node node, optional lo
ng offset = 0); |
56 | 55 |
57 [RaisesException] void selectAllChildren([Default=Undefined] optional Node n
ode); | 56 [RaisesException] void selectAllChildren([Default=Undefined] optional Node n
ode); |
58 [CustomElementCallbacks] void deleteFromDocument(); | 57 [CustomElementCallbacks] void deleteFromDocument(); |
59 | 58 |
60 readonly attribute long rangeCount; | 59 readonly attribute long rangeCount; |
61 [RaisesException] Range getRangeAt([Default=Undefined] optional long index); | 60 [RaisesException] Range getRangeAt([Default=Undefined] optional long index); |
62 void addRange([Default=Undefined] optional Range range); | 61 void addRange([Default=Undefined] optional Range range); |
63 void removeAllRanges(); | 62 void removeAllRanges(); |
64 | 63 |
65 [NotEnumerable] stringifier; | 64 [NotEnumerable] stringifier; |
(...skipping 15 matching lines...) Expand all Loading... |
81 [MeasureAs=SelectionType] readonly attribute DOMString type; | 80 [MeasureAs=SelectionType] readonly attribute DOMString type; |
82 | 81 |
83 [MeasureAs=SelectionModify] void modify([Default=Undefined] optional DOMStri
ng alter, | 82 [MeasureAs=SelectionModify] void modify([Default=Undefined] optional DOMStri
ng alter, |
84 [Default=Undefined] optional DOMStri
ng direction, | 83 [Default=Undefined] optional DOMStri
ng direction, |
85 [Default=Undefined] optional DOMStri
ng granularity); | 84 [Default=Undefined] optional DOMStri
ng granularity); |
86 [MeasureAs=SelectionSetBaseAndExtent, RaisesException] void setBaseAndExtent
([Default=Undefined] optional Node baseNode, | 85 [MeasureAs=SelectionSetBaseAndExtent, RaisesException] void setBaseAndExtent
([Default=Undefined] optional Node baseNode, |
87
[Default=Undefined] optional long baseOffset, | 86
[Default=Undefined] optional long baseOffset, |
88
[Default=Undefined] optional Node extentNode, | 87
[Default=Undefined] optional Node extentNode, |
89
[Default=Undefined] optional long extentOffset); | 88
[Default=Undefined] optional long extentOffset); |
90 [ImplementedAs=collapse, MeasureAs=SelectionSetPosition, RaisesException, Ty
peChecking=Interface] void setPosition(Node node, | 89 [ImplementedAs=collapse, MeasureAs=SelectionSetPosition, RaisesException, Ty
peChecking=Interface] void setPosition(Node node, |
91
optional long offset); | 90
optional long offset = 0); |
92 | 91 |
93 // IE extensions | 92 // IE extensions |
94 // http://msdn.microsoft.com/en-us/library/ms535869(VS.85).aspx | 93 // http://msdn.microsoft.com/en-us/library/ms535869(VS.85).aspx |
95 [MeasureAs=SelectionEmpty] void empty(); | 94 [MeasureAs=SelectionEmpty] void empty(); |
96 }; | 95 }; |
OLD | NEW |