[GSoC 2024] Plans for Fixing Haiku's WebKit2 Port | Haiku Project

So I got accepted into GSoC again! I’m going to be working on WebKit2. But what is WebKit2, or even WebKit, for that matter? Well, WebPositive uses WebKit to render its web pages. Currently, we use the WebKitLegacy API to communicate with WebKit. It would be nice to switch to the newer version: WebKit2. However, our port of WebKit2 still needs work. At present, it has lost its ability to even render any webpage at all! So, getting WebKit2 to work will be the primary goal of my GSoC project. If there’s time left, I might be able to integrate it into WebPositive.

This is a companion discussion topic for the original entry at https://www.haiku-os.org/blog/zardshard/2024-05-08_gsoc_2024_plans_for_fixing_haikus_webkit2_port

Ambitious plans, I hope you manage to achieve your goal for WebKit2 and look forward to seeing your progress.

Note that MiniBrowser is available, but the version on the depot is based on webkitgtk, which is an unrelated port of webkit.

Resuming the work on WebKit2 is more than welcome. But I believe that, at least in initial phase, the integration of WebKit2 into WebPositive should keep WebKit based browser also available. Something like:

  • WebPositive based on WebKit2, and
  • WebPositive Legasy based on WebKit

So, people have the choice and can watch the possible regressions. When WebKit2 based browser matures enough, of course, the legacy browser can be disconnected.

We will see, we arenot there yet. But the simplest way to achieve that is to use an older binary of WebPositive from the beta branch of Haiku. The WebKit2 version will be in nightly builds only for some time.


Sometimes forcing necessity ensures progress, commit to dumping webkit and be on with it

1 Like

Have your ride : joyful ! -
while taming wild codelines …
Be on time, @Zardshard !


A haiku from me
to you




Just. curious, will any of this work address the issues of not being able to stream video and audio, from services like Youtube, Rumble and TuneIn?..Thanks!

I think it’s unlikely, though that certainly would be nice.

1 Like

These issues are primarily in the Media Kit, I believe (media websites that don’t need DRM should work in the QT/GTK browsers that don’t use the native Media Kit for instance)

1 Like

No, the primary issue is our code in webkit that does not use the media kit properly.

Anyhow, this project does not relate to it, it may help tangentially but likely won‘t

1 Like

It’s both. The media kit requires a lot of extra work to get streaming properly working. It’s doable, but the situation isn’t great, and it would be nice to make some fixes there.

The interfacing with WebKit is also not great, and can be improved a lot (for example to draw things more directly on screen). Most of this code is shared between WebKitLegacy and WebKit2, but with WebKit2, it may be possible to se it in a way that loading media doesn’t completely freeze the browser (which is what happens now). In that case, we may try fixing/enabling it again.