From ce5535624a186ccb0e73eddc43e5f9c458c0b8d3 Mon Sep 17 00:00:00 2001 From: "hwaara%gmail.com" Date: Sat, 7 Oct 2006 23:26:20 +0000 Subject: [PATCH] MS Exchange Access Web Access kills window upon download finish when single window mode is set to 'reuse'. b=354701, sr=pinkerton --- camino/src/embedding/CHBrowserListener.mm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/camino/src/embedding/CHBrowserListener.mm b/camino/src/embedding/CHBrowserListener.mm index df6a639c623..276961a63b4 100644 --- a/camino/src/embedding/CHBrowserListener.mm +++ b/camino/src/embedding/CHBrowserListener.mm @@ -232,9 +232,12 @@ CHBrowserListener::ProvideWindow(nsIDOMWindow *inParent, PRUint32 inChromeFlags, if (prefersTabs) { CHBrowserView* newContainer = [mContainer reuseExistingBrowserWindow:inChromeFlags]; nsCOMPtr contentWindow = [newContainer getContentWindow]; - *outDOMWindow = contentWindow.get(); - *outWindowIsNew = PR_TRUE; - NS_IF_ADDREF(*outDOMWindow); + + // make sure gecko knows whether we're creating a new browser window (new tabs don't count) + nsCOMPtr currentWindow = [mView getContentWindow]; + *outWindowIsNew = (contentWindow != currentWindow); + + NS_IF_ADDREF(*outDOMWindow = contentWindow.get()); } return NS_OK;