= EFL Port of WebKit = == About EFL == The [http://www.enlightenment.org Enlightenment Foundation Libraries] (EFL for short) are a set of graphical libraries intended to provide easy-to-use resources for building rich user interfaces based applications. It is the core of the [http://www.enlightenment.org/ Enlightenment] (E17) desktop shell and window manager. As mentioned in Enlightenment's official web site, "the libraries are meant to be portable and optimized to be functional even on devices such as mobile devices". Its core components are: * Evas: Highly optimized raster canvas, supports software or hardware accelerated rendering * Edje: Declarative UI library, provides rich theme * Ecore: Event loop and utility classes to interface with system (X, DirectFB, Cocoa...) * Eina: Basic data types == About the port == WebKit/EFL is a project aiming at porting WebKit to the Enlightenment Foundation Libraries. The port shares code with the [wiki:WebKitGTK GTK+ one], as we also use Cairo for rendering and !LibSoup for networking. === Status === The port is being developed and maintained by [http://profusion.mobi ProFUSION], [http://samsung.com Samsung] and [http://www.intel.com Intel]. An early version was started by [http://openbossa.org INdT/OpenBossa], but it was changed significantly before inclusion in SVN (see their initial announcement at [http://tonikitoo.blogspot.com/2009/06/webkitefl-01-released.html 0.1 version (Jun/16/2009)]). The current version is quite complete, featuring: * Embedding API mostly consistent w/ Gtk, but following EFL naming scheme and conventions (such as usage of Evas Smart Objects and its callbacks); * Theme support per Web Frame; * Most of HTML5 features (video is missing); * Various delegates to allow full customization of Pop-up and Context menus; * Most of page settings (auto load images, disable flash or javascript, etc); * Override-able input handling, allowing custom mouse and keyboard behavior; * Override-able backing store, allows extensions such as tiled backing store or off screen rendering. Future plans: * NSAPI plugins, using windowless systems for integration into Evas; * HTML5 feature completion (video, geolocation); * Improving API coverage, exposing more features such as the Editor and Inspector clients; * Exposing DOM; * WebKit2 support. Other desired features: * Elementary widget wrapping up ewk_view into a convenient widget, providing default implementation for delegates; * Remove strict X11 dependency, allowing DirectFB and FB at least; * Less dependency on GNOME technologies, maybe remove Cairo and exchange !LibSoup for an EFL-based network backend. === BuildBots === Samsung is maintaining several [wiki:EFLWebKitBuildBots Buildbots]. == Getting the source == The port is entirely in the official SVN repository. Please follow the [http://webkit.org/building/checkout.html usual instructions] for obtaining !WebKit's source code. == Development == === Using a distro that comes with Python 3 as default === If you are working on a distro that comes with Python 3 as default, such as ArchLinux, you might need to follow [http://trac.webkit.org/wiki/PythonGuidelines#BuildingtheEflGtkportinadistrowhichusesPython3.xasdefault these instructions] to create a virtual environment which uses Python 2, in order to successfully build the Efl port. If that's the case, activate your virtual environment before starting the build process. === Dependencies === Install the base EFLWebKit dependencies: {{{ $ Tools/efl/install-dependencies }}} If for some reason, you're not planning to use the dependencies for the EFL port that are pulled in via jhbuild, please make sure that (after [https://bugs.webkit.org/show_bug.cgi?id=91864 bug 91864 lands] you have an installed version of harfbuzz-ng on your system as well. Unfortunately, it usually doesn't come packaged with your distro, so grab it from http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-0.9.2.tar.bz2 , build and install it manually. == About unstable dependencies requirement == The webkit-gtk folks have bumped the needed dependency some time ago to an unstable libsoup version (they track GNOME's release cycle). As we share the backend's code, we have to follow the required versions. For our needs, at least following versions will do: * glib >= 2.36.0 * glib-networking >= 2.33.2 * libsoup >= 2.42.0 == Build and Install == The port can be built using !WebKit's [http://www.webkit.org/building/build.html default build-webkit script]. By default, !WebKit will be built in the `WebKitBuild/` directory, where `` is either ''Release'' or ''Debug''. To override the default settings, you can set the `WEBKIT_OUTPUTDIR` environment variable to set a different build location. After having [http://webkit.org/building/checkout.html checked out the source code], run the script, which will take care of calling both CMake and make. === Dependencies === WebKit EFL makes it easy to pull in dependencies using jhbuild. Before your first build, depending on your OS and installed libs, you need to retrieve the dependencies. You can do that manually by calling {{{ WebKit$ ./Tools/Scripts/update-webkitefl-libs }}} or alternatively by adding the parameter {{{ --update-efl }}} to the {{{build-webkit}}} command below. === Building === {{{ WebKit$ ./Tools/Scripts/build-webkit --efl [--update-efl] }}} A variety of features can be enabled or disabled by the `build-webkit` script, pass the `--help` argument to it to see all possible options (please notice some options have no effect as they depend on features which have not been implemented on the port yet): {{{ WebKit$ ./Tools/Scripts/build-webkit --help WebKit$ ./Tools/Scripts/build-webkit --efl --debug --prefix=/opt/webkit-efl --makeargs="-j8" --no-svg --page-visibility-api }}} It is also possible to pass extra arguments directly to CMake by using the `--cmakeargs` option. {{{ WebKit$ ./Tools/Scripts/build-webkit --efl --cmakeargs="-DCMAKE_CXX_COMPILER=/opt/c++ -DCMAKE_PREFIX_PATH=/usr/local -DCMAKE_VERBOSE_MAKEFILE=TRUE" }}} To create a build with WebKit2-only support (no WebKit1) use the following: {{{ WebKit$ ./Tools/Scripts/build-webkit --efl --cmakeargs="-DENABLE_WEBKIT=OFF" }}} As with any CMake project, it is later possible to edit the existing build configuration by using tools such as `ccmake` or `cmake-gui`. {{{ WebKit$ ./Tools/Scripts/build-webkit --efl --debug WebKit$ cd WebKitBuild/Debug WebKit/WebKitBuild/Debug$ cmake-gui . # Change a few options WebKit/WebKitBuild/Debug$ make # Build again }}} === Building WebKit faster === * [http://permalink.gmane.org/gmane.os.opendarwin.webkit.efl/438 building WebKit faster by Thiago Marcos P. Santos] === The SHARED_CORE option === By default, internal !WebKit libraries such as !JavaScriptCore and !WebCore are built as static libraries and linked into the libewebkit shared library, which is the actual port library. It is also possible to build all libraries as shared libraries, which reduces link time and memory consumption but has a slight performance hit during application startup (obviously, all the shared libraries then need to be distributed and installed). In order to enable the SHARED_CORE option, pass `--cmakeargs="-DSHARED_CORE=ON" to the `built-webkit` script. {{{ WebKit$ ./Tools/Scripts/build-webkit --efl --cmakeargs="-DSHARED_CORE=ON" }}} == Known issues == If you can't launch MiniBrowser because of efreet (maybe ubuntu 12.10?), it might be the inotify issue. Please try to edit below at /etc/sysctl.conf {{{ fs.inotify.max_user_watches=1048576 }}} reference: http://peter-butkovic.blogspot.kr/2013/08/tail-inotify-resources-exhausted.html == API Unit Tests == * [wiki:"EFLWebKitTests" WebKitEFL Unit Tests] == LayoutTests == * [wiki:"WebKitEFLLayoutTest" WebKitEFL LayoutTest] == Coding Style == * [wiki:"EFLWebKitCodingStyle" Coding Style of WebKit EFL port] == Questions, feedback == If you have questions please join #webkit, #webkit-efl or #edevelop on irc.freenode.net. You may ask k-s, antognolli, acidx, demarchi, rakuco, gyuyoung or other developer there. * IRC: #webkit, #webkit-efl on irc.freenode.net * The [http://lists.webkit.org/mailman/listinfo/webkit-efl webkit-efl mailing list] (development discussion, low traffic) == Information about API == * [wiki:"EFLHistoryApiTutorial" WebKitEFL History API] * [wiki:"EFLSettingsApiTutorial" WebkitEFL Settings API] * [wiki:"EFLCookiesApiTutorial" WebkitEFL Cookies API] * [wiki:"WK2-EFLTextCheckerApiTutorial" WebKit2-EFL Text Checker API usage] * [wiki:"EFLFrameApiTutorial" Ewk_frame tutorial] == Using Web Inspector == * Web Inspector can be opened by pressing 'ctrl + i' on a web page. (for EWebLauncher/MiniBrowser) * Remote Web Inspector. (for MiniBrowser only) * The server listens on port 2999 by default. IP address of the server can be set in 'WEBKIT_INSPECTOR_SERVER'. (for example export WEBKIT_INSPECTOR_SERVER="127.0.0.1:2999")