Chromium Code Reviews| Index: chrome/browser/ui/omnibox/omnibox_edit_model.cc |
| diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.cc b/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
| index 8232aae8b8de4a26080de0f111343c22d7212a14..9c795d06cd2163d7a91a2c49b72967a0045c023f 100644 |
| --- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
| +++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
| @@ -883,10 +883,17 @@ void OmniboxEditModel::OnPopupDataChanged( |
| bool call_controller_onchanged = true; |
| inline_autocomplete_text_ = text; |
| - if (view_->OnInlineAutocompleteTextMaybeChanged( |
| - DisplayTextFromUserText(user_text_ + inline_autocomplete_text_), |
| - DisplayTextFromUserText(user_text_).length())) |
| + if (KeywordIsSelected() && |
| + view_->GetText() != DisplayTextFromUserText(user_text_) && |
| + inline_autocomplete_text_.empty()) { |
| + view_->SetWindowTextAndCaretPos(DisplayTextFromUserText(user_text_), 0, |
|
Peter Kasting
2012/10/02 21:52:02
This still feels kind of wrong to me.
Where does
Joe Thomas
2012/10/02 22:11:34
The existing code which changes the display text i
Peter Kasting
2012/10/02 22:38:28
This just doesn't seem like the right place to be
Joe Thomas
2012/10/03 01:59:47
I doubt I completely understand your logic from yo
Peter Kasting
2012/10/03 03:01:01
Yes, I understood all that.
I've just spent anoth
Joe Thomas
2012/10/03 05:41:12
Thanks for the detailed review. I will make the re
|
| + false, true); |
| + call_controller_onchanged = false; |
| + } else if (view_->OnInlineAutocompleteTextMaybeChanged( |
| + DisplayTextFromUserText(user_text_ + inline_autocomplete_text_), |
| + DisplayTextFromUserText(user_text_).length())) { |
| call_controller_onchanged = false; |
| + } |
| // If |has_temporary_text_| is true, then we previously had a manual selection |
| // but now don't (or |destination_for_temporary_text_change| would have been |