Header Gradient Blobs

This Month in Ladybird
September 2024

September 2024 is wrapping up, and it’s been another great month for the Ladybird project. We’ve merged 242 PRs from 48 contributors, and made significant progress all over.

Welcoming new sponsors

Ladybird is fully funded through the generous support of companies and individuals who believe in the open web. This month, we’re excited to welcome the following new sponsors:

We are incredibly grateful for their support. If you’re interested in sponsoring the project, please contact us.

Networking with curl

We’ve replaced our in-house HTTPS implementation with the curl library. This change has dramatically improved both compatibility and performance (it’s often more than 5x faster), allowing us to load more websites faster than ever before!

Web Platform Tests

We’ve made significant progress in Web Platform Test (WPT) coverage this month. The number of test timeouts has been reduced from 5,798 to 2,970, and switching to curl for networking has cut down the full test run time from 7 hours to under 5 hours.

In addition, we’ve fixed a long-standing issue with reftest image capture, improving our test accuracy. We’re now passing 588,982 more subtests compared to last month, bringing the total to 1,510,615 . You can track our progress via our new WPT dashboard or check out the results on wpt.fyi.

For context, here are the latest scores from the 3 major browsers, and the 3 minor up-and-coming ones:

Better audio support with FFmpeg

We have been replacing our home-grown audio codecs with FFmpeg’s excellent libavformat and libavcodec, which means that we now support a wide range of audio formats out there on the web! Vorbis, MP3, FLAC, Opus, Wave and many more can now be heard in Ladybird

Improved emoji support

Earlier this year, we temporarily regressed our emoji support when transitioning to Skia for rasterization. We’ve now restored full emoji functionality, and even improved upon it.

Ladybird now uses glyphs from system fonts like Apple Color Emoji (on macOS) and Noto Color Emoji (on other platforms). We also added support for ZWJ emoji sequences (such as the “fireman” and “heart on fire” emojis which are actually combinations of multiple emojis). Special thanks to Tim Flynn for implementing grapheme-aware text segmentation, which is what makes this work.

Font decoding using Skia

It’s already been a couple of months since we switched to using Skia for text rasterization, but it was still piggybacking on our OpenType implementation, which resulted in a need to keep multiple decoded representations in memory for the same typefaces. That’s no longer the case, and we use Skia (which under the hood uses FontConfig on Linux and Core Text on macOS) to handle everything, including decoding, extracting all required metrics, and rasterization.

CSS Transitions

This month, Ladybird gained support for the transition property, which allows authors to automatically animate changes to CSS properties. A lot of websites use this for subtle effects and it really makes the browser feel more polished. Many thanks to Matthew Olsson who contributed the bulk of this over the past several months.

CSS Cascade Layers

Websites often juggle multiple style sheets—resets, frameworks, and custom styles—leading to issues with “specificity” when styles get applied in the wrong order.

The new @layer rule helps by grouping styles into layers that apply in a predictable sequence, ensuring more control over which styles take precedence. Ladybird now supports @layer, a feature highlighted in the Interop 2022 initiative, making it a valuable addition for developers.

Style sheet inspector

Debugging CSS has gotten easier with the addition of a basic style sheet inspector in Ladybird’s dev tools. You can now view the style sheets that apply to the current page, making it simpler to troubleshoot CSS issues.

SVG and CSS masks on the GPU

We now use the GPU for rendering alpha and luminance masks, thanks to Skia’s SkSL shader language. This results in significant performance improvements for sites that rely heavily on these effects.

Successor language search progress

Over the past year, our core contributors have been exploring potential safe languages to complement or succeed C++. We evaluated several options, including Rust, Swift, Fil-C, and others. While some languages offered compelling features, many fell short in either C++ interoperability or providing the level of memory safety we needed.

After extensive testing and discussion, Swift emerged as the top choice among our core developers, thanks to the new Swift 6 interoperability features and its growing cross-platform support. As a result, we’ve decided to adopt Swift as our C++ successor language.

That said, this will be an incremental shift. The existing C++ codebase is deeply embedded in the project, and a complete rewrite would be impractical. Instead, we’ll be gradually introducing new components in Swift, carefully integrating them with our existing C++ code over time. Look forward to a dedicated blog post on the topic soon.

Credits

We thank the following people who contributed code to Ladybird in September 2024:

Alec Murphy, Ali Mohammad Pur, Aliaksandr Kalenik, Andreas Kling, Andrew Kaster, Annya, Arhcout, Asutosh Variar, Bastiaan van der Plaat, BenJilks, Chase Willden, ChaseKnowlden, Colin Reeder, Daniel La Rocque, Douwe Zumker, Francesco Gazzetta, Gingeh, Han, HolonProduction, Jamie Mansfield, Jelle Raaijmakers, Johan Dahlin, Julius Elshoff, Kevin Perdlich, Khaled Lakehal, Kostya Farber, Kuba314, Laura Braun, Lucas CHOLLET, marcin mikołajczak, Matthew Olsson, mierenhoop, Mohamed amine Bounya, Noah Bright, Olekoop, Pavel Panchekha, PiyushXCoder, rmg-x, ronak69, Saleem Abdulrasool, Sam Atkins, sideshowbarker, Simon Wanner, Tim Ledbetter, Timothy Flynn, Vitaly Takmazov