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

Unified Diff: Source/core/editing/PositionWithAffinity.cpp

Issue 1191283002: Make VisiblePosition::init to not use being constructed object (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-06-22T16:23:26 Add a comment to PositionWIthAffinity::operator==() 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/VisiblePosition.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 fff00e05be23125f5d6518f5a56f0b0edbd40c68..50de54114602b0be1388aa140b685adae0b23ee1 100644
--- a/Source/core/editing/PositionWithAffinity.cpp
+++ b/Source/core/editing/PositionWithAffinity.cpp
@@ -25,6 +25,14 @@ PositionWithAffinityTemplate<PositionType>::~PositionWithAffinityTemplate()
{
}
+template <typename PositionType>
+bool PositionWithAffinityTemplate<PositionType>::operator==(const PositionWithAffinityTemplate& other) const
+{
+ if (isNull())
+ return other.isNull();
+ return m_affinity == other.m_affinity && m_position == other.m_position;
+}
+
template class CORE_EXTERN_TEMPLATE_EXPORT PositionWithAffinityTemplate<Position>;
} // namespace blink
« no previous file with comments | « Source/core/editing/PositionWithAffinity.h ('k') | Source/core/editing/VisiblePosition.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698