Index: chrome/browser/renderer_host/render_widget_host_view_views.cc |
diff --git a/chrome/browser/renderer_host/render_widget_host_view_views.cc b/chrome/browser/renderer_host/render_widget_host_view_views.cc |
index c6be0b356c3060936e84e04db8411458451fd6e6..63399f5c389450b71ef6e0355d534b597934d801 100644 |
--- a/chrome/browser/renderer_host/render_widget_host_view_views.cc |
+++ b/chrome/browser/renderer_host/render_widget_host_view_views.cc |
@@ -355,12 +355,6 @@ void RenderWidgetHostViewViews::Paint(gfx::Canvas* canvas) { |
return; |
} |
- // Paint a "hole" in the canvas so that the render of the web page is on |
- // top of whatever else has already been painted in the views hierarchy. |
- // Later views might still get to paint on top. |
- canvas->FillRectInt(SK_ColorBLACK, 0, 0, kMaxWindowWidth, kMaxWindowHeight, |
- SkXfermode::kClear_Mode); |
- |
// Don't do any painting if the GPU process is rendering directly |
// into the View. |
RenderWidgetHost* render_widget_host = GetRenderWidgetHost(); |
@@ -385,6 +379,15 @@ void RenderWidgetHostViewViews::Paint(gfx::Canvas* canvas) { |
gfx::Rect paint_rect = gfx::Rect(0, 0, kMaxWindowWidth, kMaxWindowHeight); |
paint_rect = paint_rect.Intersect(invalid_rect_); |
+ // Make sure we paint within the bounds. |
+ paint_rect = paint_rect.Intersect(bounds()); |
+ |
+ // Paint a "hole" in the canvas so that the render of the web page is on |
+ // top of whatever else has already been painted in the views hierarchy. |
+ // Later views might still get to paint on top. |
+ canvas->FillRectInt(SK_ColorBLACK, 0, 0, |
+ paint_rect.width(), paint_rect.height(), |
+ SkXfermode::kClear_Mode); |
Alex Nicolaou
2011/01/21 16:00:16
You'll have to move this back up.
If you're reall
sadrul
2011/01/21 16:36:19
Moved this back up.
|
if (backing_store) { |
// Only render the widget if it is attached to a window; there's a short |