| 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 ec31a5b5c093d576348c16b297655c85ebf5d6a8..9783982c981bc6c1ea248ec0a057f2a0c7473af6 100644
|
| --- a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
|
| +++ b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
|
| @@ -546,6 +546,9 @@ void OmniboxViewMac::ApplyTextAttributes(
|
| const base::string16& display_text,
|
| NSMutableAttributedString* attributedString) {
|
| NSUInteger as_length = [attributedString length];
|
| + if (as_length == 0) {
|
| + return;
|
| + }
|
| NSRange as_entire_string = NSMakeRange(0, as_length);
|
| bool in_dark_mode = [[field_ window] inIncognitoModeWithSystemTheme];
|
|
|
| @@ -557,6 +560,15 @@ void OmniboxViewMac::ApplyTextAttributes(
|
| value:@"en_US_POSIX"
|
| range:as_entire_string];
|
|
|
| + // Under Material Design, force the text to be a single color white editing.
|
| + if (ui::MaterialDesignController::IsModeMaterial() &&
|
| + [field_ currentEditor]) {
|
| + [attributedString addAttribute:NSForegroundColorAttributeName
|
| + value:HostTextColor(in_dark_mode)
|
| + range:as_entire_string];
|
| + return;
|
| + }
|
| +
|
| url::Component scheme, host;
|
| AutocompleteInput::ParseForEmphasizeComponents(
|
| display_text, ChromeAutocompleteSchemeClassifier(profile_), &scheme,
|
|
|