Andreas Kling, author of the SerenityOS system, recently introduced his open source cross-platform browser project: Ladybird.

The Ladybird browser was born on July 4th this year. At first, Ladybird was developed as a “LibWeb” browser engine debugging tool for SerenityOS system, and then Andreas wanted to build a simple GUI for it. With the continuous improvement of Ladybird, two months later, Andreas found that he had completed most of the development of a Web browser, Ladybird has been regarded as a cross-platform Web browser.

(Ladybird browser visuals)

The Ladybird browser is based on SerenityOS’s LibWeb and LibJS engines, with LibWeb being developed in 2019 and known as LibHTML at the time, and its JavaScript engine LibJS being developed in 2020.

Basic Architecture

Both LibWeb and LibJS are new engines. The author has a history of developing Qt and WebKit projects, so I got some inspiration from it, but all the code is new, and the browsers and libraries are written in C++.

Here’s a rough breakdown of the current browser stack:

  • Ladybird : Tabbed browser GUI application
  • LibWeb: Web engine, multiple standards: HTML, DOM, CSS, SVG, …
  • LibJS: ECMAScript language, runtime library, garbage collector
  • LibGfx: 2D graphics, text rendering, image formats (PNG, JPG, GIF, …)
  • LibRegex: Regular Expression Engine
  • LibXML : XML parser
  • LibWasm: WebAssembly parser and interpreter
  • LibUnicode: Unicode Support Library
  • LibTextCodec : Text encoding conversion library
  • LibMarkdown : Markdown parser
  • LibCore: Other supported functions (I/O, datetime, MIME data…)
  • Qt: Cross-platform GUI and networking

LibWeb has aPlatformlayer, Ladybird injects Qt support code for event loops, timers, system font settings, etc. Ladybird currently uses Qt for network tasks because there is no multi-process RequestServer system outside of SerenityOS. Likewise, Ladybird is currently single-process, while the SerenityOS browser is a per-tab process.

Completion: low

Ladybird currently runs on Linux, macOS, Windows (WSL), and Android, but it’s still in the early stages of development, features are still missing or broken for many web platforms, and it takes a long time to be ready for everyday browsing.

Ladybird has passed the classic Acid3 standard test, which covers a bunch of basic CSS layout features and various DOM/HTML APIs.

The Acid3 test is a web test page from the Web Standards Project that checks web browsers for compliance with elements of various web standards, especially the Document Object Model (DOM) and JavaScript.

But the test does not cover the latest web standards and features such as CSS flexbox, CSS Grid, etc. This causes it to have a lot of layout and compatibility issues. For example, to browse the Reddit page with Ladybird browser:

Obviously, there are still many rendering problems such as misalignment and line breaks.

At present, Ladybird’s GUI and engine code are open source under the BSD-2-Clause license, and the code is hosted on GitHub.

#SerenityOS #Authors #Work #CrossPlatform #Web #Browser #Ladybird

Leave a Comment

Your email address will not be published. Required fields are marked *