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 EphemeralRange_h | 5 #ifndef EphemeralRange_h |
6 #define EphemeralRange_h | 6 #define EphemeralRange_h |
7 | 7 |
8 #include "core/editing/Position.h" | 8 #include "core/editing/Position.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
11 | 11 |
12 class Document; | 12 class Document; |
13 class Range; | 13 class Range; |
14 | 14 |
15 // We should restrict access to the unwanted version of |TraversalRange::end()|
function. | 15 // We should restrict access to the unwanted version of |TraversalRange::end()| |
| 16 // function. |
16 template <class Iterator> | 17 template <class Iterator> |
17 class TraversalRangeNodes : private TraversalRange<Iterator> { | 18 class TraversalRangeNodes : private TraversalRange<Iterator> { |
18 STACK_ALLOCATED(); | 19 STACK_ALLOCATED(); |
19 | 20 |
20 public: | 21 public: |
21 using StartNodeType = typename TraversalRange<Iterator>::StartNodeType; | 22 using StartNodeType = typename TraversalRange<Iterator>::StartNodeType; |
22 TraversalRangeNodes(const StartNodeType* start, | 23 TraversalRangeNodes(const StartNodeType* start, |
23 const StartNodeType* pastEndNode) | 24 const StartNodeType* pastEndNode) |
24 : TraversalRange<Iterator>(start), m_pastEndNode(pastEndNode) {} | 25 : TraversalRange<Iterator>(start), m_pastEndNode(pastEndNode) {} |
25 | 26 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 using EphemeralRangeInFlatTree = | 144 using EphemeralRangeInFlatTree = |
144 EphemeralRangeTemplate<EditingInFlatTreeStrategy>; | 145 EphemeralRangeTemplate<EditingInFlatTreeStrategy>; |
145 | 146 |
146 // Returns a newly created |Range| object from |range| or |nullptr| if | 147 // Returns a newly created |Range| object from |range| or |nullptr| if |
147 // |range.isNull()| returns true. | 148 // |range.isNull()| returns true. |
148 CORE_EXPORT Range* createRange(const EphemeralRange& /* range */); | 149 CORE_EXPORT Range* createRange(const EphemeralRange& /* range */); |
149 | 150 |
150 } // namespace blink | 151 } // namespace blink |
151 | 152 |
152 #endif | 153 #endif |
OLD | NEW |