Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1094)

Side by Side Diff: Source/core/editing/PositionWithAffinity.cpp

Issue 1187073014: Templatize PositionWithAffinity class (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-06-17T16:31:27 Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/editing/PositionWithAffinity.h ('k') | Source/core/editing/VisibleUnits.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 PositionWithAffinity::PositionWithAffinity(const Position& position, EAffinity a ffinity) 10 template <typename PositionType>
11 PositionWithAffinityTemplate<PositionType>::PositionWithAffinityTemplate(const P ositionType& position, EAffinity affinity)
11 : m_position(position) 12 : m_position(position)
12 , m_affinity(affinity) 13 , m_affinity(affinity)
13 { 14 {
14 } 15 }
15 16
16 PositionWithAffinity::PositionWithAffinity() 17 template <typename PositionType>
18 PositionWithAffinityTemplate<PositionType>::PositionWithAffinityTemplate()
17 : m_affinity(DOWNSTREAM) 19 : m_affinity(DOWNSTREAM)
18 { 20 {
19 } 21 }
20 22
21 PositionWithAffinity::~PositionWithAffinity() 23 template <typename PositionType>
24 PositionWithAffinityTemplate<PositionType>::~PositionWithAffinityTemplate()
22 { 25 {
23 } 26 }
24 27
25 DEFINE_TRACE(PositionWithAffinity) 28 template class CORE_EXTERN_TEMPLATE_EXPORT PositionWithAffinityTemplate<Position >;
tasak 2015/06/29 08:11:02 Use CORE_TEMPLATE_EXPORT here.
26 {
27 visitor->trace(m_position);
28 }
29 29
30 } // namespace blink 30 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/editing/PositionWithAffinity.h ('k') | Source/core/editing/VisibleUnits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698