On 7/23/2013 2:02 PM, [email protected] wrote:
Is there any possibility to have alternative web browsers in Firefox OS? Do they have 
to be built in HTML, using Gecko and <iframe mozbrowser>, or can other engines 
be used? Do these apps need to be certified by Mozilla? If yes, what are the 
criteria? Could other browsers support user-contributed extensions? Would their 
performance be the same as the stock web browser? Could they run accelerated asm.js 
code using OdinMonkey? Could they support SPDY? Could other browsers use their own 
proxy server?

I'll try to answer these questions though I'm not a Firefox OS developer, since I've been thinking about them myself and trying to investigate the answers a bit. These are my own opinions (not my employer's) and I may be wrong about the technical facts. Hopefully someone will correct me if I am.

At the moment at least, only HTML/JavaScript apps run by Gecko can be installed in Firefox OS. It's possible to write an alternative browser, but it would have to use <iframe mozbrowser> or some other pure-HTML solution (like a layout engine implemented entirely in JavaScript that renders to a <canvas>).

<iframe mozbrowser> is a privileged API, so any app that uses it must be certified by an app store that's trusted by the user's device (for example, the Firefox Marketplace).

Any Firefox OS browser app that uses <iframe mozbrowser> should have essentially the same performance as the default browser app. All Firefox OS apps have the same ability to use SPDY, JavaScript JITs, etc. OdinMonkey is not yet included in the stable version of Firefox OS, but once it is then it will be available to all apps and content.

I don't know whether or how it is possible for a third-party browser to use its own proxy server or to modify default HTTP headers. If it's not possible, it seems like a reasonable feature request for the Browser API.


While there's no way to install a completely non-Gecko app on current versions of Firefox OS, I think it's worth thinking about how Firefox OS might support third-party browsers with different engines in the future. This could provide some useful choices and benefits to Firefox OS users, and I don't think Mozilla would be opposed to making this possible.

On the other hand, porting a browser engine to a new platform is a very difficult task, and integrating with the Firefox OS platform in particular might have some unique challenges. Below is some UNINFORMED FUTURE SPECULATION about what it might look like *IF* someone worked on modifying both Firefox OS and an alternative browser engine to work together.

Since Gecko *is* the "application framework" for Firefox OS, the new browser would either need to render content within a web app rendered by Gecko (and figure out how its engine's event loop, resource management, etc. would interact with Gecko's), or write directly to the low-level kernel and HAL layers. The latter option might end up looking more like a "dual boot" out of Gecko into a separate platform than like a normal app, at least from the developer point of view.

Perhaps the third-party engine could run in a "child process" that talks to the main Gecko process just like Firefox OS app processes do (or Chromium tab processes). But I think this would require tight coupling to Gecko internal message formats which might be a poor fit for other engines, and difficult to maintain across Gecko versions.

Of course this is all hypothetical unless someone actually has the expertise, resources, and motivation to port another browser engine to Firefox OS and help modify Firefox OS to support it.
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to