Embedding/OMTCEmbedding
Lite Mozilla Embedding API with Off main thread rendering
OMTC Embedding is the way to provide very minimal and simple embedding API which would allow to create browser similar to Android Mobile Firefox on non-android platforms, such as Qt (Harmattan,Nemo), Windows8, iOS...
OMTC means Off Main Thread Compositing OffMainThreadCompositingWiki and simply allow to keep gecko engine in separate thread and render Mozilla Layers in different thread (responsive scrolling, zooming).
Also OMTC is very useful for embedding on mobile, because UI toolkit main thread event loop free from heavy Gecko operations and stay always responsive.
In order to build mozilla with this API available just do:
mkdir ~/mozdev cd ~/mozdev hg clone http://hg.mozilla.org/mozilla-central cd mozilla-central hg clone http://hg.mozilla.org/users/romaxa_gmail.com/embedipc_queue .hg/patches hg update `cat .hg/patches/changeset` hg qpush embedhelper/disable_widget_overlay.diff cp .hg/patches/mozconfig.qtdesktop mozconfig MOZCONFIG=$(pwd)/mozconfig make -f client.mk build_all
QtMozEmbed example
XRE_GetEmbedHelper - function will be available in libxul.so and allow to create embedding context API object.
There are also available qtmozembed library which is creating Qt Embedding API on top of XRE_GetEmbedHelper and has some test application examples.
In order to get it and build follow next steps:
cd ~/mozdev hg clone http://hg.mozilla.org/users/romaxa_gmail.com/qtmozembed cd qtmozembed ./build.sh PATH_TO_MOZILLA_OBJ_DIR or ./build.sh ~/mozdev/mozilla-central/obj-fn-qt/dist/bin cd ~/mozdev/qtmozembed/qmozembed-build/qmozembedtest ./qmozembedtest -url about:mozilla
you can export SCROLL_MODE=1 in order to get kinetic scrolling enabled.