aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiraj Modi2014-05-09 03:02:33 (EDT)
committerArun Thondapu2014-05-09 11:53:31 (EDT)
commit0658d789bfb0cb2ccab2ad6b8af953cadf626c1e (patch)
tree652e7253cf2d8ae35177c156fe242987e62adc51
parentcc78900f837ae57b63ebd7ad5fb7e94c20673c8f (diff)
downloadeclipse.platform.swt-0658d789bfb0cb2ccab2ad6b8af953cadf626c1e.zip
eclipse.platform.swt-0658d789bfb0cb2ccab2ad6b8af953cadf626c1e.tar.gz
eclipse.platform.swt-0658d789bfb0cb2ccab2ad6b8af953cadf626c1e.tar.bz2
Change-Id: Ica24808e705e9c57a7a3b95bd34e4e7d19837901 Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java
index 8690246..a02a3c1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2013 IBM Corporation and others.
+ * Copyright (c) 2003, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -602,6 +602,21 @@ public void create(Composite parent, int style) {
if (browser.isDisposed()) return;
/*
+ * With the IBM 64-bit JVM an unexpected document complete event occurs before
+ * the native browser's DOM has been built. Filter this premature event based
+ * on the browser's ready state.
+ */
+ int[] rgdispid = auto.getIDsOfNames(new String[] { "ReadyState" }); //$NON-NLS-1$
+ Variant pVarResult = auto.getProperty(rgdispid[0]);
+ if (pVarResult != null) {
+ int readyState = pVarResult.getInt();
+ pVarResult.dispose ();
+ if (readyState != READYSTATE_COMPLETE) {
+ break;
+ }
+ }
+
+ /*
* Note. The completion of the page loading is detected as
* described in the MSDN article "Determine when a page is
* done loading in WebBrowser Control".