On Mon, Feb 29, 2016 at 2:21 PM, Benjamin Francis <bfran...@mozilla.com> wrote:
> On 26 February 2016 at 21:26, Ehsan Akhgari <ehsan.akhg...@gmail.com> > wrote: > > > Without intending to start a shadow discussion on top of what's already > > happening on the internal list (sadly), to answer your technical > > question, the "platform"/Firefox point is a false dichotomy. As an > > example, you can create a new application target similar to browser, > > b2g/dev or mobile/android, select that using --enable-application, and > > start to hack away. That should make it possible to create a > > non-Firefox project on top of Gecko. You can use an HTML file for > > browser.startup.homepage, and you can use <iframe mozbrowser> if you > > need to load Web content. So it's definitely possible to achieve what > > you want as things stand today. > > > > OK, so to follow this logic in the case of B2G, your recommended solution > would be to transform /b2g/chrome/content/shell.html [1] into a replacement > for Gaia's system app and land that code directly in mozilla-central? > > That could potentially work for the B2G use case and would remove an entire > layer from the architecture which sounds great. But it would mean putting > that code in mozilla-central rather than a completely separate project on > GitHub. > > If you look at Planula source code you will see that it basically runs on top of Firefox Nightly, replacing browser.xul by a custom HTML file, using <iframe mozbrowser> to load web content. Planula is also a separate github project. At the end it's not perfect, nor the most ideal situation, but at least you can start to prototype a new browser, or anything else, without having to rebuild m-c every time. (hint: you can basically use F5 to refresh the whole UI). That said, if you want to build a full featured web browser, with only HTML technologies, you may have to deal with some internal details of Gecko. You can bypass some of it with the right set of hand-crafted addons (look at config/profile/extensions/zyzzyva). Some others details will force part of you architecture to be exactly how Gecko expects the front-end to be formatted (e.g having an iframe with the type content-primary in your startup page, or exposing a gBrowser global in some cases...) but you can really go very far if you want to build a browser and follow what Alexandre and myself have done with Planula. You may also needs a few set of patches to apply to Gecko to allow your front-end to load the devtools, or use about: pages. But most of those are pretty small and scoped patches that should not be too hard to uplift upstream. Again Planula is mostly designed to explore part of Firefox that can be replaced without the help of XUL/XPCOM and see how much can be really achieved with such technologies that trying to simulate a full-featured Electron clone (which would be cool but seems a lot of work with a lot of resources dedicated to it from various teams, and seems unrealistic with the current focus from MoCo). While Planula goal is to try to land some parts of it into browser/ and toolkit/, you can already start to prototype something right away without the need to hit m-c. Vivien. > Ben > > 1. > > https://dxr.mozilla.org/mozilla-central/source/b2g/chrome/content/shell.html > _______________________________________________ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform > _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform