Chromium Code Reviews| Index: chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm |
| diff --git a/chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm b/chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm |
| index c21981d1a83148c414ad13483af997296d8d6fac..8b49dbb471e248760fbde1ea949035db83b9cb1a 100644 |
| --- a/chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm |
| +++ b/chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm |
| @@ -16,6 +16,7 @@ |
| #include "third_party/skia/include/core/SkColor.h" |
| #include "ui/base/cocoa/window_size_constants.h" |
| #include "ui/base/resource/resource_bundle.h" |
| +#include "ui/gfx/color_palette.h" |
| #include "ui/gfx/font_list.h" |
| #include "ui/gfx/geometry/point.h" |
| #include "ui/gfx/geometry/rect.h" |
| @@ -197,11 +198,12 @@ - (CGFloat)drawName:(NSString*)name |
| rightAlign:(BOOL)rightAlign |
| bounds:(NSRect)bounds |
| textYOffset:(CGFloat)textYOffset { |
| - // TODO(crbug.com/666189): Use |
| - // AutofillPopupLayoutModel::GetValueFontColorForRow() instead and remove |
| - // IsWarning() method. |
| - NSColor* nameColor = |
| - controller_->IsWarning(index) ? [self warningColor] : [self nameColor]; |
| + SkColor skColor = controller_->layout_model().GetValueFontColorForRow(index); |
| + NSColor* nameColor = nil; |
|
Mathieu
2016/12/13 15:45:10
Have a look at https://cs.chromium.org/chromium/sr
|
| + if (skColor == autofill::kLabelTextColor || skColor == gfx::kGoogleRed700) |
| + nameColor = [self warningColor]; |
| + else |
| + nameColor = [self nameColor]; |
| NSDictionary* nameAttributes = [NSDictionary |
| dictionaryWithObjectsAndKeys:controller_->layout_model() |
| .GetValueFontListForRow(index) |