A high-profile fork: one year of Blink and Webkit

1998/11/4KHTML born
2003/1/7Webkit forks KHTML (kfm-devel post)
2013/2/13Opera switches to Chromium (post)
2013/4/3Blink forks WebKit (post)
2013/5/21Tech reporting is terrible v1 (8.8M LOC)
2013/5/22Tech reporting is terrible v2 (8.8M LOC)
2013/9/12QT switches from WebKit to Blink (webkit-dev)

In 2013 the browser wars sprouted a new rendering engine: Blink. When Blink forked in April 2013, Webkit had a total of 1.8 million lines of C++, 2,500 commits per month and was the most popular browser engine. On mobile, Webkit backed the top 3 browsers (Apple Safari, Google Chrome, Android Browser), accounting for the majority of mobile eyeballs. This post is a look at the Blink/Webkit fork one year later: how have the projects diverged, who is driving them, and what are they up to?

What is a browser engine?

Both WebKit and Blink are more than just browser engines--for example Webkit contains a first-class javascript engine (JSC) and two application layers (Webkit1, Webkit2) which are not in Blink. For this discussion, the "core" engine code is the common code shared by Blink and Webkit such as Source/WebCore and Source/WTF. This core code is what positions and draws the text you're reading now.

By not understanding the subtle differences between the projects, the tech media reported Blink removed 8.8 million lines of code. How Blink manages to run on -7 million lines of code is a mystery. ("git diff --stat" shows that 8.8 million lines were removed post-fork in Blink, primarily layout test and supporting images.) A joke by Andreas Kling was later misreported as WebKit removing 8.8 million lines of ShadowDOM.


The projects are quickly diverging due to differences in resources and priorities. The graph below shows the differences in commit rate over time. Blink's faster trajectory isn't unexpected since Google was the top contributor to Webkit.

In terms of core lines of code, both projects have reduced lines code considerably and both are starting to grow.

How did the fork affect Apple and Google's commit rates? Both organizations increased their commits post-fork. Whether this is due to competition or decreased friction is hard to tease out:

The players

Google and Apple are by-far the largest contributors to Blink and WebKit (note the axis scales). Samsung is the second-largest contributor to both projects although twice as many patches land in Blink. Opera and Igalia are the third largest contributors, primarily to Blink and Webkit, respectively.

Priorities and revealed preferences

The two graphs below show the top core files modified in each project. The change count is listed in parenthesis and the size of each box is relative to the change count within the project.

Note the similarities in which files are being changed. My high-level take on the past year is that the Blink project has been more focused on next-gen webapps with a heavy focus on the compositor, scheduling, and style subsystems. The WebKit project has been more focused on documents and improving existing pages with faster line layout and style selection (as well as an enormous amount of great work on JSC and bindings). The next year will be interesting as Safari's next release was just announced and these differences begin to pan out.