OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 12 matching lines...) Expand all Loading... |
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 #ifndef PositionIterator_h | 26 #ifndef PositionIterator_h |
27 #define PositionIterator_h | 27 #define PositionIterator_h |
28 | 28 |
29 #include "core/dom/Node.h" | 29 #include "core/dom/Node.h" |
30 #include "core/editing/EditingStrategy.h" | 30 #include "core/editing/EditingStrategy.h" |
31 #include "core/editing/EditingUtilities.h" | 31 #include "core/editing/EditingUtilities.h" |
32 #include "core/html/HTMLHtmlElement.h" | 32 #include "core/html/HTMLHtmlElement.h" |
33 #include "core/layout/LayoutBlock.h" | |
34 | 33 |
35 namespace blink { | 34 namespace blink { |
36 | 35 |
37 // A Position iterator with nearly constant-time | 36 // A Position iterator with nearly constant-time |
38 // increment, decrement, and several predicates on the Position it is at. | 37 // increment, decrement, and several predicates on the Position it is at. |
39 // Conversion from Position is O(n) in the depth. | 38 // Conversion from Position is O(n) in the depth. |
40 // Conversion to Position is O(1). | 39 // Conversion to Position is O(1). |
41 // PositionIteratorAlgorithm must be used without DOM tree change. | 40 // PositionIteratorAlgorithm must be used without DOM tree change. |
42 template <typename Strategy> | 41 template <typename Strategy> |
43 class PositionIteratorAlgorithm { | 42 class PositionIteratorAlgorithm { |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 86 |
88 extern template class PositionIteratorAlgorithm<EditingStrategy>; | 87 extern template class PositionIteratorAlgorithm<EditingStrategy>; |
89 extern template class PositionIteratorAlgorithm<EditingInFlatTreeStrategy>; | 88 extern template class PositionIteratorAlgorithm<EditingInFlatTreeStrategy>; |
90 | 89 |
91 using PositionIterator = PositionIteratorAlgorithm<EditingStrategy>; | 90 using PositionIterator = PositionIteratorAlgorithm<EditingStrategy>; |
92 using PositionIteratorInFlatTree = PositionIteratorAlgorithm<EditingInFlatTreeSt
rategy>; | 91 using PositionIteratorInFlatTree = PositionIteratorAlgorithm<EditingInFlatTreeSt
rategy>; |
93 | 92 |
94 } // namespace blink | 93 } // namespace blink |
95 | 94 |
96 #endif // PositionIterator_h | 95 #endif // PositionIterator_h |
OLD | NEW |