[webkit-dev] Cleaning up directories in WebCore

Ryosuke Niwa rniwa at webkit.org
Fri Nov 18 13:47:35 PST 2011

On Fri, Nov 18, 2011 at 11:21 AM, Adam Barth <abarth at webkit.org> wrote:

> On Fri, Nov 18, 2011 at 2:06 AM, Ryosuke Niwa <rniwa at webkit.org> wrote:

 What's the benefit of this re-org?
> The benefit is mostly to improve the hackability of WebKit by grouping
> related code together and separating unrelated code.  My hope is that
> the code in the "Features" directory will become more self-contained
> over time, helping us increase the functionality provided by WebKit
> with less implementation complexity.

Okay. Making each component self-contained by itself seems like a good idea
but I'm not sure if re-organizing directories and files is the best way to
accomplish this. For example, each component can still have lots of bad
dependencies within each file since we don't control header inclusion per

These moves should be less disruptive than the Source move.  The total
> volume of code is an order of magnitude less, and the changes can be
> made in smaller increments.

Still, if I see a crash in shipped version of Chrome, then I have to
remember to map between different paths, which will be a huge cognitive
overhead for the next couple of months if we start the move now. Also,
there are zillion WebKit crash bugs with stack trace. Those file paths need
to be moved as well. In addition, all work-in-progress patches and local
git branches will likely to conflict with these moves.

One good rule of thumb is if you've creating a bunch of files (i.e., a
> decent block code) behind an ENABLE ifdef, then it should probably go
> in the Features directory, especially if it corresponds to a
> "standalone" specification, e.g., from the WebApps working group.

Hm... what happens if we decide to enable it on all platforms and get rid
of the ENABLE flag? Should we then move those files to a different

One of the benefits of this approach is to encourage the folks writing
> these blocks of code to make them more self-contained so that the core
> part of the engine has fewer ifdefs.

I agree this is a good goal. I'm yet convinced that the proposal directory
reorg would accomplish this though. Perhaps a better way to accomplish this
is to introduce some sort of header inclusion rules.

Having said that, I re-iterate my agreement that moving manual-tests and
platform out of WebCore would be a clear improvement.

- Ryosuke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20111118/4b1de563/attachment.html>

More information about the webkit-dev mailing list