summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/terminal
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2011-02-08 15:33:38 +0000
committerArtur Signell <artur.signell@itmill.com>2011-02-08 15:33:38 +0000
commit3c0d1c8bc5d6c9a0da1ef06a5a62d621b18f0e52 (patch)
tree487e5f545360462f4154eddab9199087f6e06085 /src/com/vaadin/terminal
parent21ce7f95bb63a92c0d220a56ad007e04ecad905c (diff)
downloadvaadin-framework-3c0d1c8bc5d6c9a0da1ef06a5a62d621b18f0e52.tar.gz
vaadin-framework-3c0d1c8bc5d6c9a0da1ef06a5a62d621b18f0e52.zip
#6336 IE8 in compatibility mode does not work
svn changeset:17226/svn branch:6.5
Diffstat (limited to 'src/com/vaadin/terminal')
-rw-r--r--src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java35
1 files changed, 24 insertions, 11 deletions
diff --git a/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java b/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java
index bf3ba8f759..c1df8cb40d 100644
--- a/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java
+++ b/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java
@@ -1622,9 +1622,9 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
if (!fragment) {
setAjaxPageHeaders(response);
- writeAjaxPageHtmlHeadStart(page);
- writeAjaxPageHtmlHeader(page, title, themeUri);
- writeAjaxPageHtmlBodyStart(page);
+ writeAjaxPageHtmlHeadStart(page, request);
+ writeAjaxPageHtmlHeader(page, title, themeUri, request);
+ writeAjaxPageHtmlBodyStart(page, request);
}
String appId = appUrl;
@@ -1913,10 +1913,11 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
* Override this method if you want to add some custom html to the page.
*
* @param page
+ * @param request
* @throws IOException
*/
- protected void writeAjaxPageHtmlBodyStart(final BufferedWriter page)
- throws IOException {
+ protected void writeAjaxPageHtmlBodyStart(final BufferedWriter page,
+ final HttpServletRequest request) throws IOException {
page.write("\n</head>\n<body scroll=\"auto\" class=\""
+ ApplicationConnection.GENERATED_BODY_CLASSNAME + "\">\n");
}
@@ -1930,15 +1931,26 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
* @param page
* @param title
* @param themeUri
+ * @param request
* @throws IOException
*/
protected void writeAjaxPageHtmlHeader(final BufferedWriter page,
- String title, String themeUri) throws IOException {
+ String title, String themeUri, final HttpServletRequest request)
+ throws IOException {
page.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n");
- // Force IE9 into IE8 mode. Remove when IE 9 mode works (#5546), chrome
- // frame if available #5261
- page.write("<meta http-equiv=\"X-UA-Compatible\" content=\"IE=8,chrome=1\"/>\n");
+ WebBrowser browser = getApplicationContext(request.getSession())
+ .getBrowser();
+ if (browser.isIE()) {
+ // Chrome frame in all versions of IE (only if Chrome frame is
+ // installed)
+ if (browser.getBrowserMajorVersion() == 9) {
+ // Force IE9 into IE8 mode. Remove when IE 9 mode works (#5546)
+ page.write("<meta http-equiv=\"X-UA-Compatible\" content=\"IE=8,chrome=1\"/>\n");
+ } else {
+ page.write("<meta http-equiv=\"X-UA-Compatible\" content=\"chrome=1\"/>\n");
+ }
+ }
page.write("<style type=\"text/css\">"
+ "html, body {height:100%;margin:0;}</style>");
@@ -1962,10 +1974,11 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
* beginning of the page.
*
* @param page
+ * @param request
* @throws IOException
*/
- protected void writeAjaxPageHtmlHeadStart(final BufferedWriter page)
- throws IOException {
+ protected void writeAjaxPageHtmlHeadStart(final BufferedWriter page,
+ final HttpServletRequest request) throws IOException {
// write html header
page.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD "
+ "XHTML 1.0 Transitional//EN\" "