Chromium Code Reviews| 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 3e1140fd3c8477c429bf8a1dc67444f913b6a403..b5daee62292736066b05b841fc020c7969f820c2 100644 |
| --- a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm |
| +++ b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm |
| @@ -450,13 +450,15 @@ void OmniboxViewMac::ApplyTextAttributes(const string16& display_text, |
| url_parse::Component scheme, host; |
| AutocompleteInput::ParseForEmphasizeComponents( |
| display_text, &scheme, &host); |
| - const bool emphasize = model()->CurrentTextIsURL() && (host.len > 0); |
| - if (emphasize) { |
| + if (model()->currentTextIsURL() && |
| + (host.is_nonempty() || toolbar_model()->ShouldGreyOutURL())) { |
| [as addAttribute:NSForegroundColorAttributeName value:BaseTextColor() |
| range:as_entire_string]; |
| - [as addAttribute:NSForegroundColorAttributeName value:HostTextColor() |
| + if (host.is_nonempty() && !toolbar_model()->ShouldGreyOutURL()) { |
|
Peter Kasting
2013/04/04 21:07:05
Nit: No need to add the first clause, it will alwa
Patrick Riordan
2013/04/10 02:00:24
Done.
|
| + [as addAttribute:NSForegroundColorAttributeName value:HostTextColor() |
| range:ComponentToNSRange(host)]; |
| + } |
| } |
| // TODO(shess): GTK has this as a member var, figure out why. |