Version 19 (modified by 17 years ago) ( diff ) | ,
---|
Building the Gdk port
The Gdk port of WebKit is intended to provide a browser component primarily for users of the portable Gtk+ UI toolkit on platforms like Linux.
Status of the port
The port is actively maintained, and its build state is continuously tested by the WebKit build-bot.
Developers interested in using or contributing to the Gdk port should be willing to get their hands dirty at this stage. Patches are welcomed on the bug tracker and help is readily available on the IRC channel and mailing list for developers who want to learn the ropes.
Dependencies
The code should be easily built on any Linux distribution which has development packages for Gtk+ installed. Packages you might need to install (in addition to an "ordinary build environment"):
- libicu-dev
- gperf
- libxslt-dev
- libcurl-dev
- libsqlite3-dev
- libjpeg62-dev
- libpng12-dev
See also the dependencies listed in BuildingOnLinux (package list for major distributions).
Using Qmake4
The Gdk port has made a compromise on its build system by incurring a dependency on qmake 4, the Qt toolkit build system. This is only a build-time dependency -- the compiled executables will of course continue to have no requirement of Qt. The decision was made to share resources with the Qt porting team and has been largely successful -- the Gdk port is more likely now than ever to be in a building state straight out of SVN while the port developers have more free time to write code instead of maintaining the old Bakefile build system.
To start the build, ensure that you have qmake4 installed and run:
WebKit/WebKitTools/Scripts$ ./build-webkit --gdk
This will build both the library and the GdkLauncher demo in WebKit/WebKitBuild
Hacking
Code layout
The main components of the port:
Gtk+-specific modules
- Gtk+/Gdk UI platform: WebCore/platform/gdk
- "Page/Gdk": WebCore/page/gdk
- "Loader/Gdk": WebCore/loader/gdk
There may be other gdk-port related directories which have yet to be listed here. Note that the name of the port, "Gdk", is a historical mistake and the Gtk+ library should be used where appropriate.
Shared code modules
While the Gtk+ port is the primary consumer of these backends, we aim to keep them portable, avoiding even ifdef'd sections specific to the Gtk+ port:
- curl http backend: WebCore/platform/network/curl
- cairo graphics backend: WebCore/platform/graphics/cairo
- cairo graphics SVG backend (coming soon): WebCore/platform/graphics/svg/cairo
Current tasks (July '07)
- Make things work with debugging enabled (when NDEBUG is removed, assertions are triggered right now)
- Fix animated GIF images -- consider using GdkPixbuf?
- Continue to fix the curl backend
- Start to consider consolidating the widget into a single place as the Qt port has done, and look into implementing eg. createFrame()
- Look into supporting the canvas
- Attempt to merge the Cairo code in the Win32 port -- the equivalent code is copy-and-pasted into the "Gdk" port in some places. This will help reduce code duplication but also help towards getting WebKit/Gdk/Gtk+ working on Windows
Issues known
CURL
- The non zero select timeout feels bad. Make it possible to write a GSourceFunc to not poll the sockets and have a timeout...
- Cookie handling is complety lacking as pointed out on the mailinglist
- headerCallback needs to be landed/fixed
- Errors of curl need to be properly populated
Gtk
- A lot of classes are not yet implemented
- Frames are not supported. This needs special handling and adding an API
- We don't have pkg-config files
- We probably relayout way too often leading to weird issues as seen on planet.gnome.org
- For painting we have some issues in regard to Expose Events and when WebKit will call paint.
Theming
- Focus ring drawing
- Scrollbars for PlatformScrollbar will be terrible as we need to implement a HitTest but don't know where the elements of the scrollbar hide
- Native theming for text entries
Building
- Missing dependencies are not reported and force a user to take a closer look at the screen.