[webkit-dev] The "WebCore/platform/" directory situation

Darin Fisher darin at chromium.org
Sat Oct 4 00:41:19 PDT 2008


On Sat, Oct 4, 2008 at 12:27 AM, Maciej Stachowiak <mjs at apple.com> wrote:

>
> On Oct 3, 2008, at 9:17 PM, David Hyatt wrote:
>
> > After working for a while on the WebCore/platform/ directory, it's
> > become clear that people don't really know what this directory is
> > supposed to contain (and by people I mean pretty much everybody,
> > both inside and outside Apple).  The purpose of the platform/
> > directory is to serve as a foundation library for WebCore.  It
> > provides a widget toolkit, graphics primitives, basic data
> > structures and wrappers around low level OS services.  It should not
> > depend on any other parts of WebCore, but can depend on
> > JavaScriptCore/wtf.
>
> I agree with Hyatt on this. Although in most respects we don't enforce
> strict modularity in WebCore, this is one case where it is important,
> and we have been lax in maintaining the layering of WebCore/platform.
>
> > I also think it would be worthwhile to discuss options for
> > preventing these layering violations from occurring going forward.
> > We need to make these violations impossible.  I'd love to hear
> > suggestions on that front (separate library, hacked include paths,
> > etc.).  Whatever we decide should be implementable by Mac, Win, Gtk,
> > Qt, wx and Chromium, since we don't want platform-specific code in
> > platform to violate layering either.
>
> I think we should pull WTF and Platform into separate top level
> modules. On Mac OS X they would build static libraries that get linked
> into JavaScriptCore and WebCore respectively. Other ports may want to
> do it slightly differnetly.
>
> We have a lot fewer layering problems with WebCore and WebKit in part
> because they are separate modules, and you have to go out of your way
> and make some Client interfaces to create unfortunate entanglements.
>
> Regards,
> Maciej
>


Or at least, compile platform/ with an include path that only has wtf/ and
subdirectories of platform/.  Separate static libraries might be the easiest
way to accomplish that?

-Darin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.webkit.org/pipermail/webkit-dev/attachments/20081004/916e5572/attachment.html 


More information about the webkit-dev mailing list