Removing XUL has been talked about for a long time, but I think it means 
different things to different people. Since I’ve spent some time working on 
XUL-related projects I’m going to summarize what it means to me as a way to 
share what’s currently planned and to get feedback.

XUL is a collection of technologies, so there isn’t going to be a single 
project that “removes XUL”. What we’d like to do is align browser chrome 
development more closely with web development, and to simplify Gecko by 
focusing on the web platform. Each of the projects below should get us a step 
closer to that, and each has its own priority and timeline.

One of the successes of XUL is that some of the good parts are now part of the 
web platform. For those features, “removal” looks like a migration to the 
standard. Once the old feature isn’t used anymore in chrome, we intend to 
remove the platform feature (and may remove parts of it along the way as those 
parts become unused).

XBL bindings can be replaced with ‘webbier' alternatives like Web Components or 
plain JS. It’s a large project, and we are actively working on removing 
bindings from the frontend and supporting Web Components in the platform 
(metabug <https://bugzilla.mozilla.org/show_bug.cgi?id=1397874>, tracking 
dashboard <https://arewexblstill.com/>).
XUL flexbox can now be emulated as CSS flexbox. You can try `./mach run 
--setpref layout.css.emulate-moz-box-with-flex=true` to see how it looks. The 
main work to do now is to improve performance on CSS flexbox to get to parity 
on the TART test. That perf work is mostly unassigned - if you’d like to help 
with this project please get in touch or take a look at the perf metabug 
(emulation metabug <https://bugzilla.mozilla.org/show_bug.cgi?id=1033225>, perf 
metabug <https://bugzilla.mozilla.org/show_bug.cgi?id=1304473>).

Other features will be removed and not replaced:

XUL Overlays are no longer necessary for supporting XUL addons and we can 
simplify a bunch of things by moving away from them. This is actively being 
worked on, and we expect to be able to remove platform support in a matter of 
weeks (metabug <https://bugzilla.mozilla.org/show_bug.cgi?id=1426763>).
XUL Templates were removed at the beginning of 2018. There was only one 
consumer on the frontend which got replaced with simpler JS, and the platform 
support (around 40K LOC) was removed as well (bug 
<https://bugzilla.mozilla.org/show_bug.cgi?id=1425356>).

There is another set of features in XUL that aren’t part of the web platform 
but also provide functionality that can’t be removed without a replacement that 
works in chrome HTML. For example:

Localization via external DTD files. There are a bunch of reasons why we are 
transitioning the localization infrastructure to use Project Fluent, including 
that DTDs are tied to the XML parser and can’t be used from HTML. This work is 
actively happening, currently focused on strings in about:preferences but 
planned to expand across the browser chrome in coming quarters (metabug 
<https://bugzilla.mozilla.org/show_bug.cgi?id=1365426>, fluent homepage 
<http://projectfluent.org/>).
Generating native menus and popups. This is in the planning phase.
Supporting special tags like <browser> and <tree> (and many more). This is in 
the planning phase.
Extra features that make the application tick, like XULStore and fastload. This 
is in the planning phase.

Much of that work is still being planned, so there aren’t a lot of specifics to 
report. Features that are blocking the ability to load a top-level HTML window, 
or that are blocking other work like XBL removal will get prioritized above 
others.

Thanks,
Brian

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to