[webkit-dev] Re: [webkit-changes] [29033] trunk

Darin Adler darin at apple.com
Mon Dec 31 13:58:26 PST 2007

On Dec 29, 2007, at 11:20 PM, Alp Toker wrote:

> The discussion in bug #16669 suggests this was a clean-up to make  
> conditional database support consistent with conditional icon  
> database support. A quick grep shows precedent for this with other  
> features, eg. Frame.cpp:
> #include "SVGDocument.h"
> #include "SVGDocumentExtensions.h"
> #include "SVGNames.h"
> #include "XLinkNames.h"
> #endif
> If it's causing trouble with other build systems it might be better  
> to add guards within the header files instead. No strong feelings  
> either way.

It's not about build systems. Either approach works with any build  

There are two approaches -- #if in the headers and #if in source files  
where they include the headers.

Despite what Jan Alonzo claimed in that bug, we are consistently doing  
the #if in all the headers for these features; the #if in source files  
are mistakes.

It's not good to have these be inconsistent. I don't like the change  
to make DATABASE less like SVG and XPATH and XSLT.

The #if at include sites approach is better for people who want to  
omit the code entirely for features that are not enabled. You don't  
even need the headers in your patch. But the #if in headers approach  
is probably lower maintenance, since there are usually multiple  
includes for each header.

     -- Darin

More information about the webkit-dev mailing list