wiki:AddingFeatures

Version 12 (modified by l.gombos@samsung.com, 11 years ago) (diff)

GTK port is now using SetupWebKitFeatures.m4

Introduction

The policy for adding new (major) features to WebKit is:

  • Send email to webkit-dev describing the feature and linking to the tracking bug.
  • If necessary, add an ENABLE flag for the feature.

How to add an ENABLE flag

By adding a build definition for ENABLE_FEATURE it allows code/preprocessor to test using ENABLE(FEATURE). You'll need to edit at least the following files:

  • Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig
  • Source/WebCore/Configurations/FeatureDefines.xcconfig
  • Source/WebKit/mac/Configurations/FeatureDefines.xcconfig
  • Source/WebKit2/Configurations/FeatureDefines.xcconfig
  • Source/autotools/SetupWebKitFeatures.m4
  • Source/WebKit/chromium/features.gypi
  • Source/cmake/WebKitFeatures.cmake
  • Source/cmakeconfig.h.cmake
  • Source/WTF/wtf/FeatureDefines.h
  • Tools/Scripts/webkitperl/FeatureList.pm
  • Tools/qmake/mkspecs/features/features.pri
  • WebKitLibraries/win/tools/vsprops/FeatureDefines.vsprops
  • WebKitLibraries/win/tools/vsprops/FeatureDefinesCairo.vsprops

Note that only defines the feature. To turn the feature on, you'll need to edit the build configurations for each port. (TODO: page describing where each configuration is?)

After adding a feature, please add it to the list in the wiki

Activating a feature for CMAKE based ports

  • Edit Source/cmake/Options<Port>.cmake, e.g. OptionsEfl.cmake and set a default value for this feature.
  • Edit Tools/Scripts/webkitperl/FeatureList.pm to default enable this for the same port, e.g add a isPort() statement to the default setting assignment.

Activating a feature for Autotools based ports

At the moment only the GTK port is using this build system

There are two files that control features for GTK+:

  • Source/autotools/SetupWebKitFeatures.m4: This file controls the features enabled for WebKitGTK+ release builds -- the equivalent of production builds. In general, new and unstable features should be disabled here.
  • Tools/Scripts/webkitperl/FeatureList.pm: This file controls the features enabled for WebKitGTK+ development builds. We like to enable things early here to get test coverage as soon as possible.