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

Unified Diff: chrome/browser/ui/views/tabs/base_tab.cc

Issue 8383028: ui/gfx: Convert Canvas::ClipRectInt() to use gfx::Rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo 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
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_view.cc ('k') | ui/gfx/canvas.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/base_tab.cc
diff --git a/chrome/browser/ui/views/tabs/base_tab.cc b/chrome/browser/ui/views/tabs/base_tab.cc
index 4be5f543b0b9e73edfb3352563a54f9d24983dc1..6f38ffb1f475f62c1cb5ec7e81ad7305051a495a 100644
--- a/chrome/browser/ui/views/tabs/base_tab.cc
+++ b/chrome/browser/ui/views/tabs/base_tab.cc
@@ -88,7 +88,7 @@ void DrawIconCenter(gfx::Canvas* canvas,
int dst_y = bounds.y() - (icon_height - bounds.height()) / 2;
// NOTE: the clipping is a work around for 69528, it shouldn't be necessary.
canvas->Save();
- canvas->ClipRectInt(dst_x, dst_y, icon_width, icon_height);
+ canvas->ClipRectInt(gfx::Rect(dst_x, dst_y, icon_width, icon_height));
canvas->DrawBitmapInt(image,
image_offset, 0, icon_width, icon_height,
dst_x, dst_y, icon_width, icon_height,
@@ -444,7 +444,7 @@ void BaseTab::PaintIcon(gfx::Canvas* canvas) {
icon_size, icon_size, bounds, false);
} else {
canvas->Save();
- canvas->ClipRectInt(0, 0, width(), height());
+ canvas->ClipRectInt(GetLocalBounds());
if (should_display_crashed_favicon_) {
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
SkBitmap crashed_favicon(*rb.GetBitmapNamed(IDR_SAD_FAVICON));
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_view.cc ('k') | ui/gfx/canvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698