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
3 // found in the LICENSE file./*
6 #include "core/editing/PositionWithAffinity.h"
10 template <typename Strategy
>
11 PositionWithAffinityTemplate
<Strategy
>::PositionWithAffinityTemplate(const PositionAlgorithm
<Strategy
>& position
, TextAffinity affinity
)
12 : m_position(position
)
13 , m_affinity(affinity
)
17 template <typename Strategy
>
18 PositionWithAffinityTemplate
<Strategy
>::PositionWithAffinityTemplate()
19 : m_affinity(TextAffinity::Downstream
)
23 template <typename Strategy
>
24 PositionWithAffinityTemplate
<Strategy
>::~PositionWithAffinityTemplate()
28 template <typename Strategy
>
29 bool PositionWithAffinityTemplate
<Strategy
>::operator==(const PositionWithAffinityTemplate
& other
) const
32 return other
.isNull();
33 return m_affinity
== other
.m_affinity
&& m_position
== other
.m_position
;
36 template class CORE_TEMPLATE_EXPORT PositionWithAffinityTemplate
<EditingStrategy
>;
37 template class CORE_TEMPLATE_EXPORT PositionWithAffinityTemplate
<EditingInComposedTreeStrategy
>;