<div dir="ltr">Hello Dave,<div><br></div><div>while contributing to some of the devtools.html refactoring projects, I noticed the following further issues:</div><div><br></div><div>- the XUL label element has attribute crop=start|center|end, which can be used to truncate the label text and insert an ellipsis character at the place of your choice. HTML doesn't have this - ellipsis can be inserted only at the end, and after doing some RTL magic, also at the start (but not 100% bug-free). The "center" option is not available at all. Solving this in CSS would be a really nice addition to the web platform. There's been some spec work done by Sebastian Zartner few years ago.</div><div><br></div><div>- there is a difference in how events are dispatched in HTML vs XUL iframes. In HTML, the capture/bubble phases are isolated inside the iframe window, but in XUL, the target chain crosses the iframe boundaries. This causes problems for React and its event system, which relies on the HTML behavior. This can be solved by patching React, or adding a special flag to the iframe element.</div><div><br></div><div>- when there are elements from both XUL and HTML namespaces inside one XUL document (happens when doing incremental migration), it can be challenging to make flex-like layouts work correctly. The standard flex layout and the XUL flex (-moz-box) interact in ways that are hard to understand.</div><div><br></div><div>Jarda</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 16, 2017 at 9:43 PM, Dave Townsend <span dir="ltr"><<a href="mailto:dtownsend@mozilla.com" target="_blank">dtownsend@mozilla.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div id="m_3100841906558317896gmail-magicdomid39" class="m_3100841906558317896gmail-ace-line"><span class="m_3100841906558317896gmail-author-a-bz76ziz88zz122zz80zz122z2tz80zjz66zuz66zis">One of the things I've been investigating since moving back to the desktop team is how we can remove XUL from the application as much as possible. The benefits for doing this are varied, some obvious examples:</span></div><div id="m_3100841906558317896gmail-magicdomid40" class="m_3100841906558317896gmail-ace-line"><br></div><div id="m_3100841906558317896gmail-magicdomid41" class="m_3100841906558317896gmail-ace-line"><span class="m_3100841906558317896gmail-author-a-bz76ziz88zz122zz80zz122z2tz80zjz66zuz66zis">* XUL is a proprietary standard and we barely maintain it.</span></div><div id="m_3100841906558317896gmail-magicdomid42" class="m_3100841906558317896gmail-ace-line"><span class="m_3100841906558317896gmail-author-a-bz76ziz88zz122zz80zz122z2tz80zjz66zuz66zis">* Shallower learning curve for new contributors who may already know and use HTML.</span></div><div id="m_3100841906558317896gmail-magicdomid43" class="m_3100841906558317896gmail-ace-line"><span class="m_3100841906558317896gmail-author-a-bz76ziz88zz122zz80zz122z2tz80zjz66zuz66zis">* HTML rendering is more optimized in the platform than XUL.</span></div><div id="m_3100841906558317896gmail-magicdomid44" class="m_3100841906558317896gmail-ace-line"><span class="m_3100841906558317896gmail-author-a-bz76ziz88zz122zz80zz122z2tz80zjz66zuz66zis">* Further integration of Servo code may require dropping XUL altogether.</span></div><div id="m_3100841906558317896gmail-magicdomid45" class="m_3100841906558317896gmail-ace-line"><br></div><div id="m_3100841906558317896gmail-magicdomid126" class="m_3100841906558317896gmail-ace-line"><span class="m_3100841906558317896gmail-author-a-bz76ziz88zz122zz80zz122z2tz80zjz66zuz66zis">The necessary first step of reducing XUL use is to stop adding any more UI that uses XUL and here I'm talking about wholly new UI, additions to browser.xul and other existing UI are a separate concern. What do folks think about making this a rule for new projects in the near future?</span></div><div id="m_3100841906558317896gmail-magicdomid47" class="m_3100841906558317896gmail-ace-line"><br></div><div id="m_3100841906558317896gmail-magicdomid99" class="m_3100841906558317896gmail-ace-line"><span class="m_3100841906558317896gmail-author-a-bz76ziz88zz122zz80zz122z2tz80zjz66zuz66zis">Of course there are some features missing from HTML that make this impossible in some cases right now. Some that I've already found:</span></div><div id="m_3100841906558317896gmail-magicdomid49" class="m_3100841906558317896gmail-ace-line"><br></div><div id="m_3100841906558317896gmail-magicdomid50" class="m_3100841906558317896gmail-ace-line"><span class="m_3100841906558317896gmail-author-a-bz76ziz88zz122zz80zz122z2tz80zjz66zuz66zis">* HTML has no support for popup panels like XUL does. The devtools team have been working around this but they are still dependent on XUL right now.</span></div><div id="m_3100841906558317896gmail-magicdomid51" class="m_3100841906558317896gmail-ace-line"><span class="m_3100841906558317896gmail-author-a-bz76ziz88zz122zz80zz122z2tz80zjz66zuz66zis">* iframe elements don't have the same capabilities that the XUL browser element does and we use that in some UI.</span></div><div id="m_3100841906558317896gmail-magicdomid52" class="m_3100841906558317896gmail-ace-line"><span class="m_3100841906558317896gmail-author-a-bz76ziz88zz122zz80zz122z2tz80zjz66zuz66zis">* Top level menus on OSX are currently only able to be defined with XUL elements. This only affects UI that uses top-level windows and most of our new UI is in-content so may be less of an issue.</span></div><div id="m_3100841906558317896gmail-magicdomid53" class="m_3100841906558317896gmail-ace-line"><br></div><div id="m_3100841906558317896gmail-magicdomid237" class="m_3100841906558317896gmail-ace-line"><span class="m_3100841906558317896gmail-author-a-bz76ziz88zz122zz80zz122z2tz80zjz66zuz66zis">What other features do we depend on in XUL that I haven't listed?</span></div></div>
<br>______________________________<wbr>_________________<br>
firefox-dev mailing list<br>
<a href="mailto:firefox-dev@mozilla.org">firefox-dev@mozilla.org</a><br>
<a href="https://mail.mozilla.org/listinfo/firefox-dev" rel="noreferrer" target="_blank">https://mail.mozilla.org/<wbr>listinfo/firefox-dev</a><br>
<br></blockquote></div><br></div>