[GSoC 2024] Drawing to the Screen!

Blog post by Zardshard on Wed, 2024-07-17 09:03

WebKit wasn’t trying to draw anything to the screen. Turns out, it wasn’t aware that it was visible. No use drawing a web page when you’re invisible, right? Well, I told it that it is visible, and now it’s trying to draw to the screen. Of course, it crashes while trying to do so. It hasn’t tried to draw to the screen in ages. Everything is bit rotted! So far, it looks like this will mostly be a collection of minor tasks.

[GSoC 2024] Fixing IPC in WebKit

Blog post by Zardshard on Fri, 2024-06-28 13:34

WebKit is split into several processes. One of these processes is the browser itself. In my case, this is MiniBrowser, but, hopefully, in the future, it is WebPositive. Since browsers can have any name, WebKit refers to this process as the UIProcess. And, indeed, that process is mainly responsible for the UI. Our port will also be using two other processes: NetworkProcess and WebProcess. Unsurprisingly, NetworkProcess does the networking. WebProcess does all of the work associated with a single web page.

[GSoC 2024] Fixing the crashing

Blog post by Zardshard on Tue, 2024-05-28 10:06

Currently, MiniBrowser (the simple browser that we use to test WebKit2) crashes rather easily. It crashes when it is closed, but that’s not too bad. Unfortunately, it also crashes when trying to navigate to a website (shown above)! I will be working on fixing this crash first. For those who aren’t familiar with WebKit’s code, that’s all I can really say. But if you are familiar, then keep reading. WebKit wants to know how I will fundamentally approach porting WebKit2.

Building WebKit Sensibly

Blog post by Zardshard on Wed, 2024-05-15 10:44

WebKit builds can take a lot of space and time to build on Haiku. To those working on WebKit, welcome! This blog post is primarily for those working on HaikuWebKit, Haiku's fork of WebKit, but it may also be useful for you. I will be covering some techniques that are useful to reduce the size of build files without significant disadvantages. I’ll also cover how to speed up linking.

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

Blog post by Zardshard on Wed, 2024-05-08 08:35

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!

[GSoC 2023] Improving Icon-O-Matic Final Report

Blog post by Zardshard on Fri, 2023-08-18 11:21

What is Icon-O-Matic? There’s a good chance that not everyone reading this article will know what Icon-O-Matic is, so I’ll start by explaining what it is. Icon-O-Matic is a vector graphics editing program like Illustrator or Inkscape. It is specifically made to work with Haiku’s custom HVIF vector graphics format. This format is similar to the SVG format, except optimized to be much, much smaller. The blog post “500 Byte Images: The Haiku Vector Icon Format” provides a more in-depth discussion for those interested.

[GSOC 2023] Progress on perspective transformation

Blog post by Zardshard on Mon, 2023-06-19 12:56

While the change request to add reference images was being reviewed, I started working on ticket #18415, which suggests adding shear and perspective transformations. I decided to implement the perspective transformation since I still need to figure out which way I’m going to implement the shear transformation. Hopefully the experience in implementing the perspective transformation will give me information that will help me decide how to implement the shear transformation.

[GSoC 2023] Next up: Add reference images

Blog post by Zardshard on Thu, 2023-06-01 08:39

I have fixed three memory leaks. Before, leak_analyser.sh found 75 leaks from simply opening and closing Icon-O-Matic. It now reports only 27. I am now planning to implement a new shape type called “reference images”. This implements ticket #2748. As discussed in the ticket, having a reference image in the background greatly assists in vectorizing it. Reference images are just for reference. They will not be exported to the final HVIF file.

[GSoC 2023] First course of action: fix memory leaks

Blog post by Zardshard on Mon, 2023-05-29 09:03

The coding period has started today! In the last blog post related to GSOC, I said “Here are the plans that I currently have. As with all plans, they are subject to change.” They did indeed change since I found a tool to find memory leaks. Before I was accepted into GSOC, I had been thinking about porting AddressSanitizer to Haiku to find memory leaks. I decided against it. During the community bonding period, I found a file called leak_analyser.

How to find memory leaks

Blog post by Zardshard on Tue, 2023-05-23 10:44

In 2010-2011, mmlr created a new memory allocator: the guarded heap memory allocator. This allocator helps detect various bugs such as writing past the end of allocated memory, reading uninitialized memory, and freeing freed memory. These uses are detailed in “Using malloc_debug to Find Memory Related Bugs”. Later, in 2015, mmlr had a new project: updating the memory allocator to be able to report memory leaks. To use this feature, start by loading libroot_debug.