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

Unified Diff: chrome/browser/ui/window_snapshot/window_snapshot_mac.mm

Issue 11269022: Add Vector2d classes that represent offsets, instead of using Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: RenderText fixup 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: chrome/browser/ui/window_snapshot/window_snapshot_mac.mm
diff --git a/chrome/browser/ui/window_snapshot/window_snapshot_mac.mm b/chrome/browser/ui/window_snapshot/window_snapshot_mac.mm
index d52ddac5256820772d8ce526677b68f8c7b1d639..be3497241ea0983899fa1e6ec7e529a32479e91d 100644
--- a/chrome/browser/ui/window_snapshot/window_snapshot_mac.mm
+++ b/chrome/browser/ui/window_snapshot/window_snapshot_mac.mm
@@ -27,9 +27,8 @@ bool GrabWindowSnapshot(gfx::NativeWindow window,
// Convert snapshot bounds relative to window into bounds relative to
// screen.
- gfx::Rect screen_snapshot_bounds = gfx::Rect(
- window_bounds.origin().Add(snapshot_bounds.origin()),
- snapshot_bounds.size());
+ gfx::Rect screen_snapshot_bounds = snapshot_bounds;
+ screen_snapshot_bounds.Offset(window_bounds.OffsetFromOrigin());
DCHECK_LE(screen_snapshot_bounds.right(), window_bounds.right());
DCHECK_LE(screen_snapshot_bounds.bottom(), window_bounds.bottom());

Powered by Google App Engine
This is Rietveld 408576698