Fix Firefox 29 startup issue with workaround from bug 433179
- Apply JavaScript with WebClient.HEAD_HTML property in controls demo
and in examples demo (see Application implementation).
- Use branding with body.html in workbench demo.
Bug 433179 - RAP application does not start in Firefox 29
https://bugs.eclipse.org/bugs/show_bug.cgi?id=433179
Change-Id: I2ba7b40d9567a01fad51c0cdbef968e166ccf2ff
Signed-off-by: Markus Knauer <mknauer@eclipsesource.com>
diff --git a/examples/org.eclipse.rap.demo.controls/src/org/eclipse/rap/demo/controls/internal/ControlsApplication.java b/examples/org.eclipse.rap.demo.controls/src/org/eclipse/rap/demo/controls/internal/ControlsApplication.java
index e6bb74b..6aca9af 100644
--- a/examples/org.eclipse.rap.demo.controls/src/org/eclipse/rap/demo/controls/internal/ControlsApplication.java
+++ b/examples/org.eclipse.rap.demo.controls/src/org/eclipse/rap/demo/controls/internal/ControlsApplication.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012 EclipseSource and others.
+ * Copyright (c) 2012, 2014 EclipseSource 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
@@ -23,9 +23,19 @@
public class ControlsApplication implements ApplicationConfiguration {
+ // Bug 433179 - RAP application does not start in Firefox 29
+ private static final String FF29_COMPATIBILITY
+ = "<script type=\"text/javascript\">"
+ + "(function(){try{var e=navigator.userAgent;"
+ + "if(e.indexOf(\"like Gecko\")===-1&&e.indexOf(\"Gecko/\")!==-1)"
+ + "{if(!window.controllers){window.controllers={}}"
+ + "if(!navigator.product){navigator.product=\"Gecko\"}}}catch(t){}})()"
+ + "</script>";
+
public void configure( Application application ) {
Map<String, String> properties = new HashMap<String, String>();
properties.put( WebClient.PAGE_TITLE, "RWT Controls Demo" );
+ properties.put( WebClient.HEAD_HTML, FF29_COMPATIBILITY );
application.setOperationMode( OperationMode.SWT_COMPATIBILITY );
application.addEntryPoint( "/controls", ControlsDemo.class, properties );
application.addStyleSheet( RWT.DEFAULT_THEME_ID, "theme/theme.css" );
diff --git a/examples/org.eclipse.rap.demo/body.html b/examples/org.eclipse.rap.demo/body.html
index 527ee75..9ea2f04 100644
--- a/examples/org.eclipse.rap.demo/body.html
+++ b/examples/org.eclipse.rap.demo/body.html
@@ -1 +1,2 @@
+<script type="text/javascript">(function(){try{var e=navigator.userAgent;if(e.indexOf("like Gecko")===-1&&e.indexOf("Gecko/")!==-1){if(!window.controllers){window.controllers={}}if(!navigator.product){navigator.product="Gecko"}}}catch(t){}})()</script>
Loading party...
\ No newline at end of file
diff --git a/examples/org.eclipse.rap.design.example/body.html b/examples/org.eclipse.rap.design.example/body.html
new file mode 100644
index 0000000..7326627
--- /dev/null
+++ b/examples/org.eclipse.rap.design.example/body.html
@@ -0,0 +1 @@
+<script type="text/javascript">(function(){try{var e=navigator.userAgent;if(e.indexOf("like Gecko")===-1&&e.indexOf("Gecko/")!==-1){if(!window.controllers){window.controllers={}}if(!navigator.product){navigator.product="Gecko"}}}catch(t){}})()</script>
\ No newline at end of file
diff --git a/examples/org.eclipse.rap.design.example/build.properties b/examples/org.eclipse.rap.design.example/build.properties
index 70842b3..e616350 100644
--- a/examples/org.eclipse.rap.design.example/build.properties
+++ b/examples/org.eclipse.rap.design.example/build.properties
@@ -17,6 +17,7 @@
plugin.xml,\
plugin.properties,\
img/,\
- about.html
+ about.html,\
+ body.html
src.includes = about.html
jars.compile.order = .
diff --git a/examples/org.eclipse.rap.design.example/plugin.xml b/examples/org.eclipse.rap.design.example/plugin.xml
index d515729..ee9749b 100644
--- a/examples/org.eclipse.rap.design.example/plugin.xml
+++ b/examples/org.eclipse.rap.design.example/plugin.xml
@@ -17,6 +17,7 @@
<extension
point="org.eclipse.rap.ui.branding">
<branding
+ body="body.html"
favicon="img/business/favicon.png"
id="org.eclipse.rap.design.example.business.branding"
themeId="org.eclipse.rap.design.example.business.theme"
@@ -32,6 +33,7 @@
</presentationFactory>
</branding>
<branding
+ body="body.html"
favicon="img/fancy/favicon.png"
id="org.eclipse.rap.design.example.fancy.branding"
themeId="org.eclipse.rap.design.example.fancy.theme"
diff --git a/examples/org.eclipse.rap.examples/src/org/eclipse/rap/examples/internal/ExampleApplication.java b/examples/org.eclipse.rap.examples/src/org/eclipse/rap/examples/internal/ExampleApplication.java
index 7887308..b0c2cb1 100644
--- a/examples/org.eclipse.rap.examples/src/org/eclipse/rap/examples/internal/ExampleApplication.java
+++ b/examples/org.eclipse.rap.examples/src/org/eclipse/rap/examples/internal/ExampleApplication.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012 EclipseSource and others.
+ * Copyright (c) 2012, 2014 EclipseSource 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
@@ -31,9 +31,19 @@
public class ExampleApplication implements ApplicationConfiguration {
+ // Bug 433179 - RAP application does not start in Firefox 29
+ private static final String FF29_COMPATIBILITY
+ = "<script type=\"text/javascript\">"
+ + "(function(){try{var e=navigator.userAgent;"
+ + "if(e.indexOf(\"like Gecko\")===-1&&e.indexOf(\"Gecko/\")!==-1)"
+ + "{if(!window.controllers){window.controllers={}}"
+ + "if(!navigator.product){navigator.product=\"Gecko\"}}}catch(t){}})()"
+ + "</script>";
+
public void configure( Application application ) {
Map<String, String> properties = new HashMap<String, String>();
properties.put( WebClient.PAGE_TITLE, "RAP Examples" );
+ properties.put( WebClient.HEAD_HTML, FF29_COMPATIBILITY );
properties.put( WebClient.BODY_HTML, readTextFromResource( "resources/body.html", "UTF-8" ) );
properties.put( WebClient.FAVICON, "icons/favicon.png" );
application.setOperationMode( OperationMode.SWT_COMPATIBILITY );
diff --git a/features/org.eclipse.rap.examples.feature/feature.properties b/features/org.eclipse.rap.examples.feature/feature.properties
index ca60f51..d2a08db 100644
--- a/features/org.eclipse.rap.examples.feature/feature.properties
+++ b/features/org.eclipse.rap.examples.feature/feature.properties
@@ -1,5 +1,5 @@
################################################################################
-# Copyright (c) 2007, 2013 Innoopract Informationssysteme GmbH and others.
+# Copyright (c) 2007, 2014 Innoopract Informationssysteme GmbH 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
@@ -16,7 +16,7 @@
*** DO NOT INSTALL IN YOUR IDE ***
copyright = \
-Copyright (c) 2007, 2013 Innoopract Informationssysteme GmbH and others.\n\
+Copyright (c) 2007, 2014 Innoopract Informationssysteme GmbH and others.\n\
All rights reserved. This program and the accompanying materials\n\
are made available under the terms of the Eclipse Public License v1.0\n\
which accompanies this distribution, and is available at\n\