Thursday, December 4th, 2008

HTML 5 Gecko Build

Category: HTML

Henri Sivonen has posted an exprimental Gecko build that parses HTML 5:

The level of quality is “It runs and some pages render!” This build is not at all suitable for normal browsing use. Please don’t use it with your usual Firefox profile. There are numerous known issues starting with bogus memory management (leaking everything in the parser!), lack of fragment parsing support, lack of quirks mode, HTML elements being represented as DOM nodes that behave like XHTML elements and the integration with CSS layout being inefficient. The baseline Gecko source isn’t synced with the trunk, so the other parts of Gecko don’t have all the latest patches. The parser doesn’t reflect the most recent spec changes. meta element-based encoding declarations and BOM sniffing don’t work.

If a page doesn’t render, try reloading or navigating back and forth.

For background, please refer to a recent
newsgroup posting of mine
. (Summary: The parser core is mechanically translated from the Validator.nu HTML Parser.)

Sam Ruby talked a little about the implementation:

He starts from a single source, in Java. The Java code can be compiled to Java byte codes, JavaScript source, or C++ presumably making use of Mozilla libraries for things such as memory management. If he can do that, it seems to me to be a rather small leap from there to producing C++ using, say, either Ruby or Python libraries for memory management, as well as a thin binding to the language. C# would also be a reasonable target.

If this could be done, and made available under a liberal license, it could go a long way towards making available consistent and performant implementations of the HTML5 parser algorithm everywhere.

Posted by Dion Almaer at 8:22 am
Comment here

++++-
4.1 rating from 17 votes

Comments Here »

Comments feed TrackBack URI

Leave a comment

You must be logged in to post a comment.