Index: ui/base/native_theme/native_theme_base.cc |
diff --git a/ui/base/native_theme/native_theme_base.cc b/ui/base/native_theme/native_theme_base.cc |
index 96c4a3c21f849a7e74bbe0f88b8a0061df4b984d..df9b7bf93ca9acef7ec9c66fe7b357f60eff3811 100644 |
--- a/ui/base/native_theme/native_theme_base.cc |
+++ b/ui/base/native_theme/native_theme_base.cc |
@@ -504,7 +504,8 @@ void NativeThemeBase::PaintCheckbox(SkCanvas* canvas, |
rb.GetImageSkiaNamed(IDR_CHECKBOX_OFF); |
} |
- gfx::Rect bounds = rect.Center(gfx::Size(image->width(), image->height())); |
+ gfx::Rect bounds = rect; |
+ bounds.ClampToCenteredSize(gfx::Size(image->width(), image->height())); |
DrawImageInt(canvas, *image, 0, 0, image->width(), image->height(), |
bounds.x(), bounds.y(), bounds.width(), bounds.height()); |
} |
@@ -655,7 +656,8 @@ void NativeThemeBase::PaintRadio(SkCanvas* canvas, |
rb.GetImageSkiaNamed(IDR_RADIO_OFF); |
} |
- gfx::Rect bounds = rect.Center(gfx::Size(image->width(), image->height())); |
+ gfx::Rect bounds = rect; |
+ bounds.ClampToCenteredSize(gfx::Size(image->width(), image->height())); |
DrawImageInt(canvas, *image, 0, 0, image->width(), image->height(), |
bounds.x(), bounds.y(), bounds.width(), bounds.height()); |
} |