Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(242)

Side by Side Diff: Source/core/editing/EphemeralRange.cpp

Issue 1315543002: Introduce createRange(const EphemeralRange&) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-24T22:18:16 Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/editing/EphemeralRange.h ('k') | Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « Source/core/editing/EphemeralRange.h ('k') | Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698