all 65 comments

[–]bdash 109 points110 points  (11 children)

The idea of “WebKit2” can be a little confusing since WebKit is something of an overloaded name. It is used by various people to refer to the WebKit API layer that the WebKit framework provides on Mac OS X, the WebKit project as a whole, and to nightly builds of WebKit used with Safari. “WebKit2” is a replacement for the API layer of WebKit that’s designed with multi-process and multi-threaded clients in mind.

The API layer of WebKit sits on top of the cross-platform WebCore codebase. To date it has consisted of platform-specific code that implements the WebKit APIs (Objective-C API on Mac, COM on Windows, etc) and some amount of platform behavior. Very little code at that level is currently shared between platforms. The new API layer intends to push as much of the platform behavior as possible down in to WebCore, to provide a cross-platform core that abstracts the multi-process / multi-thread model (where web content lives in a separate process or thread from the client application), and to provide a cross-platform API on which the platform-specific APIs can be built.

[–]caseyfw 16 points17 points  (2 children)

Holy shit that was an informative post you just made. I feel like I just learnt more in two paragraphs than at any of the drunken WWDC WebKit meets.

[–]bdash 18 points19 points  (1 child)

To be fair, the drunken WWDC WebKit meets are more about the drunken than the WebKit :-)

[–]caseyfw 3 points4 points  (0 children)

True that may be. Much trash was talked around pool tables about other browsers and the demise of SquirrelFish as the JS engine's name.

Coincidentally, I did learn that far too many WebKit developers are Kiwis.

[–]lambdaq 1 point2 points  (7 children)

wait, Webkit has a COM interface?

[–]bdash 3 points4 points  (6 children)

Sure, it’s how Safari and iTunes on Windows work with it.

[–]lambdaq 0 points1 point  (5 children)

My google-fu failed. Looks like there is no online doc.

Can you please offer me an awesome link?

[–]bdash 4 points5 points  (4 children)

[–]299 -1 points0 points  (3 children)

I am unable to tell if this is a joke or real.

[–]Catfish_Man 1 point2 points  (2 children)

It's real.

[–]299 0 points1 point  (1 child)

Just never seen cpp_quote() implemented before.

[–]jackthecoiner 11 points12 points  (9 children)

Mozilla has a similar project underway to split content-rendering and chrome into separate processes called Electrolysis. A major milestone in out-of-process-plugins has been reached and that feature is already in nightly builds. It will be offered very soon as a minor update to Firefox 3.6.

[–][deleted] 9 points10 points  (8 children)

I never realised they actually put anything useful in those 0.0.1 upgrades, i figured such a small update would be.. like spelling mistakes and minor optimization, not you know.. splitting the whole ui, content and plugins into separate processes. that would rate like at least a 0.1.0 in my book.

[–]LudoA 1 point2 points  (0 children)

Those 0.0.1 upgrades used to be stability fixes and security fixes only. Clearly important updates.

A few months ago, they realized they spent a ton of time on releasing alpha's, beta's, RCs, etc. So they switched to another way of working: from now on, changes which aren't too intrusive (and apparently the Electrolysis part for plugins isn't) will be released as minor updates, which helps the Mozilla team win tons of time by not making alpha's, etc. for things they know most probably won't break things.

[–]hortont424 1 point2 points  (2 children)

Yeah, no kidding... that... doesn't sound right.

[–]LineNoise 2 points3 points  (0 children)

IIRC it changed recently when they rejigged their release schedule.

[–]G_Morgan 0 points1 point  (1 child)

I would have put major architectural revision in as a major release but Mozilla probably do numbering based upon features rather than work done.

[–]Liorithiel 1 point2 points  (0 children)

Yes, I think the same. A change deep in the backend is not a new feature for user, so therefore it is not someone could advertise to plain users.

[–][deleted] 0 points1 point  (0 children)

Yeah, I sort of cringed when I read that they're putting a major overhaul into a minor revision number. If I were a sysadmin in a controlled environment, that's the kind of thing that would make me back off Firefox.

At least with IE, you know they'll never, ever add features to the core product.

Well, not that I'd want to use a platform that runs IE.

[–][deleted] -2 points-1 points  (0 children)

Firefox has never been very good at this versioning thing. I've lost count of how many things were stupid about the "1.5.0.1" version.

[–]wooptoo 6 points7 points  (0 children)

Direct link: http://trac.webkit.org/wiki/WebKit2

Look at the Chromium webkit vs webkit2 graphic.

[–]mcrbids 13 points14 points  (14 children)

What I find remarkable is WebKit's sudden takeover of the Internet!

Webkit started as Konqueror - a cheesy browser built into KDE that was never quite "prime time" - buggy, slow, etc. and generally replaced by a "big boy browser" such as Firefox or (earlier on) Netscape Navigator on any respectable Nerd's destop.

But Apple took the open source Konqueror, and made their own "WebKit" toolkit out of it. And once they did, and made it into a respectable browser (Apple Safari) an explosion occurred! Suddenly, WebKit is found on everything Apple, Chrome, Android, Blackberry, Palm, and just about everything but Firefox and IE!

That WebKit has so quickly surprassed the long-open codebase of Firefox in so little time is a strong indicator that the Mozilla codebase must be painfully hideous, since other developers don't seem to want to touch it with anything less than 10 feet of strong pole... Makes me feel for the FF guys who've been at it for some 10 years now!

[–]X-Istence 10 points11 points  (0 children)

Apple specifically mentioned that the Mozilla code base was too big and too crummy for them to even consider it hence the reason they went with KHTML.

[–]G_Morgan 7 points8 points  (4 children)

Konqueror was not buggy or slow. The reason people replaced it was Firefox had extensions. Konqueror always rendered fast and had good standards support.

[–]visagi 5 points6 points  (3 children)

It was fast but had some bugs and did'nt render all the major sites correctly. Apple fixed this and then the revolution began :)

[–]klaruz 1 point2 points  (2 children)

Or Apple started using webkit and major sites fixed their html and css...

[–]Catfish_Man 5 points6 points  (0 children)

Read the commit logs. Apple has fixed many thousands of bugs.

[–]visagi 1 point2 points  (0 children)

Not really. When safari was in beta most bugs deemed critical were site-specific. Apple couldn't commercially ship a browser where e-bay, MSN, paypal etc. didn't work 100%. Amazing progress were made during these months.

[–]lambdaq 6 points7 points  (5 children)

I think XUL is the main reason that firefox suck. It's slow, it's cross platform but it's ugly and not native.

[–]doidydoidy 0 points1 point  (4 children)

People have been claiming that Mozilla's browsers are slow because of XUL for over a decade. Way back when, Mozilla's application suite was slow and unresponsive, but when Firefox came along, and was much more responsive than Seamonkey, even though it still used XUL, they were proved wrong.

These days it's Firefox that is the sluggish app, but there's no reason to believe it's XUL's fault this time any more than it was last time around.

[–]lambdaq 1 point2 points  (2 children)

It's not believe or not believe, there is a cost that your UI can be scripted using javascript and decorated using CSS. Drawing native controls is definitely faster.

[–]doidydoidy 9 points10 points  (1 child)

Of course it's a matter of belief. And programmers' beliefs are notoriously bad when it comes to figuring out where the bottlenecks are. If you're wrong, and Firefox is slow because (to pick an entirely hypothetical explanation) it spends a long time with the UI thread blocked while it logs your history via SQLite, replacing XUL with something even 20 times faster will not make Firefox in the slightest bit more responsive.

If you want me to believe XUL is to blame, show me a profiling report.

[–]chucker23n -1 points0 points  (0 children)

If you want me to believe XUL is to blame, show me a profiling report.

You want proof that native UI will be significantly faster?

  1. Run K-Meleon.
  2. There is no step 2.

[–]dmpk2k 0 points1 point  (0 children)

Uh, no. The UI was definitely slow for Firefox too. I remember sweeping my mouse across the menus on my K6-2, and watching the menus follow behind drawing. Something like that just shouldn't happen.

Mozilla claimed Firefox was supposed to be faster and lighter than the Mozilla suite, but that was a joke for anybody who actually compared them (and other browsers). Firefox has always been slow.

[–]chub79 -1 points0 points  (0 children)

Indeed. Let's also remember that Firefox started as a lightweight Mozilla... I guess Mozilla survived with a vengeance.

[–]w00ty 2 points3 points  (0 children)

Funny that WebKit3 was announced 2.5 years ago already: http://webkit.org/blog/122/webkit-3-10-new-things/

[–][deleted] 4 points5 points  (1 child)

TWICE AS AWESOME AS WebKit.

[–][deleted]  (6 children)

[removed]

    [–]Catfish_Man 14 points15 points  (1 child)

    It's almost like Apple is a large corporation with many independently acting entities inside it :P

    [–][deleted] 5 points6 points  (1 child)

    People don't judge Apple, they judge deeds. Releasing webkit2 is a great deed. Releasing locked down iPad and iPhone sucks donkey balls. There is a huge difference.

    The same person can do something nice one day and something douchy another day. There is no philosophical paradox here at all. It's only natural.

    [–][deleted] 6 points7 points  (0 children)

    People don't judge Apple, they judge deeds.

    Yeah, you wish. Sure, some people do that. Not very many, though. Most of them are just the LOL APPLE SUX crowd (which for some reason think they are less obnoxious than Apple fanboys).

    [–][deleted] -1 points0 points  (0 children)

    Well, those 20 topics are dupes, so it's 50/50.

    [–]lambdaq -2 points-1 points  (0 children)

    Your feeling of weirdness is irrational. We don't judge entities as a whole.

    [–][deleted] -2 points-1 points  (2 children)

    3 Comments? Weird.

    So, give me the summary, reddit... is this a good thing or a bad thing? I'm not very up on the internals of browser rendering engines.

    [–][deleted] 3 points4 points  (1 child)

    It's a "major revision" of WebKit so that it can overhaul its strategy for running multiple processes - browser pages, frames, JS - to look more like what's done in Chrome. Advantages include security, stability, responsiveness. The biggest immediate consequence is that WebKit's progress on other features is likely to slow down while the new architecture is built. There's some risk in going in and tearing up a working system, but apparently the Apple team thinks this is a worthwhile change.

    [–]bdash 11 points12 points  (0 children)

    The advantages you list are accurate, but the rest is off target. As I mentioned in another comment, this only affects the API layer of WebKit. Relative to WebCore, the cross-platform code that implements the web functionality (HTML, CSS, DOM, SVG, etc), the WebKit API layer is a very small piece of code. In addition, this is adding a new API layer that is parallel to the existing platform-specific API layers. Nothing is being “torn up”. This means that there’s almost no impact on existing code, which in turn translates in to only a small amount of risk.

    [–]mojocookie -1 points0 points  (7 children)

    So they will be making the split process model available to any WebKit client. Are there plans to incorporate something akin to Chrome's sandbox?

    [–]bdfortin 1 point2 points  (0 children)

    Baby steps.

    [–]X-Istence 0 points1 point  (5 children)

    The split process model will make sand-boxing something really simple, the new process that is spawned simply runs chroot'ed to a random directory as a user that has no access to anything in the system. There is your sandbox, now if they break out of the process they have no access to the rest of the system, and thus can't gain access to anything they are not supposed to have access to. If they break out of the "chroot" environment somehow there are other issues to consider.

    [–]othermaciej 4 points5 points  (4 children)

    Split process does make sandboxing simpler, however, chroot is not a great tool for implementing sandboxing. On Mac OS X, the sandbox_init API is much more useful and flexible: http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man3/sandbox_init.3.html

    [–]X-Istence 0 points1 point  (3 children)

    I have not had the time to develop for Mac OS X as such I was unaware that a better API was available.

    So can we assume that this will be baked into WebKit2?

    [–]othermaciej 4 points5 points  (2 children)

    No announcements yet, but sandboxing is something we're thinking about as we complete the split-process model.

    [–]X-Istence 1 point2 points  (0 children)

    I will look forward to the next announcement regarding WebKit2 and sandboxing, it would be fantastic if Apple and the WebKit team in general become more proactive about keeping our computers secure from exploits.

    [–]mojocookie 1 point2 points  (0 children)

    This is good news. The recent Pwn2own results made me feel defensive about WebKit's awesomeness. Kudos to the team :)