| 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 = 0); | 48 [RaisesException] 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 // 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. |
| 53 // http://crbug.com/384966 | 53 // http://crbug.com/384966 |
| 54 [RaisesException, TypeChecking=Interface] void extend(Node node, optional lo
ng offset = 0); | 54 [RaisesException, TypeChecking=Interface] void extend(Node node, optional lo
ng offset = 0); |
| 55 | 55 |
| 56 [RaisesException] void selectAllChildren([Default=Undefined] optional Node n
ode); | 56 [RaisesException] void selectAllChildren([Default=Undefined] optional Node n
ode); |
| 57 [CustomElementCallbacks] void deleteFromDocument(); | 57 [CustomElementCallbacks] void deleteFromDocument(); |
| 58 | 58 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 78 // IE's type accessor returns "none", "text" and "control" | 78 // IE's type accessor returns "none", "text" and "control" |
| 79 [MeasureAs=SelectionType] readonly attribute DOMString type; | 79 [MeasureAs=SelectionType] readonly attribute DOMString type; |
| 80 | 80 |
| 81 [MeasureAs=SelectionModify] void modify([Default=Undefined] optional DOMStri
ng alter, | 81 [MeasureAs=SelectionModify] void modify([Default=Undefined] optional DOMStri
ng alter, |
| 82 [Default=Undefined] optional DOMStri
ng direction, | 82 [Default=Undefined] optional DOMStri
ng direction, |
| 83 [Default=Undefined] optional DOMStri
ng granularity); | 83 [Default=Undefined] optional DOMStri
ng granularity); |
| 84 [MeasureAs=SelectionSetBaseAndExtent, RaisesException] void setBaseAndExtent
([Default=Undefined] optional Node baseNode, | 84 [MeasureAs=SelectionSetBaseAndExtent, RaisesException] void setBaseAndExtent
([Default=Undefined] optional Node baseNode, |
| 85
[Default=Undefined] optional long baseOffset, | 85
[Default=Undefined] optional long baseOffset, |
| 86
[Default=Undefined] optional Node extentNode, | 86
[Default=Undefined] optional Node extentNode, |
| 87
[Default=Undefined] optional long extentOffset); | 87
[Default=Undefined] optional long extentOffset); |
| 88 [ImplementedAs=collapse, MeasureAs=SelectionSetPosition, RaisesException, Ty
peChecking=Interface] void setPosition(Node node, | 88 [ImplementedAs=collapse, MeasureAs=SelectionSetPosition, RaisesException] vo
id setPosition(Node? node, optional long offset = 0); |
| 89
optional long offset = 0); | |
| 90 | 89 |
| 91 // IE extensions | 90 // IE extensions |
| 92 // http://msdn.microsoft.com/en-us/library/ms535869(VS.85).aspx | 91 // http://msdn.microsoft.com/en-us/library/ms535869(VS.85).aspx |
| 93 [MeasureAs=SelectionEmpty] void empty(); | 92 [MeasureAs=SelectionEmpty] void empty(); |
| 94 }; | 93 }; |
| OLD | NEW |