OLD | NEW |
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/FlatTreeTraversal.h" | 10 #include "core/dom/shadow/FlatTreeTraversal.h" |
11 #include "wtf/Allocator.h" | 11 #include "platform/wtf/Allocator.h" |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 | 14 |
15 // Editing algorithm defined on node traversal. | 15 // Editing algorithm defined on node traversal. |
16 template <typename Traversal> | 16 template <typename Traversal> |
17 class CORE_TEMPLATE_CLASS_EXPORT EditingAlgorithm : public Traversal { | 17 class CORE_TEMPLATE_CLASS_EXPORT EditingAlgorithm : public Traversal { |
18 STATIC_ONLY(EditingAlgorithm); | 18 STATIC_ONLY(EditingAlgorithm); |
19 | 19 |
20 public: | 20 public: |
21 static int CaretMaxOffset(const Node&); | 21 static int CaretMaxOffset(const Node&); |
(...skipping 12 matching lines...) Expand all Loading... |
34 EditingAlgorithm<FlatTreeTraversal>; | 34 EditingAlgorithm<FlatTreeTraversal>; |
35 | 35 |
36 // DOM tree version of editing algorithm | 36 // DOM tree version of editing algorithm |
37 using EditingStrategy = EditingAlgorithm<NodeTraversal>; | 37 using EditingStrategy = EditingAlgorithm<NodeTraversal>; |
38 // Flat tree version of editing algorithm | 38 // Flat tree version of editing algorithm |
39 using EditingInFlatTreeStrategy = EditingAlgorithm<FlatTreeTraversal>; | 39 using EditingInFlatTreeStrategy = EditingAlgorithm<FlatTreeTraversal>; |
40 | 40 |
41 } // namespace blink | 41 } // namespace blink |
42 | 42 |
43 #endif // EditingStrategy_h | 43 #endif // EditingStrategy_h |
OLD | NEW |