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

Unified Diff: ui/native_theme/native_theme_mac.mm

Issue 2288003002: Delete IsAtLeastOS10_9() and IsAtMostOS10_9() (Closed)
Patch Set: Created 4 years, 4 months 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
Index: ui/native_theme/native_theme_mac.mm
diff --git a/ui/native_theme/native_theme_mac.mm b/ui/native_theme/native_theme_mac.mm
index 5f1f8d9d83cc11ef14e0c7e31ca0fec6b37b8563..6b745c70f589007efc3d720a5817d1a074874f47 100644
--- a/ui/native_theme/native_theme_mac.mm
+++ b/ui/native_theme/native_theme_mac.mm
@@ -181,8 +181,8 @@ SkColor NativeThemeMac::GetSystemColor(ColorId color_id) const {
case kColorId_MenuBackgroundColor:
return kMenuPopupBackgroundColor;
case kColorId_MenuSeparatorColor:
- return base::mac::IsOS10_9() ? kMenuSeparatorColorMavericks
- : kMenuSeparatorColor;
+ return base::mac::IsAtLeastOS10_10() ? kMenuSeparatorColor
+ : kMenuSeparatorColorMavericks;
case kColorId_MenuBorderColor:
return kMenuBorderColor;
@@ -243,10 +243,10 @@ void NativeThemeMac::PaintMenuPopupBackground(
const MenuBackgroundExtraParams& menu_background) const {
SkPaint paint;
paint.setAntiAlias(true);
- if (base::mac::IsOS10_9())
- paint.setColor(kMenuPopupBackgroundColorMavericks);
- else
+ if (!base::mac::IsAtLeastOS10_10())
paint.setColor(kMenuPopupBackgroundColor);
Mark Mentovai 2016/08/29 17:57:56 Looks like you flipped the “then” and “else” sides
Sidney San Martín 2016/08/29 19:26:14 Oof, thanks.
+ else
+ paint.setColor(kMenuPopupBackgroundColorMavericks);
const SkScalar radius = SkIntToScalar(menu_background.corner_radius);
SkRect rect = gfx::RectToSkRect(gfx::Rect(size));
canvas->drawRoundRect(rect, radius, radius, paint);

Powered by Google App Engine
This is Rietveld 408576698