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

Unified Diff: Source/core/editing/VisibleSelection.h

Issue 988023005: Implementing directional selection strategy in Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressing feedback. Created 5 years, 8 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
Index: Source/core/editing/VisibleSelection.h
diff --git a/Source/core/editing/VisibleSelection.h b/Source/core/editing/VisibleSelection.h
index 75856ea84e53dc33c3ed5fbc93a903cfc1826c55..22caa9c19f66104ba69abae2873a9beecb4fa817 100644
--- a/Source/core/editing/VisibleSelection.h
+++ b/Source/core/editing/VisibleSelection.h
@@ -30,6 +30,7 @@
#include "core/editing/SelectionType.h"
#include "core/editing/TextGranularity.h"
#include "core/editing/VisiblePosition.h"
+#include "core/editing/VisibleUnits.h"
namespace blink {
@@ -146,8 +147,8 @@ public:
void showTreeForThis() const;
#endif
- void setStartRespectingGranularity(TextGranularity);
- void setEndRespectingGranularity(TextGranularity);
+ void setStartRespectingGranularity(TextGranularity, EWordSide defaultWordSide = RightWordIfOnBoundary);
+ void setEndRespectingGranularity(TextGranularity, EWordSide defaultWordSide = RightWordIfOnBoundary);
private:
void validate(TextGranularity = CharacterGranularity);
@@ -183,7 +184,7 @@ private:
inline bool operator==(const VisibleSelection& a, const VisibleSelection& b)
{
return a.start() == b.start() && a.end() == b.end() && a.affinity() == b.affinity() && a.isBaseFirst() == b.isBaseFirst()
- && a.isDirectional() == b.isDirectional();
+ && a.isDirectional() == b.isDirectional() && a.base() == b.base() && a.extent() == b.extent();
yosin_UTC9 2015/04/16 04:11:26 Note: I assume this change will be kicked out from
mfomitchev1 2015/04/17 00:13:51 Done.
}
inline bool operator!=(const VisibleSelection& a, const VisibleSelection& b)

Powered by Google App Engine
This is Rietveld 408576698