diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-06 16:26:20 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-06 16:26:20 +0000 |
commit | 5b137dcbe79a56673fbed5f23d3a2480270fce13 (patch) | |
tree | 19536474be0d11655302325a93f5fe81c47128a2 /chrome | |
parent | b3263102fcd879f86389fa5435b8a80e1bf9fe68 (diff) | |
download | chromium_src-5b137dcbe79a56673fbed5f23d3a2480270fce13.zip chromium_src-5b137dcbe79a56673fbed5f23d3a2480270fce13.tar.gz chromium_src-5b137dcbe79a56673fbed5f23d3a2480270fce13.tar.bz2 |
Turns out a cleanup change I made a while ago was wrong. This could result in odd text colors in the Omnibox when typing.
BUG=none
TEST=Visit m/, then type a letter into the omnibox and make sure it's black.
Review URL: http://codereview.chromium.org/259054
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28116 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_edit_view_win.cc | 6 |
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. |