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

Side by Side Diff: third_party/WebKit/Source/core/editing/RelocatablePosition.h

Issue 2123893002: Introduce class RelocatablePosition (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add CORE_EXPORT Created 4 years, 5 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
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef RelocatablePosition_h
6 #define RelocatablePosition_h
7
8 #include "core/CoreExport.h"
9 #include "core/dom/Range.h"
10
11 namespace blink {
12
13 // |RelocatablePosition| is a helper class for keeping track of a |Position| in
14 // a document upon DOM tree changes even if the given |Position|'s original
15 // anchor node is moved out of document. The class is implemented by using a
16 // temporary |Range| object to keep track of the |Position|, and disposing the
17 // |Range| when out of scope.
18 class CORE_EXPORT RelocatablePosition final {
19 STACK_ALLOCATED();
20 public:
21 explicit RelocatablePosition(const Position&);
22 ~RelocatablePosition();
23
24 Position position() const;
25
26 private:
27 const Member<Range> m_range;
28
29 DISALLOW_COPY_AND_ASSIGN(RelocatablePosition);
30 };
31
32 } // namespace blink
33
34 #endif // RelocatablePosition_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/editing/RelocatablePosition.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698