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 #include "config.h" | 5 #include "config.h" |
6 #include "core/editing/EphemeralRange.h" | 6 #include "core/editing/EphemeralRange.h" |
7 | 7 |
8 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
9 #include "core/dom/Element.h" | 9 #include "core/dom/Element.h" |
10 #include "core/dom/Range.h" | 10 #include "core/dom/Range.h" |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
137 } | 137 } |
138 #endif | 138 #endif |
139 | 139 |
140 PassRefPtrWillBeRawPtr<Range> createRange(const EphemeralRange& range) | 140 PassRefPtrWillBeRawPtr<Range> createRange(const EphemeralRange& range) |
141 { | 141 { |
142 if (range.isNull()) | 142 if (range.isNull()) |
143 return nullptr; | 143 return nullptr; |
144 return Range::create(range.document(), range.startPosition(), range.endPosit ion()); | 144 return Range::create(range.document(), range.startPosition(), range.endPosit ion()); |
145 } | 145 } |
146 | 146 |
147 PassRefPtrWillBeRawPtr<Range> createRange(const EphemeralRangeInComposedTree& ra nge) | |
yosin_UTC9
2015/10/22 02:28:28
Since DOM Range object can't represent a range cro
| |
148 { | |
149 if (range.isNull()) | |
150 return nullptr; | |
151 | |
152 return Range::create(range.document(), | |
153 toPositionInDOMTree(range.startPosition()), | |
154 toPositionInDOMTree(range.endPosition())); | |
155 } | |
156 | |
147 template class CORE_TEMPLATE_EXPORT EphemeralRangeTemplate<EditingStrategy>; | 157 template class CORE_TEMPLATE_EXPORT EphemeralRangeTemplate<EditingStrategy>; |
148 template class CORE_TEMPLATE_EXPORT EphemeralRangeTemplate<EditingInComposedTree Strategy>; | 158 template class CORE_TEMPLATE_EXPORT EphemeralRangeTemplate<EditingInComposedTree Strategy>; |
149 | 159 |
150 } // namespace blink | 160 } // namespace blink |
OLD | NEW |