Chromium Code Reviews| 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 #include "config.h" | 5 #include "config.h" |
| 6 #include "core/editing/PositionWithAffinity.h" | 6 #include "core/editing/PositionWithAffinity.h" |
| 7 | 7 |
| 8 namespace blink { | 8 namespace blink { |
| 9 | 9 |
| 10 template <typename PositionType> | 10 template <typename PositionType> |
| 11 PositionWithAffinityTemplate<PositionType>::PositionWithAffinityTemplate(const P ositionType& position, EAffinity affinity) | 11 PositionWithAffinityTemplate<PositionType>::PositionWithAffinityTemplate(const P ositionType& position, EAffinity affinity) |
| 12 : m_position(position) | 12 : m_position(position) |
| 13 , m_affinity(affinity) | 13 , m_affinity(affinity) |
| 14 { | 14 { |
| 15 } | 15 } |
| 16 | 16 |
| 17 template <typename PositionType> | 17 template <typename PositionType> |
| 18 PositionWithAffinityTemplate<PositionType>::PositionWithAffinityTemplate() | 18 PositionWithAffinityTemplate<PositionType>::PositionWithAffinityTemplate() |
| 19 : m_affinity(DOWNSTREAM) | 19 : m_affinity(DOWNSTREAM) |
| 20 { | 20 { |
| 21 } | 21 } |
| 22 | 22 |
| 23 template <typename PositionType> | 23 template <typename PositionType> |
| 24 PositionWithAffinityTemplate<PositionType>::~PositionWithAffinityTemplate() | 24 PositionWithAffinityTemplate<PositionType>::~PositionWithAffinityTemplate() |
| 25 { | 25 { |
| 26 } | 26 } |
| 27 | 27 |
| 28 template <typename PositionType> | |
| 29 bool PositionWithAffinityTemplate<PositionType>::operator==(const PositionWithAf finityTemplate& other) const | |
| 30 { | |
| 31 if (isNull()) | |
|
tkent
2015/06/22 07:04:59
Please document this in PositionWithAffinity.h.
yosin_UTC9
2015/06/22 07:25:35
Done.
| |
| 32 return other.isNull(); | |
| 33 return m_affinity == other.m_affinity && m_position == other.m_position; | |
| 34 } | |
| 35 | |
| 28 template class CORE_EXTERN_TEMPLATE_EXPORT PositionWithAffinityTemplate<Position >; | 36 template class CORE_EXTERN_TEMPLATE_EXPORT PositionWithAffinityTemplate<Position >; |
| 29 | 37 |
| 30 } // namespace blink | 38 } // namespace blink |
| OLD | NEW |