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

Side by Side Diff: third_party/WebKit/Source/core/editing/SelectionTemplate.h

Issue 2432173005: Get rid of VisibleSelection::selectionFromContentsOfNode() (Closed)
Patch Set: 2016-10-20T17:14:18 Created 4 years, 2 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SelectionTemplate_h 5 #ifndef SelectionTemplate_h
6 #define SelectionTemplate_h 6 #define SelectionTemplate_h
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "core/CoreExport.h" 9 #include "core/CoreExport.h"
10 #include "core/editing/EphemeralRange.h" 10 #include "core/editing/EphemeralRange.h"
(...skipping 28 matching lines...) Expand all
39 39
40 // Move selection to |base|. |base| can't be null. 40 // Move selection to |base|. |base| can't be null.
41 Builder& collapse(const PositionTemplate<Strategy>& base); 41 Builder& collapse(const PositionTemplate<Strategy>& base);
42 Builder& collapse(const PositionWithAffinityTemplate<Strategy>& base); 42 Builder& collapse(const PositionWithAffinityTemplate<Strategy>& base);
43 43
44 // Extend selection to |extent|. It is error if selection is none. 44 // Extend selection to |extent|. It is error if selection is none.
45 // |extent| can be in different tree scope of base, but should be in same 45 // |extent| can be in different tree scope of base, but should be in same
46 // document. 46 // document.
47 Builder& extend(const PositionTemplate<Strategy>& extent); 47 Builder& extend(const PositionTemplate<Strategy>& extent);
48 48
49 // Select all children in |node|.
50 Builder& selectAllChildren(const Node& /* node */);
51
49 Builder& setBaseAndExtent(const EphemeralRangeTemplate<Strategy>&); 52 Builder& setBaseAndExtent(const EphemeralRangeTemplate<Strategy>&);
50 53
51 // |extent| can not be null if |base| isn't null. 54 // |extent| can not be null if |base| isn't null.
52 Builder& setBaseAndExtent(const PositionTemplate<Strategy>& base, 55 Builder& setBaseAndExtent(const PositionTemplate<Strategy>& base,
53 const PositionTemplate<Strategy>& extent); 56 const PositionTemplate<Strategy>& extent);
54 57
55 // |extent| can be non-null while |base| is null, which is undesired. 58 // |extent| can be non-null while |base| is null, which is undesired.
56 // Note: This function should be used only in "core/editing/commands". 59 // Note: This function should be used only in "core/editing/commands".
57 // TODO(yosin): Once all we get rid of all call sites, we remove this. 60 // TODO(yosin): Once all we get rid of all call sites, we remove this.
58 Builder& setBaseAndExtentDeprecated( 61 Builder& setBaseAndExtentDeprecated(
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 124
122 using SelectionInDOMTree = SelectionTemplate<EditingStrategy>; 125 using SelectionInDOMTree = SelectionTemplate<EditingStrategy>;
123 using SelectionInFlatTree = SelectionTemplate<EditingInFlatTreeStrategy>; 126 using SelectionInFlatTree = SelectionTemplate<EditingInFlatTreeStrategy>;
124 127
125 CORE_EXPORT std::ostream& operator<<(std::ostream&, const SelectionInDOMTree&); 128 CORE_EXPORT std::ostream& operator<<(std::ostream&, const SelectionInDOMTree&);
126 CORE_EXPORT std::ostream& operator<<(std::ostream&, const SelectionInFlatTree&); 129 CORE_EXPORT std::ostream& operator<<(std::ostream&, const SelectionInFlatTree&);
127 130
128 } // namespace blink 131 } // namespace blink
129 132
130 #endif // SelectionTemplate_h 133 #endif // SelectionTemplate_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698