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

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

Issue 1675163002: Rename ComposedTree to FlatTree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wip Created 4 years, 10 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 EditingStrategy_h 5 #ifndef EditingStrategy_h
6 #define EditingStrategy_h 6 #define EditingStrategy_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/dom/NodeTraversal.h" 9 #include "core/dom/NodeTraversal.h"
10 #include "core/dom/shadow/ComposedTreeTraversal.h" 10 #include "core/dom/shadow/FlatTreeTraversal.h"
11 #include "wtf/Allocator.h" 11 #include "wtf/Allocator.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 template <typename Strategy> 15 template <typename Strategy>
16 class PositionTemplate; 16 class PositionTemplate;
17 17
18 template <typename Strategy> 18 template <typename Strategy>
19 class PositionIteratorAlgorithm; 19 class PositionIteratorAlgorithm;
20 20
(...skipping 11 matching lines...) Expand all
32 // This method is used to create positions in the DOM. It returns the 32 // This method is used to create positions in the DOM. It returns the
33 // maximum valid offset in a node. It returns 1 for some elements even 33 // maximum valid offset in a node. It returns 1 for some elements even
34 // though they do not have children, which creates technically invalid DOM 34 // though they do not have children, which creates technically invalid DOM
35 // Positions. Be sure to call |parentAnchoredEquivalent()| on a Position 35 // Positions. Be sure to call |parentAnchoredEquivalent()| on a Position
36 // before using it to create a DOM Range, or an exception will be thrown. 36 // before using it to create a DOM Range, or an exception will be thrown.
37 static int lastOffsetForEditing(const Node*); 37 static int lastOffsetForEditing(const Node*);
38 static Node* rootUserSelectAllForNode(Node*); 38 static Node* rootUserSelectAllForNode(Node*);
39 }; 39 };
40 40
41 extern template class CORE_EXTERN_TEMPLATE_EXPORT EditingAlgorithm<NodeTraversal >; 41 extern template class CORE_EXTERN_TEMPLATE_EXPORT EditingAlgorithm<NodeTraversal >;
42 extern template class CORE_EXTERN_TEMPLATE_EXPORT EditingAlgorithm<ComposedTreeT raversal>; 42 extern template class CORE_EXTERN_TEMPLATE_EXPORT EditingAlgorithm<FlatTreeTrave rsal>;
43 43
44 // DOM tree version of editing algorithm 44 // DOM tree version of editing algorithm
45 using EditingStrategy = EditingAlgorithm<NodeTraversal>; 45 using EditingStrategy = EditingAlgorithm<NodeTraversal>;
46 // Composed tree version of editing algorithm 46 // Flat tree version of editing algorithm
47 using EditingInComposedTreeStrategy = EditingAlgorithm<ComposedTreeTraversal>; 47 using EditingInFlatTreeStrategy = EditingAlgorithm<FlatTreeTraversal>;
48 48
49 } // namespace blink 49 } // namespace blink
50 50
51 #endif // EditingStrategy_h 51 #endif // EditingStrategy_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698