Nov 28, 2014
Web 3.12A browser to make us proud
Eduardo LimaIgalia
Strasbourg, July 27th, 2014
+ =
3/36
scope
Web 3.12: released March 2014(Web 3.10 released September 2013)
WebKitGTK+ 2.4.0: also released March 2014
·
··
4/36
scope
focus on last stable release cycle
5/36
WebKitGTK+ 2.4
6/36
WebKitGTK+
What happened?·Multiple Web processesDOM touch events supportPlugins cacheNew APIWebKit1 API deprecationmany bugfixes, as usual
······
7/36
Multiple Web processes
by Adrian Perez
8/36
Multiple Web processes
Essentially, one process per tabplus other auxiliary processesGoals
Enabled by default in Web, possible to opt-out
···
Page crashes don't crash the browserPut vulnerable data into a separate address space
··
·
9/36
Multiple Web processes
before 2.4
10/36
Multiple Web processes
after 2.4
11/36
Multiple Web processesin practice:
screenshot by Alex Diavatis
12/36
Multiple Web processes
Opt-in/out (GSettings)
gsettings set org.gnome.Epiphany \ process-model one-secondary-process-per-web-view // or 'shared-secondary-process'
13/36
Multiple Web processes
Opt-in/out (API)
int main(int argc, char **argv) { webkit_web_context_set_process_model ( webkit_web_context_get_default (), WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES);
/* The rest of the application code, unmodified */ }
14/36
Multiple Web processes
by Adrian Perez
15/36
Multiple Web processes
Downside:·More memory hungryAdded complexity on Web extensions setupAdded complexity on process management (spawning/killing)
---
16/36
Multiple Web processes
It is possible for Web views to share a Web process (new API)
GtkWidget *view, *related_view, *unrelated_view;
void create_views (){ /* Create two views which share a Web Process */ view = webkit_web_view_new (); related_view = webkit_web_view_new_with_related_view (WEBKIT_WEB_VIEW (view));
/* This view will spawn a new Web Process */ unrelated_view = webkit_web_view_new ();}
17/36
Multiple Web processes
Initializing Web extensions now (new API)·· #define WEB_EXTENSIONS_DIRECTORY /* ... */
int main (int argc, char **argv){ WebKitWebContext *context = webkit_web_context_get_default (); GVariant *data = get_data_for_web_extensions ();
webkit_web_context_set_web_extensions_directory ( context, WEB_EXTENSIONS_DIRECTORY); webkit_web_context_set_web_extensions_initialization_user_data ( context, data);
GtkWidget *view = webkit_web_view_new ();
/* ... */}
18/36
Multiple Web processes
... and in the extension·· void webkit_web_extension_initialize_with_user_data (
WebKitWebExtension *extension, GVariant *user_data){ /* Initialize the extension, using “user_data” */}
19/36
Multiple Web processes
More complexity: Different data per instance of a Web extension·New signal ::initialize-web-extensions(I promise next is the last slide with code)
··
20/36
#define WEB_EXTENSIONS_DIRECTORY /* ... */
static voidinitialize_web_extensions (WebKitWebContext *context, gpointer user_data){ /* Web Extensions get a different ID for each Web Process */ static guint32 unique_id = 0;
webkit_web_context_set_web_extensions_directory ( context, WEB_EXTENSIONS_DIRECTORY); webkit_web_context_set_web_extensions_initialization_user_data ( context, g_variant_new_uint32 (unique_id++));}
int main (int argc, char **argv){ g_signal_connect (webkit_web_context_get_default (), "initialize-web-extensions", G_CALLBACK (initialize_web_extensions), NULL);
GtkWidget *view = webkit_web_view_new ();
/* ... */}
21/36
DOM touch events support
Video format or MIME type is not supported.Video format or MIME type is not supported.
Video format or MIME type is not supported.Video format or MIME type is not supported.
Video format or MIME type is not supported.
0:000:00
screencast by Carlos Garnacho
·
22/36
Plugins cache
Plugins are synchronously scanned on first use, can't be avoidedbut now that's done once, and cached for later
··
23/36
WebKit1 deprecation
WebKit1 completely removed from trunkHave you already ported your app?2.6 will no longer ship WebKit1 API
···
24/36
Web 3.12
25/36
Overview turned into an HTML page
Removed complex GTK+ widgets, along with 1000s of lines of codeOverview now a themable and animatable HTML document
··
26/36
Overview turned into an HTML page
Video format or MIME type is not supported.Video format or MIME type is not supported.
Video format or MIME type is not supported.Video format or MIME type is not supported.
Video format or MIME type is not supported.
0:000:00
screencast by Claudio Saavedra
27/36
A new location/title headerbar
Video format or MIME type is not supported.Video format or MIME type is not supported.
Video format or MIME type is not supported.Video format or MIME type is not supported.
Video format or MIME type is not supported.
0:000:00
screencast by Claudio Saavedra
28/36
Most dialogs cleaned up and revamped
screenshot by Claudio Saavedra
29/36
New designs for incognito mode
screenshot by Claudio Saavedra
30/36
Other improvements
Configure search engine from Preferences·
31/36
The future
32/36
The future
Next releases: Web 3.16 for September 2014WebKitGTK+ 2.6 (a bit behind schedule)
··
33/36
The future
WebKitGTK·WebRTCAccelerated-compositing support on WaylandSandbox WebProcessesNew API
Initial WebCrypto spec supportDatabase Process?
····
User scripts and messagingAPI for loading arbitrary content-type
··
··
34/36
The future
GNOME Web·Important security and stability improvements
Bring back the pop-up blockerMore multi-WebProcess models
-HTTPS blockingMixed-content blocking (HTTPS vs. HTTP)
--
--
i.e: One process per security-domain-
35/36
Thank You!(q&a)
twitter @elimitevwww blogs.igalia.com/elima
36/36