summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_win.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
index 0a821de..343574a 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
@@ -2012,7 +2012,11 @@ void AutocompleteEditViewWin::EmphasizeURLComponents() {
// the standard text color.
cf.crTextColor = skia::SkColorToCOLORREF(LocationBarView::GetColor(is_secure,
emphasize ? LocationBarView::DEEMPHASIZED_TEXT : LocationBarView::TEXT));
- SetDefaultCharFormat(cf);
+ // NOTE: Don't use SetDefaultCharFormat() instead of the below; that sets the
+ // format that will get applied to text added in the future, not to text
+ // already in the edit.
+ SelectAll(false);
+ SetSelectionCharFormat(cf);
if (emphasize) {
// We've found a host name, give it more emphasis.