WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
29913
typeMismatch for type=url is not compliant to standards, and incompatible in KURL implementations
https://bugs.webkit.org/show_bug.cgi?id=29913
Summary
typeMismatch for type=url is not compliant to standards, and incompatible in ...
Kent Tamura
Reported
2009-09-30 00:01:17 PDT
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?
Attachments
Proposed patch
(8.37 KB, patch)
2009-11-25 23:23 PST
,
Kent Tamura
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Darin Adler
Comment 1
2009-09-30 10:05:04 PDT
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.
Kent Tamura
Comment 2
2009-10-04 23:40:27 PDT
(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?
Kent Tamura
Comment 3
2009-11-25 23:19:48 PST
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.
Kent Tamura
Comment 4
2009-11-25 23:23:19 PST
Created
attachment 43897
[details]
Proposed patch
Adam Barth
Comment 5
2009-11-30 12:42:52 PST
style-queue ran check-webkit-style on
attachment 43897
[details]
without any errors.
Darin Adler
Comment 6
2009-12-07 10:29:04 PST
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
WebKit Commit Bot
Comment 7
2009-12-07 14:50:23 PST
Comment on
attachment 43897
[details]
Proposed patch Clearing flags on attachment: 43897 Committed
r51799
: <
http://trac.webkit.org/changeset/51799
>
WebKit Commit Bot
Comment 8
2009-12-07 14:50:29 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug