summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/aeropeek_manager.cc3
-rw-r--r--chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc2
-rw-r--r--chrome/browser/automation/automation_provider_gtk.cc3
-rw-r--r--chrome/browser/chromeos/wm_overview_snapshot.cc2
-rw-r--r--chrome/browser/extensions/extension_tabs_module.cc3
-rw-r--r--chrome/browser/gtk/tabs/dragged_tab_gtk.cc3
-rw-r--r--chrome/browser/renderer_host/backing_store_win.cc2
-rw-r--r--chrome/browser/tab_contents/thumbnail_generator.cc3
-rw-r--r--chrome/renderer/render_widget.cc8
-rw-r--r--chrome/renderer/webplugin_delegate_pepper.cc2
-rw-r--r--chrome/renderer/webplugin_delegate_proxy.cc5
11 files changed, 15 insertions, 21 deletions
diff --git a/chrome/browser/aeropeek_manager.cc b/chrome/browser/aeropeek_manager.cc
index b93f5ad..e0296c8 100644
--- a/chrome/browser/aeropeek_manager.cc
+++ b/chrome/browser/aeropeek_manager.cc
@@ -1216,8 +1216,7 @@ bool AeroPeekManager::GetTabPreview(int tab_id, SkBitmap* preview) {
// Create a copy of this BackingStore image.
// This code is just copied from "thumbnail_generator.cc".
skia::PlatformCanvas canvas;
- if (!backing_store->CopyFromBackingStore(gfx::Rect(gfx::Point(0, 0),
- backing_store->size()),
+ if (!backing_store->CopyFromBackingStore(gfx::Rect(backing_store->size()),
&canvas))
return false;
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc b/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc
index 2f9895d..3d9d96f 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc
+++ b/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc
@@ -87,7 +87,7 @@ const char* kLRE = "\xe2\x80\xaa";
gfx::Rect GetWindowRect(GdkWindow* window) {
gint width, height;
gdk_drawable_get_size(GDK_DRAWABLE(window), &width, &height);
- return gfx::Rect(0, 0, width, height);
+ return gfx::Rect(width, height);
}
// Return a Rect for the space for a result line. This excludes the border,
diff --git a/chrome/browser/automation/automation_provider_gtk.cc b/chrome/browser/automation/automation_provider_gtk.cc
index a0fe498..8e12c89 100644
--- a/chrome/browser/automation/automation_provider_gtk.cc
+++ b/chrome/browser/automation/automation_provider_gtk.cc
@@ -53,8 +53,7 @@ void AutomationProvider::WindowGetViewBounds(int handle, int view_id,
if (!widget)
return;
*success = true;
- *bounds = gfx::Rect(0, 0,
- widget->allocation.width, widget->allocation.height);
+ *bounds = gfx::Rect(widget->allocation.width, widget->allocation.height);
gint x, y;
if (screen_coordinates) {
gfx::Point point = gtk_util::GetWidgetScreenPosition(widget);
diff --git a/chrome/browser/chromeos/wm_overview_snapshot.cc b/chrome/browser/chromeos/wm_overview_snapshot.cc
index 3ae6fd0..63c1e8a 100644
--- a/chrome/browser/chromeos/wm_overview_snapshot.cc
+++ b/chrome/browser/chromeos/wm_overview_snapshot.cc
@@ -43,7 +43,7 @@ void WmOverviewSnapshot::Init(const gfx::Size& size,
snapshot_view_->set_border(
views::Border::CreateSolidBorder(1, SkColorSetRGB(176, 176, 176)));
- WidgetGtk::Init(NULL, gfx::Rect(gfx::Point(0,0), size));
+ WidgetGtk::Init(NULL, gfx::Rect(size));
SetContentsView(snapshot_view_);
diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc
index 62b07a5..30531a8 100644
--- a/chrome/browser/extensions/extension_tabs_module.cc
+++ b/chrome/browser/extensions/extension_tabs_module.cc
@@ -878,8 +878,7 @@ bool CaptureVisibleTabFunction::CaptureSnapshotFromBackingStore(
BackingStore* backing_store) {
skia::PlatformCanvas temp_canvas;
- if (!backing_store->CopyFromBackingStore(gfx::Rect(gfx::Point(0, 0),
- backing_store->size()),
+ if (!backing_store->CopyFromBackingStore(gfx::Rect(backing_store->size()),
&temp_canvas)) {
return false;
}
diff --git a/chrome/browser/gtk/tabs/dragged_tab_gtk.cc b/chrome/browser/gtk/tabs/dragged_tab_gtk.cc
index f221c0e..426ab43 100644
--- a/chrome/browser/gtk/tabs/dragged_tab_gtk.cc
+++ b/chrome/browser/gtk/tabs/dragged_tab_gtk.cc
@@ -156,8 +156,7 @@ void DraggedTabGtk::AnimationCanceled(const Animation* animation) {
void DraggedTabGtk::Layout() {
if (attached_) {
- gfx::Size prefsize = GetPreferredSize();
- renderer_->SetBounds(gfx::Rect(0, 0, prefsize.width(), prefsize.height()));
+ renderer_->SetBounds(gfx::Rect(GetPreferredSize()));
} else {
int left = 0;
if (base::i18n::IsRTL())
diff --git a/chrome/browser/renderer_host/backing_store_win.cc b/chrome/browser/renderer_host/backing_store_win.cc
index e41ad43..94d9cbf 100644
--- a/chrome/browser/renderer_host/backing_store_win.cc
+++ b/chrome/browser/renderer_host/backing_store_win.cc
@@ -139,7 +139,7 @@ void BackingStoreWin::PaintToBackingStore(
BITMAPINFOHEADER hdr;
gfx::CreateBitmapHeader(bitmap_rect.width(), bitmap_rect.height(), &hdr);
// Account for a bitmap_rect that exceeds the bounds of our view
- gfx::Rect view_rect(0, 0, size().width(), size().height());
+ gfx::Rect view_rect(size());
for (size_t i = 0; i < copy_rects.size(); i++) {
gfx::Rect paint_rect = view_rect.Intersect(copy_rects[i]);
diff --git a/chrome/browser/tab_contents/thumbnail_generator.cc b/chrome/browser/tab_contents/thumbnail_generator.cc
index f9998a4..7650f88 100644
--- a/chrome/browser/tab_contents/thumbnail_generator.cc
+++ b/chrome/browser/tab_contents/thumbnail_generator.cc
@@ -102,8 +102,7 @@ SkBitmap GetThumbnailForBackingStore(BackingStore* backing_store) {
// allocation and we can tolerate failure here, so give up if the allocation
// fails.
skia::PlatformCanvas temp_canvas;
- if (!backing_store->CopyFromBackingStore(gfx::Rect(gfx::Point(0, 0),
- backing_store->size()),
+ if (!backing_store->CopyFromBackingStore(gfx::Rect(backing_store->size()),
&temp_canvas))
return result;
const SkBitmap& bmp = temp_canvas.getTopPlatformDevice().accessBitmap(false);
diff --git a/chrome/renderer/render_widget.cc b/chrome/renderer/render_widget.cc
index eb2b423c..ea801c4 100644
--- a/chrome/renderer/render_widget.cc
+++ b/chrome/renderer/render_widget.cc
@@ -537,7 +537,7 @@ void RenderWidget::didInvalidateRect(const WebRect& rect) {
bool update_pending = paint_aggregator_.HasPendingUpdate();
// The invalidated rect might be outside the bounds of the view.
- gfx::Rect view_rect(0, 0, size_.width(), size_.height());
+ gfx::Rect view_rect(size_);
gfx::Rect damaged_rect = view_rect.Intersect(rect);
if (damaged_rect.IsEmpty())
return;
@@ -566,7 +566,7 @@ void RenderWidget::didScrollRect(int dx, int dy, const WebRect& clip_rect) {
bool update_pending = paint_aggregator_.HasPendingUpdate();
// The scrolled rect might be outside the bounds of the view.
- gfx::Rect view_rect(0, 0, size_.width(), size_.height());
+ gfx::Rect view_rect(size_);
gfx::Rect damaged_rect = view_rect.Intersect(clip_rect);
if (damaged_rect.IsEmpty())
return;
@@ -780,10 +780,10 @@ void RenderWidget::OnMsgPaintAtSize(const TransportDIB::Handle& dib_handle,
float y_scale = static_cast<float>(desired_size.height()) /
static_cast<float>(canvas_size.height());
- gfx::Rect orig_bounds(gfx::Point(0,0), canvas_size);
+ gfx::Rect orig_bounds(canvas_size);
canvas_size.set_width(static_cast<int>(canvas_size.width() * x_scale));
canvas_size.set_height(static_cast<int>(canvas_size.height() * y_scale));
- gfx::Rect bounds(gfx::Point(0,0), canvas_size);
+ gfx::Rect bounds(canvas_size);
scoped_ptr<skia::PlatformCanvas> canvas(
paint_at_scale_buffer->GetPlatformCanvas(canvas_size.width(),
diff --git a/chrome/renderer/webplugin_delegate_pepper.cc b/chrome/renderer/webplugin_delegate_pepper.cc
index 7b82204..d70608f 100644
--- a/chrome/renderer/webplugin_delegate_pepper.cc
+++ b/chrome/renderer/webplugin_delegate_pepper.cc
@@ -1076,7 +1076,7 @@ bool WebPluginDelegatePepper::PrintPage(int page_number,
scoped_ptr<Graphics2DDeviceContext> g2d(new Graphics2DDeviceContext(this));
NPDeviceContext2DConfig config;
NPDeviceContext2D context;
- gfx::Rect surface_rect(gfx::Point(0, 0), size_in_pixels);
+ gfx::Rect surface_rect(size_in_pixels);
NPError err = g2d->Initialize(surface_rect, &config, &context);
if (err != NPERR_NO_ERROR) {
NOTREACHED();
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);