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

Unified Diff: webkit/tools/test_shell/webwidget_host_gtk.cc

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: cc/ fixes 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
« no previous file with comments | « webkit/plugins/webview_plugin.cc ('k') | webkit/tools/test_shell/webwidget_host_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/webwidget_host_gtk.cc
diff --git a/webkit/tools/test_shell/webwidget_host_gtk.cc b/webkit/tools/test_shell/webwidget_host_gtk.cc
index 6f3c8e72cb57c5d199de71ceec2aa85c109a7135..802992873a538b818f5f10f18781a455ab2cd369 100644
--- a/webkit/tools/test_shell/webwidget_host_gtk.cc
+++ b/webkit/tools/test_shell/webwidget_host_gtk.cc
@@ -290,7 +290,7 @@ WebWidgetHost* WebWidgetHost::Create(GtkWidget* parent_view,
}
void WebWidgetHost::UpdatePaintRect(const gfx::Rect& rect) {
- paint_rect_ = paint_rect_.Union(rect);
+ paint_rect_.Union(rect);
}
void WebWidgetHost::DidInvalidateRect(const gfx::Rect& damaged_rect) {
@@ -377,14 +377,14 @@ void WebWidgetHost::Paint() {
// to update that area after we're done painting it.
gfx::Rect total_paint;
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();
DLOG_IF(WARNING, i == 1) << "painting caused additional invalidations";
PaintRect(rect);
- total_paint = total_paint.Union(rect);
+ total_paint.Union(rect);
}
}
//DCHECK(paint_rect_.IsEmpty());
« no previous file with comments | « webkit/plugins/webview_plugin.cc ('k') | webkit/tools/test_shell/webwidget_host_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698