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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 8359029: ui/gfx: Convert Canvas::DrawFocusRect() to use gfx::Rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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: chrome/browser/ui/views/location_bar/location_bar_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index aefe220ff8b14ffeb1bba68c4cc8f09b98de16a6..29a34ae7e2e43d427c9de9c83982a460ba16f2df 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -755,9 +755,11 @@ void LocationBarView::OnPaint(gfx::Canvas* canvas) {
if (show_focus_rect_ && HasFocus()) {
gfx::Rect r = location_entry_view_->bounds();
#if defined(OS_WIN)
- canvas->DrawFocusRect(r.x() - 1, r.y() - 1, r.width() + 2, r.height() + 2);
+ gfx::Rect rect(r.x() - 1, r.y() - 1, r.width() + 2, r.height() + 2);
Peter Kasting 2011/10/24 22:15:13 Nit: Simpler: #if defined(OS_WIN) r.Inset(-1,
tfarina 2011/10/25 02:04:53 Done.
+ canvas->DrawFocusRect(rect);
#else
- canvas->DrawFocusRect(r.x() - 1, r.y(), r.width() + 2, r.height());
+ gfx::Rect rect(r.x() - 1, r.y(), r.width() + 2, r.height());
+ canvas->DrawFocusRect(rect);
#endif
}
}

Powered by Google App Engine
This is Rietveld 408576698