On Wed, Jun 1, 2011 at 03:09, <t.bro...@gmail.com> wrote: > On 2011/06/01 04:48:04, xtof wrote: > >> On 2011/06/01 00:10:58, tbroyer wrote: >> > On 2011/05/31 23:38:17, xtof wrote: >> > > My apologies dropping the response on this thread (I'd missed the >> > last > >> > > question and had assumed this was good to submit). >> > > >> > > Also, I didn't realize that I actually need to fetch and submit >> > this patch > >> > > (I'm not part of GWT team proper and wasn't familiar with the >> > process for > >> > > changes from external developers). >> > >> > No problem. >> > >> > Otherwise, proposed changes SGTM. >> > > I can't seem to upload an updated patch set for this issue (presumably >> > since you > >> created it). I'll mail you the patch set separately. >> > > I hope I didn't mess things up during the merge, as I couldn't simply > upload the patch to Rietveld (when you create an issue with > git-cl/upload.py, it appears that you cannot update it "manually" > afterwards; and I couldn't find an option to upload.py to give it the > patch file either). >
How annoying; this doesn't make collaborative editing particularly easy :) Anyway, the merge seems to have come pretty close, though there were a few differences (some of the changes that I made to appease checkstyle didn't take, and one of the tests in SafeHtmlTemplatesTest seems to have gotten duplicated. I've downloaded your patch set and applied it to a clean client at the same base CL; the diff of what I have vs what I got from your patch set is appended below. > Alternatively, you could create another issue in Rietveld… > > Done: http://gwt-code-reviews.appspot.com/1447812 > > http://gwt-code-reviews.appspot.com/1380806/ > diff --git a/google3/third_party/java_src/gwt/svn/trunk/user/src/com/google/gwt/user/client/ui/impl/ClippedImageImplIE6.java b/google3/third_party/java_src/gwt/svn/trunk/user/src/com/google/gwt/user/client/ui/impl/ClippedImageImplIE6.java index d69fe3b..5d623ca 100644 --- a/google3/third_party/java_src/gwt/svn/trunk/user/src/com/google/gwt/user/client/ui/impl/ClippedImageImplIE6.java +++ b/google3/third_party/java_src/gwt/svn/trunk/user/src/com/google/gwt/user/client/ui/impl/ClippedImageImplIE6.java @@ -132,4 +132,12 @@ public class ClippedImageImplIE6 extends ClippedImageImpl { return SafeHtmlUtils.fromTrustedString(clippedImgHtml); } + + @Override + public Element getImgElement(Image image) { + if (!isIE6()) { + return super.getImgElement(image); + } + return image.getElement().getFirstChildElement(); + } } diff --git a/google3/third_party/java_src/gwt/svn/trunk/user/test/com/google/gwt/safehtml/client/SafeHtmlTemplatesTest.java b/google3/third_party/java_src/gwt/svn/trunk/user/test/com/google/gwt/safehtml/client/SafeHtmlTemplatesTest.java index bc80a97..4721856 100644 --- a/google3/third_party/java_src/gwt/svn/trunk/user/test/com/google/gwt/safehtml/client/SafeHtmlTemplatesTest.java +++ b/google3/third_party/java_src/gwt/svn/trunk/user/test/com/google/gwt/safehtml/client/SafeHtmlTemplatesTest.java @@ -110,6 +110,16 @@ public class SafeHtmlTemplatesTest extends GWTTestCase { Assert.assertEquals( "<span><a href=\"#\"><b>" + HTML_MARKUP + "</b></a></span>", templates.templateWithUriAttribute( + BAD_URL, SafeHtmlUtils.fromSafeConstant(HTML_MARKUP)).asString()); + // UriUtils.fromString: sanitized by fromString + Assert.assertEquals( + "<span><a href=\"" + GOOD_URL_ENCODED + "\"><b>" + HTML_MARKUP + + "</b></a></span>", + templates.templateWithUriAttribute( + UriUtils.fromString(GOOD_URL), SafeHtmlUtils.fromSafeConstant(HTML_MARKUP)).asString()); + Assert.assertEquals( + "<span><a href=\"#\"><b>" + HTML_MARKUP + "</b></a></span>", + templates.templateWithUriAttribute( UriUtils.fromString(BAD_URL), SafeHtmlUtils.fromSafeConstant(HTML_MARKUP)).asString()); // UriUtils.fromTrustedString: not sanitized Assert.assertEquals( diff --git a/google3/third_party/java_src/gwt/svn/trunk/user/test/com/google/gwt/safehtml/shared/GwtUriUtilsTest.java b/google3/third_party/java_src/gwt/svn/trunk/user/test/com/google/gwt/safehtml/shared/GwtUriUtilsTest.java index 4329e82..5c891dd 100644 --- a/google3/third_party/java_src/gwt/svn/trunk/user/test/com/google/gwt/safehtml/shared/GwtUriUtilsTest.java +++ b/google3/third_party/java_src/gwt/svn/trunk/user/test/com/google/gwt/safehtml/shared/GwtUriUtilsTest.java @@ -34,13 +34,13 @@ public class GwtUriUtilsTest extends GWTTestCase { StringBuilder sb = new StringBuilder(UriUtils.DONT_NEED_ENCODING); final int upcaseOffset = 'A' - 'a'; for (char c = 'a'; c <= 'z'; c++) { - sb.append(c).append((char) (c + upcaseOffset)); + sb.append(c).append((char)(c + upcaseOffset)); } for (char c = '0'; c <= '9'; c++) { sb.append(c); } final String expected = sb.toString(); - + assertEquals(expected, UriUtils.encode(expected)); } diff --git a/google3/third_party/java_src/gwt/svn/trunk/user/test/com/google/gwt/safehtml/shared/UriUtilsTest.java b/google3/third_party/java_src/gwt/svn/trunk/user/test/com/google/gwt/safehtml/shared/UriUtilsTest.java index 71d3746..e0a650b 100644 --- a/google3/third_party/java_src/gwt/svn/trunk/user/test/com/google/gwt/safehtml/shared/UriUtilsTest.java +++ b/google3/third_party/java_src/gwt/svn/trunk/user/test/com/google/gwt/safehtml/shared/UriUtilsTest.java @@ -15,9 +15,7 @@ */ package com.google.gwt.safehtml.shared; -/** - * Unit tests for {@link UriUtils}. - */ + public class UriUtilsTest extends GwtUriUtilsTest { // This forces a GWTTestCase to run as a vanilla JUnit TestCase. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors