Fixes Issue #174. Fixes several issues that manifest as mixed security warnings on IE6 when running over SSL. All issues stem from the fact that IE6 reports mixed security when the DOM includes an iframe with no explicit src attribute set. The basic solution is to added javascript:'' as a benign src. The fix has been applied to the iframe shim in PopupPanelImplIE6, the iframe in RichTextAreaImplIE6 and the static history iframe generated with applicationCreator. Docs and samples have also been updated to reflect the change to the history iframe. Patch by: knorton, scottb Suggested by: josh.hinman, mat.gessel, vladimir.lapacek Review by: knorton, scottb git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@1036 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/dev/shell/GWTShellServlet.java b/dev/core/src/com/google/gwt/dev/shell/GWTShellServlet.java index 28b7380..d86f778 100644 --- a/dev/core/src/com/google/gwt/dev/shell/GWTShellServlet.java +++ b/dev/core/src/com/google/gwt/dev/shell/GWTShellServlet.java
@@ -340,7 +340,8 @@ } writer.println("</head><body>"); - writer.println("<iframe id='__gwt_historyFrame' style='width:0;height:0;border:0'></iframe>"); + writer.println("<iframe src=\"javascript:''\" id='__gwt_historyFrame' " + + "style='width:0;height:0;border:0'></iframe>"); writer.println("</body></html>"); // Done.
diff --git a/doc/src/com/google/gwt/doc/DeveloperGuide.java b/doc/src/com/google/gwt/doc/DeveloperGuide.java index bcafbab..ed70edb 100644 --- a/doc/src/com/google/gwt/doc/DeveloperGuide.java +++ b/doc/src/com/google/gwt/doc/DeveloperGuide.java
@@ -356,7 +356,7 @@ * * <!-- Include a history iframe to enable full GWT history support --> * <!-- (the id must be exactly as shown) --> - * <iframe id="__gwt_historyFrame" style="width:0;height:0;border:0"></iframe> + * <iframe src="javascript:''" id="__gwt_historyFrame" style="width:0;height:0;border:0"></iframe> * * </body> * </html>
diff --git a/samples/dynatable/src/com/google/gwt/sample/dynatable/public/DynaTable.html b/samples/dynatable/src/com/google/gwt/sample/dynatable/public/DynaTable.html index 016e829..aaef3f0 100644 --- a/samples/dynatable/src/com/google/gwt/sample/dynatable/public/DynaTable.html +++ b/samples/dynatable/src/com/google/gwt/sample/dynatable/public/DynaTable.html
@@ -6,7 +6,7 @@ <title></title> </head> <body> - <iframe id='__gwt_historyFrame' style='width:0;height:0;border:0'></iframe> + <iframe src="javascript:''" id='__gwt_historyFrame' style='width:0;height:0;border:0'></iframe> <script type="text/javascript" language='javascript' src='com.google.gwt.sample.dynatable.DynaTable.nocache.js'></script> <h1>School Schedule for Professors and Students</h1> <table width="100%" border="0" summary="School Schedule for Professors and Students">
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/KitchenSink.html b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/KitchenSink.html index d8f4593..0215b48 100644 --- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/KitchenSink.html +++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/KitchenSink.html
@@ -4,6 +4,6 @@ </head> <body> <script language='javascript' src='com.google.gwt.sample.kitchensink.KitchenSink.nocache.js'></script> - <iframe id='__gwt_historyFrame' style='width:0;height:0;border:0'></iframe> + <iframe src="javascript:''" id='__gwt_historyFrame' style='width:0;height:0;border:0'></iframe> </body> </html>
diff --git a/samples/simplerpc/src/com/google/gwt/sample/simplerpc/public/SimpleRPC.html b/samples/simplerpc/src/com/google/gwt/sample/simplerpc/public/SimpleRPC.html index 03e305f..0fa249e 100644 --- a/samples/simplerpc/src/com/google/gwt/sample/simplerpc/public/SimpleRPC.html +++ b/samples/simplerpc/src/com/google/gwt/sample/simplerpc/public/SimpleRPC.html
@@ -8,7 +8,7 @@ <title>SimpleRPC</title> </head> <body> - <iframe id='__gwt_historyFrame' style='width:0;height:0;border:0'></iframe> + <iframe src="javascript:''" id='__gwt_historyFrame' style='width:0;height:0;border:0'></iframe> <script type="text/javascript" language='javascript' src='gwt.js'> </script> <h1>
diff --git a/user/src/com/google/gwt/user/client/ui/impl/PopupImplIE6.java b/user/src/com/google/gwt/user/client/ui/impl/PopupImplIE6.java index 737db1e..257477c 100644 --- a/user/src/com/google/gwt/user/client/ui/impl/PopupImplIE6.java +++ b/user/src/com/google/gwt/user/client/ui/impl/PopupImplIE6.java
@@ -33,6 +33,11 @@ public native void onShow(Element popup) /*-{ // TODO: make this more Java and less JSNI? var frame = $doc.createElement('iframe'); + + // Setting a src prevents mixed-content warnings. + // http://weblogs.asp.net/bleroy/archive/2005/08/09/how-to-put-a-div-over-a-select-in-ie.aspx + frame.src = "javascript:''"; + frame.scrolling = 'no'; frame.frameBorder = 0;
diff --git a/user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplIE6.java b/user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplIE6.java index eb4b837..809e82b 100644 --- a/user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplIE6.java +++ b/user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplIE6.java
@@ -15,6 +15,7 @@ */ package com.google.gwt.user.client.ui.impl; +import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Element; /** @@ -22,6 +23,12 @@ */ public class RichTextAreaImplIE6 extends RichTextAreaImplStandard { + public Element createElement() { + Element elem = super.createElement(); + DOM.setElementProperty(elem, "src", "javascript:''"); + return elem; + } + public native String getText() /*-{ return this.@com.google.gwt.user.client.ui.impl.RichTextAreaImpl::elem.contentWindow.document.body.innerText; }-*/;
diff --git a/user/src/com/google/gwt/user/tools/AppHtml.htmlsrc b/user/src/com/google/gwt/user/tools/AppHtml.htmlsrc index 2b09787..d0cffec 100644 --- a/user/src/com/google/gwt/user/tools/AppHtml.htmlsrc +++ b/user/src/com/google/gwt/user/tools/AppHtml.htmlsrc
@@ -33,7 +33,7 @@ <body> <!-- OPTIONAL: include this if you want history support --> - <iframe id="__gwt_historyFrame" style="width:0;height:0;border:0"></iframe> + <iframe src="javascript:''" id="__gwt_historyFrame" style="width:0;height:0;border:0"></iframe> <h1>@className</h1>