| Index: Source/core/editing/PositionWithAffinity.h
|
| diff --git a/Source/core/editing/PositionWithAffinity.h b/Source/core/editing/PositionWithAffinity.h
|
| index e5e59589828d10379f7f4f3f63f7a29d4ff65b46..38fb1f641e77ca045b928c7e8bcf77057af2dbc2 100644
|
| --- a/Source/core/editing/PositionWithAffinity.h
|
| +++ b/Source/core/editing/PositionWithAffinity.h
|
| @@ -11,23 +11,33 @@
|
|
|
| namespace blink {
|
|
|
| -class CORE_EXPORT PositionWithAffinity {
|
| +template <typename Position>
|
| +class CORE_TEMPLATE_CLASS_EXPORT PositionWithAffinityTemplate {
|
| DISALLOW_ALLOCATION();
|
| public:
|
| - PositionWithAffinity(const Position&, EAffinity = DOWNSTREAM);
|
| - PositionWithAffinity();
|
| - ~PositionWithAffinity();
|
| + typedef Position PositionType;
|
| +
|
| + PositionWithAffinityTemplate(const PositionType&, EAffinity = DOWNSTREAM);
|
| + PositionWithAffinityTemplate();
|
| + ~PositionWithAffinityTemplate();
|
|
|
| EAffinity affinity() const { return m_affinity; }
|
| - const Position& position() const { return m_position; }
|
| + const PositionType& position() const { return m_position; }
|
|
|
| - DECLARE_TRACE();
|
| + DEFINE_INLINE_TRACE()
|
| + {
|
| + visitor->trace(m_position);
|
| + }
|
|
|
| private:
|
| - Position m_position;
|
| + PositionType m_position;
|
| EAffinity m_affinity;
|
| };
|
|
|
| +extern template class CORE_EXTERN_TEMPLATE_EXPORT PositionWithAffinityTemplate<Position>;
|
| +
|
| +using PositionWithAffinity = PositionWithAffinityTemplate<Position>;
|
| +
|
| } // namespace blink
|
|
|
| #endif // PositionWithAffinity_h
|
|
|