From ee8d6fd30b022ac2c87b7a190c954e7bb3c9b21e Mon Sep 17 00:00:00 2001 From: "erg@chromium.org" Date: Wed, 26 May 2010 17:05:48 +0000 Subject: Clean up calls like "gfx::Rect(0, 0, size().width(), size().height()". The caller can use the much shorter "gfx::Rect(size())", since gfx::Rect has a constructor that just takes a Size. BUG=none TEST=none Review URL: http://codereview.chromium.org/2204001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48283 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/renderer/webplugin_delegate_proxy.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'chrome/renderer/webplugin_delegate_proxy.cc') diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc index 18532f9..ab21bbe9 100644 --- a/chrome/renderer/webplugin_delegate_proxy.cc +++ b/chrome/renderer/webplugin_delegate_proxy.cc @@ -1084,8 +1084,7 @@ void WebPluginDelegateProxy::OnInvalidateRect(const gfx::Rect& rect) { // Clip the invalidation rect to the plugin bounds; the plugin may have been // resized since the invalidate message was sent. - const gfx::Rect clipped_rect(rect.Intersect( - gfx::Rect(0, 0, plugin_rect_.width(), plugin_rect_.height()))); + const gfx::Rect clipped_rect(rect.Intersect(gfx::Rect(plugin_rect_.size()))); invalidate_pending_ = true; CopyFromTransportToBacking(clipped_rect); @@ -1412,7 +1411,7 @@ bool WebPluginDelegateProxy::BindFakePluginWindowHandle(bool opaque) { webkit_glue::WebPluginGeometry geom; geom.window = fake_window; geom.window_rect = plugin_rect_; - geom.clip_rect = gfx::Rect(0, 0, plugin_rect_.width(), plugin_rect_.height()); + geom.clip_rect = gfx::Rect(plugin_rect_.size()); geom.rects_valid = true; geom.visible = true; render_view_->DidMovePlugin(geom); -- cgit v1.1