[rfc] Investigations into separating GeckoView out of Fennec
nalexander at mozilla.com
Mon Feb 24 11:21:24 PST 2014
Hello mobile-firefox-dev, (friends, in your best Zoidberg voice),
Motivated by all the problems that I don't understand about how
packaging a GeckoView library with Android resources is ever supposed to
work, I started to think about how hard it will be to actually extract
GeckoView out of Fennec without Android resources.
To help understand the layering of the system, I used Classycle .
I used the dependency definition file at  to figure out where things
are at. This simply says that GeckoView is comprised of (at least) the
following packages and classes.
[lib] = \
I ran Classycle like so:
chocho:Classycle1.4.1 nalexander$ java -cp classycle.jar
The output is at . I really have to hand it to the maintainers of
org.mozilla.gecko.gfx; modulo a few renames (ZoomConstraints should be
in .gfx, I think, and TouchEventInterceptor in .utils), the .gfx code is
really well isolated. With a little abstraction around preferences and
tab events, I'm confident .gfx could be "Fennec-clean" in short order.
I'm also confident we could remove the inappropriate references to
Unfortunately, extracting Fennec from GeckoApp looks to be *very*
involved. In fact, a naive approach would be to push almost all of
GeckoApp into BrowserApp, and then try to make GeckoView work. This
sounds like hard work.
In any case, I don't have more time to investigate this now, but didn't
want my research to die with me. If you're ever in the neighbourhood,
check out Classycle , and feel free to correct my assumptions about
what code should live in GeckoView. And if you can explain to me how
GeckoView and Android resources are supposed to work, that would be
More information about the mobile-firefox-dev