[gwt-contrib] Re: IE8 detection in GWT 1.7 clarification needed
On 16 juil, 17:12, stuckagain david.no...@gmail.com wrote: Joel, Glad to read that I am not totally going nuts. Unfortunately I need to support IE6,7 and 8... so using tables is currently inevitable. Hit F12 in IE8 (or choose Development Tools from the Tools menu); you'll get the ie8 permutation when it says Document mode: IE8 Standards, otherwise, you'll get the ie6 permutation. Actually, the JavaScript APIs are different between Document mode: IE8 Standards and other document modes, not just the layout! You can very easily support all three IE versions by either: - stick to quirks mode (and therefore never actually use the ie8 permutation) - use highest standards mode (will use ie8 permutation in IE8, ie6 permutation in IE7 and IE6) and check your rendering (you can just switch the document mode in IE8's development tools, or, better, test in IE6 and IE7 –Microsoft gives you VirtualPC images for free, and VirtualPC is free too–) AFAICT, the issues in standards mode are limited to StackPanel, SplitPanel and DockPanel. If you don't use any of them, just check your rendering in all three IE versions (and eventually tweak your CSS). We're basically using only FlowPanel and Grid for layout (and DecoratorPanel and Tree, to cite other table-based widgets) and haven't had any rendering problem so far. I'm curious to see your new layout support. You're not alone! ;-) --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: IE8 detection in GWT 1.7 clarification needed
Well, Alltogether the GWT 1.7 is supposed to have IE8 support, but you have to make sure that you change the doctype to strict mode or you will never actually use it. Is the strict doctype now the default one when you create a new GWT application ? I still have an old GWT Plugin in eclipse - not begin on the internet - so I can not check right now if that changed recently. I guess my workaround to disable the IFrame in popups and to remove the PNG workaround is still needed even if the browser is IE8. I did not create a patch since the implementation is against one of the prime directives of the GWT design ... is there a deviation possible for this case ? The difference in memory consumption and consequently the speed in IE7 and IE8 (in quircksmode) is dramatically improved in our applications. Our apps used to leak hunderds of megabytes for the images (although we only have 20 small 16x16 pixels images and 3 bigger ones in the application). In the case that somebody is interested in these workarounds (or wants to create a patch, which I can't right now): in my applications gwt.xml file I override the deferred binding to use my implementation instead of the one from GWT. !-- disable the iframe tricks for ie -- replace-with class=com.acme.gwt.widget.client.impl.PopupImplIE when-type-is class=com.google.gwt.user.client.ui.impl.PopupImpl/ when-property-is name=user.agent value=ie6 / /replace-with replace-with class=com.acme.gwt.widget.client.impl.ClippedImageImplIE when-type-is class=com.google.gwt.user.client.ui.impl.ClippedImageImpl/ when-property-is name=user.agent value=ie6 / /replace-with These classes are just a proxy to the IE6 implementation or the default depending on the browser version. If the browser is IE7 or newer I fall back to the default. public class PopupImplIE extends PopupImpl { private final PopupImpl mImpl; public PopupImplIE() { if (IEDetect.isIE7()) { mImpl = new PopupImpl(); } else { mImpl = new PopupImplIE6(); } } @Override public void onHide(Element pPopup) { mImpl.onHide(pPopup); } @Override public void onShow(Element pPopup) { mImpl.onShow(pPopup); } @Override public void setVisible(Element pPopup, boolean pVisible) { mImpl.setVisible(pPopup, pVisible); } } public class ClippedImageImplIE extends ClippedImageImpl { private final ClippedImageImpl mImpl; public ClippedImageImplIE() { if (IEDetect.isIE7()) { mImpl = new ClippedImageImpl(); } else { mImpl = new ClippedImageImplIE6(); } } @Override public void adjust(Element clipper, String url, int left, int top, int width, int height) { mImpl.adjust(clipper, url, left, top, width, height); } @Override public Element createStructure(String url, int left, int top, int width, int height) { return mImpl.createStructure(url, left, top, width, height); } @Override public void fireSyntheticLoadEvent(final Image image) { mImpl.fireSyntheticLoadEvent(image); } @Override public String getHTML(String url, int left, int top, int width, int height) { return mImpl.getHTML(url, left, top, width, height); } } Finally this is my class that checks the browser version: final class IEDetect { private final static boolean IE7 = jsIsIE7(); private IEDetect() {} private native static boolean jsIsIE7() /*-{ var ua = navigator.userAgent; var re = new RegExp(MSIE ([0-9]{1,}[\.0-9]{0,})); if (re.exec(ua) != null) { rv = parseFloat(RegExp.$1); } return rv = 7.0; }-*/; static boolean isIE7() { return IE7; } } --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: IE8 detection in GWT 1.7 clarification needed
Oddly enough, that's correct. The lack of doctype, or an explicitly quirks doctype as below, always puts IE8 into compatibility mode, which is pretty much identical to IE7 -- so you get the ie6/7 compiled permutation, because the ie8 one wouldn't work at all. Another way of saying this is that there's no such thing as IE8 quirks mode. Weird, eh? Do keep in mind that GWT apps generally work in standards mode, but your layout may do some surprising things, especially for some of the table-based layouts such as StackPanel. I'm working feverishly to get a replacement layout system finished that will eliminate the need for most tables in layout, and allow us to move forward towards (eventual) standards-mode-only support. On Thu, Jul 16, 2009 at 10:27 AM, stuckagain david.no...@gmail.com wrote: Hello, I was trying out recompiling with GWT 1.7 to see if I could remove my hacks to disable the IFrame trick in dialogs and I noticed that it was still active. It looks like ie8 is only triggered if you use the HTML 4.01 strict mode. If I use the transitional doctype it falls back to ie6. !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN Is this really the purpose ? David --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: IE8 detection in GWT 1.7 clarification needed
Joel, Glad to read that I am not totally going nuts. Unfortunately I need to support IE6,7 and 8... so using tables is currently inevitable. I'm curious to see your new layout support. David On Jul 16, 4:31 pm, Joel Webber j...@google.com wrote: Oddly enough, that's correct. The lack of doctype, or an explicitly quirks doctype as below, always puts IE8 into compatibility mode, which is pretty much identical to IE7 -- so you get the ie6/7 compiled permutation, because the ie8 one wouldn't work at all. Another way of saying this is that there's no such thing as IE8 quirks mode. Weird, eh? Do keep in mind that GWT apps generally work in standards mode, but your layout may do some surprising things, especially for some of the table-based layouts such as StackPanel. I'm working feverishly to get a replacement layout system finished that will eliminate the need for most tables in layout, and allow us to move forward towards (eventual) standards-mode-only support. On Thu, Jul 16, 2009 at 10:27 AM, stuckagain david.no...@gmail.com wrote: Hello, I was trying out recompiling with GWT 1.7 to see if I could remove my hacks to disable the IFrame trick in dialogs and I noticed that it was still active. It looks like ie8 is only triggered if you use the HTML 4.01 strict mode. If I use the transitional doctype it falls back to ie6. !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN Is this really the purpose ? David- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---