LayoutTests/fast/forms/ValidityState-typeMismtch-url.html fails on Chromium port because KURL implementation in Chromium is different from other ports, and host name validation rules are mismatched between the normal KURL and Chromium KURL. > FAIL http://www.g**gle.com is an incorrect valid url. > FAIL http:// www.google.com is an incorrect valid url. > FAIL http://www .google.com is an incorrect valid url. > FAIL http://www. google. com is an incorrect valid url. > FAIL http://host+ is an incorrect valid url. > FAIL http://myurl! is an incorrect valid url. The ASCII host name rule in the normal KURL is like: HEXDIG = "0-9A-Fa-f" KURL_IPV6ADDR = "[" + HEXDIG + ":]+" ALPHADIGIT = "0-9A-Za-z" KURL_HOST = "¥¥[" + KURL_IPV6ADDR + "]|[-._" + ALPHADIGIT + "]*" The ASCII host name rule in Chromium KURL, GoogleURL, is like: PCT_ENCODED = "%[" + HEXDIG + "]{2}" GURL_HOST = "(" + PCT_ENCODED + "|[- !"#$&'()*+,.:<=>@[]_`{|}" + ALPHADIGIT + "])*" HTML5's URL type is an absolute URI or an absolute IRI. URI (RFC3986)'s host name rule is like: IPV6ADDR = "[" + HEXDIG + ":.]+" UD = "-!$&'()*+,.;=_~" + ALPHADIGIT IPADDR = "(" + IPV6ADDR + "|v[0-9]¥.[:" + UD + "]+)" URI_HOST = "¥¥[" + IPADDR + "]|(" + PCT_ENCODED + "|[" + UD + "])*" IMO, - Changing GoogleURL so that it has the same rules as KURL - Changing KURL so that it has the same rules as GoogleURL - Changing both of GoogleURL and KURL so that they are compliant to the standards strictly They DON'T work well because I think KURL and GoogleURL have practical reasons of the non-standard rules. Should we have dedicated URL validator for <input type=url>? In that case, how to check IDN validity?
I think we should make KURL’s rules match GoogleURL and then remove the WebCore dependency on GoogleURL entirely. Chromium can continue to use GoogleURL elsewhere, and the Chromium team can add regression tests to make sure KURL is 100% compatible with GoogleURL.
(In reply to comment #1) > I think we should make KURL’s rules match GoogleURL and then remove the WebCore > dependency on GoogleURL entirely. Chromium can continue to use GoogleURL > elsewhere, and the Chromium team can add regression tests to make sure KURL is > 100% compatible with GoogleURL. Chromium guys, why KURLGogole was introduced? Do we need to use GoogleURL in the renderer process?
I heard Chromium wanted to keep KURLGoogle for consistency with non-WebKit part. So I'll change the test to support both of KURL and KURLGoogle.
Created attachment 43897 [details] Proposed patch
style-queue ran check-webkit-style on attachment 43897 [details] without any errors.
Comment on attachment 43897 [details] Proposed patch > +// KURL's host name restriction is stricter than RFC 3986. KURLGoogle is not. It would be best to make these the same. It's not good to have incompatible dialects of WebKit! r=me
Comment on attachment 43897 [details] Proposed patch Clearing flags on attachment: 43897 Committed r51799: <http://trac.webkit.org/changeset/51799>
All reviewed patches have been landed. Closing bug.