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

Unified Diff: chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc

Issue 8476019: ui/gfx: Convert Canvas::DrawRectInt() to use gfx::Rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reland - WHAT HERE could have broken media_unittests???? Created 9 years, 1 month 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/autocomplete/autocomplete_popup_contents_view.cc
diff --git a/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc b/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc
index c13f68fa9314d7f4587f816e60faa938a108dc8e..d1e3dbb3f0d10c499a2335dc07f8777c6af19323 100644
--- a/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc
+++ b/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc
@@ -173,14 +173,12 @@ class AutocompletePopupContentsView::InstantOptInView
}
virtual void OnPaint(gfx::Canvas* canvas) {
+ gfx::Rect paint_rect(GetLocalBounds());
+ paint_rect.Inset(kOptInBackgroundHInset, kOptInBackgroundVInset);
canvas->Save();
- canvas->Translate(gfx::Point(kOptInBackgroundHInset,
- kOptInBackgroundVInset));
- bg_painter_->Paint(width() - kOptInBackgroundHInset * 2,
- height() - kOptInBackgroundVInset * 2, canvas);
- canvas->DrawRectInt(ResourceBundle::toolbar_separator_color, 0, 0,
- width() - kOptInBackgroundHInset * 2,
- height() - kOptInBackgroundVInset * 2);
+ canvas->Translate(paint_rect.origin());
+ bg_painter_->Paint(paint_rect.width(), paint_rect.height(), canvas);
+ canvas->DrawRect(paint_rect, ResourceBundle::toolbar_separator_color);
canvas->Restore();
}
« no previous file with comments | « chrome/browser/ui/gtk/gtk_theme_service.cc ('k') | chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698