I really want to learn how WebKit works and is used and how I can implement my own browser with it. What is a good resource I can use to learn more about it?

If you want to read a bit how things works from a high level view, Tali Garsiel published an article about the big parts of WebKit and Gecko: http://taligarsiel.com/Projects/howbrowserswork1.htm && https://vimeo.com/44182484

You may want to get a checkout of the code before you start reading to see the code of the classes mentioned in the article.

Now about building WebKit from scratch. Let's get started with the first steps: get the code, build it and run what you have built.

Here is the info to get a checkout of WebKit: http://www.webkit.org/building/checkout.html If you prefer GIT, the infos are at the bottom of that page: "git clone git://git.webkit.org/WebKit.git WebKit". WebKit has a fairly big repository due to the massive number of tests. It takes a while to clone everything.

Next, you need to build. The easiest is OS X: http://www.webkit.org/building/build.html If you have Xcode installed, you only really need to call "Tools/Scripts/build-webkit --debug" or "Tools/Scripts/build-webkit --release". That takes a while the first time, then you take advantage of the incremental builds until you update your local checkout.

If you want to build on Linux: http://trac.webkit.org/wiki/BuildingGtk

You can also build for the iOS Simulator: https://www.webkit.org/blog/3457/building-webkit-for-ios-simulator/

If everything builds without issue, you will be able to run Safari with your very own WebKit: Tools/Scripts/run-safari --debug (or --release). WebKit also has it's own micro-browser that just embed the WebView: MiniBrowser. You can run it with Tools/Scripts/run-minibrowser --debug/--release.

If you run into any problem, just ask me.

If you want to contribute, I can look for something easy-ish for a first patch. The core is in C++, but if you prefer JavaScript you can also hack on the Web Inspector.

You can also start reading the patches on http://trac.webkit.org to get a sense of what is going on (some of it will likely be incomprehensible until you get familiar with the codebase)

/r/webdev Thread Parent