[webkit-gtk] Understanding WebKitGTK sources

Claudio Saavedra csaavedra at igalia.com
Sun Dec 18 13:49:42 PST 2022


On Sat, 2022-12-17 at 19:57 +0200, André A. Gomes wrote:
> Hi,
> 
> I don't understand how WebKitGTK sources are generated.  I see that
> the
> file structure resembles that of WebKit git sources hosted on GitHub.
> 
> Is there are a repository where WebKitGTK lives?  Is there a script
> or a
> manual procedure that transforms WebKit sources into WebKitGTK
> sources?

WebKitGTK is a port of WebKit. Official ports live in the same
repository as WebKit, so they are not elsewhere.

Usually different parts of WebKit are implemented in an platform-
agnostic way, and then ports fill in the specifics. That's the file
structure you see that resembles the core structure. The subdirectories
gtk/ glib/ unix/ wpe/ cocoa/ gstreamer/ etc you see in different
directories have platform-implementations (or port implementations)
that are implemented on top of the generic classes. They are usually
subclasses of those abstract classes in the parent directories, and in
some cases just platform-specific classes or helpers. Some are shared
(like glib/ is shared between gtk and wpe ports where it makes sense),
others are very port-specific (like ios/ or gtk/ directories).

These sources are not generated, they are implemented by port
developers. There might be some generated sources (look into
DerivedSources/ directories after build), but those are usually just
some of the public API wrappers for parts that don't need anything more
than boilerplate code (the JavaScriptCore glib API for example, if I
remember correctly). Most of the code in ports is not autogenerated.

Hope this helps a bit,
Claudio




More information about the webkit-gtk mailing list