Forgive me for replying to my own message, but I have more
information.

First, I have a simple project to recreate the problem.  I just create
the default 'ImageViewer' application and display four pictures.  Here
is the GUI code:

public class ImageViewer implements EntryPoint {
        public void onModuleLoad() {
                RootPanel rootPanel = RootPanel.get();

                Image image = new Image(Images.INSTANCE.picture1());
                rootPanel.add(image, 25, 24);
                image.setSize("100px", "100px");

                Image image_1 = new Image(Images.INSTANCE.picture2());
                rootPanel.add(image_1, 310, 38);
                image_1.setSize("100px", "100px");

                Image image_2 = new Image(Images.INSTANCE.picture3());
                rootPanel.add(image_2, 25, 168);
                image_2.setSize("100px", "100px");

                Image image_3 = new Image(Images.INSTANCE.picture4());
                rootPanel.add(image_3, 310, 168);
                image_3.setSize("100px", "100px");
        }
}

public interface Images extends ClientBundle {

        public static final Images INSTANCE = GWT.create(Images.class);

        ImageResource picture1();

        ImageResource picture2();

        ImageResource picture3();

        ImageResource picture4);

}

The pictures are just small 'png' images, all the same size.

When running in compatibility view mode, the images are not inlined,
but are "sprited" in the usual manner (x/y style offsets into the
<md5>.cache.png file).  When not in compatibility view mode, the
images are evidently supposed to be inlined but are not.  Here is the
IE IMG element

<IMG style="POSITION: absolute; WIDTH: 100px; HEIGHT: 100px; TOP:
24px; LEFT: 25px" class=gwt-Image border=0 src="http://10.99.41.45/war/
com.mycompany.project.ImageViewer/clear.cache.gif"
__eventBits="163965">

Whereas, here is the image element on FF (image base64 data snipped):

<img border="0" style="width: 100px; height: 100px; background:
url(&quot;data:image/png;base64,iVB [snip]  ggg==&quot;) no-repeat
scroll 0px 0px transparent; position: absolute; left: 25px; top:
168px;" src="http://10.99.41.45/war/com.mycompany.project.ImageViewer/
clear.cache.gif" class="gwt-Image">

On Mar 2, 1:53 pm, RickD <[email protected]> wrote:
> I don't know that this is limited to IE 8, this is the only IE version
> I tested against.
>
> I cannot get ImageResources to work in my project on IE.  Instead of
> seeing the image "sprite", I am seeing the entire image file with the
> multiple "sprites".  Note that everything works fine on FF and Safari.
>
> What I noticed in the DOM is quite strange; With FF and Safari, the
> images are inline in the DOM via data-URI,  but on IE the images are
> in the <md5>.cache.png files.  The problem is, on IE, the image
> element styles do not contain the x/y offsets.  Note that I used
> Firebug and DebugBar to ascertain this.
>
> I created a simple/new 'ImageViewer' project and tested against that
> as well,  that also did not work until I activated the 'compatibility
> viewer' mode in IE.  Also, the images were not inlined.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to