stippi's blog

WebPositive gets a bit more stable

Blog post by stippi on Fri, 2010-04-16 14:39

At least it can finally log into Facebook. Not that I am a fan of Facebook, but I realize how important it is for WebPositive to be able to log into that site. Some other seemingly random crashes have a good chance of being fixed, too, since I was able to track down a memory corruption bug that was caused by different parts of the code being compiled with incompatible defines. Unfortunately this took a bit of experiementing until I was finally on the right track. Today I hooked up my quad core machine to temporarily replace my regular Haiku work machine, which is CPU wise a bit underpowered. The insane rebuild times were really getting on my nerves. Even with the quad core it took quite a bit of patience, but to be absolutely sure to compile everything with the right defines, I had to compile... well... everything. Many times.

WebPositive gets polishing

Blog post by stippi on Sat, 2010-04-03 19:55

Hah, you wish! These blog titles are getting way ahead of the progress I make with WebPositive. Or let's say the title is truthful in some ways, but on the other hand perhaps suggesting more substantial progress than what was made. I did turn my attention to fixing a lot of little annoyances and bugs that were reported via various channels, the comments section of this series of blog entries being among the important sources of feedback. So keep the good feedback comming, it's very useful for me!

WebPositive matures

Blog post by stippi on Fri, 2010-03-19 12:31

Well... that might be a bit bold for me to say. Obviously WebPositive still has a lot of things missing. On the other hand, this version adds some of the most crucial things, like persistent cookie support, bookmarks and a much improved browsing history implementation.

WebPositive emerges

Blog post by stippi on Tue, 2010-03-02 21:18

Wow, it's been 10 days already since I posted my first blog entry on my work on WebKit and the native web browser. Of course my continous updates to the package I posted in my first article will probably have spoiled most of the surprise, but HaikuLauncher has been reduced again into just a bare browser shell, while a new codebase, WebPositive, has been split off from it. Using WebPositive has become a whole lot more pleasing in the meantime. For those of you who have not followed the comments to the original blog, these are the things implemented since my first post on the project:

Diving into WebKit

Blog post by stippi on Tue, 2010-02-23 19:11

First of all, I want to thank Haiku, Inc. for giving me the opportunity to concentrate fully for a while on the WebKit port and browser! This is an awesome chance that I intend to make full use of.

At the moment, I have mixed feelings. Not about writing blogs. Not about working on WebKit. But about using the new WebKit browser to write the blog entry, haha! I've seen it crash, although in the last days, it has become pretty stable. After we upgraded to a newer WebKit version as the basis for the port, the frequent random crashes have almost disappeared and I saw only one crash in three days. Compared to one every few minutes before.

But still, I am of course pushing it a bit by eating my own dog food so early on. Lucky for me, I have integration with the system clipboard already working, so I can at least copy & paste my writing into Pe from time to time.

I'll try to give an overview of how I came to work on the WebKit port and what I've done so far. Basically, I woke up one day and thought Haiku really needs a modern, efficient and well integrated browser - now. In the beginning it wasn't clear to me yet, what the best approach for this would be. I started out with NetSurf and looked into that port. Francois has done some solid work there, but the flickering annoyed me and I've looked a bit into how this could be fixed. At the same time, I tried a few websites and it just wasn't convincing to me that NetSurf would be a full featured browser soon. It's certainly an awesome project, but it looked to me like it's not in the same advanced state as other engines. So I've started to consider Firefox and WebKit. For Firefox, I've heard that the problem is the Cairo port for Haiku. So I've downloaded the Cairo source tree and pretty much rewrote the BeOS port under the presumption that the existing Cairo software rendering backend could be used to draw into BBitmaps to get an instantly fully compliant implementation. Then however I failed to get the Makefiles set up correctly for building the testing framework. At the same time, it became clear through talks with Fredrik Holmqvist, that porting a current Firefox would be much more work than just porting Cairo to Haiku.

So WebKit began looking more and more attractive. I've quickly learned that Maxime Simone was keeping the WebKit port updated since his work on it during the Google Summer of Code 2009. I checked out the repo and began working on getting it to compile. Maxime was stuck at some linking problems, but after a while I figured out what those were and then Maxime helped me get the rest of the port into compilable state again. After I finally looked at the HaikuLauncher, which is the testing application to embed a WebKit view into an application, render a website for the first time, I've been working on the port and the browser ever since.

I think the infrastructure for ports in the WebKit source tree has improved a lot since Ryan Leavengood did the initial port in 2007. One of the last things that Maxime did was enabling the pthread threading backend. When I ran the HaikuLauncher for the first few times, I ran into all kinds of asserts, because WebCore code was executed on the wrong thread. My first work was therefor to design a proper threading concept for the WebKit code. Maybe it's a good time to mention that WebCore and JavaScriptCore are the core frameworks, the actual web engine. WebKit is a thin layer on top of WebCore that provides an API for embedding and controlling WebCore on each respective platform. So WebKit is where our BWebView and BWebPage will live, while WebCore is the actual backend. The Haiku port is thus separated into these parts. Three parts actually: There are all the files in WebCore which provide platform native implementations for various aspects of WebCore.There is for example GraphicsContextHaiku, which implements the WebCore rendering backend API via BView drawing functions. In WebKit, there is two sets of files. One part is the actual WebKit public API that the Haiku port provides, the other part are the so called WebCore support classes which bridge between WebCore and WebKit.

Work had and has to be done in all three parts. Some stuff was already finished from when Ryan worked on the port, other things were finished by Maxime, but a lot of the code was still stubbed out. Lucky for me, the port also consist of it's own jam based build system, which I presume Ryan wrote. It's nice not having to deal with that as well. After I fixed and implemented a great deal more code, HaikuLauncher became somewhat usable for surfing, and more people began to be excited about the WebKit browser. Michael Lotz has been crucial in tracking down some hard to fix memory corruption bugs and in extending the CURL network layer backend in WebCore to support htdigest authentication. Rene Gollent has implemented FileChoser support and tabbed browsing in HaikuLauncher. It was of course very encouraging to get support from so many people. Each day, the browser became more usable. And sometimes fixing one little thing, even if it was very hard to track down, can suddenly enable a whole bunch of websites.

So far I think my choice to invest into WebKit was a good one. It's possible to make a very native feeling browser, although some compromises have to be made. While WebCore is essentially single threaded, at least the native drawing happens in one app_server thread per page. And this will of course improve over time, as WebCore itself will make more use of threading. In terms of feeling native, I believe HaikuLauncher has left the Firefox port far behind. It even renders faster in many situations, sometimes drastically faster.

Today, I've finally found the problem with frames and iframes not being loaded and you can thank Ingo Weinhold and praise his source level debugger for that. This too made a great deal of sites work suddenly, like maps.google.com, the full version of mail.google.com, www.gmx.net finally works... and I've found the cause of some annoying clipping problems. If you want to give the HaikuLauncher a spin, you need to run a GCC4 or hybrid Haiku system. And it needs to be pretty recent, since we've also fixed bugs and added features in Haiku to support stuff for WebKit and HaikuLauncher. Have fun! But keep in mind it can still crash. Just because I managed to finish this blog doesn't mean you should trust it, yet. :-D

Download WebPositive (SVN revision: 444)

P.S. I've stolen the awesome icon from Meanwhile's great BB icons package.

Everyone loves benchmarks

Blog post by stippi on Tue, 2010-01-12 15:23

In these exciting times, during which Ingo Weinhold is making great progress with some performance optimizations in the Haiku kernel, I felt this strong urge to conduct some benchmark results, even if that caused me great deal of pain in setting up all the test platforms! The results are quite interesting, even though I didn't manage to test all possible combinations of host platforms and file systems.

Don't miss this BeGeistert!

Blog post by stippi on Sat, 2009-10-03 10:48

This time I am very happy to be part of the organization team for BeGeistert, the bi-annual gathering of BeOS and Haiku fans in Düsseldorf, Germany. That's because I get to see who registers, and I can tell you that I am almost bursting with excitement, since this BeGeistert will be a big one! Beside the regular BeGeistert visitors, this time there are people coming whom I've known for years only via the Internet and who I can now finally meet in person. And there are also a bunch of old-timers coming who didn't participate in the event in years. Even new contributors will show up for the first time, like some of this year's Google Summer of Code and Haiku Code Drive students.

Syndicate content