| 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/dom/NodeTraversal.h" | 8 #include "core/dom/NodeTraversal.h" |
| 9 #include "core/dom/shadow/ComposedTreeTraversal.h" | 9 #include "core/dom/shadow/ComposedTreeTraversal.h" |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 using PositionIteratorType = PositionIteratorAlgorithm<EditingStrategy>; | 34 using PositionIteratorType = PositionIteratorAlgorithm<EditingStrategy>; |
| 35 using PositionType = PositionAlgorithm<EditingStrategy>; | 35 using PositionType = PositionAlgorithm<EditingStrategy>; |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 // Composed tree version of editing algorithm | 38 // Composed tree version of editing algorithm |
| 39 class EditingInComposedTreeStrategy : public EditingAlgorithm<ComposedTreeTraver
sal> { | 39 class EditingInComposedTreeStrategy : public EditingAlgorithm<ComposedTreeTraver
sal> { |
| 40 public: | 40 public: |
| 41 using PositionIteratorType = PositionIteratorAlgorithm<EditingInComposedTree
Strategy>; | 41 using PositionIteratorType = PositionIteratorAlgorithm<EditingInComposedTree
Strategy>; |
| 42 using PositionType = PositionAlgorithm<EditingInComposedTreeStrategy>; | 42 using PositionType = PositionAlgorithm<EditingInComposedTreeStrategy>; |
| 43 | 43 |
| 44 // Returns true if the given node is considered as selection boundary. |
| 45 static bool isSelectionBoundaryShadowHost(const Node&); |
| 46 |
| 44 // Don't use |parentOrShadowHostNode()| in composed tree specific algorithm. | 47 // Don't use |parentOrShadowHostNode()| in composed tree specific algorithm. |
| 45 // This function is provided here for sharing algorithm with | 48 // This function is provided here for sharing algorithm with |
| 46 // |TextIteratorAlgorithm|, which handles shadow tree within in | 49 // |TextIteratorAlgorithm|, which handles shadow tree within in |
| 47 // DOM traversal. | 50 // DOM traversal. |
| 48 static ContainerNode* parentOrShadowHostNode(const Node&); | 51 static ContainerNode* parentOrShadowHostNode(const Node&); |
| 49 }; | 52 }; |
| 50 | 53 |
| 51 extern template class EditingAlgorithm<NodeTraversal>; | 54 extern template class EditingAlgorithm<NodeTraversal>; |
| 52 extern template class EditingAlgorithm<ComposedTreeTraversal>; | 55 extern template class EditingAlgorithm<ComposedTreeTraversal>; |
| 53 | 56 |
| 54 } // namespace blink | 57 } // namespace blink |
| 55 | 58 |
| 56 #endif // EditingStrategy_h | 59 #endif // EditingStrategy_h |
| OLD | NEW |