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

Unified Diff: webkit/plugins/npapi/webplugin_delegate_impl_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/plugins/npapi/webplugin_delegate_impl_mac.mm
diff --git a/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm b/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm
index ff23bcbb3a67ca349e8e9188a3d13a08e8ee659d..ba203f97536d6d456527153745d7c10cf8356f1e 100644
--- a/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm
+++ b/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm
@@ -460,11 +460,13 @@ void WebPluginDelegateImpl::WindowlessPaint(gfx::NativeDrawingContext context,
// Plugin invalidates trigger asynchronous paints with the original
// invalidation rect; the plugin may be resized before the paint is handled,
// so we need to ensure that the damage rect is still sane.
- paint_rect = damage_rect.Intersect(
+ paint_rect = damage_rect;
+ paint_rect.Intersect(
gfx::Rect(0, 0, window_rect_.width(), window_rect_.height()));
} else {
// Use the actual window region when drawing directly to the window context.
- paint_rect = damage_rect.Intersect(window_rect_);
+ paint_rect = window_rect_;
+ paint_rect.Intersect(damage_rect);
}
ScopedActiveDelegate active_delegate(this);

Powered by Google App Engine
This is Rietveld 408576698