Thanks for the feedback! I’ve managed to significantly expand the project proposal section of my proposal. That section is now two pages long!
View updated project proposal
Fill-in-the-blank questions and Introduction have been redacted
Project Proposal
I want to work on getting Haiku WebKit’s webkit2 version working. My hope is to get MiniBrowser working well. And perhaps, if there is enough time remaining, I might also be able to get WebPositive to use webkit2.
Getting MiniBrowser working will involve a lot of work. I don’t know about all of the tasks involved yet, but here are some of the ones that may come up, in approximate order of importance:
- Fix inter-process communication.
- Make sure logs work.
- Make sure software rendering works.
- Make keyboard and mouse interactions work.
- Implement the web inspector.
- Improve the API exposed to Haiku applications.
- Clean up code.
- Implement miscellaneous platform-specific items, such as context menus, drag-and-drop, clipboard support, spell checking, full screen, and so on.
- Integrate WebKit 2 with WebPositive.
From what I can tell, doing all this is a massive endeavor, and I doubt I’ll be able to get through all of it by the end of GSoC. Therefore, I want to get the most important things first, leaving less important things for later. This would look something like:
- Get the basics working, like how they were at the end of GSoC 2019.
- Add some of the most important additional features, such as mouse and keyboard support.
- Fill out the rest of the features.
The Tasks
For those interested, here is a deeper dive into what I believe will be involved for each of the tasks listed above.
Fix inter-process communication (IPC)
This is currently the most important problem preventing things from working. Without the UIProcess, NetworkProcess, and WebProcess being able to communicate with each other, web pages cannot be loaded, let alone displayed! It also appears that this is keeping logging from working.
PulkoMandy has explained the problem relatively well in the blog post “So you want to help with webkit?”. Currently, we try to use BMessages and BLoopers for IPC. This seems possible, but has proven somewhat difficult to do. So, either we need to find a solution, or we need a good alternative method.
Make sure logs work
Logs are useful for debugging. Once IPC is working, it should be possible to make logging work, if it isn’t working already. Having logs will make debugging WebKit easier.
Make sure software rendering works
Software rendering is what will display the web pages to the screen! After fixing IPC, this may work just work. If not, then I’ll definitely want to fix it.
I’ve already done some work on this problem, so I have some idea of what is involved. The biggest problem is that WebKit is so focused on GPU rendering, that it almost completely ignores software rendering. This means the easiest way of rendering a web page may be through software OpenGL! Hopefully, it is possible to use a more efficient solution, like what WebKitLegacy uses.
Rajagopalan mentions in “GSOC 2019 final report” that some web pages, such as haiku-os.org displayed a white page. This problem may still be around and so may need to be investigated as well.
Make keyboard and mouse interactions work
This one is also mentioned in Rajagopalan’s final report. Some work has already been done on supporting the mouse, but the keyboard support remains largely missing.
Implement the web inspector
PulkoMandy has mentioned that having a web inspector may be useful for debugging. The inspector appears to need to interface with both the UIProcess and WebProcess to work. Currently, no platform-specific code has been written addressing this, and so I’ll be starting mostly from scratch.
Improve the API exposed to Haiku applications
We currently have a minimal API that MiniBrowser can use. This API should be filled out so that other applications, such as WebPositive, can use it as well. There are three potential approaches to this:
- Try to mirror WebKitLegacy’s API as closely as possible.
- Try to mirror an API of an existing platform, such as GTK, as closely as possible.
- Create a whole new API.
Clean up code
Some sections of the code are a mess. They could certainly be cleaned up.
Implement miscellaneous platform-specific items
This includes making sure that things like context menus, copy and paste, drag and drop, spell checking, and full screen work. All of these are likely relatively simple to implement.
Integrate WebKit 2 with WebPositive
The whole point of all of this!
Timeline
Naturally, getting a timeline is hard, since I’m not sure what will come up as I work on my project. But, here’s a rough approximation:
Community bonding period
- Improve my tooling. Hopefully I can avoid 1-2 hour build times for just a small change. Also, I want to get a good editor setup, whether it is Genio, or Spacemacs, with a working LSP.
- Interact with the community!
First month of coding
- Get MiniBrowser working. This might look like getting a relatively simple site like google.com to load.
Second month of coding
- Fix the rough edges of MiniBrowser and Haiku WebKit. I believe that while getting MiniBrowser working, I’ll see plenty of problems with the code and various other things that should be fixed.
Third month of coding
- If there’s enough time remaining after the other two tasks, I hope to integrate WebKit2 into WebPositive.
After Google Summer of Code
Maybe I’ll continue working on integrating WebKit2 into WebPositive. More likely, I won’t have enough time for such a large project and so take up a smaller one, such as continuing to work on Haiku-PyAPI.
Expectations from Mentors
In theory, I could likely do the entire project by myself. But that doesn’t necessarily mean it’s a good idea. I expect mentors to be useful in
- Understanding the big picture
- Understanding past decisions
- Making sure my code is high-quality
- Making sure that I’m going in the right direction