IDL files use #if defined(ENABLE_whatever) instead of #if ENABLE(whatever). This is a problem now that JavaScriptCore/wtf/Platform.h provides definitions for features that are supposed to be disabled, and features that are supposed to be disabled are properly #defined to 0. For example, in Chromium, we want WebKit database support off, and build with -DENABLE_DATABASE=0, but files like WebCore/page/DOMWindow.idl check for: #if defined(ENABLE_DATABASE) Because ENABLE_DATABASE is #defined (although to 0), the preprocessor allows the conditionalized section in. The check should be changed to: #if ENABLE(DATABASE)
Followup: the IDL files should use #if ENABLE_WHATEVER directly, because they are preprocessed without wtf/Platform.h being included, and the ENABLE() macro is not available.
Created attachment 24064 [details] grep -r ^#if.\*ENABLE_ . I tested this out in a regular WebKit Mac build, and it seems to do what's expected of it.
Comment on attachment 24064 [details] grep -r ^#if.\*ENABLE_ . Change is fine but please add a description and bug url to the changelog.
Created attachment 24120 [details] grep -r ^#if.\*ENABLE .
Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog M WebCore/bindings/objc/DOMEvents.h M WebCore/bindings/objc/PublicDOMInterfaces.h M WebCore/dom/Document.idl M WebCore/page/DOMWindow.idl M WebCore/svg/svgtags.in Committed r37362