summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authoroshima@google.com <oshima@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-21 21:02:51 +0000
committeroshima@google.com <oshima@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-21 21:02:51 +0000
commit88c39aaf6160753334888f6ab2ff81b57bdd25bf (patch)
treed8d067cfc435ca8e5de995fe0e3d5c7c3a8ffc6b /views
parent0c3c986be0715bffddc75000d2e94cb132a7da59 (diff)
downloadchromium_src-88c39aaf6160753334888f6ab2ff81b57bdd25bf.zip
chromium_src-88c39aaf6160753334888f6ab2ff81b57bdd25bf.tar.gz
chromium_src-88c39aaf6160753334888f6ab2ff81b57bdd25bf.tar.bz2
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
Diffstat (limited to 'views')
-rw-r--r--views/controls/textfield/textfield.h6
1 files changed, 3 insertions, 3 deletions
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|.