 Chromium Code Reviews
 Chromium Code Reviews Issue 8383028:
  ui/gfx: Convert Canvas::ClipRectInt() to use gfx::Rect.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src
    
  
    Issue 8383028:
  ui/gfx: Convert Canvas::ClipRectInt() to use gfx::Rect.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src| 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..c2142ccb772788a1efc784d31b045bb208831aa0 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(gfx::Rect(0, 0, width(), height())); | 
| 
Peter Kasting
2011/10/25 20:24:47
Nit: I think you can pass GetLocalBounds() here.
 
tfarina
2011/10/25 23:52:41
Done.
 | 
| if (should_display_crashed_favicon_) { | 
| ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 
| SkBitmap crashed_favicon(*rb.GetBitmapNamed(IDR_SAD_FAVICON)); |