Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Ufimtsev2017-02-09 19:35:37 +0000
committerAlexander Kurtakov2017-02-09 19:53:40 +0000
commit6e3a86801230fc81fcdcb3a8ddffd7591950df31 (patch)
tree3a04258a24ccd394b55ce1f0e2045a11e3723a72 /bundles/org.eclipse.swt/Eclipse SWT WebKit
parente1dc8c976b8851c06b235d33cde7571a1b20d20c (diff)
downloadeclipse.platform.swt-6e3a86801230fc81fcdcb3a8ddffd7591950df31.tar.gz
eclipse.platform.swt-6e3a86801230fc81fcdcb3a8ddffd7591950df31.tar.xz
eclipse.platform.swt-6e3a86801230fc81fcdcb3a8ddffd7591950df31.zip
Bug 511797: [Webkit2] locationChange.changed() not working on webkit2
Patch to fix LocationListener.changed() not working on webkit2. With this, the ChangeListener() tests work introduced in the bug work on webkit2. Change-Id: Ib81c0336280094ed873d460cacce485b00826008 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=511797 Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT WebKit')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java20
1 files changed, 12 insertions, 8 deletions
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 25625a0384..f1bbc36e64 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
@@ -1599,14 +1599,18 @@ long /*int*/ handleLoadCommitted (long /*int*/ uri, boolean top) {
}
}
- /*
- * Each invocation of setText() causes webkit_notify_load_status to be invoked
- * twice, once for the initial navigate to about:blank, and once for the auto-navigate
- * to about:blank that WebKit does when webkit_web_view_load_string is invoked. If
- * this is the first webkit_notify_load_status callback received for a setText()
- * invocation then do not send any events or re-install registered BrowserFunctions.
- */
- if (top && url.startsWith(ABOUT_BLANK) && htmlBytes != null) return 0;
+ // Bug 511797 : On webkit2, this code is only reached once per page load.
+ if (!WEBKIT2) {
+ /*
+ * Webkit1:
+ * Each invocation of setText() causes webkit_notify_load_status to be invoked
+ * twice, once for the initial navigate to about:blank, and once for the auto-navigate
+ * to about:blank that WebKit does when webkit_web_view_load_string is invoked. If
+ * this is the first webkit_notify_load_status callback received for a setText()
+ * invocation then do not send any events or re-install registered BrowserFunctions.
+ */
+ if (top && url.startsWith(ABOUT_BLANK) && htmlBytes != null) return 0;
+ }
LocationEvent event = new LocationEvent (browser);
event.display = browser.getDisplay ();

Back to the top