Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(761)

Unified Diff: chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm

Issue 2563863003: [Autofill] Remove AutofillPopupController::IsWarning() (Closed)
Patch Set: fix Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..5a55ab1e653cd2c4249c5b36f270232fd266ae4d 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,8 @@ - (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.
Mathieu 2016/12/13 17:57:12 This has not been addressed. Please remove IsWarni
- NSColor* nameColor =
- controller_->IsWarning(index) ? [self warningColor] : [self nameColor];
Mathieu 2016/12/13 17:57:12 can we get rid of the warningColor definition on t
+ SkColor skColor = controller_->layout_model().GetValueFontColorForRow(index);
+ NSColor* nameColor = skia::SkColorToSRGBNSColor(skColor);
NSDictionary* nameAttributes = [NSDictionary
dictionaryWithObjectsAndKeys:controller_->layout_model()
.GetValueFontListForRow(index)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698