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

Unified Diff: views/controls/textfield/textfield.h

Issue 6266015: Fix range comparison. Get space to accept keyword work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 11 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 | « chrome/browser/autocomplete/autocomplete_edit_view_views.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/textfield/textfield.h
diff --git a/views/controls/textfield/textfield.h b/views/controls/textfield/textfield.h
index 90c8139e4b00f3abcbe8e121a8b226b039987e4a..690e825aa20b2c1e731ee74478780b2e653d29f1 100644
--- a/views/controls/textfield/textfield.h
+++ b/views/controls/textfield/textfield.h
@@ -69,9 +69,9 @@ class TextRange {
// Returns the max of selected range.
size_t GetMax() const;
- // Returns true if |range| has same start, end position.
- bool Equals(const TextRange& range) const {
- return start_ == range.start_ && end_ == range.end_;
+ // Returns true if the the selection range is same ignoring the direction.
+ bool EqualsIgnoringDirection(const TextRange& range) const {
+ return GetMin() == range.GetMin() && GetMax() == range.GetMax();
}
// Set the range with |start| and |end|.
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_edit_view_views.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698