Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

browser.html is just the browser chrome (er, not to be confused with the browser Chrome), it's an independent Mozilla project to create a frontend entirely in web technologies, which, since these are all standardized, should theoretically work with any browser engine, not just Servo.

As for Firefox, later on this year we should see the integration of Servo's style engine ("Stylo") into Gecko, and going forward we should expect to see the two codebases share even more components. However, wholesale replacement of Gecko with Servo in Firefox isn't on the table at the moment.



> theoretically work with any browser engine, not just Servo.

Well, it depends on some privileged APIs, of course. But we've tried to keep that API surface minimal.


Ah I wasn't aware of that, what do these priveliged APIs do?


Things like history management. While tabs in browser.html are just iframes, browser.html needs more access to the contained documents to be able to fully do its job. For security reasons, you can't get at an iframe's current location/title/favicon if the loaded document is from another domain. We need this information to show a proper title in the title bar and the tabs list, and to show a back button and things like that.

In addition, the browser needs to act as a sort of broker between sites and the OS. Storing cookies and session data, showing notifications or dialogs, and entering fullscreen mode are just a few examples of this. (Note that most of these things aren't even implemented yet. Browsers are complex applications in their own right, even after accounting for the browser engine.)


The main one is mozbrowser which has some documentation here: https://developer.mozilla.org/en-US/docs/Web/API/Using_the_B...

We are deliberately trying to keep this to the bare minimum, and will likely try and find someway to standardize those few things we do if possible.


Punch through CORS like it's a sheet of paper, for example.


What exactly does "style engine" encompass? Just CSS parsing and style properties, or layout stuff, or something in between?


Parsing CSS, the selector matching to apply style rules to nodes, and the cascade of properties to other nodes.

Servo's style engine is parallelized and scales nearly linearly with number of cores, and style time is a non-trivial amount of the total rendering time.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: