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

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

Issue 1308663003: The node and allowPartialContainment arguments for Selection API should not be optional (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 months 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
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 // TODO(philipj): The offset argument should not have a default value. 53 // TODO(philipj): The offset argument should not have a default value.
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 // 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 should be optional. 56 // focusNode and focusOffset, and none of them should be optional.
57 [MeasureAs=SelectionSetBaseAndExtent, RaisesException] void setBaseAndExtent ([Default=Undefined] optional Node baseNode, 57 [MeasureAs=SelectionSetBaseAndExtent, RaisesException] void setBaseAndExtent ([Default=Undefined] optional Node baseNode,
58 [Default=Undefined] optional long baseOffset, 58 [Default=Undefined] optional long baseOffset,
59 [Default=Undefined] optional Node extentNode, 59 [Default=Undefined] optional Node extentNode,
60 [Default=Undefined] optional long extentOffset); 60 [Default=Undefined] optional long extentOffset);
61 [RaisesException, TypeChecking=Interface] void selectAllChildren(Node node); 61 [RaisesException, TypeChecking=Interface] void selectAllChildren(Node node);
62 [CustomElementCallbacks] void deleteFromDocument(); 62 [CustomElementCallbacks] void deleteFromDocument();
63 // TODO(philipj): The arguments should not be optional. 63 [MeasureAs=SelectionContainsNode] boolean containsNode(Node node, boolean al lowPartialContainment);
philipj_slow 2015/08/27 09:15:32 Please also add TypeChecking=Interface so that pas
tanay.c 2015/08/28 08:52:32 Done.
64 [MeasureAs=SelectionContainsNode] boolean containsNode([Default=Undefined] o ptional Node node, [Default=Undefined] optional boolean allowPartialContainment) ;
65 // TODO(philipj): The spec does not use [NotEnumerable]. See also: 64 // TODO(philipj): The spec does not use [NotEnumerable]. See also:
66 // https://codereview.chromium.org/345983004/ 65 // https://codereview.chromium.org/345983004/
67 // https://www.w3.org/Bugs/Public/show_bug.cgi?id=26179 66 // https://www.w3.org/Bugs/Public/show_bug.cgi?id=26179
68 [NotEnumerable] stringifier DOMString (); 67 [NotEnumerable] stringifier DOMString ();
69 68
70 // Non-standard APIs 69 // Non-standard APIs
71 70
72 // https://github.com/w3c/selection-api/issues/34 71 // https://github.com/w3c/selection-api/issues/34
73 [MeasureAs=SelectionBaseNode] readonly attribute Node? baseNode; 72 [MeasureAs=SelectionBaseNode] readonly attribute Node? baseNode;
74 [MeasureAs=SelectionBaseOffset] readonly attribute long baseOffset; 73 [MeasureAs=SelectionBaseOffset] readonly attribute long baseOffset;
75 [MeasureAs=SelectionExtentNode] readonly attribute Node? extentNode; 74 [MeasureAs=SelectionExtentNode] readonly attribute Node? extentNode;
76 [MeasureAs=SelectionExtentOffset] readonly attribute long extentOffset; 75 [MeasureAs=SelectionExtentOffset] readonly attribute long extentOffset;
77 76
78 // https://github.com/w3c/selection-api/issues/14 77 // https://github.com/w3c/selection-api/issues/14
79 [MeasureAs=SelectionType] readonly attribute DOMString type; 78 [MeasureAs=SelectionType] readonly attribute DOMString type;
80 79
81 // https://github.com/w3c/selection-api/issues/36 80 // https://github.com/w3c/selection-api/issues/36
82 [MeasureAs=SelectionEmpty] void empty(); 81 [MeasureAs=SelectionEmpty] void empty();
83 82
84 // https://github.com/w3c/selection-api/issues/37 83 // https://github.com/w3c/selection-api/issues/37
85 [MeasureAs=SelectionModify] void modify([Default=Undefined] optional DOMStri ng alter, 84 [MeasureAs=SelectionModify] void modify([Default=Undefined] optional DOMStri ng alter,
86 [Default=Undefined] optional DOMStri ng direction, 85 [Default=Undefined] optional DOMStri ng direction,
87 [Default=Undefined] optional DOMStri ng granularity); 86 [Default=Undefined] optional DOMStri ng granularity);
88 87
89 // https://github.com/w3c/selection-api/issues/38 88 // https://github.com/w3c/selection-api/issues/38
90 [ImplementedAs=collapse, MeasureAs=SelectionSetPosition, RaisesException] vo id setPosition(Node? node, optional long offset = 0); 89 [ImplementedAs=collapse, MeasureAs=SelectionSetPosition, RaisesException] vo id setPosition(Node? node, optional long offset = 0);
91 }; 90 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698