summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Gayed2013-06-28 15:55:13 (EDT)
committerPaul Webster2013-06-28 15:55:13 (EDT)
commitee2f69ca2509188c169391ed9d45d7571bad502a (patch)
tree7351f9f896520188f97c81af2a9e0f2117b7d544
parentfeb2fcb7d271fc37221c824b8ecb8733b4724180 (diff)
downloadeclipse.platform.ua-ee2f69ca2509188c169391ed9d45d7571bad502a.zip
eclipse.platform.ua-ee2f69ca2509188c169391ed9d45d7571bad502a.tar.gz
eclipse.platform.ua-ee2f69ca2509188c169391ed9d45d7571bad502a.tar.bz2
or WebKit
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowserAdapter.java8
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowserFactory.java6
2 files changed, 10 insertions, 4 deletions
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowserAdapter.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowserAdapter.java
index 7c00492..6355768 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowserAdapter.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowserAdapter.java
@@ -23,6 +23,7 @@ public class EmbeddedBrowserAdapter implements IBrowser, IBrowserCloseListener{
private EmbeddedBrowser browser;
// Thread to use in workbench mode on Windows
private UIThread2 secondThread;
+ private String browserType;
class UIThread2 extends Thread {
Display d;
@@ -60,12 +61,15 @@ public class EmbeddedBrowserAdapter implements IBrowser, IBrowserCloseListener{
/**
* Adapter constructor.
*/
- public EmbeddedBrowserAdapter() {
+ public EmbeddedBrowserAdapter(String browserType) {
+ this.browserType = browserType;
}
public Display getBrowserDisplay() {
+ /* only attempt to use a second thread if the Browser's native renderer is IE */
boolean useUIThread2 = BaseHelpSystem.getMode() == BaseHelpSystem.MODE_WORKBENCH
&& Constants.OS_WIN32.equalsIgnoreCase(Platform.getOS())
- && !Constants.WS_WPF.equalsIgnoreCase(SWT.getPlatform()) ;
+ && !Constants.WS_WPF.equalsIgnoreCase(SWT.getPlatform())
+ && "ie".equalsIgnoreCase(browserType); //$NON-NLS-1$
if (useUIThread2) {
if (secondThread == null) {
secondThread = new UIThread2();
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowserFactory.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowserFactory.java
index e604caa..dec7f54 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowserFactory.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowserFactory.java
@@ -25,6 +25,7 @@ public class EmbeddedBrowserFactory implements IBrowserFactory {
private boolean tested = false;
private boolean available = false;
+ private String browserType;
/**
* Constructor.
@@ -70,7 +71,8 @@ public class EmbeddedBrowserFactory implements IBrowserFactory {
tested = true;
Shell sh = new Shell();
try {
- new Browser(sh, SWT.NONE);
+ Browser browser = new Browser(sh, SWT.NONE);
+ browserType = browser.getBrowserType();
available = true;
} catch (SWTError se) {
if (se.code == SWT.ERROR_NO_HANDLES) {
@@ -94,6 +96,6 @@ public class EmbeddedBrowserFactory implements IBrowserFactory {
* @see IBrowserFactory#createBrowser()
*/
public IBrowser createBrowser() {
- return new EmbeddedBrowserAdapter();
+ return new EmbeddedBrowserAdapter(browserType);
}
}