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
-~----------~----~----~----~------~----~------~--~---