summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-25 23:50:52 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-25 23:50:52 +0000
commitf67f7a7bd570e21f3e534c4ec6564c6e03534be4 (patch)
tree934a164befea089d9d8975b265a52e7f840f3118 /content
parentc54f25c7a77e66bb8b1b018a8328b564cba381fc (diff)
downloadchromium_src-f67f7a7bd570e21f3e534c4ec6564c6e03534be4.zip
chromium_src-f67f7a7bd570e21f3e534c4ec6564c6e03534be4.tar.gz
chromium_src-f67f7a7bd570e21f3e534c4ec6564c6e03534be4.tar.bz2
Update the window size to include Window decorations when the custom
frame is off. We used to return the size without window decorations, which led to inconsistent behavior with the custom frame on or off. When setting the window size, we need to account for the window decoration sizes since gtk_window_resize doesn't. This is different from Firefox, which never includes the size of window decorations, but this seems more consistent with Win/Mac. BUG=88245 TEST=Open a popup window in app mode. Verify that window.innerHeight != window.outerHeight and the title bar is included in outerHeight. Review URL: http://codereview.chromium.org/7464044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93996 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/renderer_host/render_widget_host_gtk.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/content/browser/renderer_host/render_widget_host_gtk.cc b/content/browser/renderer_host/render_widget_host_gtk.cc
index 7233ba0..c321a15 100644
--- a/content/browser/renderer_host/render_widget_host_gtk.cc
+++ b/content/browser/renderer_host/render_widget_host_gtk.cc
@@ -86,10 +86,9 @@ void RenderWidgetHost::OnMsgGetRootWindowRect(gfx::NativeViewId window_id,
int width = 0;
int height = 0;
gdk_drawable_get_size(gdk_window, &width, &height);
- // Although we return a rect, this is actually two pairs of data: The
- // position of the top left corner of the window and the size of the window
- // not including the window decorations.
- *results = gfx::Rect(frame_extents.x, frame_extents.y, width, height);
+
+ *results = gfx::Rect(frame_extents.x, frame_extents.y,
+ frame_extents.width, frame_extents.height);
}
void RenderWidgetHost::OnMsgCreatePluginContainer(gfx::PluginWindowHandle id) {