OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 PositionWithAffinity_h | 5 #ifndef PositionWithAffinity_h |
6 #define PositionWithAffinity_h | 6 #define PositionWithAffinity_h |
7 | 7 |
8 #include "core/dom/Position.h" | 8 #include "core/dom/Position.h" |
9 #include "core/editing/TextAffinity.h" | 9 #include "core/editing/TextAffinity.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 class PositionWithAffinity { | 13 class PositionWithAffinity { |
14 DISALLOW_ALLOCATION(); | 14 DISALLOW_ALLOCATION(); |
15 public: | 15 public: |
16 PositionWithAffinity(const Position&, EAffinity = DOWNSTREAM); | 16 PositionWithAffinity(const Position&, EAffinity = DOWNSTREAM); |
17 PositionWithAffinity(); | 17 PositionWithAffinity(); |
18 ~PositionWithAffinity(); | 18 ~PositionWithAffinity(); |
19 | 19 |
20 EAffinity affinity() const { return m_affinity; } | 20 EAffinity affinity() const { return m_affinity; } |
21 const Position& position() const { return m_position; } | 21 const Position& position() const { return m_position; } |
22 | 22 |
23 // Rect is local to the returned renderer | |
24 LayoutRect localCaretRect(RenderObject*&) const; | |
yosin_UTC9
2014/07/29 07:00:20
We would like to keep PositionWithAninity as simpl
yoichio
2014/07/29 08:05:17
Done.
| |
25 | |
23 void trace(Visitor*); | 26 void trace(Visitor*); |
24 | 27 |
25 private: | 28 private: |
26 Position m_position; | 29 Position m_position; |
27 EAffinity m_affinity; | 30 EAffinity m_affinity; |
28 }; | 31 }; |
29 | 32 |
30 } // namespace blink | 33 } // namespace blink |
31 | 34 |
32 #endif // PositionWithAffinity_h | 35 #endif // PositionWithAffinity_h |
OLD | NEW |