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.
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)
Several DOM properties are now accessible, which should improve compatibility with scripts even though their effects are not yet implemented:
value
,min
,max
,low
,high
, andoptimum
on HTMLMeterElement (@shanehandley, #32230)autofocus
on HTMLElement and SVGElement, via HTMLOrSVGElement (@nolanlawson, #32170)role
and 43 other ARIA string properties on Element (@nolanlawson, #32080)
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 | ❌︎ | ✅ | ❌︎ |
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 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:
- servoshell no longer throws spurious GL_INVALID_ENUM errors on Windows (@Nopey, emilk/egui#3994)
- harfbuzz now builds on Windows when using clang-cl (@Nopey, harfbuzz/harfbuzz#4585, rust-harfbuzz#248, rust-harfbuzz#253)
- egui_glow no longer has to depend on an outdated version of raw-window-handle (@Nopey, emilk/egui#4036)
- raqote now depends on the latest version of font-kit (@Nopey, jrmuizel/raqote#200)
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
tomach bootstrap
to install taplo and crown only (@mrobinson, #32176) mach build
no longer fails on Windows due toSTATUS_DLL_NOT_FOUND
in crown (@sagudev, #32301)mach build
no longer fails on Windows Server 2019 due toUnsupportedPlatform
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.
Conferences and events
Recordings are now available for three recent talks about Servo:
- A year of Servo reboot: where are we now? (slides, transcript) by Rakhi Sharma, at Open Source Summit North America
- Modular Servo: Three Paths Forward (slides) by Gregory Terzian, at GOSIM Conference 2024
- A talk that discusses porting Servo to OpenHarmony OS (slides) by Jonathan Schwender, at GOSIM Conference 2024
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!