XUL/XBL Replacement Newsletter #18

Brian Grinstead bgrinstead at mozilla.com
Tue Oct 15 21:03:33 UTC 2019


This is the eighteenth edition of the XUL/XBL Replacement Newsletter. Even during the excitement of hitting 0 XBL bindings, there’s been a lot of progress and some updates to share.

GeckoView Is Built Without XBL

As we got close to 0 bindings, Brendan Dahl created a build option to disable XBL in Gecko <https://bugzilla.mozilla.org/show_bug.cgi?id=1510785>. This wasn’t a simple task due to the amount of places throughout the codebase that reference or interact with XBL. Thanks to Brendan, and to Boris Zbarsky for reviewing this change.

One nice thing about introducing a build option is that we were able to turn off XBL entirely in GeckoView! So this is the first platform where we are shipping Gecko without XBL.

We also have a bug on file to disable XBL in desktop Firefox <https://bugzilla.mozilla.org/show_bug.cgi?id=1583314>, which we plan to do after the upcoming merge to 72 on 2019-10-21.

Finally, we are tracking some of the tasks and improvements that can be made once XBL is turned off. This is done in the following metabug: remove XBL support from Gecko <https://bugzilla.mozilla.org/show_bug.cgi?id=1566221>. If you know of changes that would be good to make post-XBL, please help us track the work by blocking that bug.

Renaming XUL Files

Emma Malysz has been making quick progress on scripting migrations of .xul files to .xhtml <https://bugzilla.mozilla.org/show_bug.cgi?id=1579952>, one top-level directory at a time. As a reminder, we no longer load anything as a XULDocument <https://bugzilla.mozilla.org/show_bug.cgi?id=1550801> so chrome xul files are effectively the same as xhtml files. Renaming the files is an important step in making that clear and finishing the “XUL Document Removal” project.

The majority of xul files in tree are tests. One tricky part with them is making sure that we don’t break intermittent test tracking. For instance, if there’s a bug titled:

Intermittent test_largemenu.xul | menu movement (6000, 100) x - got 2554, expected 1530

Then when a failure happens in treeherder with a test called test_largemenu.xul, it will automatically suggest the known intermittent bug based on the summary. However, renaming the file with the .xhtml extension breaks the tracking and the test appears as an unknown orange, which causes extra work for anyone viewing results from pushes to treeherder.

I had previously consulted with the sheriffs and migrated a single test file <https://bugzilla.mozilla.org/show_bug.cgi?id=1543834>, confirming that by choosing a summary with both the old and new file name in it it will track intermittents on m-c (where it now has the new name), and beta/release (where it still has the old name). For example:

Intermittent test_largemenu.xhtml,test_largemenu.xul | menu movement (6000, 100) x - got 2554, expected 1530

There are around 100 intermittent bugs that reference xul files, so rather than manually making this change, Emma worked on scripts to:

Pull down the existing bugs and modify the summary string
Call the Bugzilla “Update Bug” API <https://bugzilla.readthedocs.io/en/latest/api/core/v1/bug.html#update-bug> endpoint for each bug to update the title.
Thanks also to Emma Humphries for helping out with the Bugzilla integration for the above.

Improving the Keyboard Shortcut Handler Implementation

Keyboard shortcut handlers (anything declared with a <xul:key> element and various built in shortcuts like PgUp, PgDown and edit commands) were sharing the same event infrastructure as XBL <handler>. In order to make it possible to build with XBL disabled, Mossop removed the dependency on XBL <https://bugzilla.mozilla.org/show_bug.cgi?id=1550058>. This is a followup to moving the definitions out of XBL <https://bugzilla.mozilla.org/show_bug.cgi?id=1419091>, and throughout this work he’s been able to make improvements like adding missing test coverage for this core feature.

See the Keybindings in Firefox <https://docs.google.com/document/d/1_Z2P5LeISwXt7JKuS9rKJkJg-ubWbMWUIMXPnbBrywg/edit#heading=h.b6hbs1dpbzxi> document for more details and a plan for how we can make it possible for JavaScript to register keyboard shortcuts at the system level so the events are correctly wait for the content process to handle them as necessary.

Next up is replacing <xul:key> <https://bugzilla.mozilla.org/show_bug.cgi?id=1550061> which has a number of longstanding issues including requiring an oncommand attribute in order to fire <https://bugzilla.mozilla.org/show_bug.cgi?id=371900>, which in turn stops us removing inline event handlers in browser.xhtml, which in turn blocks further improving CSP and eval() defense-in-depth security improvements. The idea will be to switch to JavaScript ways of registering handlers, either through a Custom Element or window initialization code.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/firefox-dev/attachments/20191015/8735d1f2/attachment.html>


More information about the firefox-dev mailing list