Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Unified Diff: chrome/browser/autocomplete/autocomplete_edit_view_mac.mm

Issue 194056: Fix text and selection's save/restore issue of omnibox when displaying tempor... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
===================================================================
--- chrome/browser/autocomplete/autocomplete_edit_view_mac.mm (revision 25735)
+++ chrome/browser/autocomplete/autocomplete_edit_view_mac.mm (working copy)
@@ -451,10 +451,8 @@
// TODO(shess): I believe this is for when the user arrows around
// the popup, will be restored if they hit escape. Figure out if
// that is for certain it.
- if (save_original_selection) {
+ if (save_original_selection)
saved_temporary_selection_ = GetSelectedRange();
- saved_temporary_text_ = GetText();
- }
SetWindowTextAndCaretPos(display_text, display_text.size());
controller_->OnChanged();
@@ -478,8 +476,7 @@
}
void AutocompleteEditViewMac::OnRevertTemporaryText() {
- SetTextAndSelectedRange(saved_temporary_text_, saved_temporary_selection_);
- saved_temporary_text_.clear();
+ SetSelectedRange(saved_temporary_selection_);
}
bool AutocompleteEditViewMac::IsFirstResponder() const {

Powered by Google App Engine
This is Rietveld 408576698