This month in Servo: new image formats, canvas backends, automation, and more!

Another record month, plus devtools improvements and creature comforts for servoshell users.

Posted 2025-08-22

Servo has smashed its record again in July, with 367 pull requests landing in our nightly builds! This includes several new web platform features:

Notable changes for Servo library consumers:

servoshell nightly showing the same things, but animated
texImage3D() example reproduced from texture_2d_array in the WebGL 2.0 Samples by Trung Le, Shuai Shao (Shrek), et al (license).

Engine changes

Like many browsers, Servo has two kinds of zoom: page zoom affects the size of the viewport, while pinch zoom does not (@shubhamg13, #38194). Page zoom now correctly triggers reflow (@mrobinson, #38166), and pinch zoom is now reset to the viewport meta config when navigating (@shubhamg13, #37315).

‘image-rendering’ property now affects ‘border-image’ (@lumiscosity, @Loirooriol, #38346), ‘text-decoration[-line]’ is now drawn under whitespace (@leo030303, @Loirooriol, #38007), and we’ve also fixed several layout bugs around grid item contents (@Loirooriol, #37981), table cell contents (@Loirooriol, #38290), quirks mode (@Loirooriol, #37814, #37831, #37820, #37837), clientWidth and clientHeight queries of grid layouts (@Loirooriol, #37917), and ‘min-height’ and ‘max-height’ of replaced elements (@Loirooriol, #37758).

As part of our incremental layout project, we now cache the layout results of replaced boxes (@Loirooriol, #37971, #37897, #37962, #37943, #37985, #38349), avoid unnecessary reflows after animations (@coding-joedow, #37954), invalidate layouts more precisely (@coding-joedow, #38199, #38057, #38198, #38059), and we’ve added incremental box tree construction (@mrobinson, @Loirooriol, @coding-joedow, #37751, #37957) for flex and grid items (@coding-joedow, #37854), table columns, cells, and captions (@Loirooriol, @mrobinson, #37851, #37850, #37849), and a variety of inline elements (@coding-joedow, #38084, #37866, #37868, #37892).

Work on IndexedDB continues, notably including support for key ranges (@arihant2math, @jdm, #38268, #37684, #38278).

sessionStorage is now isolated between webviews, and copied to new webviews with the same opener (@janvarga, #37803).

Browser changes

servoshell now has a .desktop file and window name, so you can now pin it to your taskbar on Linux (@MichaelMcDonnell, #38038). We’ve made it more ergonomic too, fixing both the sluggish mouse wheel and pixel-perfect trackpad scrolling and the too fast arrow key scrolling (@yezhizhen, #37982).

You can now focus the location bar with Alt+D in addition to Ctrl+L on non-macOS platforms (@MichaelMcDonnell, #37794), and clicking the location bar now selects the contents (@MichaelMcDonnell, #37839).

When debugging Servo with the Firefox devtools, you can now view requests in the Network tab both after navigating (@uthmaniv, #37778) and when responses are served from cache (@uthmaniv, #37906). We’re also implementing the Debugger tab (@delan, @atbrakhi, #36027), including several changes to our script system (@delan, @atbrakhi, #38236, #38232, #38265) and fixing a whole class of bugs where devtools ends up broken (@atbrakhi, @delan, @simonwuelker, @the6p4c, #37686).

WebDriver changes

WebDriver automation support now goes through servoshell, rather than through libservo internally, ensuring that WebDriver commands are consistently executed in the correct order (@longvatrong111, @PotatoCP, @mrobinson, @yezhizhen, #37669, #37908, #37663, #37911, #38212, #38314). We’ve also fixed race conditions in the Back, Forward (@longvatrong111, @jdm, #37950), Element Click (@longvatrong111, #37935), Switch To Window (@yezhizhen, #38160), and other commands (@PotatoCP, @longvatrong111, #38079, #38234).

We’ve added support for the Dismiss Alert, Accept Alert, Get Alert Text (@longvatrong111, #37913), and Send Alert Text commands for simple dialogs (@longvatrong111, #38140, #38035, #38142), as well as the Maximize Window (@yezhizhen, #38271) and Element Clear commands (@PotatoCP, @yezhizhen, @jdm, #38208). Find Element family of commands can now use the "xpath" location strategy (@yezhizhen, #37783). Get Element Shadow Root commands can now interact with closed shadow roots (@PotatoCP, #37826).

You can now run the WebDriver test suite in CI with mach try wd or mach try webdriver (@PotatoCP, @sagudev, @yezhizhen, #37498, #37873, #37712).

2D graphics

<canvas> is key to programmable graphics on the web, with Servo supporting WebGPU, WebGL, and 2D canvas contexts. But the general-purpose 2D graphics routines that power Servo’s 2D canvases are potentially useful for a lot more than <canvas>: font rendering is bread and butter for Servo, but SVG rendering is only minimally supported right now, and PDF output is not yet implemented at all.

Those features have one thing in common: they require things that WebRender can’t yet do. WebRender does one thing and does it well: rasterise the layouts of the web, really fast, by using the GPU as much as possible. Font rendering and SVG rendering both involve rasterising arbitrary paths, which currently has to be done outside WebRender, and PDF output is out of scope entirely.

The more code we can share between these tasks, the better we can make that code, and the smaller we can make Servo’s binary sizes (#38022). We’ve started by moving 2D-<canvas>-specific state out of the canvas crate (@sagudev, #38098, #38114, #38164, #38214), which has in turn allowed us to modernise it with new backends based on Vello (@EnnuiL, @sagudev, #30636, #38345):

  • a Vello GPU-based backend (@sagudev, #36821), currently slower than the default backend; to use it, build Servo with --features vello and enable it with --pref dom_canvas_vello_enabled

  • a Vello CPU-based backend (@sagudev, #38282), already faster than the default backend; to use it, build Servo with --features vello_cpu and enable it with --pref dom_canvas_vello_cpu_enabled

What is a pixel?

Many recent Servo bugs have been related to our handling of viewport, window, and screen coordinate spaces (#36817, #37804, #37824, #37878, #37978, #38089, #38090, #38093, #38255). Symptoms of these bugs include bad hit testing (e.g. links that can’t be clicked), inability to scroll to the end of the page, or graphical glitches like disappearing browser UI or black bars.

Windows rarely take up the whole screen, viewports rarely take up the whole window due to window decorations, and when different units come into play, like CSS px vs device pixels, a more systematic approach is needed. We built euclid to solve these problems in a strongly typed way within Servo, but beyond the viewport, we need to convert between euclid types and the geometry types provided by the embedder, the toolkit, the platform, or WebDriver, which creates opportunities for errors.

Embedders are now the single source of truth for window rects and screen sizes (@yezhizhen, @mrobinson, #37960, #38020), and we’ve fixed incorrect coordinate handling in Get Window Rect, Set Window Rect (@yezhizhen, #37812, #37893, #38209, #38258, #38249), resizeTo() (@yezhizhen, #37848), screenX, screenY, screenLeft, screenTop (@yezhizhen, #37934), and in servoshell (@yezhizhen, #37961, #38174, #38307, #38082). We’ve also improved the Web Platform Tests (@yezhizhen, #37856) and clarified our docs (@yezhizhen, @mrobinson, #37879, #38110) in these areas.

Donations

Thanks again for your generous support! We are now receiving 4691 USD/month (+5.0% over June) in recurring donations. This helps cover the cost of our self-hosted CI runners and one of our latest Outreachy interns!

Keep an eye out for further improvements to our CI system in the coming months, including ten-minute WPT builds and our new proposal for dedicated benchmarking runners, all thanks to your support.

Servo is also on thanks.dev, and already 22 GitHub users (−3 from June) that depend on Servo are sponsoring us there. If you use Servo libraries like url, html5ever, selectors, or cssparser, signing up for thanks.dev could be a good way for you (or your employer) to give back to the community.

4691 USD/month
10000

As always, use of these funds will be decided transparently in the Technical Steering Committee. For more details, head to our Sponsorship page.

Back