html5lib/html5lib-tests

<rtc>/<rb> spec issues (More generally, which spec does html5lib follow?)

nostrademons opened this issue · 5 comments

I've been trying to update Gumbo to pass the latest version of the html5lib testsuite and run into a spec issue with tests_19_22. The testcase is "abcd". According to the WhatWG version, there's no special parsing instructions for , so it should fall under the "any other start tag" clause, which inserts the as a child of the , as Gumbo does.

However, looking at the commit history for the test, it seems like this test was added in response to a spec change on the W3C version of the spec. Which version of the spec does html5lib (and other parsers) follow? I'd been led to believe (by an albeit biased source) that the WhatWG version was more current, but it seems like Blink and html5lib are both following the W3C?

The ruby spec in the W3C version has been implemented in WebKit and Gecko already, and last I heard, it was also in the process of getting implemented in Blink.

I'd been led to believe (by an albeit biased source) that the WhatWG version was more current

That's not true in this case. Instead what's in the W3C spec is more current and more aligned with discussions/plans among browser implementors.

Cool, thanks. I'll implement the ruby/rtc handling from the W3C spec for Gumbo.

In the general case - should I be working off the W3C spec, the WhatWG spec, or just trying to match the html5lib tests? Was this a one-off case where a change made it into the W3C spec before the WhatWG, or are there other cases where browsers more closely follow the W3C rather than the WhatWG.

In the general case - should I be working off the W3C spec, the WhatWG spec, or just trying to match the html5lib tests?

You should be working off the WHATWG spec, and checking the behavior of the tests against that when you run them against your implementation, and then raising issues if you find differences. In other words, pretty much just what you did in this case.

Was this a one-off case where a change made it into the W3C spec before the WhatWG

Yes, it's a one-off case; there are currently no other such cases.

are there other cases where browsers more closely follow the W3C rather than the WhatWG

Nope, this is the only such case.

Got it, thanks.

Essentially: the WHATWG spec will change to match implementations, and hence the tests have been included based on the W3C spec change (as that's what's implemented).