diff options
author | Niraj Modi | 2014-05-09 07:02:33 +0000 |
---|---|---|
committer | Arun Thondapu | 2014-05-09 15:53:31 +0000 |
commit | 0658d789bfb0cb2ccab2ad6b8af953cadf626c1e (patch) | |
tree | 652e7253cf2d8ae35177c156fe242987e62adc51 /bundles/org.eclipse.swt/Eclipse SWT Browser | |
parent | cc78900f837ae57b63ebd7ad5fb7e94c20673c8f (diff) | |
download | eclipse.platform.swt-0658d789bfb0cb2ccab2ad6b8af953cadf626c1e.tar.gz eclipse.platform.swt-0658d789bfb0cb2ccab2ad6b8af953cadf626c1e.tar.xz eclipse.platform.swt-0658d789bfb0cb2ccab2ad6b8af953cadf626c1e.zip |
Bug 433400 - SWT Snippet308 fails with IBM JREv4426eI20140511-2000I20140510-1500I20140509-2000
Change-Id: Ica24808e705e9c57a7a3b95bd34e4e7d19837901
Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Browser')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java | 17 |
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 8690246f8c..a02a3c186b 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". |