Commit df9ec3cb authored by mpearson@chromium.org's avatar mpearson@chromium.org

Omnibox: When backspacing out of keyword mode, don't highlight anything.

This bug was caused because Mac's NSMakeRange takes a beginning and a length.  All the other platform's range representations take a beginning and an end.

I audited omnibox_view_win.cc, omnibox_view_views.cc, and omnibox_view_gtk.cc.  They all seem to be correct.  I also tested Windows and Linux and verified that the current behavior is correct.

BUG=163807


Review URL: https://chromiumcodereview.appspot.com/11308330

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170929 0039d316-1c4b-4281-b951-d872f2087c98
parent 80c7a0ed
...@@ -269,7 +269,7 @@ void OmniboxViewMac::SetWindowTextAndCaretPos(const string16& text, ...@@ -269,7 +269,7 @@ void OmniboxViewMac::SetWindowTextAndCaretPos(const string16& text,
bool update_popup, bool update_popup,
bool notify_text_changed) { bool notify_text_changed) {
DCHECK_LE(caret_pos, text.size()); DCHECK_LE(caret_pos, text.size());
SetTextAndSelectedRange(text, NSMakeRange(caret_pos, caret_pos)); SetTextAndSelectedRange(text, NSMakeRange(caret_pos, 0));
if (update_popup) if (update_popup)
UpdatePopup(); UpdatePopup();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment