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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/editing/PositionWithAffinity.h ('k') | Source/core/editing/VisibleUnits.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/PositionWithAffinity.cpp
diff --git a/Source/core/editing/PositionWithAffinity.cpp b/Source/core/editing/PositionWithAffinity.cpp
index ddbe50be75500f6931b514b066b4f23cdf1ae360..fff00e05be23125f5d6518f5a56f0b0edbd40c68 100644
--- a/Source/core/editing/PositionWithAffinity.cpp
+++ b/Source/core/editing/PositionWithAffinity.cpp
@@ -7,24 +7,24 @@
namespace blink {
-PositionWithAffinity::PositionWithAffinity(const Position& position, EAffinity affinity)
+template <typename PositionType>
+PositionWithAffinityTemplate<PositionType>::PositionWithAffinityTemplate(const PositionType& position, EAffinity affinity)
: m_position(position)
, m_affinity(affinity)
{
}
-PositionWithAffinity::PositionWithAffinity()
+template <typename PositionType>
+PositionWithAffinityTemplate<PositionType>::PositionWithAffinityTemplate()
: m_affinity(DOWNSTREAM)
{
}
-PositionWithAffinity::~PositionWithAffinity()
+template <typename PositionType>
+PositionWithAffinityTemplate<PositionType>::~PositionWithAffinityTemplate()
{
}
-DEFINE_TRACE(PositionWithAffinity)
-{
- visitor->trace(m_position);
-}
+template class CORE_EXTERN_TEMPLATE_EXPORT PositionWithAffinityTemplate<Position>;
tasak 2015/06/29 08:11:02 Use CORE_TEMPLATE_EXPORT here.
} // namespace blink
« 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