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 33addf6c211895d57761ce0e9d3b3b03e63b9f98..c368b4c19f1f91c46772c5db749c735f1b991f6a 100644 |
--- a/chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm |
+++ b/chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm |
@@ -12,6 +12,8 @@ |
#include "chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.h" |
#include "components/autofill/core/browser/popup_item_ids.h" |
#include "components/autofill/core/browser/suggestion.h" |
+#include "skia/ext/skia_utils_mac.h" |
+#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/font_list.h" |
@@ -150,10 +152,16 @@ using autofill::AutofillPopupLayoutModel; |
bounds:(NSRect)bounds |
selected:(BOOL)isSelected |
textYOffset:(CGFloat)textYOffset { |
- // If this row is selected, highlight it. |
+ // If this row is selected, highlight it with this mac system color. |
+ // Otherwise the controller may have a specific background color for this |
+ // entry. |
if (isSelected) { |
[[self highlightColor] set]; |
[NSBezierPath fillRect:bounds]; |
+ } else { |
+ SkColor backgroundColor = controller_->GetBackgroundColorForRow(index); |
+ [skia::SkColorToSRGBNSColor(backgroundColor) set]; |
+ [NSBezierPath fillRect:bounds]; |
} |
BOOL isRTL = controller_->IsRTL(); |