summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/autocomplete_edit.cc
diff options
context:
space:
mode:
authorsuzhe@chromium.org <suzhe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-11 04:17:41 +0000
committersuzhe@chromium.org <suzhe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-11 04:17:41 +0000
commita210fefe3ce45708ec4cb66fa8f96d250602a9d9 (patch)
treed58e70d2ea154328744aa03c143ed82775fd44e8 /chrome/browser/autocomplete/autocomplete_edit.cc
parent85c4eafd31af67b19e55fbb2ed8bc17b1f068ddd (diff)
downloadchromium_src-a210fefe3ce45708ec4cb66fa8f96d250602a9d9.zip
chromium_src-a210fefe3ce45708ec4cb66fa8f96d250602a9d9.tar.gz
chromium_src-a210fefe3ce45708ec4cb66fa8f96d250602a9d9.tar.bz2
Fix text and selection's save/restore issue of omnibox when displaying temporary text.
This CL fixes issue 21362: The original text and selection can't be reverted correctly when pressing escape key in omnibox if currently selected line is not the default match. BUG=21362: The original text and selection can't be reverted correctly when pressing escape key in omnibox if currently selected line is not the default match. TEST=Input something in omnibox and make sure inline autocomplete is triggered, then press down to select another line, then press escape to revert to the default match and see of the original text and selection was reverted correctly. Review URL: http://codereview.chromium.org/194056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25968 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/autocomplete_edit.cc')
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit.cc b/chrome/browser/autocomplete/autocomplete_edit.cc
index 9a23bffe..ecde897 100644
--- a/chrome/browser/autocomplete/autocomplete_edit.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit.cc
@@ -456,6 +456,11 @@ void AutocompleteEditModel::OnPopupDataChanged(
return;
}
+ // TODO(suzhe): Instead of messing with |inline_autocomplete_text_| here,
+ // we should probably do it inside Observe(), and save/restore it around
+ // changes to the temporary text. This will let us remove knowledge of
+ // inline autocompletions from the popup code.
+ //
// Handle changes to inline autocomplete text. Don't make changes if the user
// is showing temporary text. Making display changes would be obviously
// wrong; making changes to the inline_autocomplete_text_ itself turns out to