Revision: 7137
Author: sco...@google.com
Date: Mon Nov 23 14:17:52 2009
Log: Use a css expression for hosted.html's disconnect screen in IE6  
standards mode.

We can't set a resize handler from the inner frame, and it's a minute  
enough case that it's not worth adding in extra plumbing just to wedge the  
resize handler in there.

Review by: jat
http://code.google.com/p/google-web-toolkit/source/detail?r=7137

Modified:
  /trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html

=======================================
--- /trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html Sat  
Nov 21 18:00:26 2009
+++ /trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html Mon  
Nov 23 14:17:52 2009
@@ -148,7 +148,7 @@

  function __gwt_disconnected() {
    // Prevent double-invocation.
-  __gwt_disconnected = new Function();
+  window.__gwt_disconnected = new Function();
    // Do it in a timeout so we can be sure we have a clean stack.
    window.setTimeout(__gwt_disconnected_impl, 1);
  }
@@ -180,21 +180,16 @@
    // Steal focus.
    glass.focus();

-  // Setup resize handler for IE6.
    if (navigator.userAgent.indexOf("MSIE 6") >= 0) {
+    glassStyle.width = "125%"; // Get past scroll bar area.
      if (topDoc.compatMode == "BackCompat") {
+      // Works in quirks mode.
        glassStyle.height = "100%";
-      var resizeFunc = function () {
-        glassStyle.width = topDoc.body.clientWidth + 'px';
-      }
      } else {
-      var resizeFunc = function () {
-        glassStyle.width = topDoc.documentElement.clientWidth + 'px';
-        glassStyle.height = topDoc.documentElement.clientHeight + 'px';
-      }
-    }
-    topWin.onresize = resizeFunc;
-    resizeFunc();
+      // Use a nasty CSS expression in standards mode; ideally we'd use the
+      // onresize event, but the outer window won't let us add one in IE6.
+       
glassStyle.setExpression("height", "document.documentElement.clientHeight");
+    }
    }
  }

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to