
Servo passes Acid2 - bpierre
https://twitter.com/pcwalton/status/449299846873108480
======
bpierre
Servo [1] is an experimental web engine developed by Mozilla, written in the
Rust language [2], which is also developed by Mozilla.

[1] [https://github.com/mozilla/servo](https://github.com/mozilla/servo)

[2]
[https://en.wikipedia.org/wiki/Rust_%28programming_language%2...](https://en.wikipedia.org/wiki/Rust_%28programming_language%29)

------
sanxiyn
Acid2 pass itself maybe uninteresting, but Servo also does layout in parallel
(right now, not in the future). No other engines do.

[http://pcwalton.github.io/blog/2014/02/25/revamped-
parallel-...](http://pcwalton.github.io/blog/2014/02/25/revamped-parallel-
layout-in-servo/)

~~~
haberman
Wow, Servo is way longer along than I thought!

From that post:

> No doubt about it, CSS 2.1 is tricky—floats perhaps more than anything else.

I really hope that Servo helps to identify parts of the HTML/CSS specs (if
any) that unnecessarily prevent parallelism. By that I mean features (like
"float" perhaps) that make it harder to parallelize, and where an alternative
design could support the same use cases in a better way.

Those are the gems that teach us deep lessons about the problem space, and how
future similar technologies out to be designed.

~~~
dingdingdang
CSS without float.. would not work very well! Unless we all go back to table
based design (or ahead to flexbox I guess, I don't know enough, practically
speaking, about that standard yet to reason proper about it though!)

~~~
ehsanu1
If you clear your floats, you'll be fine in terms of giving the engine room to
parallelize, according to pcwalton's blog post.

~~~
oneeyedpigeon
Does that 'allow' the classic use case of floats - potentially, what should be
the _only_ use of floats - wrapping text around an image? I feel like the
answer would be "no", yet there's no good alternative for achieving this
common requirement, which would cause a snag.

~~~
pcwalton
If you know you need to use floats to flow text around elements, feel free to
use them! They're in CSS for a reason :) But if there are alternatives (such
as absolute positioning) that work equally well in your particular design,
then choosing an alternative may help you gain better performance.

------
joelmichael
Oddly enough I just checked and Safari is not passing the Acid2 right now.
Happens on my iPhone too.

[http://www.webstandards.org/files/acid2/test.html#top](http://www.webstandards.org/files/acid2/test.html#top)

~~~
annnnd
To quote: "Servo passes Acid2 in my branch". It is probably not in default
branch yet.

~~~
danielsamuels
To quote: "Safari is not passing".

------
wittekm
Are there any sites with runnable Servo binaries? Or is it seriously just the
engine with absolutely zero browser chrome?

~~~
pcwalton
We have no browser chrome, for two reasons:

(1) Browser UX research isn't part of the research agenda for Servo at this
time. (That isn't to say we aren't interested in browser UX research at
Mozilla, just that that isn't being done under the Servo project.)

(2) It helps to ensure that we are embeddable. We want Servo to be an
embeddable Web rendering engine for people to use in their own projects.

~~~
ksec
embeddable. Wow. This was what Gecko was hoping to achieve and failed to do
so. Lets hope the second time around everything will be much much better.

~~~
kibwen
There's also a chance that they'll adopt the Webkit embedding API, which would
make Servo a drop-in replacement for any software that currently uses Webkit.
Though it hasn't been decided for certain whether to pursue this route.

------
AshleysBrain
Servo's progress is impressive. How far is it off being ready to integrate in
to a real browser? Is this likely in the foreseeable future?

~~~
hyperpape
Mozilla keeps saying it is experimental and not intended to replace Firefox,
but it sure seems like they're putting a lot of effort into it and Rust...

That said, I don't think it could be ready for years if ever.

------
cordite
> That smiley face looks like the face of someone that just passed an acid
> test. -- ‏@alekslitynski

I remember the mess I saw on my PSP when I tried it out when Acid 2 was
important.

~~~
jey
For the confused: @alekslitynski is making a reference to
[https://en.wikipedia.org/wiki/Acid_Tests](https://en.wikipedia.org/wiki/Acid_Tests).

------
DiabloD3
Can't wait until I can get a browser that uses this, especially on Android.

------
herokusaki
Posts like this always make me want to play with a layout engine trying to
implement various features. Is there a toy layout engine made specifically for
(self-) education? I couldn't find one. If there isn't, what is otherwise the
easiest one to get started with?

~~~
jgraham
Or contribute to Servo! Despite the huge milestone represented by Acid 2, it's
still pretty early days and there is plenty of work to go around. The code's
on GitHub [1], Josh Matthews did a nice talk about Fosdem that should give you
a start on the architecture and how to contribute (video [2], slides [3]), and
there is an irc channel (#servo on irc.mozilla.org) where you can ask
questions.

[1] [https://github.com/mozilla/servo/](https://github.com/mozilla/servo/) [2]
[http://ftp.osuosl.org/pub/fosdem//2014/UD2218A/Saturday/Serv...](http://ftp.osuosl.org/pub/fosdem//2014/UD2218A/Saturday/Servo_building_a_parallel_web_browser.webm)
[3]
[http://www.joshmatthews.net/fosdemservo/](http://www.joshmatthews.net/fosdemservo/)

~~~
pcwalton
Servo is also pretty easy to navigate, IMO. I'm biased, of course :) But we do
care a lot about code cleanliness.

------
cardiffspaceman
The HTML 5 spec can be implemented from scratch, but my guess is it takes a
dozen times more people than implementing a C++ compiler. My basis for this
comment is the now-four-years-dormant project I worked on to implement just
parsing HTML5 into a DOM tree, which wasn't even inspired by wanting to write
my own browser. I was motivated more by having an interest in hacking text
layout code, and the need for some sort of syntax for my test cases. Since the
project had no commercial goal, it went down a tangent.

I'm impressed that a non-profit has funded two of these projects.

------
taeric
But is it any faster at doing so than any of the competition?

Specifically, are there any real benefits to the "parallel" aspect of this?

~~~
pcwalton
I haven't measured Acid2 layout performance, because it's not particularly
interesting; Acid2's CSS is nowhere near the CSS that someone would actually
write in the real world. On real pages, from our small amount of testing,
we've seen promising results.

~~~
taeric
I'll have to give it another try. Last build I ran couldn't load that much.

Of course, firefox is already bloody fast on any site I can think of. Not sure
what sorts of improvements I should be looking for.

~~~
pcwalton
Oh, Servo certainly isn't a production-ready browser engine yet, if that's
what you're looking for; the incomplete DOM code and network code prevent many
sites from working.

~~~
taeric
More than just being production ready. I'm wondering what lessons have been
learned that will actually help current browsers. Seems that servo is in a
massive game of catch up, with no guarantees that things will be
faster/better/whatever.

~~~
anonbanker
I remember the same things being said about Mozilla/Gecko back in '99\. That
seemed to turn out pretty well for everyone.

~~~
camus2
"I remember the same things being said about Mozilla/Gecko back in '99."

Except nobody ever said that back in 99.

~~~
anonbanker
Interesting. how does one go about proving a negative?

To support my side, do a Google search for "Joel spolsky Mozilla". Hope that
helps. Granted, it was written four months into 2000, but was reflecting
murmurings one would read on Slashdot months earlier (back when /. was the HN
of its time).

~~~
taeric
I'm not sure what this proves, though. It didn't exactly work out well for
Netscape.

To be fair, the lesson learned there was to not bet your company on a rewrite.
Which they are not doing.

~~~
anonbanker
I'd say that the first thing it proves is you don't remember the tech scene in
'98\. All the comments you brought up in your GP post were reflected loudly by
most pundits during that time. Cringley, spolsky, and many others said AOL was
doing a fool's errand by allowing the then-unproven open source bazaar model
to rewrite the browser. And that they'd be playing catch-up. And that IE would
win because nobody would care about the rewrite. Fast forward to 2014, and
blink/Firefox fight for first place, while IE continues to lose market share.
Mozilla not only caught up, but is now setting the pace.

The second thing it shows is that history repeats itself. The pundits, much
like you will prove to be, were wrong. Thanks to the brilliance of jwz, the
Mozilla project and the gecko rewrite has outlived both Netscape and AOL.
Firefox is a flagship example of how open development can create a superior
product that can outlast the companies that make it.

The next thing this proves is that open development is continuing to show that
rewriting an engine doesn't require "betting the company" anymore. Mozilla and
Samsung are both heavily-invested in Servo, and are expecting this rewrite to
be at the core of your future operating system. But if servo doesn't pan out,
Mozilla won't be filing for chapter 11 protection

~~~
taeric
I'm not sure what I'm reading here. First thing to remember, is that Netscape
4 was pretty rushed and terrible. To the point that I remember thinking of how
awesome IE was at a few points. And I already had a large distrust of MS.

That is, MS used some underhanded tactics to gain market share. They also took
advantage of (and probably forced) a major misstep by a competitor.

That Phoenix/Firefox was able to be resurrected from the ashes is a fortunate
occurrence, but at no time did that at all come of as if it was planned. I
pretty much consider it the "classic coke" of the browser wars. (Remember,
phoenix was originally Mozilla's suite, stripped down to just the browser.)

So, yes, it has gone rather well. However, I'm not sure the codebase can
afford to survive the death of its stewardship again. The statistics show a
clear dominance of "not Mozilla" historically.

To the point that I'm not all sure on what you are basing your claim of
Mozilla "now setting the pace." Don't get me wrong, I'm glad it is doing well.
It is my browser of choice. However, I realize I am the minority both in my
friends/family and statistics.

Which is funny. In my family, the browser choice is either Safari or IE.
Depending on OS of choice. In my friends, it is Chrome. To the point that I'm
not even clear what lessons are to be learned from these choices, honestly.

So, back to the point. How were the pundits wrong? Did AOL/Netscape somehow
come off well by the rewrite? Was it a sound investment? If anything, I would
think the continued active development of the non-servo codebase shows that it
is sound advice _not_ to bet the company on a rewrite, and that they learned
it. Are you really claiming otherwise?

------
panzi
Looks better than current Firefox on my system.
[http://i.imgur.com/6CN4Heh.png](http://i.imgur.com/6CN4Heh.png)

~~~
cpeterso
Ouch! Acid2 is broken on my Firefox too (but in a slightly different way). :(

~~~
simlevesque
No problems on FF 31.
[http://i.imgur.com/5l2042M.png](http://i.imgur.com/5l2042M.png)

------
porker
Am I the only one who thought Acid2 was something to do with a new database
data integrity test?

~~~
kalnuezis
me too

------
camus2
Good,now maybe you could fix that broken IndexedDB spec and come up with
something more usefull...

and implement basic stuff like Summary/Details or you know some HTML5 form
controls...

And some file system api, seems to me Mozilla dont care about offline
webapps,since the WebSQL debacle...

~~~
rubiquity
Offline and Web have always been very funny to me. Why should it be the Web's
responsibility to make offline better, it is the Web after all -- the epitome
of online connectivity. If anything, it should be the mobile companies
responsibility to have better offline support. Maybe they could start by not
choosing to arbitrarily wipe Web browser data as the first step of reclaiming
memory for the operating system (I'm looking at you, Apple)?

~~~
Turing_Machine
"Why should it be the Web's responsibility to make offline better"

Because you care about your users being able to use the site?

Because modern users aren't tethered to the wall any more?

"Maybe they could start by not choosing to arbitrarily wipe Web browser data
as the first step of reclaiming memory for the operating system"

Okay, now I'm curious.

Assume the system is totally out of storage. Something _has_ to go. Should it
be:

1) Apple's answer (i.e., deleting cached web pages and data) 2) Your answer
(which would be?)

