Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / Source / core / editing / PositionWithAffinity.cpp
blobb4fba374994fd25cacab58a7f9e8ab778eecb76d
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./*
5 #include "config.h"
6 #include "core/editing/PositionWithAffinity.h"
8 namespace blink {
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
31 if (isNull())
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>;
39 } // namespace blink