<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="entry"><p class="">This is the third edition of the XBL Replacement Newsletter. 
Since the last update, we’ve removed 27 bindings and have been preparing
 to migrate bindings to Custom Elements.</p><p class="">Just a reminder that easiest way to follow along with the work is to follow the main <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1397874" class="">meta bug</a>. If you’d like to help, we are tagging bugs that are unblocked and ready to be worked on with <a href="https://mzl.la/2AyTxCG" class="">xbl-available</a>.</p>

<h2 id="custom-elements" class=""><span style="font-size: 12px;" class="">Custom Elements</span></h2><p class="">Custom Elements have been <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1406825" class="">enabled</a> in Nightly by default, which is a big step towards being able to use them in the browser chrome. Mossop has <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1404420" class="">landed</a> initial Custom Element support for XUL elements, and we have a <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1421070" class="">couple</a> <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1413418" class="">of</a> follow-ups on file before we can start using them. We are also working to find the best way to include Custom Element scripts (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1411707#c11" class="">bug 1411707</a>) and styles (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1420229" class="">bug 1420229</a>) in XUL documents.</p>

<h2 id="accessibility-roles" class=""><span style="font-size: 12px;" class="">Accessibility Roles</span></h2><p class="">One of the features that XBL provides is a way to assign a ‘role’ to 
elements that have a particular binding attached. For example: <code class="highlighter-rouge"><binding id="toolbar" role="xul:toolbar"></code> will <a href="https://dxr.mozilla.org/mozilla-central/rev/21ddfb9e6cc008e47da89db50e22697dc7b38635/accessible/base/nsAccessibilityService.cpp#1606-1608" class="">attach the XULToolbarAccessible class</a> to all <code class="highlighter-rouge">toolbar</code> elements with that binding attached.</p><p class="">We needed to come up with a new solution to continue supporting the accessibility roles, and initial work for that landed in <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1403231" class="">bug 1403231</a> when we removed the <code class="highlighter-rouge">image</code> binding. This created a new <a href="https://dxr.mozilla.org/mozilla-central/source/accessible/base/XULMap.h" class="">XULMap.h</a>
 file in which tag names get mapped to roles. The current implementation
 won’t handle every case, like when bindings are attached using more 
complex CSS selectors, but Paolo has <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1428930#c7" class="">done a thorough analysis</a> of which bindings we can migrate right away.</p>

<h2 id="binding-removals" class=""><span style="font-size: 12px;" class="">Binding Removals</span></h2><p class="">There are <a href="https://bgrins.github.io/xbl-analysis/#timeline" class="">240 more bindings left</a>,
 down from 300 at the start of the project. We’ve also started to put a 
dent in the number of lines of code, passing below 90%. Here’s a list of
 the changes:</p>

<ul class="">
  <li class="">Myk Melez <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1379338" class="">removed</a> the <code class="highlighter-rouge">preferences</code>, <code class="highlighter-rouge">preference</code>, <code class="highlighter-rouge">prefwindow</code>, <code class="highlighter-rouge">prefpane</code>, and <code class="highlighter-rouge">panebutton</code> bindings from <a href="about:preferences" class="">about:preferences</a>, migrating them to vanilla JS and validating the <a href="https://briangrinstead.com/blog/xbl-in-firefox/#2-convert-some-bindings-to-js-modules" class="">JS module approach</a> to removing certain types of bindings.</li>
  <li class="">Tim Nguyen (ntim) discovered and removed some unused <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1428849" class="">date and timepicker bindings</a> and deleted ~2K LOC.</li>
  <li class="">ntim also <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1428938" class="">discovered and removed</a>
 a bunch of legacy toolbar customization code (another 2K LOC), which 
didn’t delete any bindings but did remove quite a bit of XBL code.</li>
  <li class="">Paolo Amadini <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1419198" class="">removed the <code class="highlighter-rouge">addengine-icon</code> binding</a> in the search popup, which in turn allowed the button to reuse the existing ‘add’ SVG icon instead of custom PNG versions.</li>
  <li class="">Paolo also <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1417042" class="">removed the <code class="highlighter-rouge">panelview</code> binding</a>, creating the equivalent markup inside the existing PanelMultiView.jsm navigation functions.</li>
  <li class="">86ecce74 <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1416524" class="">removed the unused <code class="highlighter-rouge">button-image</code> binding</a>.</li>
  <li class="">86ecce74 <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=930845" class="">also removed the unused <code class="highlighter-rouge">expander</code> binding</a> and associated UA styles.</li>
  <li class="">86ecce74 <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1419596" class="">also removed the unused <code class="highlighter-rouge">optionsDialog</code> binding</a>, which enabled the removal of <code class="highlighter-rouge">dialogheader</code>.</li>
  <li class="">Dão Gottwald <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1419600" class="">removed the <code class="highlighter-rouge">dialogheader</code></a> binding, after the only consumer <code class="highlighter-rouge">optionsDialog</code> was removed.</li>
  <li class="">Dão also <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=449045" class="">removed the <code class="highlighter-rouge">timed-textbox</code> binding</a>, since <code class="highlighter-rouge">textbox[type=timed]</code> is unused.</li>
  <li class="">Dão also <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1429929" class="">removed the <code class="highlighter-rouge">tabbrowser-close-tab-button</code> binding</a> by moving its implementation into the tabbrowser-tab binding.</li>
  <li class="">Ian Moody <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1422934" class="">removed the <code class="highlighter-rouge">toolbarbutton-image</code> binding</a> and landed a nice cleanup to the tab markup in the process, using a plain <code class="highlighter-rouge"><image></code> instead.</li>
  <li class="">Ian also <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1422374" class="">removed the <code class="highlighter-rouge">stringbundleset</code> binding</a>, which wasn’t really doing anything.</li>
  <li class="">I <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1419170" class="">removed the <code class="highlighter-rouge">statusbar</code> and <code class="highlighter-rouge">statusbarpanel</code> bindings</a>, moving the accessibility role into XULMap.h.</li>
  <li class="">I removed the <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1417119" class="">xpfe autocomplete bindings</a> which were unused in m-c.</li>
</ul></div></body></html>