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

Unified Diff: ui/views/controls/focusable_border.cc

Issue 9544001: ui: Let skia do the conversion work for us by using the integer version of set() function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: peter review Created 8 years, 10 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
« no previous file with comments | « ui/views/bubble/bubble_border.cc ('k') | ui/views/controls/menu/menu_image_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/focusable_border.cc
diff --git a/ui/views/controls/focusable_border.cc b/ui/views/controls/focusable_border.cc
index 508135879c664e343c69273cf1441cac0e5cfe62..6e87758c09bb48d12b2fce64732e072e0858c05d 100644
--- a/ui/views/controls/focusable_border.cc
+++ b/ui/views/controls/focusable_border.cc
@@ -8,6 +8,7 @@
#include "ui/gfx/canvas_skia.h"
#include "ui/gfx/insets.h"
#include "ui/gfx/native_theme.h"
+#include "ui/gfx/skia_util.h"
namespace {
@@ -28,11 +29,8 @@ FocusableBorder::FocusableBorder()
}
void FocusableBorder::Paint(const View& view, gfx::Canvas* canvas) const {
- SkRect rect;
- rect.set(SkIntToScalar(0), SkIntToScalar(0),
- SkIntToScalar(view.width()), SkIntToScalar(view.height()));
SkPath path;
- path.addRect(rect, SkPath::kCW_Direction);
+ path.addRect(gfx::RectToSkRect(view.GetLocalBounds()), SkPath::kCW_Direction);
SkPaint paint;
paint.setStyle(SkPaint::kStroke_Style);
SkColor focus_color = gfx::NativeTheme::instance()->GetSystemColor(
« no previous file with comments | « ui/views/bubble/bubble_border.cc ('k') | ui/views/controls/menu/menu_image_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698