<div dir="ltr"><p>Welcome to the second Browser Architecture Newsletter! Since our <a href="https://groups.google.com/forum/#!msg/firefox-dev/ueRILL2ppac/RxR9lLPkAwAJ;context-place=forum/firefox-dev">last update</a>, we have a <a href="https://mozilla.github.io/firefox-browser-architecture/">new website</a> which includes posts about some of the <a href="https://mozilla.github.io/firefox-browser-architecture/text/0003-problems-with-xul.html">problems with XUL</a>, <a href="https://mozilla.github.io/firefox-browser-architecture/text/0002-extracting-necko.html">extracting Necko</a> as a standalone component, and <a href="https://mozilla.github.io/firefox-browser-architecture/text/0004-xbl-web-components.html">comparing</a> XBL with Web Components.</p>
<p>The website is built from <a href="https://github.com/mozilla/firefox-browser-architecture">this GitHub repository</a>
of Markdown files, and we’re using pull requests to review and revise
our research proposals and analyses. Do you have ideas for improvements?
File an issue on the repo or contact us in #browser-arch!</p>
<p><strong>XBL Conversion</strong></p>
<p>We'd like to reduce or even remove XBL and XUL from the tree. It's
becoming clear that replacing XBL is more important and easier than
replacing XUL, so there are a few projects ongoing to learn more about
how to do it.</p>
<p>A conversion of the behavioral <preference> binding is in progress at <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1379338">Bug 1379338</a>.
Although this work started as a prototype, it resulted in a more
straightforward implementation than we currently have, so is on the path
to being landed.</p>
<p>As mentioned above, there’s some new <a href="https://mozilla.github.io/firefox-browser-architecture/text/0004-xbl-web-components.html">documentation</a> comparing XBL with Web Components. There’s also a <a href="https://bgrins.github.io/xbl-analysis">visual tree</a> of the bindings we use in Firefox and what features each uses.</p>
<p>A prototype of replacing some XBL UI components in about:preferences with Custom Elements is attached to <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1392367">Bug 1392367</a>. This relies on a <a href="https://github.com/webcomponents/custom-elements/compare/master...bgrins:firefox-browser-chrome?expand=1">forked version</a> of the <a href="https://github.com/webcomponents/custom-elements">custom elements polyfill</a> made to work in XUL documents.</p>
<p>A prototype of converting <tabbrowser> to a JS class is in progress at <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1392352">Bug 1392352</a>. This would cause gBrowser to become a JS object instead of a DOM Node. This conversion is semi-automated <a href="https://github.com/bgrins/xbl-analysis/blob/ad87d682b937620b1c129e49c4081483c7074540/scripts/build-custom-elements.js">by a script converting the binding to a JS class</a>.</p>
<p><strong>Storage and Sync</strong></p>
<p>We're in the process of cataloging and analyzing some of Firefox's
sprawling storage technologies (45+ different data stores and dozens of
formats on desktop alone), and how they relate to Sync and across
platforms. We're hoping to find ways to make this situation simpler,
more reliable, and easier to extend.</p>
<p>You can see the beginnings of our knowledge capture <a href="https://github.com/mozilla/firefox-data-store-docs">here</a> (PRs welcome!), and a <a href="http://bit.ly/2vpZI9e">spreadsheet</a> showing how data types interact with Sync and mobile platforms.</p>
<p>Huge thanks to the Sync team and data and product folks across the org for helping with our research.</p>
<p><strong>Workflow Improvements</strong></p>
<p>Lately I've been paying extra attention to development papercuts when
working on bugs, especially issues when using ./mach run without
passing a profile. Here’s a list of recent changes on that front:</p>
<ul><li>You can <a href="https://groups.google.com/d/msg/firefox-dev/678mrnS6120/KXcP18ZUCAAJ">open the Browser Toolbox</a> in a local build without flipping prefs.</li><li>The default browser prompt and about:config warning screen <a href="https://groups.google.com/d/msg/firefox-dev/kPwA1y-7BpI/gX6rvhEjBQAJ">no longer show up</a> for the scratch_user (the profile used when you do ./mach run without a profile).</li><li>You can flip any pref for the scratch_user with the --setpref option, or by adding them in your <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/mach#Does_mach_have_its_own_configuration_file">machrc file</a>. For example, to make sure I always see dump output I added this to my ~/.mozbuild/machrc file:<br><code> [runprefs]<br> browser.dom.window.dump.enabled=true</code></li><li>There’s a <a href="https://groups.google.com/d/msg/firefox-dev/Tme95bp3EHY/ow-l077FAAAJ">new keyboard shortcut</a> to do a restart + session restore in local builds.</li><li>The Browser Console is <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1388552">now part of session store</a>, so it will reopen after using the above keyboard shortcut.</li></ul><div>Thanks,<br></div><div>Brian<br></div></div>