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

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

Issue 1785663002: Make setBaseAndExtent's arguments non-optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use collapse() where possible (one test) Created 4 years, 8 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/dom/script-tests/non-numeric-values-numeric-parameters.js ('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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // TODO(yoichio): Implement removeRange. crbug.com/391673 45 // TODO(yoichio): Implement removeRange. crbug.com/391673
46 //void removeRange(Range range); 46 //void removeRange(Range range);
47 [MeasureAs=SelectionRemoveAllRanges] void removeAllRanges(); 47 [MeasureAs=SelectionRemoveAllRanges] void removeAllRanges();
48 [MeasureAs=SelectionEmpty] void empty(); 48 [MeasureAs=SelectionEmpty] void empty();
49 [MeasureAs=SelectionCollapse, RaisesException] void collapse(Node? node, opt ional long offset = 0); 49 [MeasureAs=SelectionCollapse, RaisesException] void collapse(Node? node, opt ional long offset = 0);
50 [ImplementedAs=collapse, MeasureAs=SelectionSetPosition, RaisesException] vo id setPosition(Node? node, optional long offset = 0); 50 [ImplementedAs=collapse, MeasureAs=SelectionSetPosition, RaisesException] vo id setPosition(Node? node, optional long offset = 0);
51 [MeasureAs=SelectionCollapseToStart, RaisesException] void collapseToStart() ; 51 [MeasureAs=SelectionCollapseToStart, RaisesException] void collapseToStart() ;
52 [MeasureAs=SelectionCollapseToEnd, RaisesException] void collapseToEnd(); 52 [MeasureAs=SelectionCollapseToEnd, RaisesException] void collapseToEnd();
53 [MeasureAs=SelectionExtend, RaisesException] void extend(Node node, optional long offset = 0); 53 [MeasureAs=SelectionExtend, RaisesException] void extend(Node node, optional long offset = 0);
54 // TODO(philipj): The arguments should be anchorNode, anchorOffset, 54 // TODO(philipj): The arguments should be anchorNode, anchorOffset,
55 // focusNode and focusOffset, and none of them are optional or nullable in 55 // focusNode and focusOffset, and none of them are nullable in the spec.
56 // the spec. 56 [MeasureAs=SelectionSetBaseAndExtent, RaisesException] void setBaseAndExtent (Node? baseNode, long baseOffset,
57 [MeasureAs=SelectionSetBaseAndExtent, RaisesException] void setBaseAndExtent ([Default=Undefined] optional Node? baseNode, 57 Node? extentNode, long extentOffset);
58 [Default=Undefined] optional long baseOffset,
59 [Default=Undefined] optional Node? extentNode,
60 [Default=Undefined] optional long extentOffset);
61 [MeasureAs=SelectionSelectAllChildren, RaisesException] void selectAllChildr en(Node node); 58 [MeasureAs=SelectionSelectAllChildren, RaisesException] void selectAllChildr en(Node node);
62 [MeasureAs=SelectionDeleteDromDocument, CustomElementCallbacks] void deleteF romDocument(); 59 [MeasureAs=SelectionDeleteDromDocument, CustomElementCallbacks] void deleteF romDocument();
63 [MeasureAs=SelectionContainsNode] boolean containsNode(Node node, optional b oolean allowPartialContainment = false); 60 [MeasureAs=SelectionContainsNode] boolean containsNode(Node node, optional b oolean allowPartialContainment = false);
64 // TODO(philipj): The spec does not use [NotEnumerable]. See also: 61 // TODO(philipj): The spec does not use [NotEnumerable]. See also:
65 // https://codereview.chromium.org/345983004/ 62 // https://codereview.chromium.org/345983004/
66 // https://www.w3.org/Bugs/Public/show_bug.cgi?id=26179 63 // https://www.w3.org/Bugs/Public/show_bug.cgi?id=26179
67 [MeasureAs=SelectionDOMString, NotEnumerable] stringifier DOMString(); 64 [MeasureAs=SelectionDOMString, NotEnumerable] stringifier DOMString();
68 65
69 // Non-standard APIs 66 // Non-standard APIs
70 67
71 // https://github.com/w3c/selection-api/issues/34 68 // https://github.com/w3c/selection-api/issues/34
72 [MeasureAs=SelectionBaseNode] readonly attribute Node? baseNode; 69 [MeasureAs=SelectionBaseNode] readonly attribute Node? baseNode;
73 [MeasureAs=SelectionBaseOffset] readonly attribute long baseOffset; 70 [MeasureAs=SelectionBaseOffset] readonly attribute long baseOffset;
74 [MeasureAs=SelectionExtentNode] readonly attribute Node? extentNode; 71 [MeasureAs=SelectionExtentNode] readonly attribute Node? extentNode;
75 [MeasureAs=SelectionExtentOffset] readonly attribute long extentOffset; 72 [MeasureAs=SelectionExtentOffset] readonly attribute long extentOffset;
76 73
77 // https://github.com/w3c/selection-api/issues/37 74 // https://github.com/w3c/selection-api/issues/37
78 [MeasureAs=SelectionModify] void modify([Default=Undefined] optional DOMStri ng alter, 75 [MeasureAs=SelectionModify] void modify([Default=Undefined] optional DOMStri ng alter,
79 [Default=Undefined] optional DOMStri ng direction, 76 [Default=Undefined] optional DOMStri ng direction,
80 [Default=Undefined] optional DOMStri ng granularity); 77 [Default=Undefined] optional DOMStri ng granularity);
81 }; 78 };
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/dom/script-tests/non-numeric-values-numeric-parameters.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698