]> source.dussan.org Git - vaadin-framework.git/commitdiff
better workaround for "Joonas, Safari and network with latency rendering bug"
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Mon, 10 Dec 2007 15:16:37 +0000 (15:16 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Mon, 10 Dec 2007 15:16:37 +0000 (15:16 +0000)
svn changeset:3207/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/public/default/styles.css
src/com/itmill/toolkit/terminal/gwt/server/ApplicationServlet.java

index 49577138d492691663fa2ccf930c5476671c8e8c..3935cf07aa10f21f97438903ca24a12d6a55c803 100644 (file)
@@ -1,36 +1,3 @@
-/* First rules here are to avoid some bugs with Safari and network latency ~ > 100ms->
- *  Size calculations fail without them. Other problems may also appear, but the 
- * most critical ones can be avoided with these.
- * TODO workaround: concatenate style sheets
- */
-
-#itmill-ajax-window {
-       background: #e9eced;
-       font-family: "Trebuchet MS", geneva, helvetica, arial, tahoma, verdana, sans-serif;
-       color: #464f52;
-       font-size: 13px;
-       line-height: 18px;
-       height: 100%;
-}
-/* body tag created by servlet */
-.i-generated-body {
-       background: #e9eced;
-       width:100%;
-       height:100%;
-       border:0;
-       margin:0;
-       overflow:auto;
-}
-
-.i-view {
-       height: 100%;
-       width: 100%
-       overflow: auto; 
-       /* avoid scrollbars with margins in root layout */
-       margin-top:-1px;
-       border-top:1px solid transparent;
-}
-
 @import "common/common.css";\r
 @import "button/button.css";\r
 @import "textfield/textfield.css";\r
index 6c3957ca5eed33c4b27fb5c52e3fd44013757c6f..e13f00ab2197f8b432390face2431ecd5fa61c38 100644 (file)
@@ -623,7 +623,14 @@ public class ApplicationServlet extends HttpServlet {
 
         page
                 .write("<html xmlns=\"http://www.w3.org/1999/xhtml\" style=\"width:100%;"
-                        + "height:100%;border:0;margin:0;\">\n<head>\n<title>IT Mill Toolkit 5</title>\n"
+                        + "height:100%;border:0;margin:0;\">\n<head>\n"
+                        + "<style>"
+                        // Add critical styles due Safari timing issues
+                        // TODO workaround for this hack
+                        + "#itmill-ajax-window {height: 100%;}.i-generated-body "
+                        + "{width:100%;height:100%;border:0;margin:0;}.i-view "
+                        + "{height: 100%;width: 100%;}</style>"
+                        + "<title>IT Mill Toolkit 5</title>\n"
                         + "<script type=\"text/javascript\">\n"
                         + "    var itmill = {\n" + "           appUri:'");