WebKit Basics

Includes WebKitGTK+

What is WebKit?

WebKit architecture

What is WebKitGTK+?

WebKitGTK+ architecture

What is WebKit2?

WebKit2 architecture

Who is using it?

WebKitGTK+ users

Previously on WebKitGTK+…

Stable release 1.10.x

  • Now enabled by default:
    • Geolocation
    • WebGL
    • Web Timing
  • New features:
    • Accelerated compositing
    • Smooth scrolling
    • Full-screen mode
    • HTML5 History API
    • WebAudio
    • JSC LLint
  • Boatloads of bugfixes.
  • WebKit2GTK+ API augmented, nearing stabilization:
    • To happen with GNOME 3.8, including Epiphany.
    • WebKit1GTK+ API will still be maintained for a while.

WebKit2 now

State of the art

  • WebKit2 announced in April 2010
  • Apple has released Safari using it
  • Cross-platform internal C API exists
  • One Two Qt browsers out there in the wild
    • N9 browser: uses the C API
    • Snowshoe: uses Qt5
  • WebKitGTK+ is the next to have support ☺

So… How's WebKit2GTK+ doing?

The evil is in the details

Doing nicely:

  • The basics have been working for quite a while
  • Most of the small details are already in place as of 1.10:
    • Context menus
    • Web inspector
    • Favicons
    • On-disk cache
    • Spell checking
    • Printing support
    • Documentation, GI annotations…

WebKit2 changes

(For developers)

WebKit1GTK+

Goal: same API for WebKit1GTK+ and WebKit2GTK+

GtkWidget *wkt = webkit_web_view_new ();
WebKitWebSettings *settings = webkit_web_view_get_settings (WEBKIT_WEB_VIEW (wkt))
/* Configure using the the “settings” object */
GtkWidget *win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_container_add (GTK_CONTAINER (win), wkt);
webkit_web_view_load_uri (WEBKIT_WEB_VIEW (wkt), "http://fosdem.org");
gtk_widget_show_all (win);
gtk_main ();
			

WebKit2GTK+

Goal: same API for WebKit1GTK+ and WebKit2GTK+

GtkWidget *wkt = webkit_web_view_new ();
WebKitSettings *settings = webkit_web_view_get_settings (WEBKIT_WEB_VIEW (wkt))
/* Configure using the the “settings” object */
GtkWidget *win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_container_add (GTK_CONTAINER (win), wkt);
webkit_web_view_load_uri (WEBKIT_WEB_VIEW (wkt), "http://fosdem.org");
gtk_widget_show_all (win);
gtk_main ();
			
  • There are some changes, though!
  • For simple uses changes are none or minimal
  • Start porting your application now!

Differences are small(–ish)

  • Some classes renamed (mostly removing “Web”):
    • WebKitWebSettingsWebKitSettings
    • WebKitWebPluginWebKitPlugin
    • WebKitWebHistoryItemWebKitBackForwardListItem
  • Some new classes (mostly new fatures):
    • WebKitContextMenu
    • WebKitSecurityManager
  • Some classes gone away (no longer needed, or missing):
    • WebKitWebPluginDatabase
    • WebKitWebFrame

What next?

A sneak peek

To the future… and beyond

Slicker media controls

New media controls
New media controls

  Old media controls
Old media controls

To the future… and beyond

WebKitGTK+ on Wayland with WebGL

To the future… and beyond

Epiphany overview

Epiphany overview
Epiphany overview

To the future… and beyond

Epiphany “UXperiments”

To the future… and beyond

And more!

  • Text rendering with Harfbuzz
  • GObject Introspection for WebKit2GTK+
  • GStreamer 1.0 for multimedia
  • HW accelerated video rendering
  • WebP and Opus support
  • Native notifications
  • Web applications
  • Print preview
  • Win32 (printing, IPC, etc.)
  • ${FEATURE}

Wrapping up

Conclusions, everybody ♥ these

Conclusions

tl;dr

  • Mature port, widely used
  • Released regularly, every ~6 months
  • Well maintained
  • Useable for developing serious browsers
  • Scales from desktop to embedded
  • WebKit2GTK+ API nearing completion, stabilization approaching
    • Beta since 3.6
    • Epiphany adopting it for 3.8
  • WebKit1GTK+ API still being maintained
    • New features and improvements for WebKit2GTK+ first

Contributing

Every single bit matters

Thank You!

…and enjoy the rest of FOSDEM