[webkit-dev] Tightening up our include discipline

Adam Barth abarth at webkit.org
Tue Oct 18 16:37:03 PDT 2011


The other day, Sam chided me on a bug for including a header from
WebCore proper in a file in WebCore/platform.  Even though I know I'm
not supposed to do that, it's an easy mistake to make.  There's some
work going on in https://bugs.webkit.org/show_bug.cgi?id=49192 to
improve the style checker to flag these sorts of bad dependencies.
This check isn't live yet, but don't be surprised if some robotic user
complains about a bad include in one of your patches.  (As always, if
the bot complains incorrectly, please let me know so we can eliminate
false positives.)

Relatedly, as part of the recent ENABLE cleanup effort, I noticed that
some files (e.g.,
http://trac.webkit.org/browser/trunk/Source/WebCore/dom/Event.cpp)
attract lots of ifdefs because many unrelated features need to
register themselves.  I was thinking it might be an improvement to
restructure things a bit so that, for example, WebAudio wouldn't need
to reach its fingers into Event.cpp and instead could be better
contained in the WebCore/webaudio directory.

I welcome any thoughts you have on either of these topics.

Thanks,
Adam


More information about the webkit-dev mailing list