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

Unified Diff: webkit/tools/test_shell/webwidget_host_mac.mm

Issue 11110004: Make gfx::Rect class operations consistently mutate the class they are called on. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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
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..ae9f644f5627e5e98943e5e5fabce024773ee2f9 100644
--- a/webkit/tools/test_shell/webwidget_host_mac.mm
+++ b/webkit/tools/test_shell/webwidget_host_mac.mm
@@ -190,7 +190,7 @@ 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_);
@@ -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();

Powered by Google App Engine
This is Rietveld 408576698