From 88c39aaf6160753334888f6ab2ff81b57bdd25bf Mon Sep 17 00:00:00 2001 From: "oshima@google.com" Date: Fri, 21 Jan 2011 21:02:51 +0000 Subject: Fix range comparison. Get space to accept keyword work. I overlooked this placeholder code to fix. BUG=none TEST=enabled AcceptKeywordBySpaceTest for views-implementation Review URL: http://codereview.chromium.org/6266015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72185 0039d316-1c4b-4281-b951-d872f2087c98 --- views/controls/textfield/textfield.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'views') diff --git a/views/controls/textfield/textfield.h b/views/controls/textfield/textfield.h index 90c8139..690e825 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|. -- cgit v1.1