| 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 return m_startPosition.isNull() || m_domTreeVersion == m_startPosition.docum
ent()->domTreeVersion(); | 137 return m_startPosition.isNull() || m_domTreeVersion == m_startPosition.docum
ent()->domTreeVersion(); |
| 138 } | 138 } |
| 139 #else | 139 #else |
| 140 template <typename Strategy> | 140 template <typename Strategy> |
| 141 bool EphemeralRangeTemplate<Strategy>::isValid() const | 141 bool EphemeralRangeTemplate<Strategy>::isValid() const |
| 142 { | 142 { |
| 143 return true; | 143 return true; |
| 144 } | 144 } |
| 145 #endif | 145 #endif |
| 146 | 146 |
| 147 PassRefPtrWillBeRawPtr<Range> createRange(const EphemeralRange& range) |
| 148 { |
| 149 if (range.isNull()) |
| 150 return nullptr; |
| 151 return Range::create(range.document(), range.startPosition(), range.endPosit
ion()); |
| 152 } |
| 153 |
| 147 template class CORE_TEMPLATE_EXPORT EphemeralRangeTemplate<EditingStrategy>; | 154 template class CORE_TEMPLATE_EXPORT EphemeralRangeTemplate<EditingStrategy>; |
| 148 template class CORE_TEMPLATE_EXPORT EphemeralRangeTemplate<EditingInComposedTree
Strategy>; | 155 template class CORE_TEMPLATE_EXPORT EphemeralRangeTemplate<EditingInComposedTree
Strategy>; |
| 149 | 156 |
| 150 } // namespace blink | 157 } // namespace blink |
| OLD | NEW |