summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents.cc
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-04 17:58:00 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-04 17:58:00 +0000
commiteb0c1e406f837d590055021a753015feb67b6fc9 (patch)
tree68cba799e7116f4cae39bf014fe8ded65f705037 /chrome/browser/tab_contents.cc
parent6d5168ee11a27e4db3047883eddfac80a9f98c9d (diff)
downloadchromium_src-eb0c1e406f837d590055021a753015feb67b6fc9.zip
chromium_src-eb0c1e406f837d590055021a753015feb67b6fc9.tar.gz
chromium_src-eb0c1e406f837d590055021a753015feb67b6fc9.tar.bz2
Fix several issues with popup window locations:
1) Remove ConstrainedWindow::GenerateInitialBounds(), which is old and crufty and no longer relevant now that there are no unsuppressed, constrained popup windows. 2) Move the browser side positioning logic into Browser::BuildPopupWindow(). 3) Fix the window.open() handler so that when we aren't given top=/left= coordinates, we don't set the window origin (allowing the browser to do something more intelligent). BUG=1290758 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@325 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents.cc')
-rw-r--r--chrome/browser/tab_contents.cc10
1 files changed, 1 insertions, 9 deletions
diff --git a/chrome/browser/tab_contents.cc b/chrome/browser/tab_contents.cc
index 7f6c9e8..24bae60 100644
--- a/chrome/browser/tab_contents.cc
+++ b/chrome/browser/tab_contents.cc
@@ -234,15 +234,7 @@ void TabContents::AddNewContents(TabContents* new_contents,
if ((disposition == NEW_POPUP) && !delegate_->IsPopup(this)) {
if (user_gesture) {
- // TODO(erg): Need a better policy about initial placement of
- // popup windows.
- gfx::Rect initial_bounds = initial_pos;
- if (initial_bounds.x() == 0 || initial_bounds.y() == 0) {
- ConstrainedWindow::GenerateInitialBounds(
- initial_pos, this, &initial_bounds);
- }
-
- delegate_->AddNewContents(this, new_contents, disposition, initial_bounds,
+ delegate_->AddNewContents(this, new_contents, disposition, initial_pos,
user_gesture);
} else {
AddConstrainedPopup(new_contents, initial_pos);