[webkit-dev] Cleaning up directories in WebCore

Adam Barth abarth at webkit.org
Fri Nov 18 13:33:24 PST 2011


On Fri, Nov 18, 2011 at 1:25 PM, Kenneth Russell <kbr at google.com> wrote:
> On Fri, Nov 18, 2011 at 1:51 AM, Adam Barth <abarth at webkit.org> wrote:
>> I've been looking for ways to improve the hackability of WebCore, and
>> one thing that's been bothering me is the organization of our files.
>> It seems like we're due for a bit of "fall cleaning" for directories.
>> We've talked about some of these ideas before, but I wanted to put
>> them all in one email so we can see the big picture.
>>
>> Below is a concrete proposal for moving some directories around.  In
>> this approach, we'll have a "Features" directory to contain logically
>> self-contained features, like WebAudio and MediaStream, that are part
>> of the engine but that aren't tightly coupled with the DOM, Layout, or
>> Rendering.
>
> One comment regarding Web Audio since Chris Rogers is on vacation.
> This particular API is in the process of being better integrated with
> other DOM elements -- so, for example, a video or audio tag can be
> used as a Web Audio source node. It seems to me that moving its
> sources out of WebCore will make it more difficult to achieve this
> integration, especially if new rules are instituted about dependencies
> between Source/WebCore/ and Source/Features/ . Is separate compilation
> of WebCore/ and Features/ a goal or non-goal?

That's a non-goal.  These directories will remain part of WebCore.

> The same comment applies to many of the other directories under
> consideration like workers/. For this reason I wonder whether smaller
> and less traumatic reorganizations would be better in the long run.

Yeah, that's why we're keeping this code in WebCore.

> Separating out platform/ sounds great, though.

That's a bigger change because we're planning to move it out of WebCore.

Adam


>>  We'd also have a new "events" directory in "dom" to
>> contain the large number of event-related files that we've accreted.
>> The "history" directory would move into "page" (we could actually
>> merge these directories because history is so small).  Finally,
>> "manual-tests" and "platform" would move out of WebCore entirely.
>>
>> Features/  <-- New folder for (roughly) self-contained features
>>  notifications/
>>  storage/
>>  fileapi/
>>  webaudio/
>>  mediastream/
>>  workers/
>>  websockets/
>>  inspector/
>> manual-tests/  <-- Move outside of Source
>> dom/
>>  events/  <-- New folder for the 106 files that match dom/*Event*
>> page/
>>  history/  <-- Moved from top-level
>> platform/  <-- Move to Source/Platform
>>
>> The "html" and "page" directories also contain a bunch of unrelated
>> files (presumably because they're attractive locations for folks to
>> add files).  Once we do the directory moves above, I'll send out
>> another proposal for cleaning up those directories a bit.
>>
>> Please let me know if you have any thoughts.
>>
>> Thanks!
>> Adam
>> _______________________________________________
>> webkit-dev mailing list
>> webkit-dev at lists.webkit.org
>> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>>
>


More information about the webkit-dev mailing list