6 ms·
Mozilla Servo: the road to Acid2
- AndrewDucker 13y agoSo, is this because they're microtargetting Acid compliance? Or do they actually have 90% of a browser layout engine? And if it's the latter, what would actually need to be done to build the rest of a browser around it?
- paraboul 13y agoIIRC Acid1 only targets basic CSS compliance (http://en.wikipedia.org/wiki/Acid1 http://en.wikipedia.org/wiki/Acid1). I guess that most of the DOM API (end user level) has yet to be done along with the javascript API (binding) controlling it (e.g. XHR, Websocket, DOM manipulation, domain security control, etc...). Next : the browser itself (chrome, modules, tabs, external interfaces, UI, ...). So, no, not 90%. But I would attribute 50% for starting the project itself and having created something as awesome as Rust.
- pcwalton 13y ago> I guess that most of the DOM API (end user level) needs to be done along with the javascript API controlling it (e.g. XHR, Websocket, DOM manipulation, domain security control, etc...). We do have JavaScript and DOM bindings but they're incomplete. (None of the items you mentioned are implemented, except for basic DOM manipulation.)
- kibwen 13y ago> Next : the browser itself (chrome, modules, tabs, > external interfaces, UI, ...). I'd like to note that Servo itself is intended to be a layout engine independent of any specific front-end. The forthcoming UI reference implementation, a.k.a. Crow (seeing a theme yet?), can be tracked here: https://github.com/mozilla/servo/issues/111 https://github.com/mozilla/servo/issues/111
- sanxiyn 13y agoAs written in OP, Servo currently lacks table layout and absolute positioning. Those are pretty big items, so no, not 90%. Acid2-passing layout engine doesn't need to be that big. http://weasyprint.org/ http://weasyprint.org/ is known to pass Acid2 and renders the web pretty well. It does all layout by itself in less than 15,000 lines of Python.
- jessaustin 13y agoThanks for the pointer. I love it that the output of the test is just a smiley face.
- sanxiyn 13y agoThere is a guide explaining how the smiley is drawn. Interesting reading. http://www.webstandards.org/action/acid2/guide/ http://www.webstandards.org/action/acid2/guide/
- TorKlingberg 13y agoFor anyone else that didn't know: Servo is a prototype web browser engine written in the Rust language.
- kibwen 13y ago"Now that we've essentially passed Acid1 (once one remaining pull request is merged), Acid2 is on the horizon!" I applaud the Servo team for reaching such a concrete milestone on the long path to implementing a modern layout engine (in an experimental and highly unstable programming language, no less). I do want to point out an amusing anecdote, though. As the Acid1 test states: "All 100%-conformant CSS1 agents should be able to render the document elements above this paragraph indistinguishably (to the pixel) from this reference rendering, (except font rasterization and form widgets)." The point of the parenthetical disclaimer at the end was probably to account for differences in appearance in native platform elements, but the language is weaselly enough that Servo still manages to qualify as compliant despite the fact that it doesn't have form elements at all yet. :) http://www.reddit.com/r/rust/comments/1kz0ue/servo_passes_acid1/cbu544i http://www.reddit.com/r/rust/comments/1kz0ue/servo_passes_ac...
- metajack 13y agoTo be fair, I don't think the point of Acid1 was to show off form elements. Floats, percentage widths, and how the flows are constructed were the difficult bits. Note that we tried to support everything else even if the language allowed for us to skip it. For example, line-height is used in a few places, but we waited until we had line-height support before we considered ourselves passing.