Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLakshmi Shanmugam2015-05-27 11:31:02 +0000
committerLakshmi Shanmugam2015-05-27 11:34:40 +0000
commitbfd81d646bfd6fdd35c5572a300cae24ce353795 (patch)
tree7354b418add9eccf009f1617810d4621a60bf5ab
parentb406b65a23020f2d0f3b46b4ebe75980942d3d09 (diff)
downloadeclipse.platform.swt-bfd81d646bfd6fdd35c5572a300cae24ce353795.tar.gz
eclipse.platform.swt-bfd81d646bfd6fdd35c5572a300cae24ce353795.tar.xz
eclipse.platform.swt-bfd81d646bfd6fdd35c5572a300cae24ce353795.zip
Bug 467203 - Download progress window not shown with XULRunner 31
The download doesn't start automatically with XULR 31 browser and the progress window doesn't show up. The workaround is to open the download progress window, so that user can start the download.
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/HelperAppLauncherDialog_10.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/WindowCreator2.java9
3 files changed, 14 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/HelperAppLauncherDialog_10.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/HelperAppLauncherDialog_10.java
index 0a395f8b27..1e1b963d71 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/HelperAppLauncherDialog_10.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/HelperAppLauncherDialog_10.java
@@ -11,7 +11,7 @@
package org.eclipse.swt.browser;
import org.eclipse.swt.*;
-import org.eclipse.swt.internal.C;
+import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.mozilla.*;
import org.eclipse.swt.widgets.*;
@@ -68,7 +68,9 @@ int PromptForSaveToFile (long /*int*/ aLauncher, long /*int*/ aWindowContext, lo
path.dispose ();
if (rc != XPCOM.NS_OK) Mozilla.error (rc);
if (result[0] == 0) Mozilla.error (XPCOM.NS_ERROR_NULL_POINTER);
- /* Our own nsIDownload has been registered during the Browser initialization. It will be invoked by Mozilla. */
+ if (MozillaVersion.CheckVersion (MozillaVersion.VERSION_XR31, true)) {
+ Mozilla.shouldOpenDownloadProgressWindow = true;
+ }
XPCOM.memmove (_retval, result, C.PTR_SIZEOF);
return XPCOM.NS_OK;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java
index d6f9c7a8f4..d7cc81c495 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java
@@ -69,6 +69,7 @@ class Mozilla extends WebBrowser {
static Listener DisplayListener;
static boolean Initialized, IsXULRunner, PerformedVersionCheck, XPCOMWasGlued, XPCOMInitWasGlued;
static boolean IsGettingSiteWindow;
+ static boolean shouldOpenDownloadProgressWindow = false;
static String MozillaPath;
static String oldProxyHostFTP, oldProxyHostHTTP, oldProxyHostSSL;
static int oldProxyPortFTP = -1, oldProxyPortHTTP = -1, oldProxyPortSSL = -1, oldProxyType = -1;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/WindowCreator2.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/WindowCreator2.java
index e1b4a95715..375c2ee913 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/WindowCreator2.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/WindowCreator2.java
@@ -177,6 +177,15 @@ int CreateChromeWindow2 (long /*int*/ parent, int chromeFlags, int contextFlags,
new Shell (src.getShell(), style);
shell.setLayout (new FillLayout ());
browser = new Browser (shell, src == null ? SWT.MOZILLA : src.getStyle () & SWT.MOZILLA);
+ if (Mozilla.shouldOpenDownloadProgressWindow) {
+ /*
+ * In XULRunner 31, download doesn't start automatically and progress window doesn't open.
+ * We open it the download progress window, so that user can start the download.
+ */
+
+ Mozilla.shouldOpenDownloadProgressWindow = false;
+ shell.open();
+ }
browser.addVisibilityWindowListener (new VisibilityWindowListener () {
public void hide (WindowEvent event) {
}

Back to the top