[Back to top]

XUL Overlay Removal Review Packet


Problem Space

XUL overlays provide a way to customize the UI and share code across different XUL documents. In addition to sharing many of the common issues already outlined about XUL, overlays were primarily used by legacy add-ons and are not supported by new web extensions. Within mozilla-central, there are still some uses of overlays, but the majority of them could be simplified and removed or use a more standard “web” like approach.

End State

All of the C++ code that supports the complex logic of loading and merging overlays would be removed. Firefox developers would no longer need to learn an obscure Mozilla only technology. Startup performance may see a slight improvement since we would be doing the work at compile time instead of runtime.


XUL Maintainers (Neil Deakin, Gijs Kruitbosch), Firefox Frontend (Dave Townsend)


A detailed review of XUL overlay usage shows some common patterns and gives insight into how they can be removed. In general, the uses fall into four categories: unused, used once, used multiple times for simple templating, and used multiple times in a more complicated manner.


These can just be removed.

Used Once

These can simply be inlined into their master documents.

Simple Templating

These can be included via the preprocessor.

Advanced Uses

These are more tricky and will have to be replaced case by case. A few possible approaches:

[Back to top]