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

Unified Diff: chrome/browser/ui/web_contents_sizer.mm

Issue 2259533003: Use bounds instead of size for prerender requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments nit Created 4 years, 4 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/web_contents_sizer.mm
diff --git a/chrome/browser/ui/web_contents_sizer.mm b/chrome/browser/ui/web_contents_sizer.mm
index 46d3e861d4db7e6cfa4bca75b5e3adc2ad1920e8..bdb78960da21d6fdfbe00ae6d7abc452dcfbcb92 100644
--- a/chrome/browser/ui/web_contents_sizer.mm
+++ b/chrome/browser/ui/web_contents_sizer.mm
@@ -9,13 +9,16 @@
#include "content/public/browser/web_contents.h"
void ResizeWebContents(content::WebContents* web_contents,
- const gfx::Size& new_size) {
+ const gfx::Rect& new_bounds) {
NSView* view = web_contents->GetNativeView();
NSRect old_wcv_frame = [view frame];
CGFloat new_x = old_wcv_frame.origin.x;
CGFloat new_y =
- old_wcv_frame.origin.y + (old_wcv_frame.size.height - new_size.height());
+ old_wcv_frame.origin.y
+ + (old_wcv_frame.size.height - new_bounds.size().height());
NSRect new_wcv_frame =
- NSMakeRect(new_x, new_y, new_size.width(), new_size.height());
+ NSMakeRect(new_x, new_y,
+ new_bounds.size().width(),
+ new_bounds.size().height());
[view setFrame:new_wcv_frame];
}
« no previous file with comments | « chrome/browser/ui/web_contents_sizer.cc ('k') | chrome/browser/ui/webui/extensions/extension_settings_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698