Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1008)

Side by Side Diff: third_party/WebKit/Source/core/editing/Selection.idl

Issue 1498253002: Drop [LegacyInterfaceTypeChecking] for most of Selection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update tests Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/editing/DOMSelection.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 24 matching lines...) Expand all
35 WillBeGarbageCollected, 35 WillBeGarbageCollected,
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, LegacyInterfaceTypeChecking] void addRange(Ran ge range); 45 [MeasureAs=SelectionAddRange] void addRange(Range range);
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 // TODO(yoichio): The node argument should not be nullable. crbug.com/391673
51 // TODO(philipj): The offset argument should not have a default value. 50 // TODO(philipj): The offset argument should not have a default value.
52 [MeasureAs=SelectionCollapse, RaisesException, LegacyInterfaceTypeChecking] void collapse(Node? node, optional long offset = 0); 51 [MeasureAs=SelectionCollapse, RaisesException] void collapse(Node node, opti onal long offset = 0);
53 // TODO(yoichio): The node argument should not be nullable. crbug.com/391673
54 // TODO(philipj): The offset argument should not have a default value. 52 // TODO(philipj): The offset argument should not have a default value.
55 [ImplementedAs=collapse, MeasureAs=SelectionSetPosition, RaisesException, Le gacyInterfaceTypeChecking] void setPosition(Node? node, optional long offset = 0 ); 53 [ImplementedAs=collapse, MeasureAs=SelectionSetPosition, RaisesException] vo id setPosition(Node node, optional long offset = 0);
56 [MeasureAs=SelectionCollapseToStart, RaisesException] void collapseToStart() ; 54 [MeasureAs=SelectionCollapseToStart, RaisesException] void collapseToStart() ;
57 [MeasureAs=SelectionCollapseToEnd, RaisesException] void collapseToEnd(); 55 [MeasureAs=SelectionCollapseToEnd, RaisesException] void collapseToEnd();
58 // TODO(philipj): The offset argument should not have a default value. 56 // TODO(philipj): The offset argument should not have a default value.
59 [MeasureAs=SelectionExtend, RaisesException] void extend(Node node, optional long offset = 0); 57 [MeasureAs=SelectionExtend, RaisesException] void extend(Node node, optional long offset = 0);
60 // TODO(philipj): The arguments should be anchorNode, anchorOffset, 58 // TODO(philipj): The arguments should be anchorNode, anchorOffset,
61 // focusNode and focusOffset, and none of them should be optional. 59 // focusNode and focusOffset, and none of them should be optional.
62 [MeasureAs=SelectionSetBaseAndExtent, RaisesException, LegacyInterfaceTypeCh ecking] void setBaseAndExtent([Default=Undefined] optional Node baseNode, 60 [MeasureAs=SelectionSetBaseAndExtent, RaisesException, LegacyInterfaceTypeCh ecking] void setBaseAndExtent([Default=Undefined] optional Node baseNode,
63 [Default=Undefined] optional long baseOffset, 61 [Default=Undefined] optional long baseOffset,
64 [Default=Undefined] optional Node extentNode, 62 [Default=Undefined] optional Node extentNode,
65 [Default=Undefined] optional long extentOffset); 63 [Default=Undefined] optional long extentOffset);
(...skipping 11 matching lines...) Expand all
77 [MeasureAs=SelectionBaseNode] readonly attribute Node? baseNode; 75 [MeasureAs=SelectionBaseNode] readonly attribute Node? baseNode;
78 [MeasureAs=SelectionBaseOffset] readonly attribute long baseOffset; 76 [MeasureAs=SelectionBaseOffset] readonly attribute long baseOffset;
79 [MeasureAs=SelectionExtentNode] readonly attribute Node? extentNode; 77 [MeasureAs=SelectionExtentNode] readonly attribute Node? extentNode;
80 [MeasureAs=SelectionExtentOffset] readonly attribute long extentOffset; 78 [MeasureAs=SelectionExtentOffset] readonly attribute long extentOffset;
81 79
82 // https://github.com/w3c/selection-api/issues/37 80 // https://github.com/w3c/selection-api/issues/37
83 [MeasureAs=SelectionModify] void modify([Default=Undefined] optional DOMStri ng alter, 81 [MeasureAs=SelectionModify] void modify([Default=Undefined] optional DOMStri ng alter,
84 [Default=Undefined] optional DOMStri ng direction, 82 [Default=Undefined] optional DOMStri ng direction,
85 [Default=Undefined] optional DOMStri ng granularity); 83 [Default=Undefined] optional DOMStri ng granularity);
86 }; 84 };
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/DOMSelection.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698