Re: [dev-servo] HTML parsing alternatives

2014-03-06 Thread James Graham
On 06/03/14 02:05, Keegan McAllister wrote: Writing our own HTML5 parser would be a lot of work, but does not seem infeasible. The parsers I've found (including the translated C++ code for Gecko) are in the 10-20 KLoC range. We can do a one-time translation from Java for the most mechanical pa

Re: [dev-servo] HTML parsing alternatives

2014-03-06 Thread Henri Sivonen
> I've been working on that recently and I have some doubts about this > approach. Java and C++ share some features that Rust does not have. > hsivonen and I have worked around some of these mismatches, but it's been a > fair amount of effort already, and the translator is not that close to > prod

Re: [dev-servo] HTML parsing alternatives

2014-03-06 Thread Keegan McAllister
(replies inline to multiple messages) >> I think the biggest unknown is memory management. > > Is this the only thing that's blocking compilation Unfortunately it's not. Some other problems I ran into: - The Java code has static data with non-constant initializers that depend on each other. F

Re: [dev-servo] HTML parsing alternatives

2014-03-06 Thread Boris Zbarsky
On 3/6/14 4:53 PM, Keegan McAllister wrote: but can this happen with innerHTML? InnerHTML won't run any scripts per se, but will trigger mutation observers before returning, as well as custom element constructors and so forth... Another thing I would like to understand is how real sites us