Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Gayed2012-05-18 18:29:04 +0000
committerGrant Gayed2012-05-18 18:29:04 +0000
commitea5b5e0430c52c0dbc1a1e79d8a1fa1036cdc51b (patch)
treeaf42a9817b562641bf473bd6c87526b306820700 /bundles/org.eclipse.swt
parent919772fa8b23ee6c933e0492c90c86fe6aae373f (diff)
downloadeclipse.platform.swt-ea5b5e0430c52c0dbc1a1e79d8a1fa1036cdc51b.tar.gz
eclipse.platform.swt-ea5b5e0430c52c0dbc1a1e79d8a1fa1036cdc51b.tar.xz
eclipse.platform.swt-ea5b5e0430c52c0dbc1a1e79d8a1fa1036cdc51b.zip
Bug 379446 - FileDialog hangs when choosing download destination with
WebKitGTK 1.8.x (natives)
Diffstat (limited to 'bundles/org.eclipse.swt')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.c58
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.c7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.h3
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java2
4 files changed, 67 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.c b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.c
index caa86065d6..bc1a839c5a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.c
@@ -1300,6 +1300,26 @@ JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1download_1get_1current_1size)
}
#endif
+#ifndef NO__1webkit_1download_1get_1network_1request
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1webkit_1download_1get_1network_1request)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1download_1get_1network_1request_FUNC);
+/*
+ rc = (jintLong)webkit_download_get_network_request(arg0);
+*/
+ {
+ WebKitGTK_LOAD_FUNCTION(fp, webkit_download_get_network_request)
+ if (fp) {
+ rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+ }
+ }
+ WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1download_1get_1network_1request_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO__1webkit_1download_1get_1status
JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1download_1get_1status)
(JNIEnv *env, jclass that, jintLong arg0)
@@ -1380,6 +1400,26 @@ JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1webkit_1download_1get_1uri)
}
#endif
+#ifndef NO__1webkit_1download_1new
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1webkit_1download_1new)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1download_1new_FUNC);
+/*
+ rc = (jintLong)webkit_download_new(arg0);
+*/
+ {
+ WebKitGTK_LOAD_FUNCTION(fp, webkit_download_new)
+ if (fp) {
+ rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+ }
+ }
+ WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1download_1new_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO__1webkit_1download_1set_1destination_1uri
JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1download_1set_1destination_1uri)
(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1)
@@ -1402,6 +1442,24 @@ fail:
}
#endif
+#ifndef NO__1webkit_1download_1start
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1download_1start)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1download_1start_FUNC);
+/*
+ webkit_download_start(arg0);
+*/
+ {
+ WebKitGTK_LOAD_FUNCTION(fp, webkit_download_start)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+ }
+ }
+ WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1download_1start_FUNC);
+}
+#endif
+
#ifndef NO__1webkit_1get_1default_1session
JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1webkit_1get_1default_1session)
(JNIEnv *env, jclass that)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.c b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.c
index 5725527dc7..6a0c3fcd2f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.c
@@ -18,8 +18,8 @@
#ifdef NATIVE_STATS
-int WebKitGTK_nativeFunctionCount = 110;
-int WebKitGTK_nativeFunctionCallCount[110];
+int WebKitGTK_nativeFunctionCount = 113;
+int WebKitGTK_nativeFunctionCallCount[113];
char * WebKitGTK_nativeFunctionNames[] = {
"JSClassDefinition_1sizeof",
"_1JSClassCreate",
@@ -85,11 +85,14 @@ char * WebKitGTK_nativeFunctionNames[] = {
"_1webkit_1dom_1ui_1event_1get_1key_1code",
"_1webkit_1download_1cancel",
"_1webkit_1download_1get_1current_1size",
+ "_1webkit_1download_1get_1network_1request",
"_1webkit_1download_1get_1status",
"_1webkit_1download_1get_1suggested_1filename",
"_1webkit_1download_1get_1total_1size",
"_1webkit_1download_1get_1uri",
+ "_1webkit_1download_1new",
"_1webkit_1download_1set_1destination_1uri",
+ "_1webkit_1download_1start",
"_1webkit_1get_1default_1session",
"_1webkit_1major_1version",
"_1webkit_1micro_1version",
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.h b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.h
index 26832028c9..8056ac9d08 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.h
@@ -93,11 +93,14 @@ typedef enum {
_1webkit_1dom_1ui_1event_1get_1key_1code_FUNC,
_1webkit_1download_1cancel_FUNC,
_1webkit_1download_1get_1current_1size_FUNC,
+ _1webkit_1download_1get_1network_1request_FUNC,
_1webkit_1download_1get_1status_FUNC,
_1webkit_1download_1get_1suggested_1filename_FUNC,
_1webkit_1download_1get_1total_1size_FUNC,
_1webkit_1download_1get_1uri_FUNC,
+ _1webkit_1download_1new_FUNC,
_1webkit_1download_1set_1destination_1uri_FUNC,
+ _1webkit_1download_1start_FUNC,
_1webkit_1get_1default_1session_FUNC,
_1webkit_1major_1version_FUNC,
_1webkit_1micro_1version_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java
index 32dc27140d..febdb0dd71 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java
@@ -1615,7 +1615,7 @@ int /*long*/ webkit_download_requested (int /*long*/ web_view, int /*long*/ down
browser.getDisplay ().asyncExec (new Runnable () {
public void run () {
if (!browser.isDisposed ()) {
- FileDialog dialog = new FileDialog (browser.getShell (), SWT.OPEN);
+ FileDialog dialog = new FileDialog (browser.getShell (), SWT.SAVE);
dialog.setFileName (nameString);
String title = Compatibility.getMessage ("SWT_FileDownload"); //$NON-NLS-1$
dialog.setText (title);

Back to the top