←back to thread

Web Browser Engineering (2021)

(browser.engineering)
679 points MrVandemar | 10 comments | | HN request time: 0.406s | source | bottom
1. jm4 ◴[] No.41847720[source]
This looks awesome. About 15 years ago, I started working on a headless browser and maintained it for several years. It used SpiderMonkey as the js interpreter and had a custom DOM implementation. It ran all the modern js from the time, AJAX, etc. Later, I added a custom Flash runtime. It basically did everything but draw to the screen. That project was a lot of fun.

I'm definitely interested in going through this book.

replies(1): >>41847801 #
2. aitchnyu ◴[] No.41847801[source]
Umm, if you wanted/want to draw to the screen, what library will you use?
replies(3): >>41847984 #>>41848461 #>>41850947 #
3. skeeterbug ◴[] No.41847984[source]
I believe Chrome uses Skia
replies(1): >>41848048 #
4. lesuorac ◴[] No.41848048{3}[source]
Yes [4].

> [1] The library is used as of 2023 in Google Chrome, ChromeOS, ChromiumOS, Mozilla Firefox, Mozilla Thunderbird, Android, Firefox OS, Flutter,[5] Avalonia (from Alpha 4), LibreOffice (from version 7.0) and RAD Studio[6](since version 12.0).

> [2] Changes to the Skia repository will be rolled into Chromium by the AutoRoll bot several times per day.

> [3] It serves as the graphics engine for Google Chrome and ChromeOS, Android, Flutter, and many other products.

[1]: https://en.wikipedia.org/wiki/Skia_Graphics_Engine

[2]: https://skia.org/docs/dev/chrome/

[3]: https://skia.org/

[4]: https://github.com/chromium/chromium/tree/main/skia

replies(2): >>41848692 #>>41848892 #
5. pavpanchekha ◴[] No.41848461[source]
The book uses Tk (via Python's tkinter library) for the first 10 chapters and then switches to Skia, which is used by maybe all of the browsers now (I believe Webkit on Linux just switched to it from Cairo). It seems to be by far the most common high-performance 2D graphics library.
6. pmarreck ◴[] No.41848692{4}[source]
Whoa. Somehow I have not heard of this. Can this be used to make cross-platform GUI apps?
replies(1): >>41848764 #
7. Rohansi ◴[] No.41848764{5}[source]
Sure you can, it's a 2D graphics library. It's more like the JS Canvas API though instead of a UI framework.
replies(1): >>41849921 #
8. mnutt ◴[] No.41848892{4}[source]
As of 2024, WebKit's Linux ports (GTK and WPE) are switching to Skia too. [0] Prior to that, they used cairo.

[0]: https://blogs.igalia.com/carlosgc/2024/02/19/webkit-switchin...

9. PaulDavisThe1st ◴[] No.41849921{6}[source]
Which rather importantly means that you still need to find something else to do:

* layout

* event handling

which are not exactly trivial for a "real" application (whatever that means).

10. jm4 ◴[] No.41850947[source]
I didn’t have a clue. That wasn’t part of my skillset. All we needed was a headless browser that was automated. It was crawling a few million pages a day. I had a debug console where I could see cached pages, headers, cookies, etc.