diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-07 03:43:25 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-07 03:43:25 +0000 |
commit | ce49a47906658f04537e25406d429de38cb99119 (patch) | |
tree | 1cb21c6c66afde4520a1aed1829555fd7e08de17 /chrome/browser/instant/instant_loader.cc | |
parent | cee5dba4c38bb856cf4e3bc70ebc49dabf5f6b53 (diff) | |
download | chromium_src-ce49a47906658f04537e25406d429de38cb99119.zip chromium_src-ce49a47906658f04537e25406d429de38cb99119.tar.gz chromium_src-ce49a47906658f04537e25406d429de38cb99119.tar.bz2 |
Re-load instant results when user text has whitespace changes.
BUG=65688
TEST=see bug
Review URL: http://codereview.chromium.org/5657002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68438 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/instant/instant_loader.cc')
-rw-r--r-- | chrome/browser/instant/instant_loader.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/chrome/browser/instant/instant_loader.cc b/chrome/browser/instant/instant_loader.cc index af76f34..40954d3 100644 --- a/chrome/browser/instant/instant_loader.cc +++ b/chrome/browser/instant/instant_loader.cc @@ -480,8 +480,12 @@ void InstantLoader::Update(TabContentsWrapper* tab_contents, // modifies the text of the omnibox in anyway the URL changes. We also need to // update if verbatim changes and we're showing instant results. We have to be // careful in checking user_text as in some situations InstantController - // passes in an empty string (when it knows the user_text won't matter). - if (url_ == url && (!template_url || verbatim == verbatim_)) { + // passes in an empty string (when it knows the user_text won't matter). In + // these cases, we don't worry about whether the new user text matches the old + // user text. + if ((url_ == url) && + (new_user_text.empty() || user_text_ == new_user_text) && + (!template_url || verbatim == verbatim_)) { suggested_text->assign(last_suggestion_); return; } |