| 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/ComposedTreeTraversal.h" | 10 #include "core/dom/shadow/ComposedTreeTraversal.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 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 |
| OLD | NEW |