Closed Bug 278916 Opened 16 years ago Closed 16 years ago
[FIX]link launches blank popup window and new page with the desired content
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.11 Build Identifier: Camino 2005011008 On the homepage http://www.sfgate.com there is a small image in the right column with the caption "Day in Pictures" Clicking on the text or the picture launches a smaller blank popup window and a new regular sized window which contains the desired content. This problem was first noted by me on the nightlies released on January 11 and all thereafter. It does not exist with the latest version of Mozilla (1.8a) or Firefox or versions of Camino prior to Jan 11. The desired action on clicking on the text or image is to launch the popup with content which can be navigated within that window. Reproducible: Always Steps to Reproduce: 1.Launch any Camino nightly build after Jan 11 2.Go to http://www.sfgate.com 3.click on image or text labelled "Day in Pictures" Actual Results: A blank popup window is launched and then is covered with a regular-sized new window with the desired content Expected Results: Content should be present in popup window. It should be navigatable. No new larger window should be created.
Here's the relevant bit of HTML: <!-- day in pictures --> <A HREF="/cgi-bin/object/dip?f=/g/archive/2005/01/18/dip.DTL" TARGET="photos" onClick="window.open('','photos','directories=no,height=500,width=580,location=no,resizable=yes,screenx=15,screeny=15,toolbar=no,opener=orig')"> <img src="/templates/types/homepage/graphics/sub_dip2.gif" width="118" height="15" border="0" vspace="3" hspace="0"></a><br> <table border="0" cellpadding="0" cellspacing="0" width="143"><tr><td valign="top"> <A HREF="/cgi-bin/object/dip?f=/g/archive/2005/01/18/dip.DTL" TARGET="photos" onClick="window.open('','photos','directories=no,height=500,width=580,location=no,resizable=yes,screenx=15,screeny=15,toolbar=no,opener=orig')"><IMG SRC="/templates/types/object/graphics/dip_t.gif" HEIGHT="64" WIDTH="64" HSPACE="0" VSPACE="0" border="1"></A></td> <td width="2"> </td> <td valign="middle" class="text1sm"> <!--DIP--> Animal tales and human prayers. <A HREF="/cgi-bin/object/dip?f=/g/archive/2005/01/18/dip.DTL" TARGET="photos" onClick="window.open('','photos','directories=no,height=500,width=580,location=no,resizable=yes,screenx=15,screeny=15,toolbar=no,opener=orig')">DIP</A>!<!--DIP--></td></tr></table> To my ignorant eye, it looks like they're using both a TARGET and an onClick="window.open(, which seems iffy to my ignorant brain. From the rest of the initial report, it seems to me that something in the way Gecko handled those changed on Jan 11 on the trunk. FriscoFrog, did you test in Mozilla 1.8a6 (which was released on Jan 12 and may or may not have that code depending on the freeze point) and/or a Firefox nightly after Jan 11?
jst, did any popup blocking stuff change last week that camino might have missed?
Severity: normal → major
Status: UNCONFIRMED → NEW
Ever confirmed: true
Target Milestone: --- → Camino0.9
*** Bug 279201 has been marked as a duplicate of this bug. ***
This regressed between 11 and 12 januarie. I looked and it seems that Johnny Stenback is right in that those two bugs seems to be the cause when looking at the checkins.
So the problem is clearly that the target is not finding the just-opened window. Is the window being found but failing the security checks added in bug 103638? Or is it just not being found at all? Also, does Camino use nsWebBrowser and nsDocShellTreeOwner, or does it use the appshell goop in xpfe/? If the former, does it also have its own nsIDocShellTreeOwner implementation?
Same problem for Mozilla trunk: Bug 279495.
No, that's a different problem. I can reproduce that bug with Mozilla trunk, but this one worksforme. So this one is likely to be embedding-specific or Camino-specific.
I've noticed some issues with window.open() when it's called with an empty location part (e.g., window.open('', 'foo');). I wonder if this is related?
Nevermind, (I think) my issue is unrelated (though this bug did help me narrow some of my own problems down).
Mike, Simon, could you answer my question from comment 7? I'm trying to sort out why this could happen by code inspection, but it'd help to know which code to inspect...
Whiteboard: Ignore comments 8-12
Would the fix for bug 279495 have fixed this?
Possible, but unlikely -- see comment 9...
OK, I think this should fix it, assuming that Camino uses nsWebBrowser. I did test this in TestGtkEmbed (which was also showing this bug). The basic issue is that the window-finding code in nsDocShellTreeOwner was just wrong -- it skipped looking in other windows if its requestore was its child docshell, which is exactly the case when you _do_ want to look in other windows... This patch makes the code be pretty similar to that in nsChrome/ContentTreeOwner, with the modifications I added in bug 279495.
Since it's a general embedding problem, moving to core....
Component: General → Embedding: Docshell
OS: MacOS X → All
Product: Camino → Core
Hardware: Macintosh → All
Target Milestone: Camino0.9 → ---
Version: unspecified → Trunk
Priority: -- → P1
Summary: link launches blank popup window and new page with the desired content → [FIX]link launches blank popup window and new page with the desired content
Target Milestone: --- → mozilla1.8beta
Comment on attachment 173190 [details] [diff] [review] Proposed patch sr=jst
Attachment #173190 - Flags: superreview?(jst) → superreview+
This patch fixes Camino -- thanks Boris! (I see another crash when closing the DIP window on SFGate: will file separately.)
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Comment on attachment 173190 [details] [diff] [review] Proposed patch a=caillon (on behalf of drivers) for 1.0.1 and 1.7.6
Whiteboard: Ignore comments 8-12 → Ignore comments 8-12 [needs branch landing]
Fixed on 1.0.1 and 1.7 branches.
Verified Fixed on Win32 with latest Aviary 1.0.1 and Mozilla 1.7.6 builds.
Status: RESOLVED → VERIFIED
Whiteboard: Ignore comments 8-12 [needs branch landing] → Ignore comments 8-12
Test for this got added in bug 408052.
You need to log in before you can comment on or make changes to this bug.