This month in Servo: new CSS units, color emoji, servoshell, and more!

2024-05-30 Big changes to the font system and servoshell, plus improvements to flexbox, tables, DOM support, and the embedding API.

servoshell with three boxes arranged around a large water radical (水), each the same size as that character by being 1ic x 1ic.
‘ic’ units are now supported.

Servo now supports several CSS features in its nightly builds:

  • as of 2024-04-29, ‘start’, ‘end’, and ‘space-evenly’ values in ‘align-content’ and ‘justify-content’ (@nicoburns, #31724), in flexbox layouts when the experimental feature is enabled (--pref layout.flexbox.enabled)
  • as of 2024-04-30, ‘white-space-collapse’, ‘text-wrap-mode’, and the new ‘white-space’ shorthand (@Loirooriol, #32146)
  • as of 2024-05-03, ‘ch’ and ‘ic’ font-relative units (@andreubotella, #32171)
  • as of 2024-05-19, basic support for ‘border-collapse’ (@mrobinson, @Loirooriol, #32309)
  • as of 2024-05-22, ‘empty-cells’ (@Loirooriol, #32331)
  • as of 2024-05-22, ‘visibility: collapse’ on table parts (@Loirooriol, @mrobinson, #32333)
Two pixel art smileys made from table cells, one with magenta eyes and background
Left: ‘empty-cells: show’.
Right: ‘empty-cells: hide’.

Several DOM properties are now accessible, which should improve compatibility with scripts even though their effects are not yet implemented:

We’ve also landed the first patch towards making Servo’s event loop comply with the HTML spec (@gterzian, #31505). This will hopefully address some complex timing issues between the renderer and other kinds of tasks like requestAnimationFrame and ResizeObserver callbacks.

Together with correct sizing for floating tables (@Loirooriol, #32150) and empty list items (@mrobinson, @Loirooriol, #32152), as well as correct ‘line-height’ based on the first font (@mrobinson, #32165), Servo has made some big strides in the Web Platform Tests this month:

  • 90.8% (+1.6pp) in the CSS2 floats tests
  • 68.7% (+5.7pp) in the CSS2 and CSS tables tests
  • 53.3% (+4.0pp) in the CSS text tests
  • 48.8% (+3.3pp) in the CSS position tests

Font system changes

sbix CBDT COLR
Windows ❌︎ ❌︎ ❌︎
macOS ❌︎ ❌︎
Linux ❌︎ ❌︎
Overview of Servo’s current color emoji support by format and platform.

Servo now supports the ‘font-weight’, ‘font-style’, ‘font-stretch’, and ‘unicode-range’ descriptors in @font-face, correctly matching fonts split by ‘unicode-range’ (@mrobinson, @mukilan, #32164) and correctly selecting the nearest weights and styles (@mrobinson, @mukilan, #32366).

We also now support font fallback on OpenHarmony (@jschwe, #32141), and bitmap color emoji on Linux and macOS (@mrobinson, #32203, #32278). Note that the layered COLR format is not yet supported, and that on macOS, we currently only support sbix (like in Apple Color Emoji), not CBDT (like in Noto Color Emoji).

Our font system rework continues, saving up to 40 MB of memory when loading servo.org by sharing font data and metadata across threads (@mrobinson, @mukilan, #32205). We’ve fixed a bug where web fonts in one document can clobber fonts with the same name in other documents (@mrobinson, @mukilan, #32303), and a bug where the font cache leaks unused web fonts (@mrobinson, @mukilan, #32346).

servoshell changes

servoshell showing the URL of a hovered link at the bottom of the window.
servoshell now shows the URL of hovered links near the bottom of the window.

servoshell now handles all known keycodes, passing them to Servo where appropriate (@Nopey, #32228), goes back and forward when pressing the mouse side buttons (@Nopey, #32283), and shows the link URL in a status tooltip when hovering over links (@iterminatorheart, @atbrakhi, #32011).

Adding support for the mouse side buttons required a winit upgrade, but we ultimately ended up embarking on a three-month overhaul to upgrade a bunch of other deps (@Nopey, @mrobinson, #31278), including egui, glow, nix, raqote, font-kit, harfbuzz-sys, core-graphics, core-text, raw-window-handle, and jni (@delan, @mrobinson, @mukilan, #32216)!

This in turn involved upgrading those deps in surfman (@Nopey, surfman#275, surfman#280, surfman#283), font-kit (@Nopey, font-kit#234), and webrender (@Nopey, webrender#4838), as well as several improvements being contributed upstream:

Other changes

Servo for Android now builds on aarch64 (@mukilan, #32137), no longer crashes on startup (@mukilan, #32273), and now supports the SpiderMonkey JIT on 64-bit builds (@mukilan, #31134).

Servo should no longer cause intermittent errors and panics when exiting (@mrobinson, #32207), and ShowWebView no longer fails if sent too quickly after a webview is created (@wusyong, #32163).

We’ve also landed several dev changes:

  • You can now pass --skip-platform to mach bootstrap to install taplo and crown only (@mrobinson, #32176)
  • mach build no longer fails on Windows due to STATUS_DLL_NOT_FOUND in crown (@sagudev, #32301)
  • mach build no longer fails on Windows Server 2019 due to UnsupportedPlatform in notifypy (@delan, #32352)

Donations

Thanks again for your generous support! We are now receiving 1630 USD/month (+20.9% over April) in recurring donations. We are still receiving donations from 15 people on LFX, and we’re working on transferring the balance to our new fund, but we will stop accepting donations there soon — please move your recurring donations to GitHub or Open Collective.

As always, use of these funds will be decided transparently in the Technical Steering Committee. Our first proposal hopes to spend some of these funds on a dedicated CI server, which should make tryjobs and merge builds much faster!

We’ve also updated our Sponsorship page with advice about how to make your donations most effective. In short, donating via GitHub Sponsors is the best option, with 96% of the amount going to Servo in almost all cases. Donations on Open Collective give Servo around 80% to 90%, depending on the amount and payment method.

1630 USD/month
10000

Conferences and events

Recordings are now available for three recent talks about Servo:

We’ll also be running a Servo breakout session at the Web Engines Hackfest 2024 in A Coruña on 4 June at 15:00 local time (13:00 UTC). Remote participation is welcome!