web 3.12: a browser to make us proud (guadec 2014)

36

Upload: igalia

Post on 28-Nov-2014

60 views

Category:

Technology


1 download

DESCRIPTION

By Eduardo Lima. Latest developments in GNOME’s Web and its engine WebKitGTK+ has finally closed the gap, giving our platform a beautiful, robust, modern and feature-rich Web browser. This is a presentation on the state of Web technologies on GNOME, briefly discussing the latest architectural changes and feature additions, and a look at the future.

TRANSCRIPT

Page 1: Web 3.12: A browser to make us proud (GUADEC 2014)
Page 2: Web 3.12: A browser to make us proud (GUADEC 2014)

Web 3.12A browser to make us proud

Eduardo LimaIgalia

Strasbourg, July 27th, 2014

Page 3: Web 3.12: A browser to make us proud (GUADEC 2014)

+ =

3/36

Page 4: Web 3.12: A browser to make us proud (GUADEC 2014)

scope

Web 3.12: released March 2014(Web 3.10 released September 2013)

WebKitGTK+ 2.4.0: also released March 2014

·

··

4/36

Page 5: Web 3.12: A browser to make us proud (GUADEC 2014)

scope

focus on last stable release cycle

5/36

Page 6: Web 3.12: A browser to make us proud (GUADEC 2014)

WebKitGTK+ 2.4

6/36

Page 7: Web 3.12: A browser to make us proud (GUADEC 2014)

WebKitGTK+

What happened?·Multiple Web processesDOM touch events supportPlugins cacheNew APIWebKit1 API deprecationmany bugfixes, as usual

······

7/36

Page 8: Web 3.12: A browser to make us proud (GUADEC 2014)

Multiple Web processes

by Adrian Perez

8/36

Page 9: Web 3.12: A browser to make us proud (GUADEC 2014)

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

Page 10: Web 3.12: A browser to make us proud (GUADEC 2014)

Multiple Web processes

before 2.4

10/36

Page 11: Web 3.12: A browser to make us proud (GUADEC 2014)

Multiple Web processes

after 2.4

11/36

Page 12: Web 3.12: A browser to make us proud (GUADEC 2014)

Multiple Web processesin practice:

screenshot by Alex Diavatis

12/36

Page 13: Web 3.12: A browser to make us proud (GUADEC 2014)

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

Page 14: Web 3.12: A browser to make us proud (GUADEC 2014)

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

Page 15: Web 3.12: A browser to make us proud (GUADEC 2014)

Multiple Web processes

by Adrian Perez

15/36

Page 16: Web 3.12: A browser to make us proud (GUADEC 2014)

Multiple Web processes

Downside:·More memory hungryAdded complexity on Web extensions setupAdded complexity on process management (spawning/killing)

---

16/36

Page 17: Web 3.12: A browser to make us proud (GUADEC 2014)

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

Page 18: Web 3.12: A browser to make us proud (GUADEC 2014)

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

Page 19: Web 3.12: A browser to make us proud (GUADEC 2014)

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

Page 20: Web 3.12: A browser to make us proud (GUADEC 2014)

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

Page 21: Web 3.12: A browser to make us proud (GUADEC 2014)

#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

Page 22: Web 3.12: A browser to make us proud (GUADEC 2014)

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

Page 23: Web 3.12: A browser to make us proud (GUADEC 2014)

Plugins cache

Plugins are synchronously scanned on first use, can't be avoidedbut now that's done once, and cached for later

··

23/36

Page 24: Web 3.12: A browser to make us proud (GUADEC 2014)

WebKit1 deprecation

WebKit1 completely removed from trunkHave you already ported your app?2.6 will no longer ship WebKit1 API

···

24/36

Page 25: Web 3.12: A browser to make us proud (GUADEC 2014)

Web 3.12

25/36

Page 26: Web 3.12: A browser to make us proud (GUADEC 2014)

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

Page 27: Web 3.12: A browser to make us proud (GUADEC 2014)

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

Page 28: Web 3.12: A browser to make us proud (GUADEC 2014)

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

Page 29: Web 3.12: A browser to make us proud (GUADEC 2014)

Most dialogs cleaned up and revamped

screenshot by Claudio Saavedra

29/36

Page 30: Web 3.12: A browser to make us proud (GUADEC 2014)

New designs for incognito mode

screenshot by Claudio Saavedra

30/36

Page 31: Web 3.12: A browser to make us proud (GUADEC 2014)

Other improvements

Configure search engine from Preferences·

31/36

Page 32: Web 3.12: A browser to make us proud (GUADEC 2014)

The future

32/36

Page 33: Web 3.12: A browser to make us proud (GUADEC 2014)

The future

Next releases: Web 3.16 for September 2014WebKitGTK+ 2.6 (a bit behind schedule)

··

33/36

Page 34: Web 3.12: A browser to make us proud (GUADEC 2014)

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

Page 35: Web 3.12: A browser to make us proud (GUADEC 2014)

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

Page 36: Web 3.12: A browser to make us proud (GUADEC 2014)

Thank You!(q&a)

twitter @elimitevwww blogs.igalia.com/elima

36/36