Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What exactly am I embedding when using WebKit in C#?

As I understand it, both Safari and Chrome use WebKit. There are many projects that allow you to embed WebKit, but want I actually want is to embed Chrome (for Windows) in a C# app so that my application renders identically to Chrome on Windows.

So when I embed, say, AwesomiumDotNet, will the rendering, CSS support, Javascript engine, font-rendering etc be that of Chrome for Windows, or of the underlying WebKit engine?

Presumably, WebKit doesn't handle things like font and control rendering or Chrome and Safari on Windows would look identical, and yet they don't (Safari has that fuzzy text thing going on, among other differences).

So is WebKit responsible for the layout and computed styles, while the browser built on top of WebKit provides the actual rendering? Or is it more that the projects used by Apple and Google forked a while ago, and that's why they're different?

like image 321
Matt Brindley Avatar asked Aug 12 '10 17:08

Matt Brindley


1 Answers

WebKit does handle all of those things, and in fact has it's own JS engine as well (JavaScriptCore). It also does in fact render the controls and such, though in a different way than you might expect. Safari and Chrome do indeed look different, but that's because they both have different implementations of WebKit. AwesomiumDotNet provides its own implementation (just as Chrome and Safari do) of control rendering.

For all intents and purposes, when you embed AwesomiumDotNet, you're embedding a full, pre-built browser control. WebKit itself, though, doesn't necessarily need to use each of the components of the full browser. For instance, Chrome implements its own JavaScript engine (V8).

Hope this helps!

like image 125
mattbasta Avatar answered Sep 28 '22 00:09

mattbasta