There were some references to "clear.cache.gif" that did not have GWT.getModuleBaseURL() prepended to them. This caused problems when the host page path did not match the module's script path. Issue: 1147 Patch by: martin.portmann, rdayal Review by: jgw git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@1221 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/user/client/ui/impl/ClippedImageImpl.java b/user/src/com/google/gwt/user/client/ui/impl/ClippedImageImpl.java index da8f3da..cba3204 100644 --- a/user/src/com/google/gwt/user/client/ui/impl/ClippedImageImpl.java +++ b/user/src/com/google/gwt/user/client/ui/impl/ClippedImageImpl.java
@@ -17,6 +17,7 @@ import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Element; +import com.google.gwt.core.client.GWT; /** * Uses a combination of a clear image and a background image to clip all except @@ -48,8 +49,8 @@ + "px; background: url(" + url + ") no-repeat " + (-left + "px ") + (-top + "px"); - String clippedImgHtml = "<img src='clear.cache.gif' style='" - + style + "' border='0'>"; + String clippedImgHtml = "<img src='" + GWT.getModuleBaseURL() + + "clear.cache.gif' style='" + style + "' border='0'>"; return clippedImgHtml; }
diff --git a/user/src/com/google/gwt/user/client/ui/impl/ClippedImageImplIE6.java b/user/src/com/google/gwt/user/client/ui/impl/ClippedImageImplIE6.java index b50dc38..b903852 100644 --- a/user/src/com/google/gwt/user/client/ui/impl/ClippedImageImplIE6.java +++ b/user/src/com/google/gwt/user/client/ui/impl/ClippedImageImplIE6.java
@@ -34,7 +34,7 @@ private static native void injectGlobalHandler() /*-{ $wnd.__gwt_transparentImgHandler = function (elem) { elem.onerror = null; - @com.google.gwt.user.client.DOM::setImgSrc(Lcom/google/gwt/user/client/Element;Ljava/lang/String;)(elem, "clear.cache.gif"); + @com.google.gwt.user.client.DOM::setImgSrc(Lcom/google/gwt/user/client/Element;Ljava/lang/String;)(elem, @com.google.gwt.core.client.GWT::getModuleBaseURL()() + "clear.cache.gif"); }; }-*/; @@ -87,7 +87,7 @@ + clipperStyle + "\"><img src='" + moduleBaseUrlProtocol - + "' onerror='if(window.__gwt_transparentImgHandler)window.__gwt_transparentImgHandler(this);else this.src=\"clear.cache.gif\"' style=\"" + + "' onerror='if(window.__gwt_transparentImgHandler)window.__gwt_transparentImgHandler(this);else this.src=\"" + GWT.getModuleBaseURL() + "clear.cache.gif\"' style=\"" + imgStyle + "\" width=" + (left + width) + " height=" + (top + height) + " border='0'></gwt:clipper>";