XUL/XBL Replacement Newsletter #7

Brian Grinstead bgrinstead at mozilla.com
Fri Aug 24 19:33:35 UTC 2018



> On Aug 23, 2018, at 9:29 PM, Kris Maglione <kmaglione at mozilla.com> wrote:
> 
> On Thu, Aug 23, 2018 at 08:59:32PM -0700, Brian Grinstead wrote:
>> The main browser window is currently a XUL document with (mostly) XUL elements in the DOM. We’d ultimately like to support an HTML document with (mostly) HTML elements in the DOM. That’s a long road, though. One milestone we hope to hit along the way is loading an HTML document with (mostly) XUL elements in the DOM.
> 
> How is this going to work with the XUL prototype cache?

It’s a good point, and we still need to figure out what to do about the prototype cache. We’ll do that in parallel with fixing bugs - once we're confident that the HTML doc is working approximately the same as the XUL doc we’ll start tracking any regressions in talos. Since we’re going to have to do this ultimately regardless of what direction we go, I hope it’s not a major roadblock.

We have some talos pushes in flight to compare the impact of turning off various parts of the cache (script, style, document) - I’ll update you as we start to get some results from that. I’m not super familiar with this area yet, and would welcome feedback and ideas about how to enable some or all of it for HTML documents.

> My understanding was that, if anything, we'd probably initially aim for a XUL document with mostly XHTML elements so that we could continue using the XUL prototype cache until we have a replacement.

The tricky part with going the other direction (XUL doc, HTML elements) is that we have elements that are still XUL, and the XUL flexbox layout and CSS layouts don’t play well together. So migrating parts of the UI at a time into HTML elements is going to cause CSS/layout headaches unless if the parts can be pretty isolated from each other. I’m not sure I can describe all the problems exactly, but I’ve experienced this first hand when trying to put HTML inside XUL parents in the Inspector panel - things just don’t display correctly and the behavior isn’t specified AFAIK. I can dig up some bugs if you’re interested in details.

The plan to avoid that problem is to wait for XUL flexbox emulation, which will flip the entire UI to use CSS flexbox and unblock us to begin interspersing XUL and HTML elements. This is blocked primarily on CSS flexbox perf, which is being worked on by the layout team (see bug 1449346 and the metabug 1304473).

Brian



More information about the firefox-dev mailing list