Bug 32536

Summary: Some Browser-hosted SunSpider files are not valid HTML5
Product: WebKit Reporter: Maciej Stachowiak <mjs>
Component: Tools / TestsAssignee: Maciej Stachowiak <mjs>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Patch darin: review+

Description Maciej Stachowiak 2009-12-14 19:36:41 PST
Some Browser-hosted SunSpider files are not valid HTML5.
Comment 1 Maciej Stachowiak 2009-12-14 19:47:22 PST
Created attachment 44835 [details]
Patch
Comment 2 WebKit Review Bot 2009-12-14 21:12:22 PST
style-queue ran check-webkit-style on attachment 44835 [details] without any errors.
Comment 3 Darin Adler 2009-12-14 21:33:28 PST
Comment on attachment 44835 [details]
Patch

> +<meta charset=utf8>

Wow, I have never seen that syntax before. I always did it like this:

    <meta http-equiv="content-type" content="text/html; charset=utf-8">

I guess a new HTML5 thing. Does WebKit respect that syntax?

rs=me
Comment 4 Maciej Stachowiak 2009-12-14 22:12:38 PST
(In reply to comment #3)
> (From update of attachment 44835 [details])
> > +<meta charset=utf8>
> 
> Wow, I have never seen that syntax before. I always did it like this:
> 
>     <meta http-equiv="content-type" content="text/html; charset=utf-8">
> 
> I guess a new HTML5 thing.

Yep, it's new in HTML5.

> Does WebKit respect that syntax?

Yes. All browsers support it accidentally, because sniffing for a declared charset needs to be extremely lax. In particular sometimes people drop the quotes and write this:

<meta http-equiv=content-type content=text/html; charset=utf-8>

Thus you have to support charset=utf-8 by itself, and since browsers support it already, HTML5 wisely decided to make the shorter version conforming.
Comment 5 Maciej Stachowiak 2009-12-14 23:07:46 PST
http://trac.webkit.org/changeset/52139