WebKit Chromium Port
The following instructions can be used to create a new checkout or in an existing svn checkout or git clone.
The port can be built from a normal webkit checkout very similarly to webkit itself, with a few simple changes:
- Pre-Requirements: Are the same as webkit's Developer Tools. On Linux you will also need requirements for Linux. On Windows, make sure to use the copy of svn that comes with depot_tools (i.e., Windows svn). If cygwin has installed a copy of svn, make sure it comes later in your PATH or just uninstall it.
- Getting the Code: Follow webkit's Getting the Code, but add the --chromium flag to update-webkit:
update-webkit --chromium
- Building: Follow webkit's Building WebKit, but add the --chromium flag to build-webkit:
build-webkit --chromium
- Running and Testing: Run tests with a DumpRenderTree:
new-run-webkit-tests --chromium
- Build Bot: When uploading a patch for review, the chromium build bot is listed as 'cr-linux'. If your patch modifieds the GYP/GYPI files (for e.g. adding new source files), the cr-linux build could fail because the bot does not run 'gclient runhooks' before builds, this will be fixed shortly.
Building on Windows
Note: Building WebKit on the 'Express' editions of Visual Studio is not supported in this guide.
Unlike WebKit itself, Chromium port is built from Windows command line, not from Cygwin (this is how the build bot currently does it). In order to do a build, first please follow setup steps listed in BuildBot#Non-cygwinWinRequirements.
If you would like to build the port using Visual Studio 2005, set the GYP_MSVS_VERSION variable:
set GYP_MSVS_VERSION=2005
Then run update-webkit-chromium script (optionally with --force to enforce projects re-generation):
perl ./Tools/Scripts/update-webkit-chromium --force
and build-webkit:
perl ./Tools/Scripts/build-webkit --release --chromium
If you get errors when running update-webkit-chromium about "depot_tools is too old", make sure that the path to depot_tools is in your path before cygwin's copy of svn.
If you encounter linking problems with SDK or DirectX libraries, make sure to apply KB949009 patch.
Building on Android
Building the Chromium WebKit port for Android requires slightly different steps, as the code needs to be cross-compiled using the Android NDK. Besides the dependencies required to build the normal Chromium port, you need to have the latest Android SDK installed (currently version 16) and exported in your shell.
export ANDROID_SDK_ROOT=/path/to/the/androidsdk
After Getting the Code, you need to populate your tree with Chromium's code. Updating the code requires the --chromium-android argument, which will automatically pull in the Android NDK and initialize your environment.
update-webkit --chromium-android
Building the code can be done by running this command:
build-webkit --chromium-android
Note that not all targets may run as expected yet. The meta bug may be tracked for improvements in this respect.
Building with feature defines
The default set of feature defines for Chromium can be found in http://trac.webkit.org/browser/trunk/Source/WebKit/chromium/features.gypi . If you want to enable a feature that isn't enabled by default, create the file ~/.gyp/include.gypi and put the following in it:
{
'variables': {
'feature_defines': [
'ENABLE_MY_FEATURE=1',
],
},
}
After updating ~/.gyp/include.gypi, you'll need to re-run update-webkit-chromium --force to regenerate your build files.
FAQs
Why Chromium Port?
The port helps define the barrier between WebKit and Chromium by providing a stable API between the two.
Where does the Chromium Port code live?
In a webkit checkout, under WebKit/chromium/. You may browse it here.
Do I need an additional, isolated checkout of webkit for the Chromium port?
The Chromium port uses gclient and gyp to fetch and auto-generate its requirements on top of a normal webkit checkout, and builds its results into a separate output folder. Therefore, it can co-exist within the same directory structure as a normal webkit development checkout.
Useful Tools
Even though you may not be building or running the Chromium port, you can always easily generate expected results, thanks to the Rebaseline tool. It's really awesome. Try it.
WebKit gardner
Chromium port has a rotation for "WebKit gardner", the person responsible for merging new WebKit revision into Chromium. You can see the rotation schedule at Chrome WebKit Merge