| Index: webkit/tools/test_shell/webwidget_host_mac.mm
|
| diff --git a/webkit/tools/test_shell/webwidget_host_mac.mm b/webkit/tools/test_shell/webwidget_host_mac.mm
|
| index 60a10f531531ea12813c2dd0e669907ca0143b1d..795430edbbd9fd1aa02338cad63f1fb32b0c39b8 100644
|
| --- a/webkit/tools/test_shell/webwidget_host_mac.mm
|
| +++ b/webkit/tools/test_shell/webwidget_host_mac.mm
|
| @@ -97,10 +97,10 @@ void WebWidgetHost::DidInvalidateRect(const gfx::Rect& damaged_rect) {
|
| // If this invalidate overlaps with a pending scroll, then we have to
|
| // downgrade to invalidating the scroll rect.
|
| if (damaged_rect.Intersects(scroll_rect_)) {
|
| - paint_rect_ = paint_rect_.Union(scroll_rect_);
|
| + paint_rect_.Union(scroll_rect_);
|
| ResetScrollRect();
|
| }
|
| - paint_rect_ = paint_rect_.Union(damaged_rect);
|
| + paint_rect_.Union(damaged_rect);
|
|
|
| NSRect r = NSRectFromCGRect(damaged_rect.ToCGRect());
|
| // flip to cocoa coordinates
|
| @@ -114,9 +114,9 @@ void WebWidgetHost::DidScrollRect(int dx, int dy, const gfx::Rect& clip_rect) {
|
| // If we already have a pending scroll operation or if this scroll operation
|
| // intersects the existing paint region, then just failover to invalidating.
|
| if (!scroll_rect_.IsEmpty() || paint_rect_.Intersects(clip_rect)) {
|
| - paint_rect_ = paint_rect_.Union(scroll_rect_);
|
| + paint_rect_.Union(scroll_rect_);
|
| ResetScrollRect();
|
| - paint_rect_ = paint_rect_.Union(clip_rect);
|
| + paint_rect_.Union(clip_rect);
|
| }
|
|
|
| // We will perform scrolling lazily, when requested to actually paint.
|
| @@ -161,7 +161,7 @@ WebWidgetHost::~WebWidgetHost() {
|
| }
|
|
|
| void WebWidgetHost::UpdatePaintRect(const gfx::Rect& rect) {
|
| - paint_rect_ = paint_rect_.Union(rect);
|
| + paint_rect_.Union(rect);
|
| }
|
|
|
| void WebWidgetHost::Paint() {
|
| @@ -190,10 +190,10 @@ void WebWidgetHost::Paint() {
|
| webwidget_->layout();
|
|
|
| // Scroll the canvas if necessary
|
| - scroll_rect_ = client_rect.Intersect(scroll_rect_);
|
| + scroll_rect_.Intersect(client_rect);
|
| if (!scroll_rect_.IsEmpty()) {
|
| // add to invalidate rect, since there's no equivalent of ScrollDC.
|
| - paint_rect_ = paint_rect_.Union(scroll_rect_);
|
| + paint_rect_.Union(scroll_rect_);
|
| }
|
| ResetScrollRect();
|
|
|
| @@ -201,7 +201,7 @@ void WebWidgetHost::Paint() {
|
| // first time we call it. This is necessary because some WebCore rendering
|
| // objects update their layout only when painted.
|
| for (int i = 0; i < 2; ++i) {
|
| - paint_rect_ = client_rect.Intersect(paint_rect_);
|
| + paint_rect_.Intersect(client_rect);
|
| if (!paint_rect_.IsEmpty()) {
|
| gfx::Rect rect(paint_rect_);
|
| paint_rect_ = gfx::Rect();
|
|
|