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

Unified Diff: chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm

Issue 1144853003: Mac: Omnibox: Retain the "SelectAll" state after a navigation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/ui/omnibox/omnibox_view_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
diff --git a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
index 7d296dd7b43eac1eeaa73540e8d966c7c8375408..a3eac3360421c63489779fcf21b03911be4a1d14 100644
--- a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
+++ b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
@@ -219,11 +219,15 @@ void OmniboxViewMac::Update() {
controller()->GetToolbarModel()->set_url_replacement_enabled(true);
model()->UpdatePermanentText();
+ const bool was_select_all = IsSelectAll();
+
// Restore everything to the baseline look.
RevertAll();
// TODO(shess): Figure out how this case is used, to make sure
// we're getting the selection and popup right.
Peter Kasting 2015/05/19 07:04:01 Nit: Remove TODO; copy comment from views code
tapted 2015/05/19 11:28:39 Done.
+ if (was_select_all && model()->has_focus())
+ SelectAll(false /* reversed: ignored on mac */);
Peter Kasting 2015/05/19 07:04:00 Reversed state shouldn't be ignored. You should s
tapted 2015/05/19 11:28:39 Done.
} else {
// TODO(shess): This corresponds to _win and _gtk, except those
// guard it with a test for whether the security level changed.
« no previous file with comments | « no previous file | chrome/browser/ui/omnibox/omnibox_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698