summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-13 16:38:30 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-13 16:38:30 +0000
commit0e7b94e4f8ac26a855b0d22a31b1337ab3bc195a (patch)
tree5defe0ab6e0eff4a3920654579dae7e03cd6942b /chrome/browser
parentad98be36946d16a296d86b80f3f59e7eabc917c2 (diff)
downloadchromium_src-0e7b94e4f8ac26a855b0d22a31b1337ab3bc195a.zip
chromium_src-0e7b94e4f8ac26a855b0d22a31b1337ab3bc195a.tar.gz
chromium_src-0e7b94e4f8ac26a855b0d22a31b1337ab3bc195a.tar.bz2
[Mac] Always restyle omnibox after user input.
Previous version was perhaps too optimal. This should be reasonable for now since it only happens at the pace the user can enter input. http://crbug.com/14628 TEST=Browse to www.google.com. Copy/paste the entire URL. Should be styled. Review URL: http://codereview.chromium.org/149489 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20494 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_mac.mm23
1 files changed, 6 insertions, 17 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
index 6cb0f84..71c11b0 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
@@ -491,23 +491,12 @@ bool AutocompleteEditViewMac::OnAfterPossibleChange() {
const bool something_changed = model_->OnAfterPossibleChange(new_text,
selection_differs, text_differs, just_deleted_text, at_end_of_edit);
- // Restyle if the user changed something.
- // TODO(shess): Does this need to diver deeper to avoid flashing?
- // For instance, if the user types "/" after the hostname, will it
- // show as HostTextColor() for an instant before being replaced by
- // BaseTextColor(). This could probably be done by subclassing the
- // cell and intercepting draw requests so that we draw the right
- // thing every time.
- // NOTE(shess): That kind of thing would also help with when the
- // flashing from when the user's typing replaces the selection which
- // is then re-created with the new autocomplete results.
- if (something_changed) {
- // TODO(shess) I believe that this call is needless duplication of
- // effort. As best I can tell, something_changed can only be true
- // if |model_| called UpdatePopup(), which then updated us. But
- // the state involved seems substantial.
- EmphasizeURLComponents();
- }
+ // Restyle in case the user changed something.
+ // TODO(shess): I believe there are multiple-redraw cases, here.
+ // Linux watches for something_changed && text_differs, but that
+ // fails for us in case you copy the URL and paste the identical URL
+ // back (we'll lose the styling).
+ EmphasizeURLComponents();
return something_changed;
}