<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xml:base="en">
	<title>Jan Varga</title>
	<subtitle>Browser engines, open source, engineering practices, and occasional thoughts beyond software.</subtitle>
	<link href="https://blogs.igalia.com/jvarga/feed/feed.xml" rel="self"/>
	<link href="https://blogs.igalia.com/jvarga/jvarga/"/>
	<updated>2026-11-11T00:00:00Z</updated>
	<id>https://blogs.igalia.com/jvarga/</id>
	<author>
		<name>Jan Varga</name>
		<email></email>
	</author>
	
	<entry>
		<title>CSS Typed OM in Firefox: Ready to ride the trains</title>
		<link href="https://blogs.igalia.com/jvarga/css-typed-om-in-firefox-ready-to-ride-the-trains/"/>
		<updated>2026-11-11T00:00:00Z</updated>
		<id>https://blogs.igalia.com/jvarga/css-typed-om-in-firefox-ready-to-ride-the-trains/</id>
		<content type="html">&lt;p&gt;&lt;a href=&quot;https://drafts.css-houdini.org/css-typed-om-1/&quot;&gt;CSS Typed OM&lt;/a&gt; has been enabled
in Firefox Nightly since Firefox 154. Since then we’ve been working on the
remaining gaps, to get to parity with the implementations in other browsers.
With the pref enabled, Firefox now passes about 94% of the
&lt;a href=&quot;https://wpt.fyi/results/css/css-typed-om&quot;&gt;Typed OM subtests in WPT&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Last week I sent the
&lt;a href=&quot;https://groups.google.com/a/mozilla.org/g/dev-platform/c/o-34Ewll4oU&quot;&gt;intent to ship&lt;/a&gt;.
If all goes well, Typed OM will ride the trains and it will be enabled by
default in Firefox 161. Chrome and Safari already ship it, so Firefox is
catching up here. The color part of the API (&lt;code&gt;CSSColorValue&lt;/code&gt; and friends) is
not included yet, it stays behind a separate pref for now.&lt;/p&gt;
&lt;p&gt;I’ve been
&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=1278697&quot;&gt;working on Typed OM&lt;/a&gt; at
&lt;a href=&quot;https://www.igalia.com/&quot;&gt;Igalia&lt;/a&gt; for quite some time. At the beginning I
thought it’s mostly about adding new JavaScript APIs, but it involved quite a
few parts of Gecko. The DOM bindings were the obvious part. Then there is the
style system, which is written in Rust, and all the code which converts CSS
values to typed objects and back. For example a simple call like
&lt;code&gt;el.attributeStyleMap.get(&amp;quot;width&amp;quot;)&lt;/code&gt; goes through more layers than I expected.&lt;/p&gt;
&lt;p&gt;This work has been part of a
&lt;a href=&quot;https://www.igalia.com/2026/10/29/Celebrating-STF-Funded-Improvements-to-Web-Interoperability.html&quot;&gt;Sovereign Tech Fund investment&lt;/a&gt;.
Thanks to the Sovereign Tech Fund for the support. There are more details on
the Igalia website.&lt;/p&gt;
&lt;p&gt;Most of my patches were reviewed by Emilio Cobos Álvarez and David Shin from
Mozilla. Big thanks to both of them. Their reviews were quick and to the point,
and I learned a lot from them.&lt;/p&gt;
&lt;p&gt;In June I gave a presentation about this work to my team at Igalia. When I was
preparing it, I found out there are quite a lot of details and decisions which
deserve a closer look. So I’d like to write a few posts based on that
presentation. Probably something about the design decisions and about working
across Rust and C++, then testing and interop, and maybe also a few things
which surprised me.&lt;/p&gt;
&lt;p&gt;For now I’m just happy that Typed OM is finally close to shipping.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>A Different Coordinate System</title>
		<link href="https://blogs.igalia.com/jvarga/a-different-coordinate-system/"/>
		<updated>2026-10-16T00:00:00Z</updated>
		<id>https://blogs.igalia.com/jvarga/a-different-coordinate-system/</id>
		<content type="html">&lt;p&gt;I’ve spent most of my career working on Gecko, the browser engine behind
Firefox. Years in a big, mature codebase teach you a lot. You learn how things
fit together, where the hard problems hide, and which ideas have already been
tried (sometimes more than once).&lt;/p&gt;
&lt;p&gt;They also change how you think, and you don’t really notice it happening. Some
abstractions become so familiar that they stop looking like design choices.
Threading models, IPC boundaries, ownership rules, API layers: after a while,
that’s just how things are done. Most of the time this helps. But it also makes
it harder to imagine doing things any other way.&lt;/p&gt;
&lt;p&gt;Getting involved with Servo was one of the reasons I joined Igalia. Early in my
career, there was a point where I finally understood enough of Gecko to make
real changes in it. It took a while, and I remember how good that felt.&lt;/p&gt;
&lt;p&gt;Working on Servo gave me some of that feeling again. Obviously I knew a lot
more this time. Still, I was back to reading unfamiliar code and slowly
figuring out how a browser engine works, only now most of it was Rust. A lot of
the problems looked familiar to me, mostly storage, concurrency and async
stuff. But the code around them was organized differently, and I kept running
into things I’d stopped thinking about years ago.&lt;/p&gt;
&lt;p&gt;Rust is a big part of why. The compiler wants you to be explicit about who owns
what and how long it lives. In C++, I’ve become used to certain ownership
patterns over the years. Rust made me think about some of them again, and a
few times I realized that the design I had in mind wasn’t as obvious as I
thought.&lt;/p&gt;
&lt;p&gt;Comparing the two engines is interesting in itself. Gecko has decades of
development, compatibility requirements and real-world experience behind it.
Servo tackles many of the same problems with different abstractions and
constraints. I think Servo has a lot of potential, and working with both
engines has made me rethink some of the assumptions I’d developed over the
years.&lt;/p&gt;
&lt;p&gt;After so many years of maintaining production code, it’s refreshing to be a
beginner again in some areas. The experience is still there, but it’s easier to
ask basic questions. Why is this boundary here? Does this operation really need
to be async? Do we actually need this lock?&lt;/p&gt;
&lt;p&gt;I especially enjoyed asking those questions while helping with IndexedDB in
Servo. I’ve worked on IndexedDB in Gecko for many years, so seeing it built in
another engine made me look at old decisions differently.&lt;/p&gt;
&lt;p&gt;Threading is a good example. In Gecko, IndexedDB work can be spread across a
pool of up to 20 threads, and I’d always assumed more parallelism was better.
Then I ran some cross-browser comparisons under heavy multi-database load and,
out of curiosity, limited Firefox to a single thread. In that test, the
single-threaded configuration finished fastest. I didn’t expect that at all. It
opened up questions about responsiveness and scheduling that I’d like to
explore in Servo some day. That’s probably worth a separate post.&lt;/p&gt;
&lt;p&gt;Lately, other projects, mostly on Firefox, have kept me busy, so I haven’t had
much time for Servo. But I’m looking forward to getting back to it. Some of the
work there was new to me, but what I enjoyed most was seeing familiar things
again, from a different angle.&lt;/p&gt;
</content>
	</entry>
</feed>
