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

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

Issue 1287053007: Move rootUserSelectAllForNode() to EditingStrategy template class from PositionAlgorithm template cl (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-20T17:38:38 Created 5 years, 4 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 | « no previous file | Source/core/editing/EditingStrategy.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ComposedTreeTraversal.h"
(...skipping 15 matching lines...) Expand all
26 // of |Node*|. 26 // of |Node*|.
27 static bool isEmptyNonEditableNodeInEditable(const Node*); 27 static bool isEmptyNonEditableNodeInEditable(const Node*);
28 static bool editingIgnoresContent(const Node*); 28 static bool editingIgnoresContent(const Node*);
29 29
30 // This method is used to create positions in the DOM. It returns the 30 // This method is used to create positions in the DOM. It returns the
31 // maximum valid offset in a node. It returns 1 for some elements even 31 // maximum valid offset in a node. It returns 1 for some elements even
32 // though they do not have children, which creates technically invalid DOM 32 // though they do not have children, which creates technically invalid DOM
33 // Positions. Be sure to call |parentAnchoredEquivalent()| on a Position 33 // Positions. Be sure to call |parentAnchoredEquivalent()| on a Position
34 // before using it to create a DOM Range, or an exception will be thrown. 34 // before using it to create a DOM Range, or an exception will be thrown.
35 static int lastOffsetForEditing(const Node*); 35 static int lastOffsetForEditing(const Node*);
36 static Node* rootUserSelectAllForNode(Node*);
36 }; 37 };
37 38
38 extern template class CORE_EXTERN_TEMPLATE_EXPORT EditingAlgorithm<NodeTraversal >; 39 extern template class CORE_EXTERN_TEMPLATE_EXPORT EditingAlgorithm<NodeTraversal >;
39 extern template class CORE_EXTERN_TEMPLATE_EXPORT EditingAlgorithm<ComposedTreeT raversal>; 40 extern template class CORE_EXTERN_TEMPLATE_EXPORT EditingAlgorithm<ComposedTreeT raversal>;
40 41
41 // DOM tree version of editing algorithm 42 // DOM tree version of editing algorithm
42 using EditingStrategy = EditingAlgorithm<NodeTraversal>; 43 using EditingStrategy = EditingAlgorithm<NodeTraversal>;
43 // Composed tree version of editing algorithm 44 // Composed tree version of editing algorithm
44 using EditingInComposedTreeStrategy = EditingAlgorithm<ComposedTreeTraversal>; 45 using EditingInComposedTreeStrategy = EditingAlgorithm<ComposedTreeTraversal>;
45 46
46 } // namespace blink 47 } // namespace blink
47 48
48 #endif // EditingStrategy_h 49 #endif // EditingStrategy_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/editing/EditingStrategy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698