summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_active_document.cc
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-18 01:35:46 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-18 01:35:46 +0000
commit73b18974f1241da48074c495b261429bff751a4a (patch)
treee2f00243ab9367d74fad3f3427a726a771f08b26 /chrome_frame/chrome_active_document.cc
parentde89ceee429b4a6213ebcc960ec99affa92aa59c (diff)
downloadchromium_src-73b18974f1241da48074c495b261429bff751a4a.zip
chromium_src-73b18974f1241da48074c495b261429bff751a4a.tar.gz
chromium_src-73b18974f1241da48074c495b261429bff751a4a.tar.bz2
Ensure that popup windows opened within ChromeFrame full tab mode in IE receive the desired
content are size. To achieve this we first set the desired window styles on the web browser and then query it for the effective width and height. Fixes bug http://code.google.com/p/chromium/issues/detail?id=60447 Bug=60447 Test=Covered by existing window open tests. Review URL: http://codereview.chromium.org/5128002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66569 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_active_document.cc')
-rw-r--r--chrome_frame/chrome_active_document.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/chrome_frame/chrome_active_document.cc b/chrome_frame/chrome_active_document.cc
index fdb81dfe..1c62a7f 100644
--- a/chrome_frame/chrome_active_document.cc
+++ b/chrome_frame/chrome_active_document.cc
@@ -1299,12 +1299,22 @@ void ChromeActiveDocument::SetWindowDimensions() {
DVLOG(1) << "this:" << this << "\ndimensions: width:" << dimensions_.width()
<< " height:" << dimensions_.height();
if (!dimensions_.IsEmpty()) {
+ web_browser2->put_MenuBar(VARIANT_FALSE);
+ web_browser2->put_ToolBar(VARIANT_FALSE);
+
+ int width = dimensions_.width();
+ int height = dimensions_.height();
+ // Compute the size of the browser window given the desired size of the
+ // content area. As per MSDN, the WebBrowser object returns an error from
+ // this method. As a result the code below is best effort.
+ if (SUCCEEDED(web_browser2->ClientToWindow(&width, &height))) {
+ dimensions_.set_width(width);
+ dimensions_.set_height(height);
+ }
web_browser2->put_Width(dimensions_.width());
web_browser2->put_Height(dimensions_.height());
web_browser2->put_Left(dimensions_.x());
web_browser2->put_Top(dimensions_.y());
- web_browser2->put_MenuBar(VARIANT_FALSE);
- web_browser2->put_ToolBar(VARIANT_FALSE);
dimensions_.set_height(0);
dimensions_.set_width(0);