[epiphany] Mass update: Apply uncrustify style to everything



commit 4c719915f66e4eb706830ab399f9815e32d2aa49
Author: Jan-Michael Brummer <jan brummer tabos org>
Date:   Mon Jul 15 20:37:36 2019 +0200

    Mass update: Apply uncrustify style to everything

 embed/ephy-about-handler.c                         |   8 +-
 embed/ephy-download.c                              |  25 +-
 embed/ephy-embed-event.c                           |  27 +-
 embed/ephy-embed-prefs.c                           |  15 +-
 embed/ephy-embed-shell.c                           |  52 +--
 embed/ephy-embed.c                                 |  50 ++-
 embed/ephy-encodings.c                             |  15 +-
 embed/ephy-file-monitor.c                          |  10 +-
 embed/ephy-filters-manager.c                       |   8 +-
 embed/ephy-find-toolbar.c                          |   7 +-
 embed/ephy-view-source-handler.c                   |   6 +-
 embed/ephy-web-process-extension-proxy.c           |   6 +-
 embed/ephy-web-view.c                              | 404 +++++++++++----------
 embed/web-process-extension/ephy-uri-tester.c      |  76 ++--
 .../ephy-web-overview-model.c                      |  18 +-
 .../ephy-web-process-extension-main.c              |   2 +-
 .../ephy-web-process-extension.c                   | 106 +++---
 lib/ephy-debug.c                                   |  22 +-
 lib/ephy-dnd.c                                     |  24 +-
 lib/ephy-favicon-helpers.c                         |   4 +-
 lib/ephy-file-helpers.c                            |  49 +--
 lib/ephy-flatpak-utils.c                           |   2 +-
 lib/ephy-langs.c                                   |   2 +-
 lib/ephy-notification-container.c                  |   4 +-
 lib/ephy-notification.c                            |   6 +-
 lib/ephy-permissions-manager.c                     |  33 +-
 lib/ephy-profile-utils.c                           |  10 +-
 lib/ephy-search-engine-manager.c                   |   8 +-
 lib/ephy-settings.c                                |  18 +-
 lib/ephy-smaps.c                                   |  21 +-
 lib/ephy-snapshot-service.c                        |  48 +--
 lib/ephy-sqlite-connection.c                       |  29 +-
 lib/ephy-sqlite-statement.c                        |  67 +++-
 lib/ephy-string.c                                  |  16 +-
 lib/ephy-sync-utils.c                              |   8 +-
 lib/ephy-time-helpers.c                            |   6 +-
 lib/ephy-uri-helpers.c                             |   2 +-
 lib/ephy-web-app-utils.c                           |  14 +-
 lib/ephy-zoom.c                                    |   6 +-
 lib/history/ephy-history-service-hosts-table.c     |  24 +-
 lib/history/ephy-history-service-urls-table.c      |  18 +-
 lib/history/ephy-history-service-visits-table.c    |   6 +-
 lib/history/ephy-history-service.c                 | 257 +++++++------
 lib/history/ephy-history-types.c                   |  19 +-
 lib/safe-browsing/ephy-gsb-service.c               |  16 +-
 lib/safe-browsing/ephy-gsb-storage.c               |   8 +-
 lib/safe-browsing/ephy-gsb-utils.c                 |   8 +-
 lib/sync/debug/ephy-sync-debug.c                   |   4 +-
 lib/sync/ephy-history-manager.c                    |  24 +-
 lib/sync/ephy-history-record.c                     |   6 +-
 lib/sync/ephy-open-tabs-record.c                   |   4 +-
 lib/sync/ephy-password-manager.c                   |  24 +-
 lib/sync/ephy-password-record.c                    |  20 +-
 lib/sync/ephy-sync-crypto.c                        |  30 +-
 lib/sync/ephy-sync-service.c                       |  94 ++---
 lib/widgets/ephy-certificate-dialog.c              |  10 +-
 lib/widgets/ephy-download-widget.c                 |   2 +-
 lib/widgets/ephy-downloads-popover.c               |   4 +-
 lib/widgets/ephy-file-chooser.c                    |  14 +-
 lib/widgets/ephy-location-entry.c                  |  42 ++-
 lib/widgets/ephy-security-popover.c                |  20 +-
 lib/widgets/ephy-title-box.c                       |   6 +-
 src/bookmarks/ephy-add-bookmark-popover.c          |   8 +-
 src/bookmarks/ephy-bookmark-properties-grid.c      |  43 +--
 src/bookmarks/ephy-bookmark-row.c                  |  32 +-
 src/bookmarks/ephy-bookmark.c                      |  45 +--
 src/bookmarks/ephy-bookmarks-export.c              |   2 +-
 src/bookmarks/ephy-bookmarks-import.c              |  52 +--
 src/bookmarks/ephy-bookmarks-manager.c             |  53 +--
 src/bookmarks/ephy-bookmarks-popover.c             |  45 +--
 src/clear-data-dialog.c                            |  26 +-
 src/ephy-action-bar-end.c                          |   8 +-
 src/ephy-action-bar-start.c                        |  34 +-
 src/ephy-action-bar.c                              |  12 +-
 src/ephy-desktop-utils.c                           |   3 +-
 src/ephy-encoding-dialog.c                         |  13 +-
 src/ephy-header-bar.c                              |  19 +-
 src/ephy-history-dialog.c                          |   7 +-
 src/ephy-link.c                                    |   8 +-
 src/ephy-location-controller.c                     |  16 +-
 src/ephy-main.c                                    |  25 +-
 src/ephy-notebook.c                                |  15 +-
 src/ephy-page-row.c                                |  30 +-
 src/ephy-pages-popover.c                           |  34 +-
 src/ephy-pages-view.c                              |  28 +-
 src/ephy-search-engine-dialog.c                    |  32 +-
 src/ephy-session.c                                 | 111 +++---
 src/ephy-suggestion-model.c                        |  12 +-
 src/ephy-tab-header-bar.c                          |  10 +-
 src/ephy-tab-label.c                               | 110 +++---
 src/ephy-window.c                                  | 144 ++++----
 src/passwords-dialog.c                             |   4 +-
 src/popup-commands.c                               |   9 +-
 src/prefs-dialog.c                                 |  98 ++---
 src/profile-migrator/ephy-profile-migrator.c       |  89 +++--
 src/search-provider/ephy-search-provider-main.c    |   3 +-
 src/search-provider/ephy-search-provider.c         |  86 ++---
 src/synced-tabs-dialog.c                           |   6 +-
 src/webapp-additional-urls-dialog.c                |   2 +-
 src/window-commands.c                              | 123 ++++---
 tests/ephy-download-test.c                         |  18 +-
 tests/ephy-embed-shell-test.c                      |   7 +-
 tests/ephy-embed-utils-test.c                      |   3 +-
 tests/ephy-encodings-test.c                        |   3 +-
 tests/ephy-file-helpers-test.c                     |  17 +-
 tests/ephy-gsb-service-test.c                      |  27 +-
 tests/ephy-history-test.c                          |  48 ++-
 tests/ephy-location-entry-test.c                   |   3 +-
 tests/ephy-migration-test.c                        |   3 +-
 tests/ephy-session-test.c                          |   6 +-
 tests/ephy-shell-test.c                            |   6 +-
 tests/ephy-snapshot-service-test.c                 |  12 +-
 tests/ephy-sqlite-test.c                           |   3 +-
 tests/ephy-string-test.c                           |   3 +-
 tests/ephy-test-utils.c                            |  13 +-
 tests/ephy-uri-helpers-test.c                      |   3 +-
 tests/ephy-web-app-utils-test.c                    |   3 +-
 tests/ephy-web-view-test.c                         |  11 +-
 118 files changed, 1877 insertions(+), 1603 deletions(-)
---
diff --git a/embed/ephy-about-handler.c b/embed/ephy-about-handler.c
index 2ee1c8df9..0ff3d7f20 100644
--- a/embed/ephy-about-handler.c
+++ b/embed/ephy-about-handler.c
@@ -185,9 +185,9 @@ ephy_about_handler_handle_about (EphyAboutHandler       *handler,
                           _("About Web"),
                           icon_info ? gtk_icon_info_get_filename (icon_info) : "",
 #if !TECH_PREVIEW
-                         _("Web"),
+                          _("Web"),
 #else
-                         _("Epiphany Technology Preview"),
+                          _("Epiphany Technology Preview"),
 #endif
                           version,
                           _("A simple, clean, beautiful view of the web"),
@@ -273,7 +273,7 @@ handle_applications_finished_cb (EphyAboutHandler       *handler,
 
     g_string_append (data_str, "</table></body></html>");
   } else {
-    g_autoptr(GtkIconInfo) icon_info = NULL;
+    g_autoptr (GtkIconInfo) icon_info = NULL;
     g_autofree gchar *icon = g_strconcat ("application-x-addon-symbolic", NULL);
 
     g_string_append_printf (data_str, "<html><head><title>%s</title>"
@@ -419,7 +419,7 @@ history_service_query_urls_cb (EphyHistoryService     *history,
                               "  </div>\n"
                               "</body></html>\n");
 
- out:
+out:
   data_length = data_str->len;
   ephy_about_handler_finish_request (request, g_string_free (data_str, FALSE), data_length);
   g_object_unref (request);
diff --git a/embed/ephy-download.c b/embed/ephy-download.c
index 9ee900aab..8bc6094b9 100644
--- a/embed/ephy-download.c
+++ b/embed/ephy-download.c
@@ -199,7 +199,8 @@ parse_extension (const char *filename)
 }
 
 static gboolean
-set_destination_uri_for_suggested_filename (EphyDownload *download, const char *suggested_filename)
+set_destination_uri_for_suggested_filename (EphyDownload *download,
+                                            const char   *suggested_filename)
 {
   char *dest_dir;
   char *dest_name;
@@ -294,8 +295,8 @@ ephy_download_set_destination_uri (EphyDownload *download,
  * files" is set.
  **/
 void
-ephy_download_set_action (EphyDownload          *download,
-                          EphyDownloadActionType action)
+ephy_download_set_action (EphyDownload           *download,
+                          EphyDownloadActionType  action)
 {
   g_assert (EPHY_IS_DOWNLOAD (download));
 
@@ -402,8 +403,8 @@ ephy_download_succeeded (EphyDownload *download)
 }
 
 gboolean
-ephy_download_failed (EphyDownload *download,
-                      GError      **error)
+ephy_download_failed (EphyDownload  *download,
+                      GError       **error)
 {
   g_assert (EPHY_IS_DOWNLOAD (download));
 
@@ -429,9 +430,9 @@ ephy_download_failed (EphyDownload *download,
  *
  **/
 gboolean
-ephy_download_do_download_action (EphyDownload          *download,
-                                  EphyDownloadActionType action,
-                                  guint32                user_time)
+ephy_download_do_download_action (EphyDownload           *download,
+                                  EphyDownloadActionType  action,
+                                  guint32                 user_time)
 {
   GFile *destination;
   const char *destination_uri;
@@ -755,8 +756,8 @@ static void
 download_finished_cb (WebKitDownload *wk_download,
                       EphyDownload   *download)
 {
-  g_autoptr(GError) error = NULL;
-  g_autoptr(GFile) file = NULL;
+  g_autoptr (GError) error = NULL;
+  g_autoptr (GFile) file = NULL;
 
   download->finished = TRUE;
 
@@ -920,7 +921,7 @@ ephy_download_new (WebKitDownload *download)
 
   ephy_download = ephy_download_new_internal (download);
 
-  if (!ephy_is_running_inside_flatpak() && g_settings_get_boolean (EPHY_SETTINGS_WEB, 
EPHY_PREFS_WEB_ASK_ON_DOWNLOAD)) {
+  if (!ephy_is_running_inside_flatpak () && g_settings_get_boolean (EPHY_SETTINGS_WEB, 
EPHY_PREFS_WEB_ASK_ON_DOWNLOAD)) {
     g_signal_connect (ephy_download, "filename-suggested",
                       G_CALLBACK (filename_suggested_cb),
                       NULL);
@@ -957,7 +958,7 @@ EphyDownload *
 ephy_download_new_for_uri_internal (const char *uri)
 {
   EphyDownload *ephy_download;
-  g_autoptr(WebKitDownload) download = NULL;
+  g_autoptr (WebKitDownload) download = NULL;
   EphyEmbedShell *shell = ephy_embed_shell_get_default ();
 
   g_assert (uri != NULL);
diff --git a/embed/ephy-embed-event.c b/embed/ephy-embed-event.c
index ebd5f967a..c686e58b6 100644
--- a/embed/ephy-embed-event.c
+++ b/embed/ephy-embed-event.c
@@ -68,17 +68,17 @@ ephy_embed_event_new (GdkEvent            *event,
   embed_event->hit_test_result = g_object_ref (hit_test_result);
 
   switch (event->type) {
-  case GDK_BUTTON_PRESS:
-    embed_event->button = ((GdkEventButton *)event)->button;
-    embed_event->modifier = ((GdkEventButton *)event)->state;
-    embed_event->x = ((GdkEventButton *)event)->x;
-    embed_event->y = ((GdkEventButton *)event)->y;
-    break;
-  case GDK_KEY_PRESS:
-    embed_event->modifier = ((GdkEventKey *)event)->state;
-    break;
-  default:
-    break;
+    case GDK_BUTTON_PRESS:
+      embed_event->button = ((GdkEventButton *)event)->button;
+      embed_event->modifier = ((GdkEventButton *)event)->state;
+      embed_event->x = ((GdkEventButton *)event)->x;
+      embed_event->y = ((GdkEventButton *)event)->y;
+      break;
+    case GDK_KEY_PRESS:
+      embed_event->modifier = ((GdkEventKey *)event)->state;
+      break;
+    default:
+      break;
   }
 
   return embed_event;
@@ -113,7 +113,8 @@ ephy_embed_event_get_modifier (EphyEmbedEvent *event)
 
 void
 ephy_embed_event_get_coords (EphyEmbedEvent *event,
-                             guint *x, guint *y)
+                             guint          *x,
+                             guint          *y)
 {
   g_assert (EPHY_IS_EMBED_EVENT (event));
 
@@ -138,7 +139,7 @@ ephy_embed_event_get_property (EphyEmbedEvent *event,
   g_assert (name);
 
   /* FIXME: ugly hack! This only works for now because all properties
-     we have are strings */
+   *  we have are strings */
   g_value_init (value, G_TYPE_STRING);
 
   g_object_get_property (G_OBJECT (event->hit_test_result), name, value);
diff --git a/embed/ephy-embed-prefs.c b/embed/ephy-embed-prefs.c
index 02e0c0747..073025551 100644
--- a/embed/ephy-embed-prefs.c
+++ b/embed/ephy-embed-prefs.c
@@ -33,11 +33,13 @@ typedef struct {
   const char *schema;
   const char *key;
   const char *webkit_pref;
-  void (*callback)(GSettings *settings, const char *key, gpointer data);
+  void (*callback)(GSettings  *settings,
+                   const char *key,
+                   gpointer    data);
 } PrefData;
 
 #define DEFAULT_ENCODING_SETTING "default-charset"
-// FIXME: Refactor this code to remove the need of those globals
+/* FIXME: Refactor this code to remove the need of those globals */
 static WebKitSettings *webkit_settings = NULL;
 static GFileMonitor *user_style_sheet_monitor = NULL;
 
@@ -219,7 +221,7 @@ webkit_pref_callback_font_family (GSettings  *settings,
 }
 
 /* Based on Christian Persch's code from gecko backend of epiphany
-   (old transform_accept_languages_list() function) */
+ *  (old transform_accept_languages_list() function) */
 static void
 webkit_pref_callback_accept_languages (GSettings  *settings,
                                        const char *key,
@@ -344,7 +346,7 @@ webkit_pref_callback_enable_spell_checking (GSettings  *settings,
   webkit_web_context_set_spell_checking_enabled (web_context, value);
 
   if (value) {
-    g_autoptr(GArray) array = g_array_new (TRUE, FALSE, sizeof (char *));
+    g_autoptr (GArray) array = g_array_new (TRUE, FALSE, sizeof (char *));
     g_autofree gchar *language = g_settings_get_string (EPHY_SETTINGS_WEB, 
EPHY_PREFS_WEB_SPELL_CHECKER_LANGUAGE);
     char **normalized;
 
@@ -381,7 +383,7 @@ webkit_pref_callback_hardware_acceleration_policy (GSettings  *settings,
                                                         WEBKIT_HARDWARE_ACCELERATION_POLICY_NEVER);
       break;
     case EPHY_PREFS_WEB_HARDWARE_ACCELERATION_POLICY_ON_DEMAND:
-      /* Fallthrough */
+    /* Fallthrough */
     default:
       webkit_settings_set_hardware_acceleration_policy (webkit_settings,
                                                         WEBKIT_HARDWARE_ACCELERATION_POLICY_ON_DEMAND);
@@ -389,8 +391,7 @@ webkit_pref_callback_hardware_acceleration_policy (GSettings  *settings,
   }
 }
 
-static const PrefData webkit_pref_entries[] =
-{
+static const PrefData webkit_pref_entries[] = {
   /* Epiphany font settings */
   { EPHY_PREFS_WEB_SCHEMA,
     EPHY_PREFS_WEB_SERIF_FONT,
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
index 0d86a5f69..b6e5f19a6 100644
--- a/embed/ephy-embed-shell.c
+++ b/embed/ephy-embed-shell.c
@@ -113,7 +113,7 @@ ephy_embed_shell_get_view_for_page_id (EphyEmbedShell *self,
   GList *windows = gtk_application_get_windows (GTK_APPLICATION (self));
 
   for (GList *l = windows; l && l->data; l = l->next) {
-    g_autoptr(GList) tabs = ephy_embed_container_get_children (l->data);
+    g_autoptr (GList) tabs = ephy_embed_container_get_children (l->data);
 
     for (GList *t = tabs; t && t->data; t = t->next) {
       EphyWebView *ephy_view = ephy_embed_get_web_view (t->data);
@@ -152,7 +152,7 @@ tabs_catalog_get_tabs_info (EphyTabsCatalog *catalog)
   EphyEmbedShell *embed_shell = EPHY_EMBED_SHELL (catalog);
   WebKitFaviconDatabase *database;
   GList *windows;
-  g_autoptr(GList) tabs = NULL;
+  g_autoptr (GList) tabs = NULL;
   GList *tabs_info = NULL;
   const char *title;
   const char *url;
@@ -229,7 +229,7 @@ web_process_extension_password_form_focused_message_received_cb (WebKitUserConte
 {
   guint64 page_id;
   gboolean insecure_action;
-  g_autoptr(GVariant) variant = NULL;
+  g_autoptr (GVariant) variant = NULL;
   g_autofree char *message_str = NULL;
 
   message_str = jsc_value_to_string (webkit_javascript_result_get_js_value (message));
@@ -266,7 +266,7 @@ static void
 ephy_embed_shell_update_overview_urls (EphyEmbedShell *shell)
 {
   EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell);
-  g_autoptr(EphyHistoryQuery) query = NULL;
+  g_autoptr (EphyHistoryQuery) query = NULL;
 
   query = ephy_history_query_new_for_overview ();
   ephy_history_service_query_urls (priv->global_history_service, query, NULL,
@@ -374,8 +374,8 @@ password_manager_query_finished_cb (GList               *records,
   }
 
   proxy = ephy_embed_shell_get_extension_proxy_for_page_id (data->shell,
-                                                                                   data->page_id,
-                                                                                   data->origin);
+                                                            data->page_id,
+                                                            data->origin);
   if (proxy)
     ephy_web_process_extension_proxy_password_query_response (proxy, username, password, data->promise_id, 
data->frame_id);
 
@@ -386,7 +386,7 @@ static char *
 property_to_string_or_null (JSCValue   *value,
                             const char *name)
 {
-  g_autoptr(JSCValue) prop = jsc_value_object_get_property (value, name);
+  g_autoptr (JSCValue) prop = jsc_value_object_get_property (value, name);
   if (jsc_value_is_null (prop) || jsc_value_is_undefined (prop))
     return NULL;
   return jsc_value_to_string (prop);
@@ -396,7 +396,7 @@ static int
 property_to_int32 (JSCValue   *value,
                    const char *name)
 {
-  g_autoptr(JSCValue) prop = jsc_value_object_get_property (value, name);
+  g_autoptr (JSCValue) prop = jsc_value_object_get_property (value, name);
   return jsc_value_to_int32 (prop);
 }
 
@@ -404,7 +404,7 @@ static int
 property_to_uint64 (JSCValue   *value,
                     const char *name)
 {
-  g_autoptr(JSCValue) prop = jsc_value_object_get_property (value, name);
+  g_autoptr (JSCValue) prop = jsc_value_object_get_property (value, name);
   return (guint64)jsc_value_to_double (prop);
 }
 
@@ -480,8 +480,8 @@ save_auth_request_free (SaveAuthRequest *request)
 }
 
 static void
-save_auth_request_response_cb (gint                 response_id,
-                               SaveAuthRequest      *data)
+save_auth_request_response_cb (gint             response_id,
+                               SaveAuthRequest *data)
 {
   if (response_id == GTK_RESPONSE_REJECT) {
     ephy_permissions_manager_set_permission (data->permissions_manager,
@@ -507,7 +507,7 @@ web_process_extension_password_manager_save_real (EphyEmbedShell *shell,
   g_autofree char *password = property_to_string_or_null (value, "password");
   g_autofree char *username_field = property_to_string_or_null (value, "usernameField");
   g_autofree char *password_field = property_to_string_or_null (value, "passwordField");
-  g_autoptr(JSCValue) is_new_prop = jsc_value_object_get_property (value, "isNew");
+  g_autoptr (JSCValue) is_new_prop = jsc_value_object_get_property (value, "isNew");
   gboolean is_new = jsc_value_to_boolean (is_new_prop);
   guint64 page_id = property_to_uint64 (value, "pageID");
   EphyWebView *view;
@@ -641,7 +641,7 @@ history_service_host_deleted_cb (EphyHistoryService *service,
 {
   EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell);
   GList *l;
-  g_autoptr(SoupURI) deleted_uri = NULL;
+  g_autoptr (SoupURI) deleted_uri = NULL;
 
   deleted_uri = soup_uri_new (deleted_url);
 
@@ -738,7 +738,7 @@ got_snapshot_path_for_url_cb (EphySnapshotService *service,
                               char                *url)
 {
   g_autofree char *snapshot = NULL;
-  g_autoptr(GError) error = NULL;
+  g_autoptr (GError) error = NULL;
 
   snapshot = ephy_snapshot_service_get_snapshot_path_for_url_finish (service, result, &error);
   if (snapshot) {
@@ -892,8 +892,8 @@ ephy_resource_request_cb (WebKitURISchemeRequest *request)
 {
   const char *path;
   gsize size;
-  g_autoptr(GInputStream) stream = NULL;
-  g_autoptr(GError) error = NULL;
+  g_autoptr (GInputStream) stream = NULL;
+  g_autoptr (GError) error = NULL;
 
   path = webkit_uri_scheme_request_get_path (request);
   if (!g_resources_get_info (path, 0, &size, NULL, &error)) {
@@ -911,9 +911,9 @@ ephy_resource_request_cb (WebKitURISchemeRequest *request)
 static void
 ftp_request_cb (WebKitURISchemeRequest *request)
 {
-  g_autoptr(GDesktopAppInfo) app_info = NULL;
-  g_autoptr(GList) list = NULL;
-  g_autoptr(GError) error = NULL;
+  g_autoptr (GDesktopAppInfo) app_info = NULL;
+  g_autoptr (GList) list = NULL;
+  g_autoptr (GError) error = NULL;
   const char *uri;
 
   uri = webkit_uri_scheme_request_get_uri (request);
@@ -939,7 +939,7 @@ initialize_web_process_extensions (WebKitWebContext *web_context,
                                    EphyEmbedShell   *shell)
 {
   EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell);
-  g_autoptr(GVariant) user_data = NULL;
+  g_autoptr (GVariant) user_data = NULL;
   gboolean private_profile;
   gboolean browser_mode;
   const char *address;
@@ -1004,7 +1004,7 @@ new_connection_cb (GDBusServer     *server,
                    EphyEmbedShell  *shell)
 {
   EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell);
-  g_autoptr(EphyWebProcessExtensionProxy) extension = NULL;
+  g_autoptr (EphyWebProcessExtensionProxy) extension = NULL;
 
   extension = ephy_web_process_extension_proxy_new (connection);
 
@@ -1031,9 +1031,9 @@ static void
 ephy_embed_shell_setup_web_process_extensions_server (EphyEmbedShell *shell)
 {
   EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell);
-  g_autoptr(GDBusAuthObserver) observer = NULL;
+  g_autoptr (GDBusAuthObserver) observer = NULL;
   g_autofree char *address = NULL;
-  g_autoptr(GError) error = NULL;
+  g_autoptr (GError) error = NULL;
 
   address = g_strdup_printf ("unix:tmpdir=%s", g_get_tmp_dir ());
 
@@ -1068,7 +1068,7 @@ static void
 ephy_embed_shell_create_web_context (EphyEmbedShell *shell)
 {
   EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell);
-  g_autoptr(WebKitWebsiteDataManager) manager = NULL;
+  g_autoptr (WebKitWebsiteDataManager) manager = NULL;
 
   if (priv->mode == EPHY_EMBED_SHELL_MODE_INCOGNITO) {
     priv->web_context = webkit_web_context_new_ephemeral ();
@@ -1100,7 +1100,7 @@ download_started_cb (WebKitWebContext *web_context,
                      EphyEmbedShell   *shell)
 {
   EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell);
-  g_autoptr(EphyDownload) ephy_download = NULL;
+  g_autoptr (EphyDownload) ephy_download = NULL;
   gboolean ephy_download_set;
 
   /* Is download locked down? */
@@ -1362,7 +1362,7 @@ ephy_embed_shell_constructed (GObject *object)
   mode = ephy_embed_shell_get_mode (shell);
 
   /* These do not run the EmbedShell application instance, so make sure that
-     there is a web context and a user content manager for them. */
+   *  there is a web context and a user content manager for them. */
   if (mode == EPHY_EMBED_SHELL_MODE_TEST ||
       mode == EPHY_EMBED_SHELL_MODE_SEARCH_PROVIDER) {
     ephy_embed_shell_create_web_context (shell);
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c
index 0cea1428b..9957f5bc4 100644
--- a/embed/ephy-embed.c
+++ b/embed/ephy-embed.c
@@ -132,7 +132,8 @@ static GParamSpec *obj_properties[LAST_PROP];
  */
 
 static guint
-ephy_embed_statusbar_get_context_id (EphyEmbed *embed, const char  *context_description)
+ephy_embed_statusbar_get_context_id (EphyEmbed  *embed,
+                                     const char *context_description)
 {
   char *string;
   guint id;
@@ -155,7 +156,8 @@ ephy_embed_statusbar_get_context_id (EphyEmbed *embed, const char  *context_desc
 }
 
 static void
-ephy_embed_set_statusbar_label (EphyEmbed *embed, const char *label)
+ephy_embed_set_statusbar_label (EphyEmbed  *embed,
+                                const char *label)
 {
   nautilus_floating_bar_set_primary_label (NAUTILUS_FLOATING_BAR (embed->floating_bar), label);
 
@@ -167,7 +169,8 @@ ephy_embed_set_statusbar_label (EphyEmbed *embed, const char *label)
 }
 
 static void
-ephy_embed_statusbar_update (EphyEmbed *embed, const char *text)
+ephy_embed_statusbar_update (EphyEmbed  *embed,
+                             const char *text)
 {
   g_assert (EPHY_IS_EMBED (embed));
 
@@ -175,7 +178,9 @@ ephy_embed_statusbar_update (EphyEmbed *embed, const char *text)
 }
 
 static guint
-ephy_embed_statusbar_push (EphyEmbed *embed, guint context_id, const char *text)
+ephy_embed_statusbar_push (EphyEmbed  *embed,
+                           guint       context_id,
+                           const char *text)
 {
   EphyEmbedStatusbarMsg *msg;
 
@@ -198,7 +203,8 @@ ephy_embed_statusbar_push (EphyEmbed *embed, guint context_id, const char *text)
 /* End of code based on GTK+ GtkStatusbar. */
 
 static void
-ephy_embed_statusbar_pop (EphyEmbed *embed, guint context_id)
+ephy_embed_statusbar_pop (EphyEmbed *embed,
+                          guint      context_id)
 {
   EphyEmbedStatusbarMsg *msg;
   GSList *list;
@@ -223,7 +229,8 @@ ephy_embed_statusbar_pop (EphyEmbed *embed, guint context_id)
 }
 
 static void
-remove_from_destroy_list_cb (GtkWidget *widget, EphyEmbed *embed)
+remove_from_destroy_list_cb (GtkWidget *widget,
+                             EphyEmbed *embed)
 {
   GSList *list;
 
@@ -283,9 +290,9 @@ web_view_title_changed_cb (WebKitWebView *web_view,
 }
 
 static void
-load_changed_cb (WebKitWebView  *web_view,
-                 WebKitLoadEvent load_event,
-                 EphyEmbed      *embed)
+load_changed_cb (WebKitWebView   *web_view,
+                 WebKitLoadEvent  load_event,
+                 EphyEmbed       *embed)
 {
   switch (load_event) {
     case WEBKIT_LOAD_COMMITTED:
@@ -536,7 +543,7 @@ ephy_embed_attach_inspector_cb (WebKitWebInspector *inspector,
 
 static gboolean
 ephy_embed_close_inspector_cb (WebKitWebInspector *inspector,
-                                EphyEmbed          *embed)
+                               EphyEmbed          *embed)
 {
   embed->inspector_loaded = FALSE;
 
@@ -583,7 +590,9 @@ pop_statusbar_later_cb (gpointer data)
 }
 
 static void
-status_message_notify_cb (EphyWebView *view, GParamSpec *pspec, EphyEmbed *embed)
+status_message_notify_cb (EphyWebView *view,
+                          GParamSpec  *pspec,
+                          EphyEmbed   *embed)
 {
   const char *message;
 
@@ -599,7 +608,7 @@ status_message_notify_cb (EphyWebView *view, GParamSpec *pspec, EphyEmbed *embed
     ephy_embed_statusbar_push (embed, embed->tab_message_id, message);
   } else {
     /* A short timeout before hiding the statusbar ensures that while moving
-       over a series of links, the overlay widget doesn't flicker on and off. */
+     *  over a series of links, the overlay widget doesn't flicker on and off. */
     if (embed->pop_statusbar_later_source_id == 0) {
       embed->pop_statusbar_later_source_id = g_timeout_add (250, pop_statusbar_later_cb, embed);
       g_source_set_name_by_id (embed->pop_statusbar_later_source_id, "[epiphany] pop_statusbar_later_cb");
@@ -617,7 +626,9 @@ clear_progress_cb (EphyEmbed *embed)
 }
 
 static void
-progress_update (EphyWebView *view, GParamSpec *pspec, EphyEmbed *embed)
+progress_update (EphyWebView *view,
+                 GParamSpec  *pspec,
+                 EphyEmbed   *embed)
 {
   gdouble progress;
   gboolean loading;
@@ -698,7 +709,8 @@ ephy_embed_maybe_load_delayed_request (EphyEmbed *embed)
 }
 
 static void
-ephy_embed_restored_window_cb (EphyEmbedShell *shell, EphyEmbed *embed)
+ephy_embed_restored_window_cb (EphyEmbedShell *shell,
+                               EphyEmbed      *embed)
 {
   if (!gtk_widget_get_mapped (GTK_WIDGET (embed)))
     return;
@@ -707,7 +719,8 @@ ephy_embed_restored_window_cb (EphyEmbedShell *shell, EphyEmbed *embed)
 }
 
 static void
-ephy_embed_mapped_cb (GtkWidget *widget, gpointer data)
+ephy_embed_mapped_cb (GtkWidget *widget,
+                      gpointer   data)
 {
   ephy_embed_maybe_load_delayed_request ((EphyEmbed *)widget);
 }
@@ -911,7 +924,8 @@ ephy_embed_add_top_widget (EphyEmbed                *embed,
  * details.
  */
 void
-ephy_embed_remove_top_widget (EphyEmbed *embed, GtkWidget *widget)
+ephy_embed_remove_top_widget (EphyEmbed *embed,
+                              GtkWidget *widget)
 {
   if (g_slist_find (embed->destroy_on_transition_list, widget)) {
     GSList *list;
@@ -936,7 +950,9 @@ ephy_embed_remove_top_widget (EphyEmbed *embed, GtkWidget *widget)
  * is on is switched to.
  */
 void
-ephy_embed_set_delayed_load_request (EphyEmbed *embed, WebKitURIRequest *request, WebKitWebViewSessionState 
*state)
+ephy_embed_set_delayed_load_request (EphyEmbed                 *embed,
+                                     WebKitURIRequest          *request,
+                                     WebKitWebViewSessionState *state)
 {
   g_assert (EPHY_IS_EMBED (embed));
   g_assert (WEBKIT_IS_URI_REQUEST (request));
diff --git a/embed/ephy-encodings.c b/embed/ephy-encodings.c
index b44dd7d60..38a61b34d 100644
--- a/embed/ephy-encodings.c
+++ b/embed/ephy-encodings.c
@@ -54,8 +54,7 @@ struct {
   const char *code;
   EphyLanguageGroup groups;
 }
-encoding_entries [] =
-{
+encoding_entries [] = {
   { N_("Arabic (_IBM-864)"), "IBM864", LG_ARABIC },
   { N_("Arabic (ISO-_8859-6)"), "ISO-8859-6", LG_ARABIC },
   { N_("Arabic (_MacArabic)"), "x-mac-arabic", LG_ARABIC },
@@ -182,10 +181,10 @@ ephy_encodings_class_init (EphyEncodingsClass *klass)
 }
 
 static EphyEncoding *
-add_encoding (EphyEncodings    *encodings,
-              const char       *title,
-              const char       *code,
-              EphyLanguageGroup groups)
+add_encoding (EphyEncodings     *encodings,
+              const char        *title,
+              const char        *code,
+              EphyLanguageGroup  groups)
 {
   EphyEncoding *encoding;
 
@@ -244,8 +243,8 @@ get_encodings_foreach (gpointer key,
 }
 
 GList *
-ephy_encodings_get_encodings (EphyEncodings    *encodings,
-                              EphyLanguageGroup group_mask)
+ephy_encodings_get_encodings (EphyEncodings     *encodings,
+                              EphyLanguageGroup  group_mask)
 {
   GList *list = NULL;
   GetEncodingsData data;
diff --git a/embed/ephy-file-monitor.c b/embed/ephy-file-monitor.c
index 0c7f3f165..893b9048b 100644
--- a/embed/ephy-file-monitor.c
+++ b/embed/ephy-file-monitor.c
@@ -100,11 +100,11 @@ ephy_file_monitor_reload_cb (EphyFileMonitor *monitor)
 }
 
 static void
-ephy_file_monitor_changed_cb (GFileMonitor     *monitor,
-                              GFile            *file,
-                              GFile            *other_file,
-                              GFileMonitorEvent event_type,
-                              EphyFileMonitor  *file_monitor)
+ephy_file_monitor_changed_cb (GFileMonitor      *monitor,
+                              GFile             *file,
+                              GFile             *other_file,
+                              GFileMonitorEvent  event_type,
+                              EphyFileMonitor   *file_monitor)
 {
   gboolean should_reload;
 
diff --git a/embed/ephy-filters-manager.c b/embed/ephy-filters-manager.c
index a2094bdca..5fa0854bc 100644
--- a/embed/ephy-filters-manager.c
+++ b/embed/ephy-filters-manager.c
@@ -55,7 +55,7 @@ adblock_filter_file_is_valid (GFile *file)
 
   /* Now check if the local file is too old. */
   file_info = g_file_query_info (file,
-                                 G_FILE_ATTRIBUTE_TIME_MODIFIED","G_FILE_ATTRIBUTE_STANDARD_SIZE,
+                                 G_FILE_ATTRIBUTE_TIME_MODIFIED ","G_FILE_ATTRIBUTE_STANDARD_SIZE,
                                  G_FILE_QUERY_INFO_NONE,
                                  NULL,
                                  NULL);
@@ -90,7 +90,7 @@ adblock_filter_retrieve_data_new (EphyFiltersManager *manager,
                                   EphyDownload       *download,
                                   const char         *source_uri)
 {
-  AdblockFilterRetrieveData* data;
+  AdblockFilterRetrieveData *data;
   data = g_new (AdblockFilterRetrieveData, 1);
   data->manager = g_object_ref (manager);
   data->download = g_object_ref (download);
@@ -379,8 +379,8 @@ EphyFiltersManager *
 ephy_filters_manager_new (const char *filters_dir)
 {
   return EPHY_FILTERS_MANAGER (g_object_new (EPHY_TYPE_FILTERS_MANAGER,
-                                            "filters-dir", filters_dir,
-                                            NULL));
+                                             "filters-dir", filters_dir,
+                                             NULL));
 }
 
 const char *
diff --git a/embed/ephy-find-toolbar.c b/embed/ephy-find-toolbar.c
index d943dc8a3..c55208628 100644
--- a/embed/ephy-find-toolbar.c
+++ b/embed/ephy-find-toolbar.c
@@ -85,7 +85,8 @@ typedef enum {
 
 /* private functions */
 
-static void ephy_find_toolbar_set_web_view (EphyFindToolbar *toolbar, WebKitWebView *web_view);
+static void ephy_find_toolbar_set_web_view (EphyFindToolbar *toolbar,
+                                            WebKitWebView   *web_view);
 
 static void
 update_search_tag (EphyFindToolbar *toolbar)
@@ -153,8 +154,8 @@ clear_status (EphyFindToolbar *toolbar)
 }
 
 static void
-real_find (EphyFindToolbar  *toolbar,
-           EphyFindDirection direction)
+real_find (EphyFindToolbar   *toolbar,
+           EphyFindDirection  direction)
 {
   WebKitFindOptions options = WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE;
 
diff --git a/embed/ephy-view-source-handler.c b/embed/ephy-view-source-handler.c
index 0e57b2b73..d10867a07 100644
--- a/embed/ephy-view-source-handler.c
+++ b/embed/ephy-view-source-handler.c
@@ -97,8 +97,8 @@ finish_uri_scheme_request (EphyViewSourceRequest *request,
   }
 
   request->source_handler->outstanding_requests =
-      g_list_remove (request->source_handler->outstanding_requests,
-                     request);
+    g_list_remove (request->source_handler->outstanding_requests,
+                   request);
 
   ephy_view_source_request_free (request);
 }
@@ -243,7 +243,7 @@ ephy_view_source_request_start (EphyViewSourceRequest *request)
   WebKitWebView *web_view;
 
   request->source_handler->outstanding_requests =
-      g_list_prepend (request->source_handler->outstanding_requests, request);
+    g_list_prepend (request->source_handler->outstanding_requests, request);
 
   original_uri = webkit_uri_scheme_request_get_uri (request->scheme_request);
   soup_uri = soup_uri_new (original_uri);
diff --git a/embed/ephy-web-process-extension-proxy.c b/embed/ephy-web-process-extension-proxy.c
index a65450d81..866c2c110 100644
--- a/embed/ephy-web-process-extension-proxy.c
+++ b/embed/ephy-web-process-extension-proxy.c
@@ -114,7 +114,7 @@ web_process_extension_proxy_created_cb (GDBusProxy                   *proxy,
                                         GAsyncResult                 *result,
                                         EphyWebProcessExtensionProxy *web_process_extension)
 {
-  g_autoptr(GError) error = NULL;
+  g_autoptr (GError) error = NULL;
 
   web_process_extension->proxy = g_dbus_proxy_new_finish (result, &error);
   if (!web_process_extension->proxy) {
@@ -301,7 +301,7 @@ ephy_web_process_extension_proxy_password_query_usernames_response (EphyWebProce
                                                                     guint64                       frame_id)
 {
   GList *l;
-  g_auto(GVariantBuilder) builder = G_VARIANT_BUILDER_INIT (G_VARIANT_TYPE_STRING_ARRAY);
+  g_auto (GVariantBuilder) builder = G_VARIANT_BUILDER_INIT (G_VARIANT_TYPE_STRING_ARRAY);
 
   if (!web_process_extension->proxy)
     return;
@@ -330,7 +330,7 @@ ephy_web_process_extension_proxy_password_query_response (EphyWebProcessExtensio
 
   g_dbus_proxy_call (web_process_extension->proxy,
                      "PasswordQueryResponse",
-                     g_variant_new ("(ssit)", username ?: "", password ?: "", promise_id, frame_id),
+                     g_variant_new ("(ssit)", username ? : "", password ? : "", promise_id, frame_id),
                      G_DBUS_CALL_FLAGS_NONE,
                      -1,
                      web_process_extension->cancellable,
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 85dd1fefd..39f2efdde 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -332,7 +332,6 @@ static gboolean
 ephy_web_view_run_file_chooser (WebKitWebView            *web_view,
                                 WebKitFileChooserRequest *request)
 {
-
   GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (web_view));
   GtkFileChooser *dialog;
   gboolean allows_multiple_selection = webkit_file_chooser_request_get_select_multiple (request);
@@ -527,7 +526,8 @@ ephy_web_view_set_property (GObject      *object,
 }
 
 static gboolean
-ephy_web_view_key_press_event (GtkWidget *widget, GdkEventKey *event)
+ephy_web_view_key_press_event (GtkWidget   *widget,
+                               GdkEventKey *event)
 {
   EphyWebView *web_view = EPHY_WEB_VIEW (widget);
   gboolean key_handled = FALSE;
@@ -543,7 +543,8 @@ ephy_web_view_key_press_event (GtkWidget *widget, GdkEventKey *event)
 }
 
 static gboolean
-ephy_web_view_button_press_event (GtkWidget *widget, GdkEventButton *event)
+ephy_web_view_button_press_event (GtkWidget      *widget,
+                                  GdkEventButton *event)
 {
   /* These are the special cases WebkitWebView doesn't handle but we have an
    * interest in handling. */
@@ -648,9 +649,9 @@ save_auth_request_destroy (SaveRequestData *data,
 }
 
 static void
-info_bar_save_request_response_cb (GtkInfoBar          *info_bar,
-                                   gint                 response_id,
-                                   SaveRequestData     *data)
+info_bar_save_request_response_cb (GtkInfoBar      *info_bar,
+                                   gint             response_id,
+                                   SaveRequestData *data)
 {
   g_assert (data->callback);
   data->callback (response_id, data->callback_data);
@@ -658,19 +659,19 @@ info_bar_save_request_response_cb (GtkInfoBar          *info_bar,
 }
 
 void
-ephy_web_view_show_auth_form_save_request (EphyWebView                    *web_view,
-                                           const char                     *origin,
-                                           const char                     *username,
-                                           EphyPasswordSaveRequestCallback response_callback,
-                                           gpointer                        response_data,
-                                           GDestroyNotify                  response_destroy)
+ephy_web_view_show_auth_form_save_request (EphyWebView                     *web_view,
+                                           const char                      *origin,
+                                           const char                      *username,
+                                           EphyPasswordSaveRequestCallback  response_callback,
+                                           gpointer                         response_data,
+                                           GDestroyNotify                   response_destroy)
 {
   GtkWidget *info_bar;
   SaveRequestData *data;
 
   info_bar = ephy_web_view_create_form_auth_save_confirmation_info_bar (web_view, origin, username);
 
-  data = g_new(SaveRequestData, 1);
+  data = g_new (SaveRequestData, 1);
   data->callback = response_callback;
   data->callback_data = response_data;
   data->callback_destroy = response_destroy;
@@ -1156,12 +1157,12 @@ process_terminated_cb (EphyWebView                       *web_view,
                        gpointer                           user_data)
 {
   switch (reason) {
-  case WEBKIT_WEB_PROCESS_CRASHED:
-    g_warning (_("Web process crashed"));
-    break;
-  case WEBKIT_WEB_PROCESS_EXCEEDED_MEMORY_LIMIT:
-    g_warning (_("Web process terminated due to exceeding memory limit"));
-    break;
+    case WEBKIT_WEB_PROCESS_CRASHED:
+      g_warning (_("Web process crashed"));
+      break;
+    case WEBKIT_WEB_PROCESS_EXCEEDED_MEMORY_LIMIT:
+      g_warning (_("Web process terminated due to exceeding memory limit"));
+      break;
   }
 
   if (!ephy_embed_has_load_pending (EPHY_GET_EMBED_FROM_EPHY_WEB_VIEW (web_view))) {
@@ -1429,10 +1430,10 @@ new_window_cb (EphyWebView *view,
 }
 
 static gboolean
-decide_policy_cb (WebKitWebView           *web_view,
-                  WebKitPolicyDecision    *decision,
-                  WebKitPolicyDecisionType decision_type,
-                  gpointer                 user_data)
+decide_policy_cb (WebKitWebView            *web_view,
+                  WebKitPolicyDecision     *decision,
+                  WebKitPolicyDecisionType  decision_type,
+                  gpointer                  user_data)
 {
   WebKitResponsePolicyDecision *response_decision;
   WebKitURIResponse *response;
@@ -1450,7 +1451,7 @@ decide_policy_cb (WebKitWebView           *web_view,
   mime_type = webkit_uri_response_get_mime_type (response);
 
   /* If WebKit can't handle the mime type start the download
-     process */
+   *  process */
   if (webkit_response_policy_decision_is_mime_type_supported (response_decision))
     return FALSE;
 
@@ -1520,9 +1521,9 @@ permission_request_info_bar_destroyed_cb (PermissionRequestData *data,
 }
 
 static void
-decide_on_permission_request (GtkWidget               *info_bar,
-                              int                      response,
-                              PermissionRequestData   *data)
+decide_on_permission_request (GtkWidget             *info_bar,
+                              int                    response,
+                              PermissionRequestData *data)
 {
   const char *address;
   EphyPermissionType permission_type;
@@ -1595,29 +1596,29 @@ show_permission_request_info_bar (WebKitWebView           *web_view,
   bold_origin = g_markup_printf_escaped ("<b>%s</b>", origin);
 
   switch (permission_type) {
-  case EPHY_PERMISSION_TYPE_SHOW_NOTIFICATIONS:
-    /* Translators: Notification policy for a specific site. */
-    message = g_strdup_printf (_("The page at %s wants to show desktop notifications."),
-                               bold_origin);
-    break;
-  case EPHY_PERMISSION_TYPE_ACCESS_LOCATION:
-    /* Translators: Geolocation policy for a specific site. */
-    message = g_strdup_printf (_("The page at %s wants to know your location."),
-                               bold_origin);
-    break;
-  case EPHY_PERMISSION_TYPE_ACCESS_MICROPHONE:
-    /* Translators: Microphone policy for a specific site. */
-    message = g_strdup_printf (_("The page at %s wants to use your microphone."),
-                               bold_origin);
-    break;
-  case EPHY_PERMISSION_TYPE_ACCESS_WEBCAM:
-    /* Translators: Webcam policy for a specific site. */
-    message = g_strdup_printf (_("The page at %s wants to use your webcam."),
-                               bold_origin);
-    break;
-  case EPHY_PERMISSION_TYPE_SAVE_PASSWORD:
-  default:
-    g_assert_not_reached ();
+    case EPHY_PERMISSION_TYPE_SHOW_NOTIFICATIONS:
+      /* Translators: Notification policy for a specific site. */
+      message = g_strdup_printf (_("The page at %s wants to show desktop notifications."),
+                                 bold_origin);
+      break;
+    case EPHY_PERMISSION_TYPE_ACCESS_LOCATION:
+      /* Translators: Geolocation policy for a specific site. */
+      message = g_strdup_printf (_("The page at %s wants to know your location."),
+                                 bold_origin);
+      break;
+    case EPHY_PERMISSION_TYPE_ACCESS_MICROPHONE:
+      /* Translators: Microphone policy for a specific site. */
+      message = g_strdup_printf (_("The page at %s wants to use your microphone."),
+                                 bold_origin);
+      break;
+    case EPHY_PERMISSION_TYPE_ACCESS_WEBCAM:
+      /* Translators: Webcam policy for a specific site. */
+      message = g_strdup_printf (_("The page at %s wants to use your webcam."),
+                                 bold_origin);
+      break;
+    case EPHY_PERMISSION_TYPE_SAVE_PASSWORD:
+    default:
+      g_assert_not_reached ();
   }
 
   label = gtk_label_new (NULL);
@@ -1638,21 +1639,21 @@ show_permission_request_info_bar (WebKitWebView           *web_view,
   g_object_weak_ref (G_OBJECT (info_bar), (GWeakNotify)permission_request_info_bar_destroyed_cb, data);
 
   switch (permission_type) {
-  case EPHY_PERMISSION_TYPE_SHOW_NOTIFICATIONS:
-    track_info_bar (info_bar, &EPHY_WEB_VIEW (web_view)->notification_info_bar);
-    break;
-  case EPHY_PERMISSION_TYPE_ACCESS_LOCATION:
-    track_info_bar (info_bar, &EPHY_WEB_VIEW (web_view)->geolocation_info_bar);
-    break;
-  case EPHY_PERMISSION_TYPE_ACCESS_MICROPHONE:
-    track_info_bar (info_bar, &EPHY_WEB_VIEW (web_view)->microphone_info_bar);
-    break;
-  case EPHY_PERMISSION_TYPE_ACCESS_WEBCAM:
-    track_info_bar (info_bar, &EPHY_WEB_VIEW (web_view)->webcam_info_bar);
-    break;
-  case EPHY_PERMISSION_TYPE_SAVE_PASSWORD:
-  default:
-    g_assert_not_reached ();
+    case EPHY_PERMISSION_TYPE_SHOW_NOTIFICATIONS:
+      track_info_bar (info_bar, &EPHY_WEB_VIEW (web_view)->notification_info_bar);
+      break;
+    case EPHY_PERMISSION_TYPE_ACCESS_LOCATION:
+      track_info_bar (info_bar, &EPHY_WEB_VIEW (web_view)->geolocation_info_bar);
+      break;
+    case EPHY_PERMISSION_TYPE_ACCESS_MICROPHONE:
+      track_info_bar (info_bar, &EPHY_WEB_VIEW (web_view)->microphone_info_bar);
+      break;
+    case EPHY_PERMISSION_TYPE_ACCESS_WEBCAM:
+      track_info_bar (info_bar, &EPHY_WEB_VIEW (web_view)->webcam_info_bar);
+      break;
+    case EPHY_PERMISSION_TYPE_SAVE_PASSWORD:
+    default:
+      g_assert_not_reached ();
   }
 
   ephy_embed_add_top_widget (EPHY_GET_EMBED_FROM_EPHY_WEB_VIEW (web_view),
@@ -1701,24 +1702,24 @@ permission_request_cb (WebKitWebView           *web_view,
                                                         origin);
 
   switch (permission) {
-  case EPHY_PERMISSION_PERMIT:
-    webkit_permission_request_allow (decision);
-    goto out;
-  case EPHY_PERMISSION_DENY:
-    webkit_permission_request_deny (decision);
-    goto out;
-  case EPHY_PERMISSION_UNDECIDED:
-    /* Application mode implies being OK with notifications. */
-    if (permission_type == EPHY_PERMISSION_TYPE_SHOW_NOTIFICATIONS &&
-        ephy_embed_shell_get_mode (shell) == EPHY_EMBED_SHELL_MODE_APPLICATION) {
-      ephy_permissions_manager_set_permission (permissions_manager,
-                                               permission_type,
-                                               origin,
-                                               EPHY_PERMISSION_PERMIT);
+    case EPHY_PERMISSION_PERMIT:
       webkit_permission_request_allow (decision);
-    } else {
-      show_permission_request_info_bar (web_view, decision, permission_type);
-    }
+      goto out;
+    case EPHY_PERMISSION_DENY:
+      webkit_permission_request_deny (decision);
+      goto out;
+    case EPHY_PERMISSION_UNDECIDED:
+      /* Application mode implies being OK with notifications. */
+      if (permission_type == EPHY_PERMISSION_TYPE_SHOW_NOTIFICATIONS &&
+          ephy_embed_shell_get_mode (shell) == EPHY_EMBED_SHELL_MODE_APPLICATION) {
+        ephy_permissions_manager_set_permission (permissions_manager,
+                                                 permission_type,
+                                                 origin,
+                                                 EPHY_PERMISSION_PERMIT);
+        webkit_permission_request_allow (decision);
+      } else {
+        show_permission_request_info_bar (web_view, decision, permission_type);
+      }
   }
 
 out:
@@ -1874,7 +1875,7 @@ update_security_status_for_committed_load (EphyWebView *view,
 
   if (!soup_uri ||
       strcmp (soup_uri_get_scheme (soup_uri), EPHY_VIEW_SOURCE_SCHEME) == 0 ||
-      // Warning: we do not whitelist localhost because it could be redirected by DNS.
+      /* Warning: we do not whitelist localhost because it could be redirected by DNS. */
       g_strcmp0 (soup_uri_get_host (soup_uri), "127.0.0.1") == 0 ||
       g_strcmp0 (soup_uri_get_host (soup_uri), "::1") == 0 ||
       webkit_security_manager_uri_scheme_is_local (security_manager, soup_uri->scheme) ||
@@ -1895,9 +1896,9 @@ update_security_status_for_committed_load (EphyWebView *view,
 }
 
 static void
-load_changed_cb (WebKitWebView  *web_view,
-                 WebKitLoadEvent load_event,
-                 gpointer        user_data)
+load_changed_cb (WebKitWebView   *web_view,
+                 WebKitLoadEvent  load_event,
+                 gpointer         user_data)
 {
   EphyWebView *view = EPHY_WEB_VIEW (web_view);
   GObject *object = G_OBJECT (web_view);
@@ -2197,7 +2198,7 @@ format_network_error_page (const char  *uri,
   g_free (first_paragraph);
   /* Technical details when a site cannot be loaded due to a network error. */
   first_paragraph = g_strdup_printf (_("The precise error was: %s"),
-                                      formatted_reason);
+                                     formatted_reason);
   *message_details = g_strdup_printf ("<p>%s</p>", first_paragraph);
 
   /* The button on the network error page. DO NOT ADD MNEMONICS HERE. */
@@ -2307,20 +2308,20 @@ format_process_crash_error_page (const char  *uri,
 }
 
 static void
-format_tls_error_page (EphyWebView *view,
-                       const char  *origin,
-                       char       **page_title,
-                       char       **message_title,
-                       char       **message_body,
-                       char       **message_details,
-                       char       **button_label,
-                       char       **button_action,
-                       const char **button_accesskey,
-                       char       **hidden_button_label,
-                       char       **hidden_button_action,
-                       const char **hidden_button_accesskey,
-                       const char **icon_name,
-                       const char **style)
+format_tls_error_page (EphyWebView  *view,
+                       const char   *origin,
+                       char        **page_title,
+                       char        **message_title,
+                       char        **message_body,
+                       char        **message_details,
+                       char        **button_label,
+                       char        **button_action,
+                       const char  **button_accesskey,
+                       char        **hidden_button_label,
+                       char        **hidden_button_action,
+                       const char  **hidden_button_accesskey,
+                       const char  **icon_name,
+                       const char  **style)
 {
   char *formatted_origin;
   char *first_paragraph;
@@ -2351,7 +2352,7 @@ format_tls_error_page (EphyWebView *view,
   /* The hidden button on the invalid TLS certificate error page. Do not add mnemonics here. */
   *hidden_button_label = g_strdup (_("Accept Risk and Proceed"));
   *hidden_button_action = g_strdup_printf 
("window.webkit.messageHandlers.tlsErrorPage.postMessage(%"G_GUINT64_FORMAT ");",
-                                          webkit_web_view_get_page_id (WEBKIT_WEB_VIEW (view)));
+                                           webkit_web_view_get_page_id (WEBKIT_WEB_VIEW (view)));
   /* Mnemonic for the Accept Risk and Proceed button on the invalid TLS certificate error page. */
   *hidden_button_accesskey = C_("proceed-anyway-access-key", "P");
 
@@ -2363,21 +2364,21 @@ format_tls_error_page (EphyWebView *view,
 }
 
 static void
-format_unsafe_browsing_error_page (EphyWebView *view,
-                                   const char  *origin,
-                                   const char  *threat_type,
-                                   char       **page_title,
-                                   char       **message_title,
-                                   char       **message_body,
-                                   char       **message_details,
-                                   char       **button_label,
-                                   char       **button_action,
-                                   const char **button_accesskey,
-                                   char       **hidden_button_label,
-                                   char       **hidden_button_action,
-                                   const char **hidden_button_accesskey,
-                                   const char **icon_name,
-                                   const char **style)
+format_unsafe_browsing_error_page (EphyWebView  *view,
+                                   const char   *origin,
+                                   const char   *threat_type,
+                                   char        **page_title,
+                                   char        **message_title,
+                                   char        **message_body,
+                                   char        **message_details,
+                                   char        **button_label,
+                                   char        **button_action,
+                                   const char  **button_accesskey,
+                                   char        **hidden_button_label,
+                                   char        **hidden_button_action,
+                                   const char  **hidden_button_accesskey,
+                                   const char  **icon_name,
+                                   const char  **style)
 {
   char *formatted_origin;
   char *first_paragraph;
@@ -2401,7 +2402,7 @@ format_unsafe_browsing_error_page (EphyWebView *view,
                                           "including viruses and other malicious code "
                                           "and how to protect your computer at %s."),
                                         "<a href=\"https://www.stopbadware.org/\";>"
-                                          "www.stopbadware.org"
+                                        "www.stopbadware.org"
                                         "</a>");
   } else if (!g_strcmp0 (threat_type, GSB_THREAT_TYPE_SOCIAL_ENGINEERING)) {
     first_paragraph = g_strdup_printf (_("Attackers on %s may trick you into doing "
@@ -2412,10 +2413,10 @@ format_unsafe_browsing_error_page (EphyWebView *view,
     *message_details = g_strdup_printf (_("You can find out more about social engineering "
                                           "(phishing) at %s or from %s."),
                                         "<a href=\"https://support.google.com/webmasters/answer/6350487\";>"
-                                          "Social Engineering (Phishing and Deceptive Sites)"
+                                        "Social Engineering (Phishing and Deceptive Sites)"
                                         "</a>",
                                         "<a href=\"https://www.antiphishing.org/\";>"
-                                          "www.antiphishing.org"
+                                        "www.antiphishing.org"
                                         "</a>");
   } else {
     first_paragraph = g_strdup_printf (_("%s may contain harmful programs. Attackers might "
@@ -2425,7 +2426,7 @@ format_unsafe_browsing_error_page (EphyWebView *view,
                                        formatted_origin);
     *message_details = g_strdup_printf (_("You can learn more about unwanted software at %s."),
                                         "<a 
href=\"https://www.google.com/about/unwanted-software-policy.html\";>"
-                                          "Unwanted Software Policy"
+                                        "Unwanted Software Policy"
                                         "</a>");
   }
 
@@ -2477,8 +2478,8 @@ format_no_such_file_error_page (EphyWebView  *view,
   first_paragraph = g_strdup_printf (_("%s could not be found."),
                                      formatted_origin);
   second_paragraph = g_strdup_printf (_("Please check the file name for "
-                                       "capitalization or other typing errors. Also check if "
-                                       "it has been moved, renamed, or deleted."));
+                                        "capitalization or other typing errors. Also check if "
+                                        "it has been moved, renamed, or deleted."));
 
   *message_body = g_strdup_printf ("<p>%s</p><p>%s</p>", first_paragraph, second_paragraph);
 
@@ -2504,11 +2505,11 @@ format_no_such_file_error_page (EphyWebView  *view,
  *
  **/
 void
-ephy_web_view_load_error_page (EphyWebView         *view,
-                               const char          *uri,
-                               EphyWebViewErrorPage page,
-                               GError              *error,
-                               gpointer             user_data)
+ephy_web_view_load_error_page (EphyWebView          *view,
+                               const char           *uri,
+                               EphyWebViewErrorPage  page,
+                               GError               *error,
+                               gpointer              user_data)
 {
   GBytes *html_file;
   GString *html = g_string_new ("");
@@ -2682,11 +2683,11 @@ ephy_web_view_load_error_page (EphyWebView         *view,
 }
 
 static gboolean
-load_failed_cb (WebKitWebView  *web_view,
-                WebKitLoadEvent load_event,
-                const char     *uri,
-                GError         *error,
-                gpointer        user_data)
+load_failed_cb (WebKitWebView   *web_view,
+                WebKitLoadEvent  load_event,
+                const char      *uri,
+                GError          *error,
+                gpointer         user_data)
 {
   EphyWebView *view = EPHY_WEB_VIEW (web_view);
 
@@ -2696,7 +2697,6 @@ load_failed_cb (WebKitWebView  *web_view,
   if (error->domain != WEBKIT_NETWORK_ERROR &&
       error->domain != WEBKIT_POLICY_ERROR &&
       error->domain != WEBKIT_PLUGIN_ERROR) {
-
     if (view->address && g_str_has_prefix (view->address, "file:"))
       ephy_web_view_load_error_page (view, uri, EPHY_WEB_VIEW_ERROR_NO_SUCH_FILE, error, NULL);
     else
@@ -2720,8 +2720,7 @@ load_failed_cb (WebKitWebView  *web_view,
     case WEBKIT_PLUGIN_ERROR_CONNECTION_CANCELLED:
       ephy_web_view_load_error_page (view, uri, EPHY_WEB_VIEW_ERROR_PAGE_NETWORK_ERROR, error, NULL);
       return TRUE;
-    case WEBKIT_NETWORK_ERROR_CANCELLED:
-    {
+    case WEBKIT_NETWORK_ERROR_CANCELLED: {
       if (!view->typed_address) {
         const char *prev_uri;
 
@@ -2747,11 +2746,11 @@ load_failed_cb (WebKitWebView  *web_view,
 }
 
 static gboolean
-load_failed_with_tls_error_cb (WebKitWebView       *web_view,
-                               const char          *uri,
-                               GTlsCertificate     *certificate,
-                               GTlsCertificateFlags errors,
-                               gpointer             user_data)
+load_failed_with_tls_error_cb (WebKitWebView        *web_view,
+                               const char           *uri,
+                               GTlsCertificate      *certificate,
+                               GTlsCertificateFlags  errors,
+                               gpointer              user_data)
 {
   EphyWebView *view = EPHY_WEB_VIEW (web_view);
 
@@ -2768,9 +2767,9 @@ load_failed_with_tls_error_cb (WebKitWebView       *web_view,
 }
 
 static void
-mixed_content_detected_cb (WebKitWebView             *web_view,
-                           WebKitInsecureContentEvent event,
-                           gpointer                   user_data)
+mixed_content_detected_cb (WebKitWebView              *web_view,
+                           WebKitInsecureContentEvent  event,
+                           gpointer                    user_data)
 {
   EphyWebView *view = EPHY_WEB_VIEW (web_view);
 
@@ -2835,17 +2834,17 @@ static const char *
 enum_nick (GType enum_type,
            int   value)
 {
-    GEnumClass *enum_class;
-    const GEnumValue *enum_value;
-    const char *nick = NULL;
+  GEnumClass *enum_class;
+  const GEnumValue *enum_value;
+  const char *nick = NULL;
 
-    enum_class = g_type_class_ref (enum_type);
-    enum_value = g_enum_get_value (enum_class, value);
-    if (enum_value)
-        nick = enum_value->value_nick;
+  enum_class = g_type_class_ref (enum_type);
+  enum_value = g_enum_get_value (enum_class, value);
+  if (enum_value)
+    nick = enum_value->value_nick;
 
-    g_type_class_unref (enum_class);
-    return nick;
+  g_type_class_unref (enum_class);
+  return nick;
 }
 
 static void
@@ -2885,7 +2884,7 @@ authenticate_cb (WebKitWebView               *web_view,
                  gpointer                     user_data)
 {
   EphyWebView *ephy_web_view = EPHY_WEB_VIEW (web_view);
-  g_autoptr(WebKitCredential) credential = NULL;
+  g_autoptr (WebKitCredential) credential = NULL;
 
   credential = webkit_authentication_request_get_proposed_credential (request);
 
@@ -3291,8 +3290,8 @@ ephy_web_view_set_link_message (EphyWebView *view,
  * Sets @view's security-level property to @level.
  **/
 void
-ephy_web_view_set_security_level (EphyWebView      *view,
-                                  EphySecurityLevel level)
+ephy_web_view_set_security_level (EphyWebView       *view,
+                                  EphySecurityLevel  level)
 {
   g_assert (EPHY_IS_WEB_VIEW (view));
 
@@ -3403,10 +3402,10 @@ has_modified_forms_cb (WebKitWebView *view,
  * Return value: %TRUE if @view has user-modified forms
  **/
 void
-ephy_web_view_has_modified_forms (EphyWebView        *view,
-                                  GCancellable       *cancellable,
-                                  GAsyncReadyCallback callback,
-                                  gpointer            user_data)
+ephy_web_view_has_modified_forms (EphyWebView         *view,
+                                  GCancellable        *cancellable,
+                                  GAsyncReadyCallback  callback,
+                                  gpointer             user_data)
 {
   GTask *task;
 
@@ -3422,9 +3421,9 @@ ephy_web_view_has_modified_forms (EphyWebView        *view,
 }
 
 gboolean
-ephy_web_view_has_modified_forms_finish (EphyWebView  *view,
-                                         GAsyncResult *result,
-                                         GError      **error)
+ephy_web_view_has_modified_forms_finish (EphyWebView   *view,
+                                         GAsyncResult  *result,
+                                         GError       **error)
 {
   g_assert (g_task_is_valid (result, view));
 
@@ -3479,10 +3478,10 @@ get_best_web_app_icon_cb (WebKitWebView *view,
 }
 
 void
-ephy_web_view_get_best_web_app_icon (EphyWebView        *view,
-                                     GCancellable       *cancellable,
-                                     GAsyncReadyCallback callback,
-                                     gpointer            user_data)
+ephy_web_view_get_best_web_app_icon (EphyWebView         *view,
+                                     GCancellable        *cancellable,
+                                     GAsyncReadyCallback  callback,
+                                     gpointer             user_data)
 {
   WebKitWebView *wk_view;
   GTask *task;
@@ -3503,11 +3502,11 @@ ephy_web_view_get_best_web_app_icon (EphyWebView        *view,
 }
 
 gboolean
-ephy_web_view_get_best_web_app_icon_finish (EphyWebView  *view,
-                                            GAsyncResult *result,
-                                            char        **icon_uri,
-                                            GdkRGBA      *icon_color,
-                                            GError      **error)
+ephy_web_view_get_best_web_app_icon_finish (EphyWebView   *view,
+                                            GAsyncResult  *result,
+                                            char         **icon_uri,
+                                            GdkRGBA       *icon_color,
+                                            GError       **error)
 {
   GetBestWebAppIconAsyncData *data;
   GTask *task = G_TASK (result);
@@ -3556,10 +3555,10 @@ get_web_app_title_cb (WebKitWebView *view,
 }
 
 void
-ephy_web_view_get_web_app_title (EphyWebView        *view,
-                                 GCancellable       *cancellable,
-                                 GAsyncReadyCallback callback,
-                                 gpointer            user_data)
+ephy_web_view_get_web_app_title (EphyWebView         *view,
+                                 GCancellable        *cancellable,
+                                 GAsyncReadyCallback  callback,
+                                 gpointer             user_data)
 {
   GTask *task;
 
@@ -3575,9 +3574,9 @@ ephy_web_view_get_web_app_title (EphyWebView        *view,
 }
 
 char *
-ephy_web_view_get_web_app_title_finish (EphyWebView  *view,
-                                        GAsyncResult *result,
-                                        GError      **error)
+ephy_web_view_get_web_app_title_finish (EphyWebView   *view,
+                                        GAsyncResult  *result,
+                                        GError       **error)
 {
   g_assert (g_task_is_valid (result, view));
 
@@ -3619,7 +3618,8 @@ ephy_web_view_get_security_level (EphyWebView           *view,
 }
 
 static void
-ephy_web_view_print_failed (EphyWebView *view, GError *error)
+ephy_web_view_print_failed (EphyWebView *view,
+                            GError      *error)
 {
   GtkWidget *info_bar;
   GtkWidget *label;
@@ -3752,7 +3752,8 @@ ephy_web_view_save_main_resource_cb (GFile         *file,
  * Saves the currently loaded page of @view to @uri.
  **/
 void
-ephy_web_view_save (EphyWebView *view, const char *uri)
+ephy_web_view_save (EphyWebView *view,
+                    const char  *uri)
 {
   GFile *file;
 
@@ -3799,7 +3800,7 @@ ephy_web_view_load_homepage (EphyWebView *view)
 
   home = g_settings_get_string (EPHY_SETTINGS_MAIN, EPHY_PREFS_HOMEPAGE_URL);
   if (home == NULL || home[0] == '\0') {
-    ephy_web_view_load_new_tab_page(view);
+    ephy_web_view_load_new_tab_page (view);
   } else {
     ephy_web_view_freeze_history (view);
     ephy_web_view_set_visit_type (view, EPHY_PAGE_VISIT_HOMEPAGE);
@@ -3852,7 +3853,8 @@ ephy_web_view_get_visit_type (EphyWebView *view)
  * properly weighted in the history backend.
  **/
 void
-ephy_web_view_set_visit_type (EphyWebView *view, EphyHistoryPageVisitType visit_type)
+ephy_web_view_set_visit_type (EphyWebView              *view,
+                              EphyHistoryPageVisitType  visit_type)
 {
   g_assert (EPHY_IS_WEB_VIEW (view));
 
@@ -3889,8 +3891,8 @@ ephy_web_view_toggle_reader_mode (EphyWebView *view,
   }
 
   if (!ephy_web_view_is_reader_mode_available (view)) {
-   view->reader_active = FALSE;
-   return;
+    view->reader_active = FALSE;
+    return;
   }
 
   view->reader_url = g_strdup (ephy_web_view_get_address (view));
@@ -3904,22 +3906,22 @@ ephy_web_view_toggle_reader_mode (EphyWebView *view,
                             g_settings_get_enum (EPHY_SETTINGS_READER,
                                                  EPHY_PREFS_READER_COLOR_SCHEME));
   g_string_append_printf (html, "<style>%s</style>"
-                                "<title>%s</title>"
-                                "<body class='%s %s'>"
-                                "<article>"
-                                "<h2>"
-                                "%s"
-                                "</h2>"
-                                "<i>"
-                                "%s"
-                                "</i>"
-                                "<hr>",
-                                (gchar *)g_bytes_get_data (style_css, NULL),
-                                title,
-                                font_style,
-                                color_scheme,
-                                title,
-                                view->reader_byline != NULL ? view->reader_byline : "");
+                          "<title>%s</title>"
+                          "<body class='%s %s'>"
+                          "<article>"
+                          "<h2>"
+                          "%s"
+                          "</h2>"
+                          "<i>"
+                          "%s"
+                          "</i>"
+                          "<hr>",
+                          (gchar *)g_bytes_get_data (style_css, NULL),
+                          title,
+                          font_style,
+                          color_scheme,
+                          title,
+                          view->reader_byline != NULL ? view->reader_byline : "");
   g_string_append (html, view->reader_content);
   g_string_append (html, "</article>");
 
diff --git a/embed/web-process-extension/ephy-uri-tester.c b/embed/web-process-extension/ephy-uri-tester.c
index 21acc69ab..632aca648 100644
--- a/embed/web-process-extension/ephy-uri-tester.c
+++ b/embed/web-process-extension/ephy-uri-tester.c
@@ -139,8 +139,8 @@ ephy_uri_tester_is_matched_by_key (EphyUriTester *tester,
   char *uri;
   int len;
   int pos = 0;
-  g_autoptr(GList) regex_bl = NULL;
-  g_autoptr(GString) guri = NULL;
+  g_autoptr (GList) regex_bl = NULL;
+  g_autoptr (GString) guri = NULL;
   gboolean ret = FALSE;
   char sig[SIGNATURE_SIZE + 1];
   GHashTable *keys = tester->keys;
@@ -203,7 +203,8 @@ ephy_uri_tester_is_matched (EphyUriTester *tester,
 }
 
 static GString *
-ephy_uri_tester_fixup_regexp (const char *prefix, char *src)
+ephy_uri_tester_fixup_regexp (const char *prefix,
+                              char       *src)
 {
   GString *str;
 
@@ -218,26 +219,26 @@ ephy_uri_tester_fixup_regexp (const char *prefix, char *src)
   }
 
   /* NOTE: The '$' is used as separator for the rule options, so rule patterns
-     cannot ever contain them. If a rule needs to match it, it uses "%24".
-     Splitting the option is done in ephy_uri_tester_add_url_pattern().
-
-     The loop below always escapes square brackets. This way there is no chance
-     that they get interpreted as a character class, and it is NOT needed to
-     escape '-' because it's only special inside a character class. */
+   *  cannot ever contain them. If a rule needs to match it, it uses "%24".
+   *  Splitting the option is done in ephy_uri_tester_add_url_pattern().
+   *
+   *  The loop below always escapes square brackets. This way there is no chance
+   *  that they get interpreted as a character class, and it is NOT needed to
+   *  escape '-' because it's only special inside a character class. */
   do {
     switch (*src) {
       case '*':
         g_string_append (str, ".*");
         break;
       case '^':
-      /* Matches a separator character, defined as:
-       * "anything but a letter, a digit, or one of the following: _ - . %" */
+        /* Matches a separator character, defined as:
+         * "anything but a letter, a digit, or one of the following: _ - . %" */
         g_string_append (str, "([^a-zA-Z\\d]|[_\\-\\.%])");
         break;
       case '|':
-      /* If at the end of the pattern, the match is anchored at the end. In
-       * the middle of a pattern it matches a literal vertical bar and the
-       * character must be escaped. */
+        /* If at the end of the pattern, the match is anchored at the end. In
+         * the middle of a pattern it matches a literal vertical bar and the
+         * character must be escaped. */
         if (src[1] == '\0')
           g_string_append (str, "$");
         else
@@ -287,7 +288,7 @@ ephy_uri_tester_compile_regexp (EphyUriTester *tester,
   GHashTable *keys;
   GHashTable *optslist;
   GRegex *regex;
-  g_autoptr(GError) error = NULL;
+  g_autoptr (GError) error = NULL;
   char *patt;
   int len;
 
@@ -354,9 +355,9 @@ ephy_uri_tester_add_url_pattern (EphyUriTester *tester,
                                  char          *line,
                                  gboolean       whitelist)
 {
-  g_auto(GStrv) data;
+  g_auto (GStrv) data;
   char *patt;
-  g_autoptr(GString) format_patt = NULL;
+  g_autoptr (GString) format_patt = NULL;
   const char *opts;
 
   data = g_strsplit (line, "$", -1);
@@ -398,7 +399,8 @@ ephy_uri_tester_add_url_pattern (EphyUriTester *tester,
 }
 
 static inline void
-ephy_uri_tester_frame_add (EphyUriTester *tester, char *line)
+ephy_uri_tester_frame_add (EphyUriTester *tester,
+                           char          *line)
 {
   const char *separator = " , ";
 
@@ -418,7 +420,7 @@ ephy_uri_tester_frame_add_private (EphyUriTester *tester,
                                    const char    *line,
                                    const char    *sep)
 {
-  g_auto(GStrv) data;
+  g_auto (GStrv) data;
   data = g_strsplit (line, sep, 2);
 
   if (!(data[1] && *data[1])
@@ -429,7 +431,7 @@ ephy_uri_tester_frame_add_private (EphyUriTester *tester,
   }
 
   if (strchr (data[0], ',')) {
-    g_auto(GStrv) domains;
+    g_auto (GStrv) domains;
     int i;
 
     domains = g_strsplit (data[0], ",", -1);
@@ -521,10 +523,12 @@ ephy_uri_tester_adblock_loaded (EphyUriTester *tester)
 }
 
 static void
-file_parse_cb (GDataInputStream *stream, GAsyncResult *result, EphyUriTester *tester)
+file_parse_cb (GDataInputStream *stream,
+               GAsyncResult     *result,
+               EphyUriTester    *tester)
 {
   g_autofree char *line = NULL;
-  g_autoptr(GError) error = NULL;
+  g_autoptr (GError) error = NULL;
 
   line = g_data_input_stream_read_line_finish (stream, result, NULL, &error);
   if (!line) {
@@ -543,11 +547,13 @@ file_parse_cb (GDataInputStream *stream, GAsyncResult *result, EphyUriTester *te
 }
 
 static void
-file_read_cb (GFile *file, GAsyncResult *result, EphyUriTester *tester)
+file_read_cb (GFile         *file,
+              GAsyncResult  *result,
+              EphyUriTester *tester)
 {
-  g_autoptr(GFileInputStream) stream = NULL;
-  g_autoptr(GDataInputStream) data_stream = NULL;
-  g_autoptr(GError) error = NULL;
+  g_autoptr (GFileInputStream) stream = NULL;
+  g_autoptr (GDataInputStream) data_stream = NULL;
+  g_autoptr (GError) error = NULL;
 
   stream = g_file_read_finish (file, result, &error);
   if (!stream) {
@@ -578,11 +584,11 @@ ephy_uri_tester_is_uri_allowed (EphyUriTester *tester,
 }
 
 static void
-adblock_file_monitor_changed (GFileMonitor     *monitor,
-                              GFile            *file,
-                              GFile            *other_file,
-                              GFileMonitorEvent event_type,
-                              EphyUriTester    *tester)
+adblock_file_monitor_changed (GFileMonitor      *monitor,
+                              GFile             *file,
+                              GFile             *other_file,
+                              GFileMonitorEvent  event_type,
+                              EphyUriTester     *tester)
 {
   if (event_type != G_FILE_MONITOR_EVENT_RENAMED)
     return;
@@ -597,17 +603,17 @@ static void
 ephy_uri_tester_begin_loading_adblock_filters (EphyUriTester  *tester,
                                                GList         **monitors)
 {
-  g_auto(GStrv) filters;
+  g_auto (GStrv) filters;
 
   filters = g_settings_get_strv (EPHY_SETTINGS_WEB_PROCESS_EXTENSION_MAIN, EPHY_PREFS_ADBLOCK_FILTERS);
   tester->adblock_filters_to_load = g_strv_length (filters);
   for (guint i = 0; filters[i]; i++) {
-    g_autoptr(GFile) filter_file = NULL;
+    g_autoptr (GFile) filter_file = NULL;
 
     filter_file = ephy_uri_tester_get_adblock_filter_file (tester->adblock_data_dir, filters[i]);
     if (!g_file_query_exists (filter_file, NULL)) {
       GFileMonitor *monitor;
-      g_autoptr(GError) error = NULL;
+      g_autoptr (GError) error = NULL;
 
       monitor = g_file_monitor_file (filter_file, G_FILE_MONITOR_WATCH_MOVES, NULL, &error);
       if (monitor) {
@@ -809,7 +815,7 @@ ephy_uri_tester_enable_adblock_changed_cb (GSettings     *settings,
 void
 ephy_uri_tester_load (EphyUriTester *tester)
 {
-  g_autoptr(GTask) task = NULL;
+  g_autoptr (GTask) task = NULL;
   char **trash;
 
   g_assert (EPHY_IS_URI_TESTER (tester));
diff --git a/embed/web-process-extension/ephy-web-overview-model.c 
b/embed/web-process-extension/ephy-web-overview-model.c
index d36b4856d..b59756167 100644
--- a/embed/web-process-extension/ephy-web-overview-model.c
+++ b/embed/web-process-extension/ephy-web-overview-model.c
@@ -97,8 +97,8 @@ ephy_web_overview_model_urls_to_js_value (EphyWebOverviewModel *model,
   urls = g_ptr_array_new_with_free_func (g_object_unref);
   for (l = model->items; l; l = g_list_next (l)) {
     EphyWebOverviewModelItem *item = (EphyWebOverviewModelItem *)l->data;
-    g_autoptr(JSCValue) js_item = NULL;
-    g_autoptr(JSCValue) value = NULL;
+    g_autoptr (JSCValue) js_item = NULL;
+    g_autoptr (JSCValue) value = NULL;
 
     js_item = jsc_value_new_object (js_context, NULL, NULL);
     value = jsc_value_new_string (js_context, item->url);
@@ -119,12 +119,12 @@ ephy_web_overview_model_notify_urls_changed (EphyWebOverviewModel *model)
 {
   GHashTableIter iter;
   gpointer key;
-  g_autoptr(GPtrArray) urls = NULL;
+  g_autoptr (GPtrArray) urls = NULL;
 
   g_hash_table_iter_init (&iter, model->urls_listeners);
   while (g_hash_table_iter_next (&iter, &key, NULL)) {
-    g_autoptr(JSCValue) value = NULL;
-    g_autoptr(JSCValue) ret = NULL;
+    g_autoptr (JSCValue) value = NULL;
+    g_autoptr (JSCValue) ret = NULL;
 
     value = jsc_weak_value_get_value (JSC_WEAK_VALUE (key));
     if (value && jsc_value_is_function (value)) {
@@ -145,8 +145,8 @@ ephy_web_overview_model_notify_thumbnail_changed (EphyWebOverviewModel *model,
 
   g_hash_table_iter_init (&iter, model->thumbnail_listeners);
   while (g_hash_table_iter_next (&iter, &key, NULL)) {
-    g_autoptr(JSCValue) value = NULL;
-    g_autoptr(JSCValue) ret = NULL;
+    g_autoptr (JSCValue) value = NULL;
+    g_autoptr (JSCValue) ret = NULL;
 
     value = jsc_weak_value_get_value (JSC_WEAK_VALUE (key));
     if (value) {
@@ -166,8 +166,8 @@ ephy_web_overview_model_notify_title_changed (EphyWebOverviewModel *model,
 
   g_hash_table_iter_init (&iter, model->title_listeners);
   while (g_hash_table_iter_next (&iter, &key, NULL)) {
-    g_autoptr(JSCValue) value = NULL;
-    g_autoptr(JSCValue) ret = NULL;
+    g_autoptr (JSCValue) value = NULL;
+    g_autoptr (JSCValue) ret = NULL;
 
     value = jsc_weak_value_get_value (JSC_WEAK_VALUE (key));
     if (value) {
diff --git a/embed/web-process-extension/ephy-web-process-extension-main.c 
b/embed/web-process-extension/ephy-web-process-extension-main.c
index 38857ab83..bfdf4bbf8 100644
--- a/embed/web-process-extension/ephy-web-process-extension-main.c
+++ b/embed/web-process-extension/ephy-web-process-extension-main.c
@@ -40,7 +40,7 @@ webkit_web_extension_initialize_with_user_data (WebKitWebExtension *webkit_exten
   const char *adblock_data_dir;
   gboolean private_profile;
   gboolean browser_mode;
-  g_autoptr(GError) error = NULL;
+  g_autoptr (GError) error = NULL;
 
   g_variant_get (user_data, "(&sm&sm&s&sbb)", &guid, &server_address, &profile_dir, &adblock_data_dir, 
&private_profile, &browser_mode);
 
diff --git a/embed/web-process-extension/ephy-web-process-extension.c 
b/embed/web-process-extension/ephy-web-process-extension.c
index 039a028bd..d44ba89da 100644
--- a/embed/web-process-extension/ephy-web-process-extension.c
+++ b/embed/web-process-extension/ephy-web-process-extension.c
@@ -108,9 +108,9 @@ log_to_js_console (EphyWebProcessExtension *extension,
                    const char              *str,
                    ...)
 {
-  g_autoptr(JSCContext) js_context = NULL;
-  g_autoptr(JSCValue) js_console = NULL;
-  g_autoptr(JSCValue) js_result = NULL;
+  g_autoptr (JSCContext) js_context = NULL;
+  g_autoptr (JSCValue) js_console = NULL;
+  g_autoptr (JSCValue) js_result = NULL;
   g_autofree char *expanded_str = NULL;
   WebKitFrame *frame;
   va_list args;
@@ -181,10 +181,10 @@ should_use_adblocker (const char              *request_uri,
 }
 
 static gboolean
-web_page_send_request (WebKitWebPage            *web_page,
-                       WebKitURIRequest         *request,
-                       WebKitURIResponse        *redirected_response,
-                       EphyWebProcessExtension  *extension)
+web_page_send_request (WebKitWebPage           *web_page,
+                       WebKitURIRequest        *request,
+                       WebKitURIResponse       *redirected_response,
+                       EphyWebProcessExtension *extension)
 {
   const char *request_uri;
   const char *redirected_response_uri;
@@ -226,10 +226,10 @@ web_page_will_submit_form (WebKitWebPage            *web_page,
 {
   EphyWebProcessExtension *extension;
   gboolean form_submit_handled;
-  g_autoptr(JSCContext) js_context = NULL;
-  g_autoptr(JSCValue) js_ephy = NULL;
-  g_autoptr(JSCValue) js_form = NULL;
-  g_autoptr(JSCValue) js_result = NULL;
+  g_autoptr (JSCContext) js_context = NULL;
+  g_autoptr (JSCValue) js_ephy = NULL;
+  g_autoptr (JSCValue) js_form = NULL;
+  g_autoptr (JSCValue) js_result = NULL;
 
   form_submit_handled =
     GPOINTER_TO_INT (g_object_get_data (G_OBJECT (dom_form),
@@ -294,11 +294,11 @@ web_page_form_controls_associated (WebKitWebPage           *web_page,
                                    WebKitFrame             *frame,
                                    EphyWebProcessExtension *extension)
 {
-  g_autoptr(GPtrArray) form_controls = NULL;
-  g_autoptr(JSCContext) js_context = NULL;
-  g_autoptr(JSCValue) js_ephy = NULL;
-  g_autoptr(JSCValue) js_serializer = NULL;
-  g_autoptr(JSCValue) js_result = NULL;
+  g_autoptr (GPtrArray) form_controls = NULL;
+  g_autoptr (JSCContext) js_context = NULL;
+  g_autoptr (JSCValue) js_ephy = NULL;
+  g_autoptr (JSCValue) js_serializer = NULL;
+  g_autoptr (JSCValue) js_result = NULL;
   guint i;
 
   js_context = webkit_frame_get_js_context_for_script_world (frame, extension->script_world);
@@ -340,8 +340,8 @@ web_page_context_menu (WebKitWebPage          *web_page,
   g_autofree char *string = NULL;
   GVariantBuilder builder;
   WebKitFrame *frame;
-  g_autoptr(JSCContext) js_context = NULL;
-  g_autoptr(JSCValue) js_value = NULL;
+  g_autoptr (JSCContext) js_context = NULL;
+  g_autoptr (JSCValue) js_value = NULL;
 
   extension = ephy_web_process_extension_get ();
   /* FIXME: this is wrong, see https://gitlab.gnome.org/GNOME/epiphany/issues/442
@@ -369,7 +369,7 @@ static void
 ephy_web_process_extension_emit_page_created (EphyWebProcessExtension *extension,
                                               guint64                  page_id)
 {
-  g_autoptr(GError) error = NULL;
+  g_autoptr (GError) error = NULL;
 
   g_dbus_connection_emit_signal (extension->dbus_connection,
                                  NULL,
@@ -415,7 +415,7 @@ ephy_web_process_extension_page_created_cb (EphyWebProcessExtension *extension,
                                             WebKitWebPage           *web_page)
 {
   guint64 page_id;
-  g_autoptr(JSCContext) js_context = NULL;
+  g_autoptr (JSCContext) js_context = NULL;
 
   /* Enforce the creation of the script world global context in the main frame */
   js_context = webkit_frame_get_js_context_for_script_world (webkit_web_page_get_main_frame (web_page), 
extension->script_world);
@@ -445,8 +445,8 @@ get_password_manager (EphyWebProcessExtension *self,
                       guint64                  frame_id)
 {
   WebKitFrame *frame;
-  g_autoptr(JSCContext) js_context = NULL;
-  g_autoptr(JSCValue) js_ephy = NULL;
+  g_autoptr (JSCContext) js_context = NULL;
+  g_autoptr (JSCValue) js_ephy = NULL;
 
   frame = g_hash_table_lookup (self->frames_map, GINT_TO_POINTER (frame_id));
   if (!frame)
@@ -476,7 +476,7 @@ handle_method_call (GDBusConnection       *connection,
   if (g_strcmp0 (method_name, "HistorySetURLs") == 0) {
     if (extension->overview_model) {
       GVariantIter iter;
-      g_autoptr(GVariant) array = NULL;
+      g_autoptr (GVariant) array = NULL;
       const char *url;
       const char *title;
       GList *items = NULL;
@@ -530,8 +530,8 @@ handle_method_call (GDBusConnection       *connection,
     g_dbus_method_invocation_return_value (invocation, NULL);
   } else if (g_strcmp0 (method_name, "PasswordQueryUsernamesResponse") == 0) {
     g_autofree const char **users;
-    g_autoptr(JSCValue) ret = NULL;
-    g_autoptr(JSCValue) password_manager = NULL;
+    g_autoptr (JSCValue) ret = NULL;
+    g_autoptr (JSCValue) password_manager = NULL;
     gint32 promise_id;
     guint64 frame_id;
 
@@ -548,8 +548,8 @@ handle_method_call (GDBusConnection       *connection,
     const char *password;
     gint32 promise_id;
     guint64 frame_id;
-    g_autoptr(JSCValue) ret = NULL;
-    g_autoptr(JSCValue) password_manager = NULL;
+    g_autoptr (JSCValue) ret = NULL;
+    g_autoptr (JSCValue) password_manager = NULL;
 
     g_variant_get (parameters, "(&s&sit)", &username, &password, &promise_id, &frame_id);
     password_manager = get_password_manager (extension, frame_id);
@@ -568,7 +568,9 @@ static const GDBusInterfaceVTable interface_vtable = {
 };
 
 static void
-drop_frame_weak_ref (gpointer key, gpointer value, gpointer extension)
+drop_frame_weak_ref (gpointer key,
+                     gpointer value,
+                     gpointer extension)
 {
   g_object_weak_unref (G_OBJECT (value), (GWeakNotify)frame_destroyed_notify, extension);
 }
@@ -632,9 +634,9 @@ dbus_connection_created_cb (GObject                 *source_object,
                             EphyWebProcessExtension *extension)
 {
   static GDBusNodeInfo *introspection_data = NULL;
-  g_autoptr(GDBusConnection) connection = NULL;
+  g_autoptr (GDBusConnection) connection = NULL;
   guint registration_id;
-  g_autoptr(GError) error = NULL;
+  g_autoptr (GError) error = NULL;
 
   if (!introspection_data)
     introspection_data = g_dbus_node_info_new_for_xml (introspection_xml, NULL);
@@ -723,8 +725,8 @@ static void
 js_exception_handler (JSCContext   *context,
                       JSCException *exception)
 {
-  g_autoptr(JSCValue) js_console = NULL;
-  g_autoptr(JSCValue) js_result = NULL;
+  g_autoptr (JSCValue) js_console = NULL;
+  g_autoptr (JSCValue) js_result = NULL;
   g_autofree char *report = NULL;
 
   js_console = jsc_context_get_value (context, "console");
@@ -736,18 +738,18 @@ js_exception_handler (JSCContext   *context,
 }
 
 static void
-window_object_cleared_cb (WebKitScriptWorld        *world,
-                          WebKitWebPage            *page,
-                          WebKitFrame              *frame,
-                          EphyWebProcessExtension  *extension)
-{
-  g_autoptr(JSCContext) js_context = NULL;
-  g_autoptr(GBytes) bytes = NULL;
-  const char* data;
+window_object_cleared_cb (WebKitScriptWorld       *world,
+                          WebKitWebPage           *page,
+                          WebKitFrame             *frame,
+                          EphyWebProcessExtension *extension)
+{
+  g_autoptr (JSCContext) js_context = NULL;
+  g_autoptr (GBytes) bytes = NULL;
+  const char *data;
   gsize data_size;
-  g_autoptr(JSCValue) js_ephy = NULL;
-  g_autoptr(JSCValue) js_function = NULL;
-  g_autoptr(JSCValue) result = NULL;
+  g_autoptr (JSCValue) js_ephy = NULL;
+  g_autoptr (JSCValue) js_function = NULL;
+  g_autoptr (JSCValue) result = NULL;
 
   js_context = webkit_frame_get_js_context_for_script_world (frame, world);
   jsc_context_push_exception_handler (js_context, (JSCExceptionHandler)js_exception_handler, NULL, NULL);
@@ -777,9 +779,9 @@ window_object_cleared_cb (WebKitScriptWorld        *world,
   g_clear_object (&js_function);
 
   if (g_strcmp0 (webkit_web_page_get_uri (page), "ephy-about:overview") == 0) {
-    g_autoptr(JSCValue) js_overview = NULL;
-    g_autoptr(JSCValue) js_overview_ctor = NULL;
-    g_autoptr(JSCValue) jsc_overview_model = NULL;
+    g_autoptr (JSCValue) js_overview = NULL;
+    g_autoptr (JSCValue) js_overview_ctor = NULL;
+    g_autoptr (JSCValue) jsc_overview_model = NULL;
 
     bytes = g_resources_lookup_data ("/org/gnome/epiphany-web-process-extension/js/overview.js", 
G_RESOURCE_LOOKUP_FLAGS_NONE, NULL);
     data = g_bytes_get_data (bytes, &data_size);
@@ -802,11 +804,11 @@ window_object_cleared_cb (WebKitScriptWorld        *world,
                                                  js_ephy);
 
   if (!extension->is_private_profile) {
-    g_autoptr(JSCValue) js_password_manager_ctor = jsc_value_object_get_property (js_ephy, 
"PasswordManager");
-    g_autoptr(JSCValue) js_password_manager = jsc_value_constructor_call (js_password_manager_ctor,
-                                                                          G_TYPE_UINT64, 
webkit_web_page_get_id (page),
-                                                                          G_TYPE_UINT64, webkit_frame_get_id 
(frame),
-                                                                          G_TYPE_NONE);
+    g_autoptr (JSCValue) js_password_manager_ctor = jsc_value_object_get_property (js_ephy, 
"PasswordManager");
+    g_autoptr (JSCValue) js_password_manager = jsc_value_constructor_call (js_password_manager_ctor,
+                                                                           G_TYPE_UINT64, 
webkit_web_page_get_id (page),
+                                                                           G_TYPE_UINT64, 
webkit_frame_get_id (frame),
+                                                                           G_TYPE_NONE);
     jsc_value_object_set_property (js_ephy, "passwordManager", js_password_manager);
 
     js_function = jsc_value_new_function (js_context,
@@ -851,7 +853,7 @@ ephy_web_process_extension_initialize (EphyWebProcessExtension *extension,
                                        gboolean                 is_private_profile,
                                        gboolean                 is_browser_mode)
 {
-  g_autoptr(GDBusAuthObserver) observer = NULL;
+  g_autoptr (GDBusAuthObserver) observer = NULL;
 
   g_assert (EPHY_IS_WEB_PROCESS_EXTENSION (extension));
 
diff --git a/lib/ephy-debug.c b/lib/ephy-debug.c
index 43ae764cc..35299f3e5 100644
--- a/lib/ephy-debug.c
+++ b/lib/ephy-debug.c
@@ -69,10 +69,10 @@ static char **ephy_log_modules;
 static gboolean ephy_log_all_modules;
 
 static void
-log_module (const gchar   *log_domain,
-            GLogLevelFlags log_level,
-            const char    *message,
-            gpointer       user_data)
+log_module (const gchar    *log_domain,
+            GLogLevelFlags  log_level,
+            const char     *message,
+            gpointer        user_data)
 {
   gboolean should_log = ephy_log_all_modules;
 
@@ -97,10 +97,10 @@ log_module (const gchar   *log_domain,
 #define MAX_DEPTH 200
 
 static void
-trap_handler (const char    *log_domain,
-              GLogLevelFlags log_level,
-              const char    *message,
-              gpointer       user_data)
+trap_handler (const char     *log_domain,
+              GLogLevelFlags  log_level,
+              const char     *message,
+              gpointer        user_data)
 {
   g_log_default_handler (log_domain, log_level, message, user_data);
 
@@ -142,7 +142,8 @@ trap_handler (const char    *log_domain,
 }
 
 static EphyProfiler *
-ephy_profiler_new (const char *name, const char *module)
+ephy_profiler_new (const char *name,
+                   const char *module)
 {
   EphyProfiler *profiler;
 
@@ -212,7 +213,8 @@ ephy_profiler_free (EphyProfiler *profiler)
  * Starts a new profiler on @module naming it @name.
  **/
 void
-ephy_profiler_start (const char *name, const char *module)
+ephy_profiler_start (const char *name,
+                     const char *module)
 {
   EphyProfiler *profiler;
 
diff --git a/lib/ephy-dnd.c b/lib/ephy-dnd.c
index dcfca9fcd..366565093 100644
--- a/lib/ephy-dnd.c
+++ b/lib/ephy-dnd.c
@@ -31,7 +31,9 @@
  * GMC also fails to do this as well.
  */
 static void
-add_one_netscape_url (const char *url, const char *title, gpointer data)
+add_one_netscape_url (const char *url,
+                      const char *title,
+                      gpointer    data)
 {
   GString *result;
 
@@ -46,7 +48,9 @@ add_one_netscape_url (const char *url, const char *title, gpointer data)
 }
 
 static void
-add_one_uri (const char *uri, const char *title, gpointer data)
+add_one_uri (const char *uri,
+             const char *title,
+             gpointer    data)
 {
   GString *result;
 
@@ -57,7 +61,9 @@ add_one_uri (const char *uri, const char *title, gpointer data)
 }
 
 static void
-add_one_topic (const char *uri, const char *title, gpointer data)
+add_one_topic (const char *uri,
+               const char *title,
+               gpointer    data)
 {
   GString *result;
 
@@ -68,12 +74,12 @@ add_one_topic (const char *uri, const char *title, gpointer data)
 }
 
 gboolean
-ephy_dnd_drag_data_get (GtkWidget                       *widget,
-                        GdkDragContext                  *context,
-                        GtkSelectionData                *selection_data,
-                        guint32                          time,
-                        gpointer                         container_context,
-                        EphyDragEachSelectedItemIterator each_selected_item_iterator)
+ephy_dnd_drag_data_get (GtkWidget                        *widget,
+                        GdkDragContext                   *context,
+                        GtkSelectionData                 *selection_data,
+                        guint32                           time,
+                        gpointer                          container_context,
+                        EphyDragEachSelectedItemIterator  each_selected_item_iterator)
 {
   GString *result = NULL;
   GdkAtom target;
diff --git a/lib/ephy-favicon-helpers.c b/lib/ephy-favicon-helpers.c
index e2b31775d..148ac1cf6 100644
--- a/lib/ephy-favicon-helpers.c
+++ b/lib/ephy-favicon-helpers.c
@@ -25,7 +25,9 @@
 #include <glib.h>
 
 GdkPixbuf *
-ephy_pixbuf_get_from_surface_scaled (cairo_surface_t *surface, int width, int height)
+ephy_pixbuf_get_from_surface_scaled (cairo_surface_t *surface,
+                                     int              width,
+                                     int              height)
 {
   GdkPixbuf *pixbuf;
   int favicon_width;
diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c
index f1ea7437a..ead8cbb5d 100644
--- a/lib/ephy-file-helpers.c
+++ b/lib/ephy-file-helpers.c
@@ -299,8 +299,8 @@ char *
 ephy_default_profile_dir (void)
 {
   return profile_dir_type == EPHY_PROFILE_DIR_TEST ?
-    g_strdup (ephy_profile_dir ()) :
-    g_build_filename (g_get_user_data_dir (), "epiphany", NULL);
+         g_strdup (ephy_profile_dir ()) :
+         g_build_filename (g_get_user_data_dir (), "epiphany", NULL);
 }
 
 /**
@@ -314,8 +314,8 @@ char *
 ephy_default_cache_dir (void)
 {
   return profile_dir_type == EPHY_PROFILE_DIR_TEST ?
-    g_build_filename (ephy_profile_dir (), "cache", NULL) :
-    g_build_filename (g_get_user_cache_dir (), "epiphany", NULL);
+         g_build_filename (ephy_profile_dir (), "cache", NULL) :
+         g_build_filename (g_get_user_cache_dir (), "epiphany", NULL);
 }
 
 /**
@@ -329,8 +329,8 @@ char *
 ephy_default_config_dir (void)
 {
   return profile_dir_type == EPHY_PROFILE_DIR_TEST ?
-    g_build_filename (ephy_profile_dir (), "config", NULL) :
-    g_build_filename (g_get_user_config_dir (), "epiphany", NULL);
+         g_build_filename (ephy_profile_dir (), "config", NULL) :
+         g_build_filename (g_get_user_config_dir (), "epiphany", NULL);
 }
 
 /**
@@ -345,9 +345,9 @@ ephy_default_config_dir (void)
  * Returns: %FALSE if the profile dir couldn't be created or accessed
  **/
 gboolean
-ephy_file_helpers_init (const char          *profile_dir,
-                        EphyFileHelpersFlags flags,
-                        GError             **error)
+ephy_file_helpers_init (const char            *profile_dir,
+                        EphyFileHelpersFlags   flags,
+                        GError               **error)
 {
   gboolean ret = TRUE;
   gboolean private_profile;
@@ -502,8 +502,8 @@ ephy_file_helpers_shutdown (void)
  * Returns: %TRUE if @dir exists and is a directory
  **/
 gboolean
-ephy_ensure_dir_exists (const char *dir,
-                        GError    **error)
+ephy_ensure_dir_exists (const char  *dir,
+                        GError     **error)
 {
   if (g_file_test (dir, G_FILE_TEST_EXISTS) &&
       !g_file_test (dir, G_FILE_TEST_IS_DIR)) {
@@ -540,12 +540,12 @@ ephy_ensure_dir_exists (const char *dir,
 }
 
 static gboolean
-launch_application (GAppInfo  *app,
-                    GList     *files,
-                    guint32    user_time)
+launch_application (GAppInfo *app,
+                    GList    *files,
+                    guint32   user_time)
 {
-  g_autoptr(GdkAppLaunchContext) context = NULL;
-  g_autoptr(GError) error = NULL;
+  g_autoptr (GdkAppLaunchContext) context = NULL;
+  g_autoptr (GError) error = NULL;
   GdkDisplay *display;
   GdkScreen *screen;
   gboolean res;
@@ -584,7 +584,7 @@ ephy_file_launch_desktop_file (const char                   *filename,
                                guint32                       user_time,
                                EphyFileHelpersNotFlatpakTag  tag)
 {
-  g_autoptr(GDesktopAppInfo) app = NULL;
+  g_autoptr (GDesktopAppInfo) app = NULL;
 
   /* This is impossible to implement inside flatpak. Higher layers must
    * ensure we don't get here.
@@ -603,7 +603,7 @@ launch_via_uri_handler (GFile *file)
   const char *uri;
   GdkDisplay *display;
   GdkAppLaunchContext *context;
-  g_autoptr(GError) error = NULL;
+  g_autoptr (GError) error = NULL;
 
   display = gdk_display_get_default ();
   context = gdk_display_get_app_launch_context (display);
@@ -635,8 +635,8 @@ ephy_file_launch_handler (GFile   *file,
 {
   GAppInfo *app = NULL;
   gboolean ret = FALSE;
-  g_autoptr(GList) list = NULL;
-  g_autoptr(GError) error = NULL;
+  g_autoptr (GList) list = NULL;
+  g_autoptr (GError) error = NULL;
 
   g_assert (file != NULL);
 
@@ -667,9 +667,9 @@ open_in_default_handler (const char                   *uri,
                          GdkScreen                    *screen,
                          EphyFileHelpersNotFlatpakTag  tag)
 {
-  g_autoptr(GdkAppLaunchContext) context = NULL;
-  g_autoptr(GAppInfo) appinfo = NULL;
-  g_autoptr(GError) error = NULL;
+  g_autoptr (GdkAppLaunchContext) context = NULL;
+  g_autoptr (GAppInfo) appinfo = NULL;
+  g_autoptr (GError) error = NULL;
   GList uris;
 
   /* This is impossible to implement inside flatpak. Higher layers must
@@ -735,7 +735,8 @@ ephy_file_browse_to (GFile                        *file,
  * Returns: %TRUE if delete succeeded
  **/
 gboolean
-ephy_file_delete_dir_recursively (const char *directory, GError **error)
+ephy_file_delete_dir_recursively (const char  *directory,
+                                  GError     **error)
 {
   GDir *dir;
   const char *file_name;
diff --git a/lib/ephy-flatpak-utils.c b/lib/ephy-flatpak-utils.c
index e9329ae5b..d6e401502 100644
--- a/lib/ephy-flatpak-utils.c
+++ b/lib/ephy-flatpak-utils.c
@@ -188,7 +188,7 @@ portal_proxy_created_cb (GObject      *source,
                                        "OpenFile",
                                        g_variant_new ("(s@h@a{sv})",
                                                       "",
-                                                      g_variant_new("h", 0),
+                                                      g_variant_new ("h", 0),
                                                       g_variant_builder_end (&builder)),
                                        G_DBUS_CALL_FLAGS_NONE,
                                        -1,
diff --git a/lib/ephy-langs.c b/lib/ephy-langs.c
index d68db8274..3883de5e9 100644
--- a/lib/ephy-langs.c
+++ b/lib/ephy-langs.c
@@ -177,7 +177,7 @@ ephy_langs_normalize_locale (const char *locale)
 char *
 ephy_langs_language_for_locale (const char *locale)
 {
-  g_autoptr(GString) string = g_string_new (locale);
+  g_autoptr (GString) string = g_string_new (locale);
 
   /* Before calling gnome_get_language_from_locale() we have to convert
    * from web locales (e.g. es-ES) to UNIX (e.g. es_ES.UTF-8).
diff --git a/lib/ephy-notification-container.c b/lib/ephy-notification-container.c
index 838aaed55..d55d42d4b 100644
--- a/lib/ephy-notification-container.c
+++ b/lib/ephy-notification-container.c
@@ -22,9 +22,9 @@
 #include "ephy-notification-container.h"
 
 struct _EphyNotificationContainer {
-  GtkRevealer  parent_instance;
+  GtkRevealer parent_instance;
 
-  GtkWidget   *grid;
+  GtkWidget *grid;
 };
 
 struct _EphyNotificationContainerClass {
diff --git a/lib/ephy-notification.c b/lib/ephy-notification.c
index b812014e8..789b640f8 100644
--- a/lib/ephy-notification.c
+++ b/lib/ephy-notification.c
@@ -24,7 +24,7 @@
 #include "ephy-notification-container.h"
 
 struct _EphyNotification {
-  GtkFrame   parent_instance;
+  GtkFrame parent_instance;
 
   GtkWidget *grid;
 
@@ -32,8 +32,8 @@ struct _EphyNotification {
   GtkWidget *body;
   GtkWidget *close_button;
 
-  char      *head_msg;
-  char      *body_msg;
+  char *head_msg;
+  char *body_msg;
 };
 
 struct _EphyNotificationClass {
diff --git a/lib/ephy-permissions-manager.c b/lib/ephy-permissions-manager.c
index 153aef800..02fa436e4 100644
--- a/lib/ephy-permissions-manager.c
+++ b/lib/ephy-permissions-manager.c
@@ -31,8 +31,7 @@
 #include <string.h>
 #include <webkit2/webkit2.h>
 
-struct _EphyPermissionsManager
-{
+struct _EphyPermissionsManager {
   GObject parent_instance;
 
   GHashTable *origins_mapping;
@@ -104,7 +103,7 @@ ephy_permissions_manager_get_settings_for_origin (EphyPermissionsManager *manage
   char *origin_path;
   char *trimmed_protocol;
   char *filename;
-  GSettingsBackend* backend;
+  GSettingsBackend *backend;
   GSettings *settings;
   WebKitSecurityOrigin *security_origin;
   char *pos;
@@ -154,20 +153,20 @@ static const char *
 permission_type_to_string (EphyPermissionType type)
 {
   switch (type) {
-  case EPHY_PERMISSION_TYPE_SHOW_NOTIFICATIONS:
-    return "notifications-permission";
-  case EPHY_PERMISSION_TYPE_SAVE_PASSWORD:
-    return "save-password-permission";
-  case EPHY_PERMISSION_TYPE_ACCESS_LOCATION:
-    return "geolocation-permission";
-  case EPHY_PERMISSION_TYPE_ACCESS_MICROPHONE:
-    return "audio-device-permission";
-  case EPHY_PERMISSION_TYPE_ACCESS_WEBCAM:
-    return "video-device-permission";
-  case EPHY_PERMISSION_TYPE_SHOW_ADS:
-    return "advertisement-permission";
-  default:
-    g_assert_not_reached ();
+    case EPHY_PERMISSION_TYPE_SHOW_NOTIFICATIONS:
+      return "notifications-permission";
+    case EPHY_PERMISSION_TYPE_SAVE_PASSWORD:
+      return "save-password-permission";
+    case EPHY_PERMISSION_TYPE_ACCESS_LOCATION:
+      return "geolocation-permission";
+    case EPHY_PERMISSION_TYPE_ACCESS_MICROPHONE:
+      return "audio-device-permission";
+    case EPHY_PERMISSION_TYPE_ACCESS_WEBCAM:
+      return "video-device-permission";
+    case EPHY_PERMISSION_TYPE_SHOW_ADS:
+      return "advertisement-permission";
+    default:
+      g_assert_not_reached ();
   }
 }
 
diff --git a/lib/ephy-profile-utils.c b/lib/ephy-profile-utils.c
index f41c0fdf4..cadc1ed90 100644
--- a/lib/ephy-profile-utils.c
+++ b/lib/ephy-profile-utils.c
@@ -89,15 +89,17 @@ ephy_profile_utils_set_migration_version (int version)
 #define EPHY_PROFILE_MIGRATOR "ephy-profile-migrator"
 
 gboolean
-ephy_profile_utils_do_migration (const char *profile_directory, int test_to_run, gboolean debug)
+ephy_profile_utils_do_migration (const char *profile_directory,
+                                 int         test_to_run,
+                                 gboolean    debug)
 {
-  g_autoptr(GError) error = NULL;
+  g_autoptr (GError) error = NULL;
   g_autofree char *index = NULL;
   g_autofree char *version = NULL;
   int status;
   const char *argv[8] = { PKGLIBEXECDIR "/" EPHY_PROFILE_MIGRATOR, "-v" };
   int i = 2; /* index for argv, start filling at 2. */
-  g_auto(GStrv) envp = NULL;
+  g_auto (GStrv) envp = NULL;
 
   envp = g_environ_setenv (g_get_environ (),
                            "EPHY_LOG_MODULES", "ephy-profile",
@@ -106,7 +108,7 @@ ephy_profile_utils_do_migration (const char *profile_directory, int test_to_run,
   argv[i++] = version = g_strdup_printf ("%d", EPHY_PROFILE_MIGRATION_VERSION);
 
   /* If we're not trying to run a migration step in a test and there
-     is nothing to migrate, don't spawn the migrator at all. */
+   *  is nothing to migrate, don't spawn the migrator at all. */
   if (test_to_run == -1 &&
       EPHY_PROFILE_MIGRATION_VERSION == ephy_profile_utils_get_migration_version ()) {
     return TRUE;
diff --git a/lib/ephy-search-engine-manager.c b/lib/ephy-search-engine-manager.c
index c6da9eb0f..ef4ffe2ef 100644
--- a/lib/ephy-search-engine-manager.c
+++ b/lib/ephy-search-engine-manager.c
@@ -36,14 +36,12 @@ enum {
 
 static guint signals[LAST_SIGNAL];
 
-struct _EphySearchEngineManager
-{
+struct _EphySearchEngineManager {
   GObject parent_instance;
   GHashTable *search_engines;
 };
 
-typedef struct
-{
+typedef struct {
   char *address;
   char *bang;
 } EphySearchEngineInfo;
@@ -303,7 +301,7 @@ ephy_search_engine_manager_engine_from_bang (EphySearchEngineManager *manager,
 
   while (g_hash_table_iter_next (&iter, &key, &value)) {
     info = (EphySearchEngineInfo *)value;
-    if (g_strcmp0(bang, info->bang) == 0)
+    if (g_strcmp0 (bang, info->bang) == 0)
       return (const char *)key;
   }
 
diff --git a/lib/ephy-settings.c b/lib/ephy-settings.c
index 897dc4bb6..2d29b5618 100644
--- a/lib/ephy-settings.c
+++ b/lib/ephy-settings.c
@@ -128,7 +128,7 @@ on_settings_changed (GSettings *settings,
                      char      *key,
                      gpointer   user_data)
 {
-  g_autoptr(GVariant) value = g_settings_get_user_value (settings, key);
+  g_autoptr (GVariant) value = g_settings_get_user_value (settings, key);
   if (value != NULL)
     g_settings_set_value (user_data, key, value);
   else
@@ -144,15 +144,15 @@ static void
 sync_settings (GSettings *original,
                GSettings *new)
 {
-  g_autoptr(GSettingsSchema) schema = NULL;
-  g_auto(GStrv) keys = NULL;
+  g_autoptr (GSettingsSchema) schema = NULL;
+  g_auto (GStrv) keys = NULL;
 
   g_object_get (original, "settings-schema", &schema, NULL);
   keys = g_settings_schema_list_keys (schema);
 
   for (size_t i = 0; keys[i] != NULL; ++i) {
     const char *key = keys[i];
-    g_autoptr(GVariant) value = g_settings_get_user_value (original, key);
+    g_autoptr (GVariant) value = g_settings_get_user_value (original, key);
 
     if (value != NULL)
       g_settings_set_value (new, key, value);
@@ -204,18 +204,18 @@ ephy_settings_get_for_web_process_extension (const char *schema)
   gsettings = g_hash_table_lookup (settings, key_name);
 
   if (gsettings == NULL) {
-    g_autoptr(GSettingsBackend) backend = NULL;
-    g_autoptr(GSettings) web_gsettings = NULL;
+    g_autoptr (GSettingsBackend) backend = NULL;
+    g_autoptr (GSettings) web_gsettings = NULL;
     g_autofree char *keyfile_path = NULL;
     g_autofree char *path = NULL;
 
     gsettings = ephy_settings_get (schema);
     g_assert (gsettings != NULL);
 
-    // GLib inside Flatpak will default to this backend in the future
-    // so we don't need to do anything extra
+    /* GLib inside Flatpak will default to this backend in the future */
+    /* so we don't need to do anything extra */
     g_object_get (gsettings, "backend", &backend, NULL);
-    // G_IS_KEYFILE_SETTINGS_BACKEND () is private API
+    /* G_IS_KEYFILE_SETTINGS_BACKEND () is private API */
     if (!g_strcmp0 (g_type_name (G_TYPE_FROM_INSTANCE (backend)), "GKeyfileSettingsBackend")) {
       g_hash_table_insert (settings, g_steal_pointer (&key_name), g_object_ref (gsettings));
       return gsettings;
diff --git a/lib/ephy-smaps.c b/lib/ephy-smaps.c
index 3a1b987ae..41140e0be 100644
--- a/lib/ephy-smaps.c
+++ b/lib/ephy-smaps.c
@@ -110,7 +110,8 @@ static void perm_entry_free (PermEntry *entry)
   g_free (entry);
 }
 
-static void add_to_perm_entry (GHashTable *hash, VMA_t *entry)
+static void add_to_perm_entry (GHashTable *hash,
+                               VMA_t      *entry)
 {
   const char *perms = entry->perms;
   PermEntry *value;
@@ -137,7 +138,8 @@ static void add_to_perm_entry (GHashTable *hash, VMA_t *entry)
     g_hash_table_insert (hash, g_strdup (perms), value);
 }
 
-static void add_to_totals (PermEntry *entry, PermEntry *totals)
+static void add_to_totals (PermEntry *entry,
+                           PermEntry *totals)
 {
   totals->shared_clean += entry->shared_clean;
   totals->shared_dirty += entry->shared_dirty;
@@ -145,7 +147,9 @@ static void add_to_totals (PermEntry *entry, PermEntry *totals)
   totals->private_dirty += entry->private_dirty;
 }
 
-static void print_vma_table (GString *str, GHashTable *hash, const char *caption)
+static void print_vma_table (GString    *str,
+                             GHashTable *hash,
+                             const char *caption)
 {
   PermEntry *pentry, totals;
 
@@ -188,7 +192,10 @@ static void print_vma_table (GString *str, GHashTable *hash, const char *caption
   g_string_append (str, "</table>");
 }
 
-static void ephy_smaps_pid_to_html (EphySMaps *smaps, GString *str, pid_t pid, EphyProcess process)
+static void ephy_smaps_pid_to_html (EphySMaps  *smaps,
+                                    GString    *str,
+                                    pid_t       pid,
+                                    EphyProcess process)
 {
   GFileInputStream *stream;
   GDataInputStream *data_stream;
@@ -271,7 +278,7 @@ static void ephy_smaps_pid_to_html (EphySMaps *smaps, GString *str, pid_t pid, E
     }
 
     g_match_info_free (match_info);
- out:
+out:
     g_free (line);
   }
 
@@ -407,7 +414,9 @@ static EphyProcess get_ephy_process (pid_t pid)
   return process;
 }
 
-static void ephy_smaps_pid_children_to_html (EphySMaps *smaps, GString *str, pid_t parent_pid)
+static void ephy_smaps_pid_children_to_html (EphySMaps *smaps,
+                                             GString   *str,
+                                             pid_t      parent_pid)
 {
   GDir *proc;
   const char *name;
diff --git a/lib/ephy-snapshot-service.c b/lib/ephy-snapshot-service.c
index 824070869..625f86c3d 100644
--- a/lib/ephy-snapshot-service.c
+++ b/lib/ephy-snapshot-service.c
@@ -197,7 +197,7 @@ save_thumbnail (GdkPixbuf  *pixbuf,
   chmod (tmp_path, 0600);
   rename (tmp_path, path);
 
- out:
+out:
   if (error != NULL) {
     g_warning ("Failed to create thumbnail %s: %s", tmp_path, error->message);
     g_error_free (error);
@@ -343,10 +343,10 @@ idle_cache_snapshot_path (gpointer user_data)
 }
 
 static void
-cache_snapshot_data_in_idle (EphySnapshotService  *service,
-                             const char           *url,
-                             const char           *path,
-                             EphySnapshotFreshness freshness)
+cache_snapshot_data_in_idle (EphySnapshotService   *service,
+                             const char            *url,
+                             const char            *path,
+                             EphySnapshotFreshness  freshness)
 {
   CacheData *data;
   data = g_new (CacheData, 1);
@@ -397,9 +397,9 @@ ephy_snapshot_service_save_snapshot_async (EphySnapshotService *service,
 }
 
 static char *
-ephy_snapshot_service_save_snapshot_finish (EphySnapshotService *service,
-                                            GAsyncResult        *result,
-                                            GError             **error)
+ephy_snapshot_service_save_snapshot_finish (EphySnapshotService  *service,
+                                            GAsyncResult         *result,
+                                            GError              **error)
 {
   g_assert (g_task_is_valid (result, service));
 
@@ -490,29 +490,29 @@ webview_destroyed_cb (GtkWidget *web_view,
 }
 
 static void
-webview_load_changed_cb (WebKitWebView  *web_view,
-                         WebKitLoadEvent load_event,
-                         GTask          *task)
+webview_load_changed_cb (WebKitWebView   *web_view,
+                         WebKitLoadEvent  load_event,
+                         GTask           *task)
 {
   if (load_event != WEBKIT_LOAD_FINISHED)
     return;
 
   /* Load finished doesn't ensure that we actually have visible content yet,
-     so hold a bit before retrieving the snapshot. */
+   *  so hold a bit before retrieving the snapshot. */
   g_idle_add ((GSourceFunc)retrieve_snapshot_from_web_view, task);
 
   /* Some pages might end up causing this condition to happen twice, so remove
-     the handler in order to avoid calling the above idle function twice. */
+   *  the handler in order to avoid calling the above idle function twice. */
   g_signal_handlers_disconnect_by_func (web_view, webview_load_changed_cb, task);
   g_signal_handlers_disconnect_by_func (web_view, webview_destroyed_cb, task);
 }
 
 static gboolean
-webview_load_failed_cb (WebKitWebView  *web_view,
-                        WebKitLoadEvent load_event,
-                        const char      failing_uri,
-                        GError         *error,
-                        GTask          *task)
+webview_load_failed_cb (WebKitWebView   *web_view,
+                        WebKitLoadEvent  load_event,
+                        const char       failing_uri,
+                        GError          *error,
+                        GTask           *task)
 {
   g_signal_handlers_disconnect_by_func (web_view, webview_load_changed_cb, task);
   g_signal_handlers_disconnect_by_func (web_view, webview_load_failed_cb, task);
@@ -678,9 +678,9 @@ take_fresh_snapshot_in_background_if_stale (EphySnapshotService *service,
 }
 
 char *
-ephy_snapshot_service_get_snapshot_path_for_url_finish (EphySnapshotService *service,
-                                                        GAsyncResult        *result,
-                                                        GError             **error)
+ephy_snapshot_service_get_snapshot_path_for_url_finish (EphySnapshotService  *service,
+                                                        GAsyncResult         *result,
+                                                        GError              **error)
 {
   g_assert (g_task_is_valid (result, service));
 
@@ -743,9 +743,9 @@ ephy_snapshot_service_get_snapshot_path_async (EphySnapshotService *service,
 }
 
 char *
-ephy_snapshot_service_get_snapshot_path_finish (EphySnapshotService *service,
-                                                GAsyncResult        *result,
-                                                GError             **error)
+ephy_snapshot_service_get_snapshot_path_finish (EphySnapshotService  *service,
+                                                GAsyncResult         *result,
+                                                GError              **error)
 {
   g_assert (g_task_is_valid (result, service));
 
diff --git a/lib/ephy-sqlite-connection.c b/lib/ephy-sqlite-connection.c
index e470bf6aa..bf6c59746 100644
--- a/lib/ephy-sqlite-connection.c
+++ b/lib/ephy-sqlite-connection.c
@@ -113,14 +113,16 @@ GQuark ephy_sqlite_error_quark (void)
 }
 
 static void
-set_error_from_string (const char *string, GError **error)
+set_error_from_string (const char  *string,
+                       GError     **error)
 {
   if (error)
     *error = g_error_new_literal (ephy_sqlite_error_quark (), 0, string);
 }
 
 EphySQLiteConnection *
-ephy_sqlite_connection_new (EphySQLiteConnectionMode mode, const char *database_path)
+ephy_sqlite_connection_new (EphySQLiteConnectionMode  mode,
+                            const char               *database_path)
 {
   return EPHY_SQLITE_CONNECTION (g_object_new (EPHY_TYPE_SQLITE_CONNECTION,
                                                "mode", mode,
@@ -129,7 +131,8 @@ ephy_sqlite_connection_new (EphySQLiteConnectionMode mode, const char *database_
 }
 
 gboolean
-ephy_sqlite_connection_open (EphySQLiteConnection *self, GError **error)
+ephy_sqlite_connection_open (EphySQLiteConnection  *self,
+                             GError               **error)
 {
   if (self->database) {
     set_error_from_string ("Connection already open.", error);
@@ -176,14 +179,17 @@ ephy_sqlite_connection_delete_database (EphySQLiteConnection *self)
 }
 
 void
-ephy_sqlite_connection_get_error (EphySQLiteConnection *self, GError **error)
+ephy_sqlite_connection_get_error (EphySQLiteConnection  *self,
+                                  GError               **error)
 {
   if (error)
     *error = g_error_new_literal (ephy_sqlite_error_quark (), sqlite3_errcode (self->database), 
sqlite3_errmsg (self->database));
 }
 
 gboolean
-ephy_sqlite_connection_execute (EphySQLiteConnection *self, const char *sql, GError **error)
+ephy_sqlite_connection_execute (EphySQLiteConnection  *self,
+                                const char            *sql,
+                                GError               **error)
 {
   if (self->database == NULL) {
     set_error_from_string ("Connection not open.", error);
@@ -198,7 +204,9 @@ ephy_sqlite_connection_execute (EphySQLiteConnection *self, const char *sql, GEr
 }
 
 EphySQLiteStatement *
-ephy_sqlite_connection_create_statement (EphySQLiteConnection *self, const char *sql, GError **error)
+ephy_sqlite_connection_create_statement (EphySQLiteConnection  *self,
+                                         const char            *sql,
+                                         GError               **error)
 {
   sqlite3_stmt *prepared_statement;
 
@@ -239,7 +247,8 @@ ephy_sqlite_connection_enable_foreign_keys (EphySQLiteConnection *self)
 }
 
 gboolean
-ephy_sqlite_connection_begin_transaction (EphySQLiteConnection *self, GError **error)
+ephy_sqlite_connection_begin_transaction (EphySQLiteConnection  *self,
+                                          GError               **error)
 {
   if (self->mode == EPHY_SQLITE_CONNECTION_MODE_READ_ONLY)
     return TRUE;
@@ -247,7 +256,8 @@ ephy_sqlite_connection_begin_transaction (EphySQLiteConnection *self, GError **e
 }
 
 gboolean
-ephy_sqlite_connection_commit_transaction (EphySQLiteConnection *self, GError **error)
+ephy_sqlite_connection_commit_transaction (EphySQLiteConnection  *self,
+                                           GError               **error)
 {
   if (self->mode == EPHY_SQLITE_CONNECTION_MODE_READ_ONLY)
     return TRUE;
@@ -255,7 +265,8 @@ ephy_sqlite_connection_commit_transaction (EphySQLiteConnection *self, GError **
 }
 
 gboolean
-ephy_sqlite_connection_table_exists (EphySQLiteConnection *self, const char *table_name)
+ephy_sqlite_connection_table_exists (EphySQLiteConnection *self,
+                                     const char           *table_name)
 {
   GError *error = NULL;
   gboolean table_exists = FALSE;
diff --git a/lib/ephy-sqlite-statement.c b/lib/ephy-sqlite-statement.c
index 9bfa7d3e8..627770a0a 100644
--- a/lib/ephy-sqlite-statement.c
+++ b/lib/ephy-sqlite-statement.c
@@ -42,7 +42,10 @@ struct _EphySQLiteStatement {
 G_DEFINE_TYPE (EphySQLiteStatement, ephy_sqlite_statement, G_TYPE_OBJECT);
 
 static void
-ephy_sqlite_statement_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec 
*pspec)
+ephy_sqlite_statement_set_property (GObject      *object,
+                                    guint         property_id,
+                                    const GValue *value,
+                                    GParamSpec   *pspec)
 {
   EphySQLiteStatement *self = EPHY_SQLITE_STATEMENT (object);
 
@@ -108,7 +111,9 @@ ephy_sqlite_statement_init (EphySQLiteStatement *self)
 }
 
 gboolean
-ephy_sqlite_statement_bind_null (EphySQLiteStatement *self, int column, GError **error)
+ephy_sqlite_statement_bind_null (EphySQLiteStatement  *self,
+                                 int                   column,
+                                 GError              **error)
 {
   if (sqlite3_bind_null (self->prepared_statement, column) != SQLITE_OK) {
     ephy_sqlite_connection_get_error (self->connection, error);
@@ -119,7 +124,10 @@ ephy_sqlite_statement_bind_null (EphySQLiteStatement *self, int column, GError *
 }
 
 gboolean
-ephy_sqlite_statement_bind_boolean (EphySQLiteStatement *self, int column, gboolean value, GError **error)
+ephy_sqlite_statement_bind_boolean (EphySQLiteStatement  *self,
+                                    int                   column,
+                                    gboolean              value,
+                                    GError              **error)
 {
   if (sqlite3_bind_int (self->prepared_statement, column + 1, value ? 1 : 0) != SQLITE_OK) {
     ephy_sqlite_connection_get_error (self->connection, error);
@@ -130,7 +138,10 @@ ephy_sqlite_statement_bind_boolean (EphySQLiteStatement *self, int column, gbool
 }
 
 gboolean
-ephy_sqlite_statement_bind_int (EphySQLiteStatement *self, int column, int value, GError **error)
+ephy_sqlite_statement_bind_int (EphySQLiteStatement  *self,
+                                int                   column,
+                                int                   value,
+                                GError              **error)
 {
   if (sqlite3_bind_int (self->prepared_statement, column + 1, value) != SQLITE_OK) {
     ephy_sqlite_connection_get_error (self->connection, error);
@@ -141,7 +152,10 @@ ephy_sqlite_statement_bind_int (EphySQLiteStatement *self, int column, int value
 }
 
 gboolean
-ephy_sqlite_statement_bind_int64 (EphySQLiteStatement *self, int column, gint64 value, GError **error)
+ephy_sqlite_statement_bind_int64 (EphySQLiteStatement  *self,
+                                  int                   column,
+                                  gint64                value,
+                                  GError              **error)
 {
   if (sqlite3_bind_int64 (self->prepared_statement, column + 1, value) != SQLITE_OK) {
     ephy_sqlite_connection_get_error (self->connection, error);
@@ -152,7 +166,10 @@ ephy_sqlite_statement_bind_int64 (EphySQLiteStatement *self, int column, gint64
 }
 
 gboolean
-ephy_sqlite_statement_bind_double (EphySQLiteStatement *self, int column, double value, GError **error)
+ephy_sqlite_statement_bind_double (EphySQLiteStatement  *self,
+                                   int                   column,
+                                   double                value,
+                                   GError              **error)
 {
   if (sqlite3_bind_double (self->prepared_statement, column + 1, value) != SQLITE_OK) {
     ephy_sqlite_connection_get_error (self->connection, error);
@@ -163,7 +180,10 @@ ephy_sqlite_statement_bind_double (EphySQLiteStatement *self, int column, double
 }
 
 gboolean
-ephy_sqlite_statement_bind_string (EphySQLiteStatement *self, int column, const char *value, GError **error)
+ephy_sqlite_statement_bind_string (EphySQLiteStatement  *self,
+                                   int                   column,
+                                   const char           *value,
+                                   GError              **error)
 {
   if (sqlite3_bind_text (self->prepared_statement, column + 1, value, -1, SQLITE_TRANSIENT) != SQLITE_OK) {
     ephy_sqlite_connection_get_error (self->connection, error);
@@ -174,7 +194,11 @@ ephy_sqlite_statement_bind_string (EphySQLiteStatement *self, int column, const
 }
 
 gboolean
-ephy_sqlite_statement_bind_blob (EphySQLiteStatement *self, int column, const void *value, int length, 
GError **error)
+ephy_sqlite_statement_bind_blob (EphySQLiteStatement  *self,
+                                 int                   column,
+                                 const void           *value,
+                                 int                   length,
+                                 GError              **error)
 {
   if (sqlite3_bind_blob (self->prepared_statement, column + 1, value, length, SQLITE_TRANSIENT) != 
SQLITE_OK) {
     ephy_sqlite_connection_get_error (self->connection, error);
@@ -184,7 +208,8 @@ ephy_sqlite_statement_bind_blob (EphySQLiteStatement *self, int column, const vo
 }
 
 gboolean
-ephy_sqlite_statement_step (EphySQLiteStatement *self, GError **error)
+ephy_sqlite_statement_step (EphySQLiteStatement  *self,
+                            GError              **error)
 {
   int error_code = sqlite3_step (self->prepared_statement);
   if (error_code != SQLITE_OK && error_code != SQLITE_ROW && error_code != SQLITE_DONE) {
@@ -207,7 +232,8 @@ ephy_sqlite_statement_get_column_count (EphySQLiteStatement *self)
 }
 
 EphySQLiteColumnType
-ephy_sqlite_statement_get_column_type (EphySQLiteStatement *self, int column)
+ephy_sqlite_statement_get_column_type (EphySQLiteStatement *self,
+                                       int                  column)
 {
   int column_type = sqlite3_column_type (self->prepared_statement, column);
   switch (column_type) {
@@ -226,43 +252,50 @@ ephy_sqlite_statement_get_column_type (EphySQLiteStatement *self, int column)
 }
 
 int
-ephy_sqlite_statement_get_column_size (EphySQLiteStatement *self, int column)
+ephy_sqlite_statement_get_column_size (EphySQLiteStatement *self,
+                                       int                  column)
 {
   return sqlite3_column_bytes (self->prepared_statement, column);
 }
 
 int
-ephy_sqlite_statement_get_column_as_boolean (EphySQLiteStatement *self, int column)
+ephy_sqlite_statement_get_column_as_boolean (EphySQLiteStatement *self,
+                                             int                  column)
 {
   return ephy_sqlite_statement_get_column_as_int (self, column);
 }
 
 int
-ephy_sqlite_statement_get_column_as_int (EphySQLiteStatement *self, int column)
+ephy_sqlite_statement_get_column_as_int (EphySQLiteStatement *self,
+                                         int                  column)
 {
   return sqlite3_column_int (self->prepared_statement, column);
 }
 
 gint64
-ephy_sqlite_statement_get_column_as_int64 (EphySQLiteStatement *self, int column)
+ephy_sqlite_statement_get_column_as_int64 (EphySQLiteStatement *self,
+                                           int                  column)
 {
   return sqlite3_column_int64 (self->prepared_statement, column);
 }
 
 double
-ephy_sqlite_statement_get_column_as_double (EphySQLiteStatement *self, int column)
+ephy_sqlite_statement_get_column_as_double (EphySQLiteStatement *self,
+                                            int                  column)
 {
   return sqlite3_column_double (self->prepared_statement, column);
 }
 
 const char *
-ephy_sqlite_statement_get_column_as_string (EphySQLiteStatement *self, int column)
+ephy_sqlite_statement_get_column_as_string (EphySQLiteStatement *self,
+                                            int                  column)
 {
   return (const char *)sqlite3_column_text (self->prepared_statement, column);
 }
 
 const void *
-ephy_sqlite_statement_get_column_as_blob (EphySQLiteStatement *self, int column)
+ephy_sqlite_statement_get_column_as_blob (EphySQLiteStatement *self,
+                                          int                  column)
 {
   return sqlite3_column_blob (self->prepared_statement, column);
 }
diff --git a/lib/ephy-string.c b/lib/ephy-string.c
index aac2c2497..509490c86 100644
--- a/lib/ephy-string.c
+++ b/lib/ephy-string.c
@@ -30,7 +30,8 @@
 #include <sys/types.h>
 
 gboolean
-ephy_string_to_int (const char *string, gulong *integer)
+ephy_string_to_int (const char *string,
+                    gulong     *integer)
 {
   gulong result;
   char *parse_end;
@@ -89,8 +90,8 @@ ephy_string_blank_chr (char *source)
  * characters.
  */
 char *
-ephy_string_shorten (char *str,
-                     gsize target_length)
+ephy_string_shorten (char  *str,
+                     gsize  target_length)
 {
   char *new_str;
   glong actual_length;
@@ -126,9 +127,9 @@ ephy_string_shorten (char *str,
 }
 
 /* This is a collation key that is very very likely to sort before any
-   collation key that libc strxfrm generates. We use this before any
-   special case (dot or number) to make sure that its sorted before
-   anything else.
+ *  collation key that libc strxfrm generates. We use this before any
+ *  special case (dot or number) to make sure that its sorted before
+ *  anything else.
  */
 #define COLLATION_SENTINEL "\1\1\1"
 
@@ -212,7 +213,8 @@ ephy_string_get_host_name (const char *url)
  * UTF-8 strings.
  **/
 char **
-ephy_string_commandline_args_to_uris (char **arguments, GError **error)
+ephy_string_commandline_args_to_uris (char   **arguments,
+                                      GError **error)
 {
   gchar **args;
   GFile *file;
diff --git a/lib/ephy-sync-utils.c b/lib/ephy-sync-utils.c
index 021f518ed..6c8a37a85 100644
--- a/lib/ephy-sync-utils.c
+++ b/lib/ephy-sync-utils.c
@@ -136,9 +136,9 @@ base64_urlsafe_to_base64 (char *text)
 }
 
 guint8 *
-ephy_sync_utils_base64_urlsafe_decode (const char   *text,
-                                       gsize        *out_len,
-                                       gboolean      should_fill)
+ephy_sync_utils_base64_urlsafe_decode (const char *text,
+                                       gsize      *out_len,
+                                       gboolean    should_fill)
 {
   guint8 *out;
   char *to_decode;
@@ -249,7 +249,7 @@ ephy_sync_utils_make_client_record (const char *device_bso_id,
   g_assert (device_name);
 
   array = json_array_new ();
-  protocol = g_strdup_printf ("1.%"PRIu32, EPHY_SYNC_STORAGE_VERSION);
+  protocol = g_strdup_printf ("1.%" PRIu32, EPHY_SYNC_STORAGE_VERSION);
   json_array_add_string_element (array, protocol);
 
   object = json_object_new ();
diff --git a/lib/ephy-time-helpers.c b/lib/ephy-time-helpers.c
index 060833f20..9289e49c8 100644
--- a/lib/ephy-time-helpers.c
+++ b/lib/ephy-time-helpers.c
@@ -65,9 +65,10 @@
  **/
 
 char *
-eel_strdup_strftime (const char *format, struct tm *time_pieces)
+eel_strdup_strftime (const char *format,
+                     struct tm  *time_pieces)
 {
-  g_autoptr(GString) string = NULL;
+  g_autoptr (GString) string = NULL;
   const char *remainder, *percent;
   char code[4], buffer[512];
   char *piece, *result;
@@ -230,7 +231,6 @@ ephy_time_helpers_utf_friendly_time (time_t date)
   if (then.tm_mday == now.tm_mday &&
       then.tm_mon == now.tm_mon &&
       then.tm_year == now.tm_year) {
-
     if (!use_24) {
       /* Translators: "friendly time" string for the current day, strftime format. like "Today 12∶34 am" */
       format = _("Today %I∶%M %p");
diff --git a/lib/ephy-uri-helpers.c b/lib/ephy-uri-helpers.c
index 3d9014e17..b02d7eb85 100644
--- a/lib/ephy-uri-helpers.c
+++ b/lib/ephy-uri-helpers.c
@@ -247,7 +247,7 @@ ephy_remove_tracking_from_uri (const char *uri_string)
   g_list_free_full (items, (GDestroyNotify)query_item_free);
   g_list_free (new_items);
 
- bail:
+bail:
   soup_uri_free (uri);
   return ret;
 }
diff --git a/lib/ephy-web-app-utils.c b/lib/ephy-web-app-utils.c
index 0b7f6c184..08017cfb0 100644
--- a/lib/ephy-web-app-utils.c
+++ b/lib/ephy-web-app-utils.c
@@ -116,16 +116,16 @@ ephy_web_application_get_program_name_from_profile_directory (const char *profil
 {
   const char *name;
 
-  // Just get the basename
+  /* Just get the basename */
   name = strrchr (profile_dir, G_DIR_SEPARATOR);
   if (name == NULL) {
     g_warning ("Profile directoroy %s is not a valid path", profile_dir);
     return NULL;
   }
 
-  name++; // Strip '/'
+  name++; /* Strip '/' */
 
-  // Legacy web app support
+  /* Legacy web app support */
   if (g_str_has_prefix (name, "app-"))
     name += strlen ("app-");
 
@@ -213,8 +213,8 @@ ephy_web_application_delete (const char *id)
   g_autofree char *config_dir = NULL;
   g_autofree char *desktop_file = NULL;
   g_autofree char *desktop_path = NULL;
-  g_autoptr(GFile) launcher = NULL;
-  g_autoptr(GError) error = NULL;
+  g_autoptr (GFile) launcher = NULL;
+  g_autoptr (GError) error = NULL;
 
   g_assert (id);
 
@@ -398,7 +398,7 @@ ephy_web_application_create (const char *id,
 
   /* Create an .app file. */
   app_file = g_build_filename (profile_dir, ".app", NULL);
-  fd = g_open (app_file, O_WRONLY|O_CREAT|O_TRUNC, 0644);
+  fd = g_open (app_file, O_WRONLY | O_CREAT | O_TRUNC, 0644);
   if (fd < 0) {
     g_warning ("Failed to create .app file: %s", g_strerror (errno));
     return NULL;
@@ -596,7 +596,7 @@ ephy_web_application_get_application_list_internal (gboolean only_legacy)
   GFileInfo *info;
   GList *applications = NULL;
   g_autofree char *parent_directory_path = NULL;
-  g_autoptr(GFile) parent_directory = NULL;
+  g_autoptr (GFile) parent_directory = NULL;
 
   if (only_legacy)
     parent_directory_path = g_build_filename (g_get_user_config_dir (), "epiphany", NULL);
diff --git a/lib/ephy-zoom.c b/lib/ephy-zoom.c
index 8591d0092..b0661e016 100644
--- a/lib/ephy-zoom.c
+++ b/lib/ephy-zoom.c
@@ -29,8 +29,7 @@
 #define NUM_ZOOM_STEPS 14
 
 static float
-zoom_steps [NUM_ZOOM_STEPS] =
-{
+  zoom_steps [NUM_ZOOM_STEPS] = {
   0.30f,
   0.50f,
   0.67f,
@@ -48,7 +47,8 @@ zoom_steps [NUM_ZOOM_STEPS] =
 };
 
 float
-ephy_zoom_get_changed_zoom_level (float level, int steps)
+ephy_zoom_get_changed_zoom_level (float level,
+                                  int   steps)
 {
   float new_level;
   gint i;
diff --git a/lib/history/ephy-history-service-hosts-table.c b/lib/history/ephy-history-service-hosts-table.c
index c48da775c..d19f7235d 100644
--- a/lib/history/ephy-history-service-hosts-table.c
+++ b/lib/history/ephy-history-service-hosts-table.c
@@ -50,7 +50,8 @@ ephy_history_service_initialize_hosts_table (EphyHistoryService *self)
 }
 
 void
-ephy_history_service_add_host_row (EphyHistoryService *self, EphyHistoryHost *host)
+ephy_history_service_add_host_row (EphyHistoryService *self,
+                                   EphyHistoryHost    *host)
 {
   EphySQLiteStatement *statement = NULL;
   GError *error = NULL;
@@ -90,7 +91,8 @@ ephy_history_service_add_host_row (EphyHistoryService *self, EphyHistoryHost *ho
 }
 
 void
-ephy_history_service_update_host_row (EphyHistoryService *self, EphyHistoryHost *host)
+ephy_history_service_update_host_row (EphyHistoryService *self,
+                                      EphyHistoryHost    *host)
 {
   EphySQLiteStatement *statement;
   GError *error = NULL;
@@ -130,7 +132,9 @@ ephy_history_service_update_host_row (EphyHistoryService *self, EphyHistoryHost
 }
 
 EphyHistoryHost *
-ephy_history_service_get_host_row (EphyHistoryService *self, const gchar *host_string, EphyHistoryHost *host)
+ephy_history_service_get_host_row (EphyHistoryService *self,
+                                   const gchar        *host_string,
+                                   EphyHistoryHost    *host)
 {
   EphySQLiteStatement *statement = NULL;
   GError *error = NULL;
@@ -244,7 +248,8 @@ ephy_history_service_get_all_hosts (EphyHistoryService *self)
 }
 
 GList *
-ephy_history_service_find_host_rows (EphyHistoryService *self, EphyHistoryQuery *query)
+ephy_history_service_find_host_rows (EphyHistoryService *self,
+                                     EphyHistoryQuery   *query)
 {
   EphySQLiteStatement *statement = NULL;
   GList *substring;
@@ -345,7 +350,8 @@ ephy_history_service_find_host_rows (EphyHistoryService *self, EphyHistoryQuery
 
 /* Inspired from ephy-history.c */
 static GList *
-get_hostname_and_locations (const gchar *url, gchar **hostname)
+get_hostname_and_locations (const gchar  *url,
+                            gchar       **hostname)
 {
   GList *host_locations = NULL;
   char *scheme = NULL;
@@ -478,10 +484,10 @@ ephy_history_service_delete_orphan_hosts (EphyHistoryService *self)
   g_assert (self->history_database != NULL);
 
   /* Where a JOIN would give us all hosts with urls associated, a LEFT
-     JOIN also gives us those hosts for which there are no urls.  By
-     means of urls.host == NULL we filter out anything else and
-     retrieve only the ids of the hosts without associated urls. Then,
-     we delete all these rows from the hosts table. */
+   *  JOIN also gives us those hosts for which there are no urls.  By
+   *  means of urls.host == NULL we filter out anything else and
+   *  retrieve only the ids of the hosts without associated urls. Then,
+   *  we delete all these rows from the hosts table. */
   ephy_sqlite_connection_execute (self->history_database,
                                   "DELETE FROM hosts WHERE hosts.id IN "
                                   "  (SELECT hosts.id FROM hosts LEFT JOIN urls "
diff --git a/lib/history/ephy-history-service-urls-table.c b/lib/history/ephy-history-service-urls-table.c
index a1a4daa9b..add6fa15f 100644
--- a/lib/history/ephy-history-service-urls-table.c
+++ b/lib/history/ephy-history-service-urls-table.c
@@ -53,7 +53,9 @@ ephy_history_service_initialize_urls_table (EphyHistoryService *self)
 }
 
 EphyHistoryURL *
-ephy_history_service_get_url_row (EphyHistoryService *self, const char *url_string, EphyHistoryURL *url)
+ephy_history_service_get_url_row (EphyHistoryService *self,
+                                  const char         *url_string,
+                                  EphyHistoryURL     *url)
 {
   EphySQLiteStatement *statement = NULL;
   GError *error = NULL;
@@ -106,7 +108,7 @@ ephy_history_service_get_url_row (EphyHistoryService *self, const char *url_stri
   url->id = ephy_sqlite_statement_get_column_as_int (statement, 0);
 
   /* Only get the URL and page title if we don't know it yet, as the version in the
-     history could be outdated. */
+   *  history could be outdated. */
   if (url->url == NULL)
     url->url = g_strdup (ephy_sqlite_statement_get_column_as_string (statement, 1));
   if (url->title == NULL)
@@ -123,7 +125,8 @@ ephy_history_service_get_url_row (EphyHistoryService *self, const char *url_stri
 }
 
 void
-ephy_history_service_add_url_row (EphyHistoryService *self, EphyHistoryURL *url)
+ephy_history_service_add_url_row (EphyHistoryService *self,
+                                  EphyHistoryURL     *url)
 {
   EphySQLiteStatement *statement = NULL;
   GError *error = NULL;
@@ -165,7 +168,8 @@ ephy_history_service_add_url_row (EphyHistoryService *self, EphyHistoryURL *url)
 }
 
 void
-ephy_history_service_update_url_row (EphyHistoryService *self, EphyHistoryURL *url)
+ephy_history_service_update_url_row (EphyHistoryService *self,
+                                     EphyHistoryURL     *url)
 {
   EphySQLiteStatement *statement;
   GError *error = NULL;
@@ -222,7 +226,8 @@ create_url_from_statement (EphySQLiteStatement *statement)
 }
 
 GList *
-ephy_history_service_find_url_rows (EphyHistoryService *self, EphyHistoryQuery *query)
+ephy_history_service_find_url_rows (EphyHistoryService *self,
+                                    EphyHistoryQuery   *query)
 {
   EphySQLiteStatement *statement = NULL;
   GList *substring;
@@ -387,7 +392,8 @@ ephy_history_service_find_url_rows (EphyHistoryService *self, EphyHistoryQuery *
 }
 
 void
-ephy_history_service_delete_url (EphyHistoryService *self, EphyHistoryURL *url)
+ephy_history_service_delete_url (EphyHistoryService *self,
+                                 EphyHistoryURL     *url)
 {
   EphySQLiteStatement *statement = NULL;
   const char *sql_statement;
diff --git a/lib/history/ephy-history-service-visits-table.c b/lib/history/ephy-history-service-visits-table.c
index e418deb1e..d6fd01b47 100644
--- a/lib/history/ephy-history-service-visits-table.c
+++ b/lib/history/ephy-history-service-visits-table.c
@@ -49,7 +49,8 @@ ephy_history_service_initialize_visits_table (EphyHistoryService *self)
 }
 
 void
-ephy_history_service_add_visit_row (EphyHistoryService *self, EphyHistoryPageVisit *visit)
+ephy_history_service_add_visit_row (EphyHistoryService   *self,
+                                    EphyHistoryPageVisit *visit)
 {
   EphySQLiteStatement *statement;
   GError *error = NULL;
@@ -99,7 +100,8 @@ create_page_visit_from_statement (EphySQLiteStatement *statement)
 }
 
 GList *
-ephy_history_service_find_visit_rows (EphyHistoryService *self, EphyHistoryQuery *query)
+ephy_history_service_find_visit_rows (EphyHistoryService *self,
+                                      EphyHistoryQuery   *query)
 {
   EphySQLiteStatement *statement = NULL;
   GList *substring;
diff --git a/lib/history/ephy-history-service.c b/lib/history/ephy-history-service.c
index 01c176354..218217b4e 100644
--- a/lib/history/ephy-history-service.c
+++ b/lib/history/ephy-history-service.c
@@ -33,7 +33,9 @@
 #include <glib.h>
 #include <glib/gstdio.h>
 
-typedef gboolean (*EphyHistoryServiceMethod)      (EphyHistoryService *self, gpointer data, gpointer 
*result);
+typedef gboolean (*EphyHistoryServiceMethod)      (EphyHistoryService *self,
+                                                   gpointer            data,
+                                                   gpointer           *result);
 
 typedef enum {
   /* WRITE */
@@ -81,9 +83,14 @@ typedef struct _EphyHistoryServiceMessage {
 } EphyHistoryServiceMessage;
 
 static gpointer run_history_service_thread (EphyHistoryService *self);
-static void ephy_history_service_process_message (EphyHistoryService *self, EphyHistoryServiceMessage 
*message);
-static gboolean ephy_history_service_execute_quit (EphyHistoryService *self, gpointer data, gpointer 
*result);
-static void ephy_history_service_quit (EphyHistoryService *self, EphyHistoryJobCallback callback, gpointer 
user_data);
+static void ephy_history_service_process_message (EphyHistoryService        *self,
+                                                  EphyHistoryServiceMessage *message);
+static gboolean ephy_history_service_execute_quit (EphyHistoryService *self,
+                                                   gpointer            data,
+                                                   gpointer           *result);
+static void ephy_history_service_quit (EphyHistoryService    *self,
+                                       EphyHistoryJobCallback callback,
+                                       gpointer               user_data);
 
 enum {
   PROP_0,
@@ -97,7 +104,10 @@ static GParamSpec *obj_properties[LAST_PROP];
 G_DEFINE_TYPE (EphyHistoryService, ephy_history_service, G_TYPE_OBJECT);
 
 static void
-ephy_history_service_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec 
*pspec)
+ephy_history_service_set_property (GObject      *object,
+                                   guint         property_id,
+                                   const GValue *value,
+                                   GParamSpec   *pspec)
 {
   EphyHistoryService *self = EPHY_HISTORY_SERVICE (object);
 
@@ -116,7 +126,10 @@ ephy_history_service_set_property (GObject *object, guint property_id, const GVa
 }
 
 static void
-ephy_history_service_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+ephy_history_service_get_property (GObject    *object,
+                                   guint       property_id,
+                                   GValue     *value,
+                                   GParamSpec *pspec)
 {
   EphyHistoryService *self = EPHY_HISTORY_SERVICE (object);
   switch (property_id) {
@@ -313,19 +326,21 @@ ephy_history_service_new (const char               *history_filename,
 }
 
 static gint
-sort_messages (EphyHistoryServiceMessage *a, EphyHistoryServiceMessage *b, gpointer user_data)
+sort_messages (EphyHistoryServiceMessage *a,
+               EphyHistoryServiceMessage *b,
+               gpointer                   user_data)
 {
   return a->type > b->type ? 1 : a->type == b->type ? 0 : -1;
 }
 
 static EphyHistoryServiceMessage *
-ephy_history_service_message_new (EphyHistoryService           *service,
-                                  EphyHistoryServiceMessageType type,
-                                  gpointer                      method_argument,
-                                  GDestroyNotify                method_argument_cleanup,
-                                  GCancellable                 *cancellable,
-                                  EphyHistoryJobCallback        callback,
-                                  gpointer                      user_data)
+ephy_history_service_message_new (EphyHistoryService            *service,
+                                  EphyHistoryServiceMessageType  type,
+                                  gpointer                       method_argument,
+                                  GDestroyNotify                 method_argument_cleanup,
+                                  GCancellable                  *cancellable,
+                                  EphyHistoryJobCallback         callback,
+                                  gpointer                       user_data)
 {
   EphyHistoryServiceMessage *message = g_new0 (EphyHistoryServiceMessage, 1);
 
@@ -353,7 +368,8 @@ ephy_history_service_message_free (EphyHistoryServiceMessage *message)
 }
 
 static void
-ephy_history_service_send_message (EphyHistoryService *self, EphyHistoryServiceMessage *message)
+ephy_history_service_send_message (EphyHistoryService        *self,
+                                   EphyHistoryServiceMessage *message)
 {
   g_async_queue_push_sorted (self->queue, message, (GCompareDataFunc)sort_messages, NULL);
 }
@@ -424,9 +440,9 @@ ephy_history_service_open_database_connections (EphyHistoryService *self)
   }
 
   return self->read_only ||
-          (ephy_history_service_initialize_hosts_table (self) &&
-           ephy_history_service_initialize_urls_table (self) &&
-           ephy_history_service_initialize_visits_table (self));
+         (ephy_history_service_initialize_hosts_table (self) &&
+          ephy_history_service_initialize_urls_table (self) &&
+          ephy_history_service_initialize_visits_table (self));
 }
 
 static void
@@ -440,7 +456,9 @@ ephy_history_service_close_database_connections (EphyHistoryService *self)
 }
 
 static gboolean
-ephy_history_service_execute_quit (EphyHistoryService *self, gpointer data, gpointer *result)
+ephy_history_service_execute_quit (EphyHistoryService *self,
+                                   gpointer            data,
+                                   gpointer           *result)
 {
   g_assert (self->history_thread == g_thread_self ());
 
@@ -543,7 +561,8 @@ signal_emission_context_new (EphyHistoryService *service,
 }
 
 static gboolean
-ephy_history_service_execute_add_visit_helper (EphyHistoryService *self, EphyHistoryPageVisit *visit)
+ephy_history_service_execute_add_visit_helper (EphyHistoryService   *self,
+                                               EphyHistoryPageVisit *visit)
 {
   if (visit->url->host == NULL)
     visit->url->host = ephy_history_service_get_host_row_from_url (self, visit->url->url);
@@ -596,7 +615,9 @@ ephy_history_service_execute_add_visit_helper (EphyHistoryService *self, EphyHis
 }
 
 static gboolean
-ephy_history_service_execute_add_visit (EphyHistoryService *self, EphyHistoryPageVisit *visit, gpointer 
*result)
+ephy_history_service_execute_add_visit (EphyHistoryService   *self,
+                                        EphyHistoryPageVisit *visit,
+                                        gpointer             *result)
 {
   gboolean success;
   g_assert (self->history_thread == g_thread_self ());
@@ -609,7 +630,9 @@ ephy_history_service_execute_add_visit (EphyHistoryService *self, EphyHistoryPag
 }
 
 static gboolean
-ephy_history_service_execute_add_visits (EphyHistoryService *self, GList *visits, gpointer *result)
+ephy_history_service_execute_add_visits (EphyHistoryService *self,
+                                         GList              *visits,
+                                         gpointer           *result)
 {
   gboolean success = TRUE;
   g_assert (self->history_thread == g_thread_self ());
@@ -626,7 +649,9 @@ ephy_history_service_execute_add_visits (EphyHistoryService *self, GList *visits
 }
 
 static gboolean
-ephy_history_service_execute_find_visits (EphyHistoryService *self, EphyHistoryQuery *query, gpointer 
*result)
+ephy_history_service_execute_find_visits (EphyHistoryService *self,
+                                          EphyHistoryQuery   *query,
+                                          gpointer           *result)
 {
   GList *visits = ephy_history_service_find_visit_rows (self, query);
   GList *current = visits;
@@ -649,7 +674,8 @@ ephy_history_service_execute_find_visits (EphyHistoryService *self, EphyHistoryQ
 
 static gboolean
 ephy_history_service_execute_get_hosts (EphyHistoryService *self,
-                                        gpointer pointer, gpointer *results)
+                                        gpointer            pointer,
+                                        gpointer           *results)
 {
   GList *hosts;
 
@@ -661,7 +687,8 @@ ephy_history_service_execute_get_hosts (EphyHistoryService *self,
 
 static gboolean
 ephy_history_service_execute_query_hosts (EphyHistoryService *self,
-                                          EphyHistoryQuery *query, gpointer *results)
+                                          EphyHistoryQuery   *query,
+                                          gpointer           *results)
 {
   GList *hosts;
 
@@ -672,7 +699,11 @@ ephy_history_service_execute_query_hosts (EphyHistoryService *self,
 }
 
 void
-ephy_history_service_add_visit (EphyHistoryService *self, EphyHistoryPageVisit *visit, GCancellable 
*cancellable, EphyHistoryJobCallback callback, gpointer user_data)
+ephy_history_service_add_visit (EphyHistoryService     *self,
+                                EphyHistoryPageVisit   *visit,
+                                GCancellable           *cancellable,
+                                EphyHistoryJobCallback  callback,
+                                gpointer                user_data)
 {
   EphyHistoryServiceMessage *message;
 
@@ -687,7 +718,11 @@ ephy_history_service_add_visit (EphyHistoryService *self, EphyHistoryPageVisit *
 }
 
 void
-ephy_history_service_add_visits (EphyHistoryService *self, GList *visits, GCancellable *cancellable, 
EphyHistoryJobCallback callback, gpointer user_data)
+ephy_history_service_add_visits (EphyHistoryService     *self,
+                                 GList                  *visits,
+                                 GCancellable           *cancellable,
+                                 EphyHistoryJobCallback  callback,
+                                 gpointer                user_data)
 {
   EphyHistoryServiceMessage *message;
 
@@ -702,7 +737,12 @@ ephy_history_service_add_visits (EphyHistoryService *self, GList *visits, GCance
 }
 
 void
-ephy_history_service_find_visits_in_time (EphyHistoryService *self, gint64 from, gint64 to, GCancellable 
*cancellable, EphyHistoryJobCallback callback, gpointer user_data)
+ephy_history_service_find_visits_in_time (EphyHistoryService     *self,
+                                          gint64                  from,
+                                          gint64                  to,
+                                          GCancellable           *cancellable,
+                                          EphyHistoryJobCallback  callback,
+                                          gpointer                user_data)
 {
   EphyHistoryQuery *query;
 
@@ -717,7 +757,11 @@ ephy_history_service_find_visits_in_time (EphyHistoryService *self, gint64 from,
 }
 
 void
-ephy_history_service_query_visits (EphyHistoryService *self, EphyHistoryQuery *query, GCancellable 
*cancellable, EphyHistoryJobCallback callback, gpointer user_data)
+ephy_history_service_query_visits (EphyHistoryService     *self,
+                                   EphyHistoryQuery       *query,
+                                   GCancellable           *cancellable,
+                                   EphyHistoryJobCallback  callback,
+                                   gpointer                user_data)
 {
   EphyHistoryServiceMessage *message;
 
@@ -730,7 +774,9 @@ ephy_history_service_query_visits (EphyHistoryService *self, EphyHistoryQuery *q
 }
 
 static gboolean
-ephy_history_service_execute_query_urls (EphyHistoryService *self, EphyHistoryQuery *query, gpointer *result)
+ephy_history_service_execute_query_urls (EphyHistoryService *self,
+                                         EphyHistoryQuery   *query,
+                                         gpointer           *result)
 {
   GList *urls = ephy_history_service_find_url_rows (self, query);
 
@@ -740,7 +786,11 @@ ephy_history_service_execute_query_urls (EphyHistoryService *self, EphyHistoryQu
 }
 
 void
-ephy_history_service_query_urls (EphyHistoryService *self, EphyHistoryQuery *query, GCancellable 
*cancellable, EphyHistoryJobCallback callback, gpointer user_data)
+ephy_history_service_query_urls (EphyHistoryService     *self,
+                                 EphyHistoryQuery       *query,
+                                 GCancellable           *cancellable,
+                                 EphyHistoryJobCallback  callback,
+                                 gpointer                user_data)
 {
   EphyHistoryServiceMessage *message;
 
@@ -754,10 +804,10 @@ ephy_history_service_query_urls (EphyHistoryService *self, EphyHistoryQuery *que
 }
 
 void
-ephy_history_service_get_hosts (EphyHistoryService    *self,
-                                GCancellable          *cancellable,
-                                EphyHistoryJobCallback callback,
-                                gpointer               user_data)
+ephy_history_service_get_hosts (EphyHistoryService     *self,
+                                GCancellable           *cancellable,
+                                EphyHistoryJobCallback  callback,
+                                gpointer                user_data)
 {
   EphyHistoryServiceMessage *message;
 
@@ -770,11 +820,11 @@ ephy_history_service_get_hosts (EphyHistoryService    *self,
 }
 
 void
-ephy_history_service_query_hosts (EphyHistoryService    *self,
-                                  EphyHistoryQuery      *query,
-                                  GCancellable          *cancellable,
-                                  EphyHistoryJobCallback callback,
-                                  gpointer               user_data)
+ephy_history_service_query_hosts (EphyHistoryService     *self,
+                                  EphyHistoryQuery       *query,
+                                  GCancellable           *cancellable,
+                                  EphyHistoryJobCallback  callback,
+                                  gpointer                user_data)
 {
   EphyHistoryServiceMessage *message;
 
@@ -829,12 +879,12 @@ ephy_history_service_execute_set_url_title (EphyHistoryService *self,
 }
 
 void
-ephy_history_service_set_url_title (EphyHistoryService    *self,
-                                    const char            *orig_url,
-                                    const char            *title,
-                                    GCancellable          *cancellable,
-                                    EphyHistoryJobCallback callback,
-                                    gpointer               user_data)
+ephy_history_service_set_url_title (EphyHistoryService     *self,
+                                    const char             *orig_url,
+                                    const char             *title,
+                                    GCancellable           *cancellable,
+                                    EphyHistoryJobCallback  callback,
+                                    gpointer                user_data)
 {
   EphyHistoryURL *url;
   EphyHistoryServiceMessage *message;
@@ -877,12 +927,12 @@ ephy_history_service_execute_set_url_zoom_level (EphyHistoryService *self,
 }
 
 void
-ephy_history_service_set_url_zoom_level (EphyHistoryService    *self,
-                                         const char            *url,
-                                         double                 zoom_level,
-                                         GCancellable          *cancellable,
-                                         EphyHistoryJobCallback callback,
-                                         gpointer               user_data)
+ephy_history_service_set_url_zoom_level (EphyHistoryService     *self,
+                                         const char             *url,
+                                         double                  zoom_level,
+                                         GCancellable           *cancellable,
+                                         EphyHistoryJobCallback  callback,
+                                         gpointer                user_data)
 {
   EphyHistoryServiceMessage *message;
   GVariant *variant;
@@ -925,12 +975,12 @@ ephy_history_service_execute_set_url_hidden (EphyHistoryService *self,
 }
 
 void
-ephy_history_service_set_url_hidden (EphyHistoryService    *self,
-                                     const char            *orig_url,
-                                     gboolean               hidden,
-                                     GCancellable          *cancellable,
-                                     EphyHistoryJobCallback callback,
-                                     gpointer               user_data)
+ephy_history_service_set_url_hidden (EphyHistoryService     *self,
+                                     const char             *orig_url,
+                                     gboolean                hidden,
+                                     GCancellable           *cancellable,
+                                     EphyHistoryJobCallback  callback,
+                                     gpointer                user_data)
 {
   EphyHistoryServiceMessage *message;
   EphyHistoryURL *url;
@@ -962,11 +1012,11 @@ ephy_history_service_execute_get_url (EphyHistoryService *self,
 }
 
 void
-ephy_history_service_get_url (EphyHistoryService    *self,
-                              const char            *url,
-                              GCancellable          *cancellable,
-                              EphyHistoryJobCallback callback,
-                              gpointer               user_data)
+ephy_history_service_get_url (EphyHistoryService     *self,
+                              const char             *url,
+                              GCancellable           *cancellable,
+                              EphyHistoryJobCallback  callback,
+                              gpointer                user_data)
 {
   EphyHistoryServiceMessage *message;
 
@@ -995,11 +1045,11 @@ ephy_history_service_execute_get_host_for_url (EphyHistoryService *self,
 }
 
 void
-ephy_history_service_get_host_for_url (EphyHistoryService    *self,
-                                       const char            *url,
-                                       GCancellable          *cancellable,
-                                       EphyHistoryJobCallback callback,
-                                       gpointer               user_data)
+ephy_history_service_get_host_for_url (EphyHistoryService     *self,
+                                       const char             *url,
+                                       GCancellable           *cancellable,
+                                       EphyHistoryJobCallback  callback,
+                                       gpointer                user_data)
 {
   EphyHistoryServiceMessage *message;
 
@@ -1064,10 +1114,10 @@ delete_host_signal_emit (SignalEmissionContext *ctx)
 }
 
 static gboolean
-ephy_history_service_execute_delete_host (EphyHistoryService    *self,
-                                          EphyHistoryHost       *host,
-                                          EphyHistoryJobCallback callback,
-                                          gpointer               user_data)
+ephy_history_service_execute_delete_host (EphyHistoryService     *self,
+                                          EphyHistoryHost        *host,
+                                          EphyHistoryJobCallback  callback,
+                                          gpointer                user_data)
 {
   SignalEmissionContext *ctx;
 
@@ -1106,11 +1156,11 @@ ephy_history_service_execute_clear (EphyHistoryService *self,
 }
 
 void
-ephy_history_service_delete_urls (EphyHistoryService    *self,
-                                  GList                 *urls,
-                                  GCancellable          *cancellable,
-                                  EphyHistoryJobCallback callback,
-                                  gpointer               user_data)
+ephy_history_service_delete_urls (EphyHistoryService     *self,
+                                  GList                  *urls,
+                                  GCancellable           *cancellable,
+                                  EphyHistoryJobCallback  callback,
+                                  gpointer                user_data)
 {
   EphyHistoryServiceMessage *message;
 
@@ -1124,11 +1174,11 @@ ephy_history_service_delete_urls (EphyHistoryService    *self,
 }
 
 void
-ephy_history_service_delete_host (EphyHistoryService    *self,
-                                  EphyHistoryHost       *host,
-                                  GCancellable          *cancellable,
-                                  EphyHistoryJobCallback callback,
-                                  gpointer               user_data)
+ephy_history_service_delete_host (EphyHistoryService     *self,
+                                  EphyHistoryHost        *host,
+                                  GCancellable           *cancellable,
+                                  EphyHistoryJobCallback  callback,
+                                  gpointer                user_data)
 {
   EphyHistoryServiceMessage *message =
     ephy_history_service_message_new (self, DELETE_HOST,
@@ -1138,10 +1188,10 @@ ephy_history_service_delete_host (EphyHistoryService    *self,
 }
 
 void
-ephy_history_service_clear (EphyHistoryService    *self,
-                            GCancellable          *cancellable,
-                            EphyHistoryJobCallback callback,
-                            gpointer               user_data)
+ephy_history_service_clear (EphyHistoryService     *self,
+                            GCancellable           *cancellable,
+                            EphyHistoryJobCallback  callback,
+                            gpointer                user_data)
 {
   EphyHistoryServiceMessage *message;
 
@@ -1154,9 +1204,9 @@ ephy_history_service_clear (EphyHistoryService    *self,
 }
 
 static void
-ephy_history_service_quit (EphyHistoryService    *self,
-                           EphyHistoryJobCallback callback,
-                           gpointer               user_data)
+ephy_history_service_quit (EphyHistoryService     *self,
+                           EphyHistoryJobCallback  callback,
+                           gpointer                user_data)
 {
   EphyHistoryServiceMessage *message =
     ephy_history_service_message_new (self, QUIT,
@@ -1224,14 +1274,16 @@ ephy_history_service_process_message (EphyHistoryService        *self,
 /* Public API. */
 
 void
-ephy_history_service_find_urls (EphyHistoryService *self,
-                                gint64 from, gint64 to,
-                                guint limit, gint host,
-                                GList *substring_list,
-                                EphyHistorySortType sort_type,
-                                GCancellable *cancellable,
-                                EphyHistoryJobCallback callback,
-                                gpointer user_data)
+ephy_history_service_find_urls (EphyHistoryService     *self,
+                                gint64                  from,
+                                gint64                  to,
+                                guint                   limit,
+                                gint                    host,
+                                GList                  *substring_list,
+                                EphyHistorySortType     sort_type,
+                                GCancellable           *cancellable,
+                                EphyHistoryJobCallback  callback,
+                                gpointer                user_data)
 {
   EphyHistoryQuery *query;
 
@@ -1277,11 +1329,12 @@ ephy_history_service_visit_url (EphyHistoryService       *self,
 }
 
 void
-ephy_history_service_find_hosts (EphyHistoryService *self,
-                                 gint64 from, gint64 to,
-                                 GCancellable *cancellable,
-                                 EphyHistoryJobCallback callback,
-                                 gpointer user_data)
+ephy_history_service_find_hosts (EphyHistoryService     *self,
+                                 gint64                  from,
+                                 gint64                  to,
+                                 GCancellable           *cancellable,
+                                 EphyHistoryJobCallback  callback,
+                                 gpointer                user_data)
 {
   EphyHistoryQuery *query;
 
diff --git a/lib/history/ephy-history-types.c b/lib/history/ephy-history-types.c
index 779a06add..9a806f7fd 100644
--- a/lib/history/ephy-history-types.c
+++ b/lib/history/ephy-history-types.c
@@ -23,7 +23,9 @@
 #include "ephy-history-types.h"
 
 EphyHistoryPageVisit *
-ephy_history_page_visit_new_with_url (EphyHistoryURL *url, gint64 visit_time, EphyHistoryPageVisitType 
visit_type)
+ephy_history_page_visit_new_with_url (EphyHistoryURL           *url,
+                                      gint64                    visit_time,
+                                      EphyHistoryPageVisitType  visit_type)
 {
   EphyHistoryPageVisit *visit = g_new0 (EphyHistoryPageVisit, 1);
   visit->id = -1;
@@ -34,7 +36,9 @@ ephy_history_page_visit_new_with_url (EphyHistoryURL *url, gint64 visit_time, Ep
 }
 
 EphyHistoryPageVisit *
-ephy_history_page_visit_new (const char *url, gint64 visit_time, EphyHistoryPageVisitType visit_type)
+ephy_history_page_visit_new (const char               *url,
+                             gint64                    visit_time,
+                             EphyHistoryPageVisitType  visit_type)
 {
   return ephy_history_page_visit_new_with_url (ephy_history_url_new (url, url, 0, 0, 0),
                                                visit_time, visit_type);
@@ -78,7 +82,10 @@ ephy_history_page_visit_list_free (GList *list)
 }
 
 EphyHistoryHost *
-ephy_history_host_new (const char *url, const char *title, int visit_count, double zoom_level)
+ephy_history_host_new (const char *url,
+                       const char *title,
+                       int         visit_count,
+                       double      zoom_level)
 {
   EphyHistoryHost *host = g_new0 (EphyHistoryHost, 1);
 
@@ -120,7 +127,11 @@ ephy_history_host_free (EphyHistoryHost *host)
 }
 
 EphyHistoryURL *
-ephy_history_url_new (const char *url, const char *title, int visit_count, int typed_count, gint64 
last_visit_time)
+ephy_history_url_new (const char *url,
+                      const char *title,
+                      int         visit_count,
+                      int         typed_count,
+                      gint64      last_visit_time)
 {
   EphyHistoryURL *history_url = g_new0 (EphyHistoryURL, 1);
   history_url->id = -1;
diff --git a/lib/safe-browsing/ephy-gsb-service.c b/lib/safe-browsing/ephy-gsb-service.c
index 8a89f26cb..ef8e2a446 100644
--- a/lib/safe-browsing/ephy-gsb-service.c
+++ b/lib/safe-browsing/ephy-gsb-service.c
@@ -40,18 +40,18 @@
 struct _EphyGSBService {
   GObject parent_instance;
 
-  char           *api_key;
+  char *api_key;
   EphyGSBStorage *storage;
 
-  gboolean        is_updating;
-  guint           source_id;
+  gboolean is_updating;
+  guint source_id;
 
-  gint64          next_full_hashes_time;
-  gint64          next_list_updates_time;
-  gint64          back_off_exit_time;
-  gint64          back_off_num_fails;
+  gint64 next_full_hashes_time;
+  gint64 next_list_updates_time;
+  gint64 back_off_exit_time;
+  gint64 back_off_num_fails;
 
-  SoupSession    *session;
+  SoupSession *session;
 };
 
 G_DEFINE_TYPE (EphyGSBService, ephy_gsb_service, G_TYPE_OBJECT);
diff --git a/lib/safe-browsing/ephy-gsb-storage.c b/lib/safe-browsing/ephy-gsb-storage.c
index 44e3aa683..1d3068660 100644
--- a/lib/safe-browsing/ephy-gsb-storage.c
+++ b/lib/safe-browsing/ephy-gsb-storage.c
@@ -44,10 +44,10 @@
  * The format is {THREAT_TYPE, PLATFORM_TYPE, THREAT_ENTRY_TYPE}.
  */
 static const char * const gsb_linux_threat_lists[][3] = {
-  {GSB_THREAT_TYPE_MALWARE,            "LINUX",        "URL"},
+  {GSB_THREAT_TYPE_MALWARE, "LINUX", "URL"},
   {GSB_THREAT_TYPE_SOCIAL_ENGINEERING, "ANY_PLATFORM", "URL"},
-  {GSB_THREAT_TYPE_UNWANTED_SOFTWARE,  "LINUX",        "URL"},
-  {GSB_THREAT_TYPE_MALWARE,            "LINUX",        "IP_RANGE"},
+  {GSB_THREAT_TYPE_UNWANTED_SOFTWARE, "LINUX", "URL"},
+  {GSB_THREAT_TYPE_MALWARE, "LINUX", "IP_RANGE"},
 };
 
 struct _EphyGSBStorage {
@@ -746,7 +746,7 @@ ephy_gsb_storage_compute_checksum (EphyGSBStorage    *self,
   GError *error = NULL;
   const char *sql;
   char *retval = NULL;
-  GChecksum *checksum ;
+  GChecksum *checksum;
   guint8 *digest;
   gsize digest_len = GSB_HASH_SIZE;
 
diff --git a/lib/safe-browsing/ephy-gsb-utils.c b/lib/safe-browsing/ephy-gsb-utils.c
index 9abb4511d..d3cc81605 100644
--- a/lib/safe-browsing/ephy-gsb-utils.c
+++ b/lib/safe-browsing/ephy-gsb-utils.c
@@ -35,15 +35,15 @@
 
 typedef struct {
   guint8 *data;     /* The bit stream as an array of bytes */
-  gsize   data_len; /* The number of bytes in the array */
+  gsize data_len;   /* The number of bytes in the array */
   guint8 *curr;     /* The current byte in the bit stream */
-  guint8  mask;     /* Bit mask to read a bit within a byte */
-  gsize   num_read; /* The number of bits read so far */
+  guint8 mask;      /* Bit mask to read a bit within a byte */
+  gsize num_read;   /* The number of bits read so far */
 } EphyGSBBitReader;
 
 typedef struct {
   EphyGSBBitReader *reader;
-  guint             parameter; /* Golomb-Rice parameter, between 2 and 28 */
+  guint parameter;             /* Golomb-Rice parameter, between 2 and 28 */
 } EphyGSBRiceDecoder;
 
 static inline EphyGSBBitReader *
diff --git a/lib/sync/debug/ephy-sync-debug.c b/lib/sync/debug/ephy-sync-debug.c
index 8a5a46c31..fc5803d60 100644
--- a/lib/sync/debug/ephy-sync-debug.c
+++ b/lib/sync/debug/ephy-sync-debug.c
@@ -166,7 +166,7 @@ ephy_sync_debug_make_delete_body (const char          *id,
   g_assert (bundle);
 
   record = g_strdup_printf ("{\"id\": \"%s\", \"deleted\": true}", id);
-  payload = ephy_sync_crypto_encrypt_record (record,  bundle);
+  payload = ephy_sync_crypto_encrypt_record (record, bundle);
   json = json_object_new ();
   json_object_set_string_member (json, "id", id);
   json_object_set_string_member (json, "payload", payload);
@@ -242,7 +242,7 @@ ephy_sync_debug_prepare_soup_message (const char   *url,
     soup_message_set_request (msg, content_type, SOUP_MEMORY_COPY, body, strlen (body));
   }
 
-  if (!g_strcmp0 (method, "PUT") || !g_strcmp0(method, "POST"))
+  if (!g_strcmp0 (method, "PUT") || !g_strcmp0 (method, "POST"))
     soup_message_headers_append (msg->request_headers, "content-type", content_type);
 
   header = ephy_sync_crypto_hawk_header_new (url, method, hawk_id,
diff --git a/lib/sync/ephy-history-manager.c b/lib/sync/ephy-history-manager.c
index 4fa69cce9..df94e2034 100644
--- a/lib/sync/ephy-history-manager.c
+++ b/lib/sync/ephy-history-manager.c
@@ -46,12 +46,12 @@ enum {
 static GParamSpec *obj_properties[LAST_PROP];
 
 typedef struct {
-  EphyHistoryManager                     *manager;
-  gboolean                                is_initial;
-  GList                                  *remotes_deleted;
-  GList                                  *remotes_updated;
-  EphySynchronizableManagerMergeCallback  callback;
-  gpointer                                user_data;
+  EphyHistoryManager *manager;
+  gboolean is_initial;
+  GList *remotes_deleted;
+  GList *remotes_updated;
+  EphySynchronizableManagerMergeCallback callback;
+  gpointer user_data;
 } MergeHistoryAsyncData;
 
 static MergeHistoryAsyncData *
@@ -364,7 +364,7 @@ ephy_history_manager_handle_initial_merge (EphyHistoryManager *self,
 
       g_hash_table_remove (records_ht_id, remote_id);
     } else {
-    /* Try find by URL. */
+      /* Try find by URL. */
       record = g_hash_table_lookup (records_ht_url, remote_url);
       if (record) {
         /* Different ID, same URL. Keep local ID. */
@@ -391,11 +391,11 @@ ephy_history_manager_handle_initial_merge (EphyHistoryManager *self,
 }
 
 static GPtrArray *
-ephy_history_manager_handle_regular_merge (EphyHistoryManager  *self,
-                                           GHashTable          *records_ht_id,
-                                           GHashTable          *records_ht_url,
-                                           GList               *deleted_records,
-                                           GList               *updated_records)
+ephy_history_manager_handle_regular_merge (EphyHistoryManager *self,
+                                           GHashTable         *records_ht_id,
+                                           GHashTable         *records_ht_url,
+                                           GList              *deleted_records,
+                                           GList              *updated_records)
 {
   EphyHistoryRecord *record;
   GPtrArray *to_upload;
diff --git a/lib/sync/ephy-history-record.c b/lib/sync/ephy-history-record.c
index f0f675deb..c805a26c1 100644
--- a/lib/sync/ephy-history-record.c
+++ b/lib/sync/ephy-history-record.c
@@ -27,9 +27,9 @@
 struct _EphyHistoryRecord {
   GObject parent_instance;
 
-  char      *id;
-  char      *title;
-  char      *uri;
+  char *id;
+  char *title;
+  char *uri;
   GSequence *visits;
 };
 
diff --git a/lib/sync/ephy-open-tabs-record.c b/lib/sync/ephy-open-tabs-record.c
index 6d89cd04e..99c34f901 100644
--- a/lib/sync/ephy-open-tabs-record.c
+++ b/lib/sync/ephy-open-tabs-record.c
@@ -26,8 +26,8 @@
 struct _EphyOpenTabsRecord {
   GObject parent_instance;
 
-  char  *id;
-  char  *client_name;
+  char *id;
+  char *client_name;
 
   /* List of JSON objects. Each object describes a tab and has the fields:
    * @title: a string representing the title of the current page
diff --git a/lib/sync/ephy-password-manager.c b/lib/sync/ephy-password-manager.c
index 2d138d674..a27cdbafe 100644
--- a/lib/sync/ephy-password-manager.c
+++ b/lib/sync/ephy-password-manager.c
@@ -68,21 +68,21 @@ typedef struct {
 
 typedef struct {
   EphyPasswordManager *manager;
-  char                *password;
+  char *password;
 } UpdatePasswordAsyncData;
 
 typedef struct {
   EphyPasswordManager *manager;
-  EphyPasswordRecord  *record;
+  EphyPasswordRecord *record;
 } ManageRecordAsyncData;
 
 typedef struct {
-  EphyPasswordManager                    *manager;
-  gboolean                                is_initial;
-  GList                                  *remotes_deleted;
-  GList                                  *remotes_updated;
-  EphySynchronizableManagerMergeCallback  callback;
-  gpointer                                user_data;
+  EphyPasswordManager *manager;
+  gboolean is_initial;
+  GList *remotes_deleted;
+  GList *remotes_updated;
+  EphySynchronizableManagerMergeCallback callback;
+  gpointer user_data;
 } MergePasswordsAsyncData;
 
 static QueryAsyncData *
@@ -220,7 +220,7 @@ get_attributes_table (const char *id,
   if (server_time_modified >= 0)
     g_hash_table_insert (attributes,
                          g_strdup (SERVER_TIME_MODIFIED_KEY),
-                         g_strdup_printf ("%"PRId64, server_time_modified));
+                         g_strdup_printf ("%" PRId64, server_time_modified));
 
   return attributes;
 }
@@ -688,8 +688,8 @@ ephy_password_manager_forget (EphyPasswordManager *self,
   g_assert (id);
 
   /* synchronizable-deleted signal needs an EphySynchronizable object,
-   * therefore we need to obtain the password record first and then emit
-   * the signal before clearing the password from the secret schema. */
+  * therefore we need to obtain the password record first and then emit
+  * the signal before clearing the password from the secret schema. */
   ephy_password_manager_query (self, id,
                                NULL, NULL, NULL, NULL, NULL,
                                forget_cb, self);
@@ -926,7 +926,7 @@ ephy_password_manager_handle_initial_merge (EphyPasswordManager *self,
         local_timestamp = ephy_password_record_get_time_password_changed (record);
         if (local_timestamp > remote_timestamp) {
           /* Local record is newer. Keep it and upload it to server.
-           * Also, must keep the most recent server time modified. */
+          * Also, must keep the most recent server time modified. */
           local_server_time_modified = ephy_synchronizable_get_server_time_modified (EPHY_SYNCHRONIZABLE 
(record));
           if (local_server_time_modified < remote_server_time_modified) {
             ephy_synchronizable_set_server_time_modified (EPHY_SYNCHRONIZABLE (record),
diff --git a/lib/sync/ephy-password-record.c b/lib/sync/ephy-password-record.c
index 85e25f54d..5e320a5a3 100644
--- a/lib/sync/ephy-password-record.c
+++ b/lib/sync/ephy-password-record.c
@@ -26,16 +26,16 @@
 struct _EphyPasswordRecord {
   GObject parent_instance;
 
-  char    *id;
-  char    *origin;
-  char    *target_origin;
-  char    *username;
-  char    *password;
-  char    *username_field;
-  char    *password_field;
-  guint64  time_created;
-  guint64  time_password_changed;
-  gint64   server_time_modified;
+  char *id;
+  char *origin;
+  char *target_origin;
+  char *username;
+  char *password;
+  char *username_field;
+  char *password_field;
+  guint64 time_created;
+  guint64 time_password_changed;
+  gint64 server_time_modified;
 };
 
 static void json_serializable_iface_init (JsonSerializableIface *iface);
diff --git a/lib/sync/ephy-sync-crypto.c b/lib/sync/ephy-sync-crypto.c
index d79a2d648..e5333fbc8 100644
--- a/lib/sync/ephy-sync-crypto.c
+++ b/lib/sync/ephy-sync-crypto.c
@@ -543,18 +543,18 @@ ephy_sync_crypto_hkdf (const guint8 *in,
   prk = g_malloc (SHA256_DIGEST_SIZE);
   out = g_malloc (out_len);
 
-  hmac_sha256_set_key(&ctx, SHA256_DIGEST_SIZE, salt);
-  hkdf_extract(&ctx,
+  hmac_sha256_set_key (&ctx, SHA256_DIGEST_SIZE, salt);
+  hkdf_extract (&ctx,
+                (nettle_hash_update_func *)hmac_sha256_update,
+                (nettle_hash_digest_func *)hmac_sha256_digest,
+                SHA256_DIGEST_SIZE,
+                in_len, in, prk);
+  hmac_sha256_set_key (&ctx, SHA256_DIGEST_SIZE, prk);
+  hkdf_expand (&ctx,
                (nettle_hash_update_func *)hmac_sha256_update,
                (nettle_hash_digest_func *)hmac_sha256_digest,
                SHA256_DIGEST_SIZE,
-               in_len, in, prk);
-  hmac_sha256_set_key(&ctx, SHA256_DIGEST_SIZE, prk);
-  hkdf_expand(&ctx,
-              (nettle_hash_update_func *)hmac_sha256_update,
-              (nettle_hash_digest_func *)hmac_sha256_digest,
-              SHA256_DIGEST_SIZE,
-              info_len, info, out_len, out);
+               info_len, info, out_len, out);
 
   g_free (salt);
   g_free (prk);
@@ -874,7 +874,7 @@ ephy_sync_crypto_create_assertion (const char           *certificate,
 
   /* Encode the header and body to base64 url safe and join them. */
   expires_at = g_get_real_time () / 1000 + seconds * 1000;
-  body = g_strdup_printf ("{\"exp\": %"PRIu64", \"aud\": \"%s\"}", expires_at, audience);
+  body = g_strdup_printf ("{\"exp\": %" PRIu64 ", \"aud\": \"%s\"}", expires_at, audience);
   body_b64 = ephy_sync_utils_base64_urlsafe_encode ((guint8 *)body, strlen (body), TRUE);
   header_b64 = ephy_sync_utils_base64_urlsafe_encode ((guint8 *)header, strlen (header), TRUE);
   to_sign = g_strdup_printf ("%s.%s", header_b64, body_b64);
@@ -942,7 +942,7 @@ ephy_sync_crypto_aes_256_encrypt (const char   *text,
   guint8 *padded;
   guint8 *encrypted;
   gsize padded_len;
-  struct CBC_CTX(struct aes256_ctx, AES_BLOCK_SIZE) ctx;
+  struct CBC_CTX (struct aes256_ctx, AES_BLOCK_SIZE) ctx;
 
   g_assert (text);
   g_assert (key);
@@ -952,9 +952,9 @@ ephy_sync_crypto_aes_256_encrypt (const char   *text,
   padded = ephy_sync_crypto_pad (text, AES_BLOCK_SIZE, &padded_len);
   encrypted = g_malloc (padded_len);
 
-  aes256_set_encrypt_key(&ctx.ctx, key);
-  CBC_SET_IV(&ctx, iv);
-  CBC_ENCRYPT(&ctx, aes256_encrypt, padded_len, encrypted, padded);
+  aes256_set_encrypt_key (&ctx.ctx, key);
+  CBC_SET_IV (&ctx, iv);
+  CBC_ENCRYPT (&ctx, aes256_encrypt, padded_len, encrypted, padded);
 
   *out_len = padded_len;
   g_free (padded);
@@ -1070,7 +1070,7 @@ ephy_sync_crypto_aes_256_decrypt (const guint8 *data,
 {
   guint8 *decrypted;
   char *unpadded;
-  struct CBC_CTX(struct aes256_ctx, AES_BLOCK_SIZE) ctx;
+  struct CBC_CTX (struct aes256_ctx, AES_BLOCK_SIZE) ctx;
 
   g_assert (data);
   g_assert (key);
diff --git a/lib/sync/ephy-sync-service.c b/lib/sync/ephy-sync-service.c
index 276f5cb7c..00f7ae2f5 100644
--- a/lib/sync/ephy-sync-service.c
+++ b/lib/sync/ephy-sync-service.c
@@ -36,24 +36,24 @@
 #include <string.h>
 
 struct _EphySyncService {
-  GObject      parent_instance;
+  GObject parent_instance;
 
   SoupSession *session;
-  guint        source_id;
+  guint source_id;
 
-  char        *user;
-  char        *crypto_keys;
-  GHashTable  *secrets;
-  GSList      *managers;
-
-  gboolean     locked;
-  char        *storage_endpoint;
-  char        *storage_credentials_id;
-  char        *storage_credentials_key;
-  gint64       storage_credentials_expiry_time;
-  GQueue      *storage_queue;
-
-  char                 *certificate;
+  char *user;
+  char *crypto_keys;
+  GHashTable *secrets;
+  GSList *managers;
+
+  gboolean locked;
+  char *storage_endpoint;
+  char *storage_credentials_id;
+  char *storage_credentials_key;
+  gint64 storage_credentials_expiry_time;
+  GQueue *storage_queue;
+
+  char *certificate;
   SyncCryptoRSAKeyPair *key_pair;
 
   gboolean sync_periodically;
@@ -96,51 +96,51 @@ enum {
 static guint signals[LAST_SIGNAL];
 
 typedef struct {
-  char                *endpoint;
-  char                *method;
-  char                *request_body;
-  gint64               modified_since;
-  gint64               unmodified_since;
-  SoupSessionCallback  callback;
-  gpointer             user_data;
+  char *endpoint;
+  char *method;
+  char *request_body;
+  gint64 modified_since;
+  gint64 unmodified_since;
+  SoupSessionCallback callback;
+  gpointer user_data;
 } StorageRequestAsyncData;
 
 typedef struct {
   EphySyncService *service;
-  char            *email;
-  char            *uid;
-  char            *session_token;
-  char            *unwrap_kb;
-  char            *token_id_hex;
-  guint8          *req_hmac_key;
-  guint8          *resp_hmac_key;
-  guint8          *resp_xor_key;
+  char *email;
+  char *uid;
+  char *session_token;
+  char *unwrap_kb;
+  char *token_id_hex;
+  guint8 *req_hmac_key;
+  guint8 *resp_hmac_key;
+  guint8 *resp_xor_key;
 } SignInAsyncData;
 
 typedef struct {
-  EphySyncService           *service;
+  EphySyncService *service;
   EphySynchronizableManager *manager;
-  gboolean                   is_initial;
-  gboolean                   is_last;
-  GList                     *remotes_deleted;
-  GList                     *remotes_updated;
+  gboolean is_initial;
+  gboolean is_last;
+  GList *remotes_deleted;
+  GList *remotes_updated;
 } SyncCollectionAsyncData;
 
 typedef struct {
-  EphySyncService           *service;
+  EphySyncService *service;
   EphySynchronizableManager *manager;
-  EphySynchronizable        *synchronizable;
+  EphySynchronizable *synchronizable;
 } SyncAsyncData;
 
 typedef struct {
-  EphySyncService           *service;
+  EphySyncService *service;
   EphySynchronizableManager *manager;
-  GPtrArray                 *synchronizables;
-  guint                      start;
-  guint                      end;
-  char                      *batch_id;
-  gboolean                   batch_is_last;
-  gboolean                   sync_done;
+  GPtrArray *synchronizables;
+  guint start;
+  guint end;
+  char *batch_id;
+  gboolean batch_is_last;
+  gboolean sync_done;
 } BatchUploadAsyncData;
 
 static StorageRequestAsyncData *
@@ -546,12 +546,12 @@ ephy_sync_service_send_storage_request (EphySyncService         *self,
     soup_message_headers_append (msg->request_headers, "content-type", content_type);
 
   if (data->modified_since >= 0) {
-    if_modified_since = g_strdup_printf ("%"PRId64, data->modified_since);
+    if_modified_since = g_strdup_printf ("%" PRId64, data->modified_since);
     soup_message_headers_append (msg->request_headers, "X-If-Modified-Since", if_modified_since);
   }
 
   if (data->unmodified_since >= 0) {
-    if_unmodified_since = g_strdup_printf ("%"PRId64, data->unmodified_since);
+    if_unmodified_since = g_strdup_printf ("%" PRId64, data->unmodified_since);
     soup_message_headers_append (msg->request_headers, "X-If-Unmodified-Since", if_unmodified_since);
   }
 
@@ -1607,7 +1607,7 @@ ephy_sync_service_sync_collection (EphySyncService           *self,
   if (is_initial) {
     endpoint = g_strdup_printf ("storage/%s?full=true", collection);
   } else {
-    endpoint = g_strdup_printf ("storage/%s?newer=%"PRId64"&full=true", collection,
+    endpoint = g_strdup_printf ("storage/%s?newer=%" PRId64 "&full=true", collection,
                                 ephy_synchronizable_manager_get_sync_time (manager));
   }
 
diff --git a/lib/widgets/ephy-certificate-dialog.c b/lib/widgets/ephy-certificate-dialog.c
index a8df188dc..9d7db8665 100644
--- a/lib/widgets/ephy-certificate-dialog.c
+++ b/lib/widgets/ephy-certificate-dialog.c
@@ -328,11 +328,11 @@ ephy_certificate_dialog_init (EphyCertificateDialog *dialog)
 }
 
 GtkWidget *
-ephy_certificate_dialog_new (GtkWindow           *parent,
-                             const char          *address,
-                             GTlsCertificate     *certificate,
-                             GTlsCertificateFlags tls_errors,
-                             EphySecurityLevel    security_level)
+ephy_certificate_dialog_new (GtkWindow            *parent,
+                             const char           *address,
+                             GTlsCertificate      *certificate,
+                             GTlsCertificateFlags  tls_errors,
+                             EphySecurityLevel     security_level)
 {
   GtkWidget *dialog;
 
diff --git a/lib/widgets/ephy-download-widget.c b/lib/widgets/ephy-download-widget.c
index 3bf611088..8ca0442ba 100644
--- a/lib/widgets/ephy-download-widget.c
+++ b/lib/widgets/ephy-download-widget.c
@@ -118,7 +118,7 @@ get_remaining_time (guint64 content_length,
 static void
 update_download_icon (EphyDownloadWidget *widget)
 {
-  g_autoptr(GIcon) icon = NULL;
+  g_autoptr (GIcon) icon = NULL;
   const char *content_type;
 
   content_type = ephy_download_get_content_type (widget->download);
diff --git a/lib/widgets/ephy-downloads-popover.c b/lib/widgets/ephy-downloads-popover.c
index d6a6bd50b..3bcacdf36 100644
--- a/lib/widgets/ephy-downloads-popover.c
+++ b/lib/widgets/ephy-downloads-popover.c
@@ -100,7 +100,7 @@ static void
 download_removed_cb (EphyDownloadsPopover *popover,
                      EphyDownload         *download)
 {
-  g_autoptr(GList) children = NULL;
+  g_autoptr (GList) children = NULL;
   GList *l;
   EphyDownloadsManager *manager;
 
@@ -134,7 +134,7 @@ download_removed_cb (EphyDownloadsPopover *popover,
 static void
 clear_button_clicked_cb (EphyDownloadsPopover *popover)
 {
-  g_autoptr(GList) children = NULL;
+  g_autoptr (GList) children = NULL;
   GList *l;
   EphyDownloadsManager *manager;
 
diff --git a/lib/widgets/ephy-file-chooser.c b/lib/widgets/ephy-file-chooser.c
index 4cd906145..a69958297 100644
--- a/lib/widgets/ephy-file-chooser.c
+++ b/lib/widgets/ephy-file-chooser.c
@@ -104,7 +104,7 @@ update_preview_cb (GtkFileChooser *file_chooser,
   gint preview_width = 0;
   gint preview_height = 0;
   struct g_stat st_buf;
-  g_autoptr(GdkPixbuf) pixbuf = NULL;
+  g_autoptr (GdkPixbuf) pixbuf = NULL;
 
   GdkPixbufFormat *preview_format = gdk_pixbuf_get_file_info (filename,
                                                               &preview_width,
@@ -112,7 +112,7 @@ update_preview_cb (GtkFileChooser *file_chooser,
 
   if (!filename || g_stat (filename, &st_buf) || (!S_ISREG (st_buf.st_mode))) {
     gtk_file_chooser_set_preview_widget_active (file_chooser, FALSE);
-    return; // stat failed or file is not regular
+    return; /* stat failed or file is not regular */
   }
 
   if (!preview_format ||
@@ -120,7 +120,7 @@ update_preview_cb (GtkFileChooser *file_chooser,
       preview_width > MAX_PREVIEW_SOURCE_SIZE ||
       preview_height > MAX_PREVIEW_SOURCE_SIZE) {
     gtk_file_chooser_set_preview_widget_active (file_chooser, FALSE);
-    return; // unpreviewable, 0px, or unsafely large
+    return; /* unpreviewable, 0px, or unsafely large */
   }
 
   if (preview_width > MAX_PREVIEW_SIZE || preview_height > MAX_PREVIEW_SIZE) {
@@ -143,10 +143,10 @@ update_preview_cb (GtkFileChooser *file_chooser,
 }
 
 GtkFileChooser *
-ephy_create_file_chooser (const char           *title,
-                          GtkWidget            *parent,
-                          GtkFileChooserAction  action,
-                          EphyFileFilterDefault default_filter)
+ephy_create_file_chooser (const char            *title,
+                          GtkWidget             *parent,
+                          GtkFileChooserAction   action,
+                          EphyFileFilterDefault  default_filter)
 {
   GtkFileChooser *dialog;
   GtkFileFilter *filter[EPHY_FILE_FILTER_LAST];
diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c
index 7ec8e1fb2..d26020e11 100644
--- a/lib/widgets/ephy-location-entry.c
+++ b/lib/widgets/ephy-location-entry.c
@@ -87,7 +87,8 @@ struct _EphyLocationEntry {
   EphySecurityLevel security_level;
 };
 
-static gboolean ephy_location_entry_reset_internal (EphyLocationEntry *, gboolean);
+static gboolean ephy_location_entry_reset_internal (EphyLocationEntry *,
+                                                    gboolean);
 
 enum {
   PROP_0,
@@ -106,7 +107,8 @@ enum signalsEnum {
 static gint signals[LAST_SIGNAL] = { 0 };
 
 static void ephy_location_entry_title_widget_interface_init (EphyTitleWidgetInterface *iface);
-static void schedule_dns_prefetch (EphyLocationEntry *entry, const gchar *url);
+static void schedule_dns_prefetch (EphyLocationEntry *entry,
+                                   const gchar       *url);
 
 G_DEFINE_TYPE_WITH_CODE (EphyLocationEntry, ephy_location_entry, GTK_TYPE_OVERLAY,
                          G_IMPLEMENT_INTERFACE (EPHY_TYPE_TITLE_WIDGET,
@@ -217,8 +219,8 @@ ephy_location_entry_title_widget_get_security_level (EphyTitleWidget *widget)
 }
 
 static void
-ephy_location_entry_title_widget_set_security_level (EphyTitleWidget   *widget,
-                                                     EphySecurityLevel  security_level)
+ephy_location_entry_title_widget_set_security_level (EphyTitleWidget  *widget,
+                                                     EphySecurityLevel security_level)
 
 {
   EphyLocationEntry *entry = EPHY_LOCATION_ENTRY (widget);
@@ -689,10 +691,10 @@ entry_populate_popup_cb (GtkEntry          *entry,
 }
 
 static gboolean
-icon_button_icon_press_event_cb (GtkWidget           *widget,
-                                 GtkEntryIconPosition position,
-                                 GdkEventButton      *event,
-                                 EphyLocationEntry   *entry)
+icon_button_icon_press_event_cb (GtkWidget            *widget,
+                                 GtkEntryIconPosition  position,
+                                 GdkEventButton       *event,
+                                 EphyLocationEntry    *entry)
 {
   if (((event->type == GDK_BUTTON_PRESS &&
         event->button == 1) ||
@@ -711,14 +713,14 @@ icon_button_icon_press_event_cb (GtkWidget           *widget,
 }
 
 static gboolean
-bookmark_icon_button_press_event_cb (GtkWidget           *entry,
-                                     GdkEventButton      *event,
-                                     EphyLocationEntry   *lentry)
+bookmark_icon_button_press_event_cb (GtkWidget         *entry,
+                                     GdkEventButton    *event,
+                                     EphyLocationEntry *lentry)
 {
   if (((event->type == GDK_BUTTON_PRESS &&
         event->button == 1) ||
        (event->type == GDK_TOUCH_BEGIN))) {
-      g_signal_emit (lentry, signals[BOOKMARK_CLICKED], 0);
+    g_signal_emit (lentry, signals[BOOKMARK_CLICKED], 0);
   }
 
   return TRUE;
@@ -759,8 +761,8 @@ button_box_size_allocated_cb (GtkWidget    *widget,
    *
    * FIXME: Loading CSS during size_allocate is ILLEGAL and BROKEN.
    */
-  css = g_strdup_printf (".url_entry { padding-right: %dpx; }"\
-                         ".url_entry:dir(rtl) { padding-left: %dpx; padding-right: %dpx; }"\
+  css = g_strdup_printf (".url_entry { padding-right: %dpx; }" \
+                         ".url_entry:dir(rtl) { padding-left: %dpx; padding-right: %dpx; }" \
                          ".url_entry progress { margin-right: -%dpx; }",
                          lentry->allocation_width + 5,
                          lentry->allocation_width + 5,
@@ -892,7 +894,7 @@ ephy_location_entry_construct_contents (EphyLocationEntry *entry)
   gtk_widget_set_tooltip_text (entry->bookmark, _("Bookmark this page"));
   gtk_widget_show (entry->bookmark);
   g_signal_connect (G_OBJECT (entry->bookmark_event_box), "button_press_event", G_CALLBACK 
(bookmark_icon_button_press_event_cb), entry);
-  gtk_container_add (GTK_CONTAINER(entry->bookmark_event_box), entry->bookmark);
+  gtk_container_add (GTK_CONTAINER (entry->bookmark_event_box), entry->bookmark);
   gtk_box_pack_end (GTK_BOX (button_box), entry->bookmark_event_box, FALSE, FALSE, 6);
 
   context = gtk_widget_get_style_context (entry->bookmark);
@@ -903,7 +905,7 @@ ephy_location_entry_construct_contents (EphyLocationEntry *entry)
   entry->reader_mode = gtk_image_new_from_icon_name ("ephy-reader-mode-symbolic", GTK_ICON_SIZE_MENU);
   gtk_widget_set_tooltip_text (entry->reader_mode, _("Toggle reader mode"));
   gtk_widget_show (entry->reader_mode);
-  gtk_container_add (GTK_CONTAINER(entry->reader_mode_event_box), entry->reader_mode);
+  gtk_container_add (GTK_CONTAINER (entry->reader_mode_event_box), entry->reader_mode);
   gtk_box_pack_end (GTK_BOX (button_box), entry->reader_mode_event_box, FALSE, FALSE, 6);
 
   context = gtk_widget_get_style_context (entry->reader_mode);
@@ -916,7 +918,7 @@ ephy_location_entry_construct_contents (EphyLocationEntry *entry)
                     NULL);
 
   g_signal_connect (entry->url_entry, "suggestion-activated",
-                          G_CALLBACK (ephy_location_entry_suggestion_activated), entry);
+                    G_CALLBACK (ephy_location_entry_suggestion_activated), entry);
 }
 
 static void
@@ -975,8 +977,8 @@ proxy_resolver_ready_cb (GObject      *object,
 {
   PrefetchHelper *helper = user_data;
   GProxyResolver *resolver = G_PROXY_RESOLVER (object);
-  g_autoptr(GError) error = NULL;
-  g_auto(GStrv) proxies = NULL;
+  g_autoptr (GError) error = NULL;
+  g_auto (GStrv) proxies = NULL;
 
   proxies = g_proxy_resolver_lookup_finish (resolver, result, &error);
   if (error != NULL) {
@@ -1309,7 +1311,7 @@ ephy_location_entry_set_progress (EphyLocationEntry *entry,
   if (entry->progress_timeout) {
     g_source_remove (entry->progress_timeout);
     entry->progress_timeout = 0;
- }
+  }
 
   if (!loading) {
     /* Setting progress to 0 when it is already 0 can actually cause the
diff --git a/lib/widgets/ephy-security-popover.c b/lib/widgets/ephy-security-popover.c
index 867b09350..ec60d84fb 100644
--- a/lib/widgets/ephy-security-popover.c
+++ b/lib/widgets/ephy-security-popover.c
@@ -429,16 +429,16 @@ handle_permission_combobox_changed (EphySecurityPopover *popover,
   permissions_manager = ephy_embed_shell_get_permissions_manager (ephy_embed_shell_get_default ());
 
   switch (action) {
-  case 0:
-    permission = EPHY_PERMISSION_PERMIT;
-    break;
-  default:
-  case 1:
-    permission = EPHY_PERMISSION_DENY;
-    break;
-  case 2:
-    permission = EPHY_PERMISSION_UNDECIDED;
-    break;
+    case 0:
+      permission = EPHY_PERMISSION_PERMIT;
+      break;
+    default:
+    case 1:
+      permission = EPHY_PERMISSION_DENY;
+      break;
+    case 2:
+      permission = EPHY_PERMISSION_UNDECIDED;
+      break;
   }
 
   ephy_permissions_manager_set_permission (permissions_manager,
diff --git a/lib/widgets/ephy-title-box.c b/lib/widgets/ephy-title-box.c
index 3ceca1f44..e12a55e8c 100644
--- a/lib/widgets/ephy-title-box.c
+++ b/lib/widgets/ephy-title-box.c
@@ -150,8 +150,8 @@ ephy_title_box_title_widget_get_security_level (EphyTitleWidget *widget)
 }
 
 static void
-ephy_title_box_title_widget_set_security_level (EphyTitleWidget  *widget,
-                                                EphySecurityLevel security_level)
+ephy_title_box_title_widget_set_security_level (EphyTitleWidget   *widget,
+                                                EphySecurityLevel  security_level)
 {
   EphyTitleBox *title_box = EPHY_TITLE_BOX (widget);
   const char *icon_name;
@@ -221,7 +221,7 @@ ephy_title_box_title_widget_interface_init (EphyTitleWidgetInterface *iface)
 static void
 ephy_title_box_class_init (EphyTitleBoxClass *klass)
 {
-  GObjectClass   *object_class = G_OBJECT_CLASS (klass);
+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
   GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
 
   object_class->constructed = ephy_title_box_constructed;
diff --git a/src/bookmarks/ephy-add-bookmark-popover.c b/src/bookmarks/ephy-add-bookmark-popover.c
index bb331f039..dfdad53e1 100644
--- a/src/bookmarks/ephy-add-bookmark-popover.c
+++ b/src/bookmarks/ephy-add-bookmark-popover.c
@@ -30,11 +30,11 @@
 #include "ephy-sync-utils.h"
 
 struct _EphyAddBookmarkPopover {
-  GtkPopover     parent_instance;
+  GtkPopover parent_instance;
 
-  char          *address;
+  char *address;
 
-  GtkWidget     *grid;
+  GtkWidget *grid;
   EphyHeaderBar *header_bar;
 };
 
@@ -213,7 +213,7 @@ ephy_add_bookmark_popover_show (EphyAddBookmarkPopover *self)
   bookmark = ephy_bookmarks_manager_get_bookmark_by_url (manager, address);
   if (!bookmark) {
     g_autofree char *id = NULL;
-    g_autoptr(EphyBookmark) new_bookmark = NULL;
+    g_autoptr (EphyBookmark) new_bookmark = NULL;
 
     id = ephy_sync_utils_get_random_sync_id ();
     new_bookmark = ephy_bookmark_new (address,
diff --git a/src/bookmarks/ephy-bookmark-properties-grid.c b/src/bookmarks/ephy-bookmark-properties-grid.c
index 9703f93b5..8a229b80c 100644
--- a/src/bookmarks/ephy-bookmark-properties-grid.c
+++ b/src/bookmarks/ephy-bookmark-properties-grid.c
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with Epiphany.  If not, see <http://www.gnu.org/licenses/>.
-*/
+ */
 
 #include "config.h"
 
@@ -33,24 +33,24 @@
 #include <string.h>
 
 struct _EphyBookmarkPropertiesGrid {
-  GtkGrid                         parent_instance;
-
-  EphyBookmarksManager           *manager;
-  EphyBookmark                   *bookmark;
-  gboolean                        bookmark_is_modified;
-  gboolean                        bookmark_is_removed;
-
-  EphyBookmarkPropertiesGridType  type;
-  GtkWidget                      *parent;
-
-  GtkWidget                      *popover_bookmark_label;
-  GtkWidget                      *name_entry;
-  GtkWidget                      *address_entry;
-  GtkWidget                      *popover_tags_label;
-  GtkWidget                      *tags_box;
-  GtkWidget                      *add_tag_entry;
-  GtkWidget                      *add_tag_button;
-  GtkWidget                      *remove_bookmark_button;
+  GtkGrid parent_instance;
+
+  EphyBookmarksManager *manager;
+  EphyBookmark *bookmark;
+  gboolean bookmark_is_modified;
+  gboolean bookmark_is_removed;
+
+  EphyBookmarkPropertiesGridType type;
+  GtkWidget *parent;
+
+  GtkWidget *popover_bookmark_label;
+  GtkWidget *name_entry;
+  GtkWidget *address_entry;
+  GtkWidget *popover_tags_label;
+  GtkWidget *tags_box;
+  GtkWidget *add_tag_entry;
+  GtkWidget *add_tag_button;
+  GtkWidget *remove_bookmark_button;
 };
 
 G_DEFINE_TYPE (EphyBookmarkPropertiesGrid, ephy_bookmark_properties_grid, GTK_TYPE_GRID)
@@ -66,7 +66,8 @@ enum {
 static GParamSpec *obj_properties[LAST_PROP];
 
 static int
-flow_box_sort_func (GtkFlowBoxChild *child1, GtkFlowBoxChild *child2)
+flow_box_sort_func (GtkFlowBoxChild *child1,
+                    GtkFlowBoxChild *child2)
 {
   GtkWidget *box1;
   GtkWidget *box2;
@@ -482,7 +483,7 @@ static const GActionEntry entries[] = {
 static void
 ephy_bookmark_properties_grid_init (EphyBookmarkPropertiesGrid *self)
 {
-  g_autoptr(GSimpleActionGroup) group = NULL;
+  g_autoptr (GSimpleActionGroup) group = NULL;
   GAction *action;
 
   gtk_widget_init_template (GTK_WIDGET (self));
diff --git a/src/bookmarks/ephy-bookmark-row.c b/src/bookmarks/ephy-bookmark-row.c
index 3f5414fd2..fe4979276 100644
--- a/src/bookmarks/ephy-bookmark-row.c
+++ b/src/bookmarks/ephy-bookmark-row.c
@@ -27,13 +27,13 @@
 #include "ephy-favicon-helpers.h"
 
 struct _EphyBookmarkRow {
-  GtkListBoxRow    parent_instance;
+  GtkListBoxRow parent_instance;
 
-  EphyBookmark    *bookmark;
+  EphyBookmark *bookmark;
 
-  GtkWidget       *favicon_image;
-  GtkWidget       *title_label;
-  GtkWidget       *properties_button;
+  GtkWidget *favicon_image;
+  GtkWidget *title_label;
+  GtkWidget *properties_button;
 };
 
 G_DEFINE_TYPE (EphyBookmarkRow, ephy_bookmark_row, GTK_TYPE_LIST_BOX_ROW)
@@ -82,10 +82,10 @@ ephy_bookmark_row_favicon_loaded_cb (GObject      *source,
                                      GAsyncResult *result,
                                      gpointer      user_data)
 {
-  g_autoptr(EphyBookmarkRow) self = user_data;
+  g_autoptr (EphyBookmarkRow) self = user_data;
   WebKitFaviconDatabase *database = WEBKIT_FAVICON_DATABASE (source);
   cairo_surface_t *icon_surface;
-  g_autoptr(GdkPixbuf) favicon = NULL;
+  g_autoptr (GdkPixbuf) favicon = NULL;
 
   g_assert (EPHY_IS_BOOKMARK_ROW (self));
 
@@ -109,32 +109,30 @@ ephy_bookmark_row_set_property (GObject      *object,
 {
   EphyBookmarkRow *self = EPHY_BOOKMARK_ROW (object);
 
-  switch (prop_id)
-    {
+  switch (prop_id) {
     case PROP_BOOKMARK:
       self->bookmark = g_value_dup_object (value);
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-    }
+  }
 }
 
 static void
-ephy_bookmark_row_get_property (GObject      *object,
-                                guint         prop_id,
-                                GValue       *value,
-                                GParamSpec   *pspec)
+ephy_bookmark_row_get_property (GObject    *object,
+                                guint       prop_id,
+                                GValue     *value,
+                                GParamSpec *pspec)
 {
   EphyBookmarkRow *self = EPHY_BOOKMARK_ROW (object);
 
-  switch (prop_id)
-    {
+  switch (prop_id) {
     case PROP_BOOKMARK:
       g_value_set_object (value, ephy_bookmark_row_get_bookmark (self));
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-    }
+  }
 }
 
 static void
diff --git a/src/bookmarks/ephy-bookmark.c b/src/bookmarks/ephy-bookmark.c
index 514a54aec..5bb2706ec 100644
--- a/src/bookmarks/ephy-bookmark.c
+++ b/src/bookmarks/ephy-bookmark.c
@@ -32,30 +32,30 @@
 #define BOOKMARK_LOAD_IN_SIDEBAR_VAL FALSE
 
 struct _EphyBookmark {
-  GObject      parent_instance;
+  GObject parent_instance;
 
-  char        *url;
-  char        *title;
-  GSequence   *tags;
-  gint64       time_added;
+  char *url;
+  char *title;
+  GSequence *tags;
+  gint64 time_added;
 
   /* Firefox Sync specific fields. */
-  char        *id;
-  char        *type;
-  char        *parent_id;
-  char        *parent_name;
-  gboolean     load_in_sidebar;
-  gint64       server_time_modified;
+  char *id;
+  char *type;
+  char *parent_id;
+  char *parent_name;
+  gboolean load_in_sidebar;
+  gint64 server_time_modified;
 };
 
 static void json_serializable_iface_init (JsonSerializableIface *iface);
 static void ephy_synchronizable_iface_init (EphySynchronizableInterface *iface);
 
 G_DEFINE_TYPE_WITH_CODE (EphyBookmark, ephy_bookmark, G_TYPE_OBJECT,
-                        G_IMPLEMENT_INTERFACE (JSON_TYPE_SERIALIZABLE,
-                                               json_serializable_iface_init)
-                        G_IMPLEMENT_INTERFACE (EPHY_TYPE_SYNCHRONIZABLE,
-                                               ephy_synchronizable_iface_init))
+                         G_IMPLEMENT_INTERFACE (JSON_TYPE_SERIALIZABLE,
+                                                json_serializable_iface_init)
+                         G_IMPLEMENT_INTERFACE (EPHY_TYPE_SYNCHRONIZABLE,
+                                                ephy_synchronizable_iface_init))
 
 enum {
   PROP_0,
@@ -78,7 +78,7 @@ enum {
 };
 
 static GParamSpec *obj_properties[LAST_PROP];
-static guint       signals[LAST_SIGNAL];
+static guint signals[LAST_SIGNAL];
 
 static void
 ephy_bookmark_set_property (GObject      *object,
@@ -321,7 +321,8 @@ ephy_bookmark_get_time_added (EphyBookmark *self)
 
 
 void
-ephy_bookmark_set_url (EphyBookmark *self, const char *url)
+ephy_bookmark_set_url (EphyBookmark *self,
+                       const char   *url)
 {
   g_assert (EPHY_IS_BOOKMARK (self));
 
@@ -338,7 +339,8 @@ ephy_bookmark_get_url (EphyBookmark *self)
 }
 
 void
-ephy_bookmark_set_title (EphyBookmark *self, const char *title)
+ephy_bookmark_set_title (EphyBookmark *self,
+                         const char   *title)
 {
   g_assert (EPHY_IS_BOOKMARK (self));
 
@@ -378,7 +380,6 @@ void
 ephy_bookmark_set_is_uploaded (EphyBookmark *self,
                                gboolean      uploaded)
 {
-
   /* FIXME: This is no longer used for Firefox Sync, but bookmarks import/export
    * expects it. We need to delete it and write a migrator for bookmarks. */
   g_assert (EPHY_IS_BOOKMARK (self));
@@ -438,7 +439,8 @@ ephy_bookmark_remove_tag (EphyBookmark *self,
 }
 
 gboolean
-ephy_bookmark_has_tag (EphyBookmark *self, const char *tag)
+ephy_bookmark_has_tag (EphyBookmark *self,
+                       const char   *tag)
 {
   GSequenceIter *tag_iter;
 
@@ -495,7 +497,8 @@ ephy_bookmark_bookmarks_compare_func (EphyBookmark *bookmark1,
 }
 
 int
-ephy_bookmark_tags_compare (const char *tag1, const char *tag2)
+ephy_bookmark_tags_compare (const char *tag1,
+                            const char *tag2)
 {
   int result;
 
diff --git a/src/bookmarks/ephy-bookmarks-export.c b/src/bookmarks/ephy-bookmarks-export.c
index 6363473e0..f1bc54d1c 100644
--- a/src/bookmarks/ephy-bookmarks-export.c
+++ b/src/bookmarks/ephy-bookmarks-export.c
@@ -83,7 +83,7 @@ write_contents_cb (GObject      *source_object,
                    GAsyncResult *result,
                    gpointer      user_data)
 {
-  g_autoptr(GTask) task = user_data;
+  g_autoptr (GTask) task = user_data;
   GHashTable *root_table;
   GError *error = NULL;
 
diff --git a/src/bookmarks/ephy-bookmarks-import.c b/src/bookmarks/ephy-bookmarks-import.c
index 048f45c7e..8862b995f 100644
--- a/src/bookmarks/ephy-bookmarks-import.c
+++ b/src/bookmarks/ephy-bookmarks-import.c
@@ -29,7 +29,7 @@
 #include <glib/gi18n.h>
 
 GQuark bookmarks_import_error_quark (void);
-G_DEFINE_QUARK (bookmarks-import-error-quark, bookmarks_import_error)
+G_DEFINE_QUARK (bookmarks - import - error - quark, bookmarks_import_error)
 #define BOOKMARKS_IMPORT_ERROR bookmarks_import_error_quark ()
 
 typedef enum {
@@ -149,21 +149,21 @@ ephy_bookmarks_import (EphyBookmarksManager  *manager,
   bookmarks = get_bookmarks_from_table (table);
   ephy_bookmarks_manager_add_bookmarks (manager, bookmarks);
 
-  out:
-    if (table)
-      gvdb_table_free (table);
-    if (bookmarks)
-      g_sequence_free (bookmarks);
-    if (root_table)
-      gvdb_table_free (root_table);
+out:
+  if (table)
+    gvdb_table_free (table);
+  if (bookmarks)
+    g_sequence_free (bookmarks);
+  if (root_table)
+    gvdb_table_free (root_table);
 
   return res;
 }
 
 static void
-load_tags_for_bookmark (EphySQLiteConnection  *connection,
-                        EphyBookmark          *bookmark,
-                        int                    bookmark_id)
+load_tags_for_bookmark (EphySQLiteConnection *connection,
+                        EphyBookmark         *bookmark,
+                        int                   bookmark_id)
 {
   EphyBookmarksManager *manager = ephy_shell_get_bookmarks_manager (ephy_shell_get_default ());
   EphySQLiteStatement *statement = NULL;
@@ -202,11 +202,11 @@ load_tags_for_bookmark (EphySQLiteConnection  *connection,
     goto out;
   }
 
-  out:
-    if (statement)
-      g_object_unref (statement);
-    if (error)
-      g_error_free (error);
+out:
+  if (statement)
+    g_object_unref (statement);
+  if (error)
+    g_error_free (error);
 }
 
 gboolean
@@ -294,16 +294,16 @@ ephy_bookmarks_import_from_firefox (EphyBookmarksManager  *manager,
 
   ephy_bookmarks_manager_add_bookmarks (manager, bookmarks);
 
-  out:
-    g_free (filename);
-    if (connection) {
-      ephy_sqlite_connection_close (connection);
-      g_object_unref (connection);
-    }
-    if (statement)
-      g_object_unref (statement);
-    if (bookmarks)
-      g_sequence_free (bookmarks);
+out:
+  g_free (filename);
+  if (connection) {
+    ephy_sqlite_connection_close (connection);
+    g_object_unref (connection);
+  }
+  if (statement)
+    g_object_unref (statement);
+  if (bookmarks)
+    g_sequence_free (bookmarks);
 
   return ret;
 }
diff --git a/src/bookmarks/ephy-bookmarks-manager.c b/src/bookmarks/ephy-bookmarks-manager.c
index f7148a879..efddec92f 100644
--- a/src/bookmarks/ephy-bookmarks-manager.c
+++ b/src/bookmarks/ephy-bookmarks-manager.c
@@ -34,17 +34,17 @@
 #define EPHY_BOOKMARKS_FILE "bookmarks.gvdb"
 
 struct _EphyBookmarksManager {
-  GObject       parent_instance;
+  GObject parent_instance;
 
   GCancellable *cancellable;
 
-  GSequence    *bookmarks;
-  GSequence    *tags;
+  GSequence *bookmarks;
+  GSequence *tags;
 
-  gchar        *gvdb_filename;
+  gchar *gvdb_filename;
 };
 
-static void list_model_iface_init     (GListModelInterface *iface);
+static void list_model_iface_init (GListModelInterface *iface);
 static void ephy_synchronizable_manager_iface_init (EphySynchronizableManagerInterface *iface);
 
 G_DEFINE_TYPE_WITH_CODE (EphyBookmarksManager, ephy_bookmarks_manager, G_TYPE_OBJECT,
@@ -65,7 +65,7 @@ enum {
   LAST_SIGNAL
 };
 
-static guint       signals[LAST_SIGNAL];
+static guint signals[LAST_SIGNAL];
 
 static void
 ephy_bookmarks_manager_copy_tags_from_bookmark (EphyBookmarksManager *self,
@@ -128,7 +128,7 @@ ephy_bookmarks_manager_class_init (EphyBookmarksManagerClass *klass)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
-  object_class->dispose  = ephy_bookmarks_manager_dispose;
+  object_class->dispose = ephy_bookmarks_manager_dispose;
   object_class->finalize = ephy_bookmarks_manager_finalize;
 
   signals[BOOKMARK_ADDED] =
@@ -210,7 +210,7 @@ ephy_bookmarks_manager_class_init (EphyBookmarksManagerClass *klass)
 static void
 ephy_bookmarks_manager_init (EphyBookmarksManager *self)
 {
-  g_autoptr(GError) error = NULL;
+  g_autoptr (GError) error = NULL;
 
   self->cancellable = g_cancellable_new ();
 
@@ -298,8 +298,8 @@ ephy_bookmarks_manager_unwatch_bookmark (EphyBookmarksManager *self,
 }
 
 static GSequenceIter *
-ephy_bookmarks_search_and_insert_bookmark (GSequence     *bookmarks,
-                                           EphyBookmark  *bookmark)
+ephy_bookmarks_search_and_insert_bookmark (GSequence    *bookmarks,
+                                           EphyBookmark *bookmark)
 {
   GSequenceIter *iter;
   GSequenceIter *prev_iter;
@@ -389,8 +389,8 @@ ephy_bookmarks_manager_remove_bookmark_internal (EphyBookmarksManager *self,
   g_assert (EPHY_IS_BOOKMARK (bookmark));
 
   for (iter = g_sequence_get_begin_iter (self->bookmarks);
-         !g_sequence_iter_is_end (iter);
-         iter = g_sequence_iter_next (iter)) {
+       !g_sequence_iter_is_end (iter);
+       iter = g_sequence_iter_next (iter)) {
     if (g_strcmp0 (ephy_bookmark_get_id (g_sequence_get (iter)),
                    ephy_bookmark_get_id (bookmark)) == 0)
       break;
@@ -435,8 +435,8 @@ ephy_bookmarks_manager_get_bookmark_by_url (EphyBookmarksManager *self,
   g_assert (url != NULL);
 
   for (iter = g_sequence_get_begin_iter (self->bookmarks);
-         !g_sequence_iter_is_end (iter);
-         iter = g_sequence_iter_next (iter)) {
+       !g_sequence_iter_is_end (iter);
+       iter = g_sequence_iter_next (iter)) {
     EphyBookmark *bookmark = g_sequence_get (iter);
 
     if (g_strcmp0 (ephy_bookmark_get_url (bookmark), url) == 0)
@@ -468,7 +468,8 @@ ephy_bookmarks_manager_get_bookmark_by_id (EphyBookmarksManager *self,
 }
 
 void
-ephy_bookmarks_manager_create_tag (EphyBookmarksManager *self, const char *tag)
+ephy_bookmarks_manager_create_tag (EphyBookmarksManager *self,
+                                   const char           *tag)
 {
   GSequenceIter *tag_iter;
   GSequenceIter *prev_tag_iter;
@@ -490,7 +491,8 @@ ephy_bookmarks_manager_create_tag (EphyBookmarksManager *self, const char *tag)
 }
 
 void
-ephy_bookmarks_manager_delete_tag (EphyBookmarksManager *self, const char *tag)
+ephy_bookmarks_manager_delete_tag (EphyBookmarksManager *self,
+                                   const char           *tag)
 {
   GSequenceIter *iter = NULL;
   int position;
@@ -518,7 +520,8 @@ ephy_bookmarks_manager_delete_tag (EphyBookmarksManager *self, const char *tag)
 }
 
 gboolean
-ephy_bookmarks_manager_tag_exists (EphyBookmarksManager *self, const char *tag)
+ephy_bookmarks_manager_tag_exists (EphyBookmarksManager *self,
+                                   const char           *tag)
 {
   GSequenceIter *iter;
 
@@ -597,7 +600,7 @@ ephy_bookmarks_manager_save_warn_on_error_cb (GObject      *object,
 {
   EphyBookmarksManager *self = EPHY_BOOKMARKS_MANAGER (object);
   gboolean ret;
-  g_autoptr(GError) error = NULL;
+  g_autoptr (GError) error = NULL;
 
   ret = ephy_bookmarks_manager_save_finish (self, result, &error);
   if (ret == FALSE)
@@ -618,7 +621,7 @@ bookmarks_export_cb (GObject      *source_object,
                      gpointer      user_data)
 {
   EphyBookmarksManager *self = EPHY_BOOKMARKS_MANAGER (source_object);
-  g_autoptr(GTask) task = user_data;
+  g_autoptr (GTask) task = user_data;
   GError *error;
 
   if (!ephy_bookmarks_export_finish (self, result, &error)) {
@@ -644,9 +647,9 @@ ephy_bookmarks_manager_save (EphyBookmarksManager *self,
 }
 
 gboolean
-ephy_bookmarks_manager_save_finish (EphyBookmarksManager *self,
-                                    GAsyncResult         *result,
-                                    GError              **error)
+ephy_bookmarks_manager_save_finish (EphyBookmarksManager  *self,
+                                    GAsyncResult          *result,
+                                    GError               **error)
 {
   g_assert (g_task_is_valid (result, self));
 
@@ -655,8 +658,8 @@ ephy_bookmarks_manager_save_finish (EphyBookmarksManager *self,
 
 typedef struct {
   GMainLoop *main_loop;
-  gboolean   result;
-  GError    *error;
+  gboolean result;
+  GError *error;
 } SaveToFileData;
 
 static void
@@ -676,7 +679,7 @@ gboolean
 ephy_bookmarks_manager_save_sync (EphyBookmarksManager  *self,
                                   GError               **error)
 {
-  g_autoptr(GMainContext) context = NULL;
+  g_autoptr (GMainContext) context = NULL;
   SaveToFileData *data;
   gboolean result;
 
diff --git a/src/bookmarks/ephy-bookmarks-popover.c b/src/bookmarks/ephy-bookmarks-popover.c
index e49a48d89..088af0513 100644
--- a/src/bookmarks/ephy-bookmarks-popover.c
+++ b/src/bookmarks/ephy-bookmarks-popover.c
@@ -32,17 +32,17 @@
 #include <glib/gi18n.h>
 
 struct _EphyBookmarksPopover {
-  GtkPopover             parent_instance;
+  GtkPopover parent_instance;
 
-  GtkWidget             *toplevel_stack;
-  GtkWidget             *bookmarks_list_box;
-  GtkWidget             *tags_list_box;
-  GtkWidget             *tag_detail_list_box;
-  GtkWidget             *tag_detail_back_button;
-  GtkWidget             *tag_detail_label;
-  char                  *tag_detail_tag;
+  GtkWidget *toplevel_stack;
+  GtkWidget *bookmarks_list_box;
+  GtkWidget *tags_list_box;
+  GtkWidget *tag_detail_list_box;
+  GtkWidget *tag_detail_back_button;
+  GtkWidget *tag_detail_label;
+  char *tag_detail_tag;
 
-  EphyBookmarksManager  *manager;
+  EphyBookmarksManager *manager;
 };
 
 G_DEFINE_TYPE (EphyBookmarksPopover, ephy_bookmarks_popover, GTK_TYPE_POPOVER)
@@ -50,7 +50,7 @@ G_DEFINE_TYPE (EphyBookmarksPopover, ephy_bookmarks_popover, GTK_TYPE_POPOVER)
 #define EPHY_LIST_BOX_ROW_TYPE_BOOKMARK "bookmark"
 #define EPHY_LIST_BOX_ROW_TYPE_TAG "tag"
 
-static GtkWidget *create_bookmark_row (gpointer item, gpointer user_data);
+static GtkWidget * create_bookmark_row (gpointer item, gpointer user_data);
 static GtkWidget *create_tag_row (const char *tag);
 
 static void
@@ -190,13 +190,13 @@ ephy_bookmarks_popover_bookmark_tag_removed_cb (EphyBookmarksPopover *self,
 
   /* If the tag no longer contains bookmarks, remove it from the tags list */
   if (g_sequence_is_empty (ephy_bookmarks_manager_get_bookmarks_with_tag (self->manager, tag))) {
-      children = gtk_container_get_children (GTK_CONTAINER (self->tags_list_box));
-      for (l = children; l != NULL; l = l->next) {
-        title = g_object_get_data (G_OBJECT (l->data), "title");
-        if (g_strcmp0 (title, tag) == 0)
-          gtk_container_remove (GTK_CONTAINER (self->tags_list_box), GTK_WIDGET (l->data));
-      }
-      g_list_free (children);
+    children = gtk_container_get_children (GTK_CONTAINER (self->tags_list_box));
+    for (l = children; l != NULL; l = l->next) {
+      title = g_object_get_data (G_OBJECT (l->data), "title");
+      if (g_strcmp0 (title, tag) == 0)
+        gtk_container_remove (GTK_CONTAINER (self->tags_list_box), GTK_WIDGET (l->data));
+    }
+    g_list_free (children);
   }
 }
 
@@ -345,7 +345,8 @@ ephy_bookmarks_popover_tag_deleted_cb (EphyBookmarksPopover *self,
 }
 
 static int
-tags_list_box_sort_func (GtkListBoxRow *row1, GtkListBoxRow *row2)
+tags_list_box_sort_func (GtkListBoxRow *row1,
+                         GtkListBoxRow *row2)
 {
   const char *type1;
   const char *type2;
@@ -363,7 +364,7 @@ tags_list_box_sort_func (GtkListBoxRow *row1, GtkListBoxRow *row2)
 
   if (g_strcmp0 (type1, EPHY_LIST_BOX_ROW_TYPE_TAG) == 0
       && g_strcmp0 (type2, EPHY_LIST_BOX_ROW_TYPE_TAG) == 0)
-      return ephy_bookmark_tags_compare (title1, title2);
+    return ephy_bookmark_tags_compare (title1, title2);
 
   if (g_strcmp0 (type1, EPHY_LIST_BOX_ROW_TYPE_TAG) == 0)
     return -1;
@@ -425,9 +426,9 @@ ephy_bookmarks_popover_show_tag_detail (EphyBookmarksPopover *self,
 }
 
 static void
-ephy_bookmarks_popover_list_box_row_activated_cb (EphyBookmarksPopover   *self,
-                                                  GtkListBoxRow          *row,
-                                                  GtkListBox             *box)
+ephy_bookmarks_popover_list_box_row_activated_cb (EphyBookmarksPopover *self,
+                                                  GtkListBoxRow        *row,
+                                                  GtkListBox           *box)
 {
   const char *type;
   const char *tag;
diff --git a/src/clear-data-dialog.c b/src/clear-data-dialog.c
index 4934e7122..20437484f 100644
--- a/src/clear-data-dialog.c
+++ b/src/clear-data-dialog.c
@@ -73,7 +73,7 @@ G_DEFINE_TYPE (ClearDataDialog, clear_data_dialog, GTK_TYPE_DIALOG)
 typedef struct {
   WebKitWebsiteDataTypes type;
   gboolean initial_state;
-  const char* name;
+  const char *name;
 } DataEntry;
 
 static const DataEntry data_entries[] = {
@@ -98,18 +98,18 @@ static inline GTimeSpan
 get_timespan_for_combo_value (Timespan timespan)
 {
   switch (timespan) {
-  case TIMESPAN_HOUR:
-    return G_TIME_SPAN_HOUR;
-  case TIMESPAN_DAY:
-    return G_TIME_SPAN_DAY;
-  case TIMESPAN_WEEK:
-    return G_TIME_SPAN_DAY * 7;
-  case TIMESPAN_MONTH:
-    return G_TIME_SPAN_DAY * 7 * 4;
-  case TIMESPAN_FOREVER:
-    return 0;
-  default:
-    break;
+    case TIMESPAN_HOUR:
+      return G_TIME_SPAN_HOUR;
+    case TIMESPAN_DAY:
+      return G_TIME_SPAN_DAY;
+    case TIMESPAN_WEEK:
+      return G_TIME_SPAN_DAY * 7;
+    case TIMESPAN_MONTH:
+      return G_TIME_SPAN_DAY * 7 * 4;
+    case TIMESPAN_FOREVER:
+      return 0;
+    default:
+      break;
   }
 
   g_assert_not_reached ();
diff --git a/src/ephy-action-bar-end.c b/src/ephy-action-bar-end.c
index d02498c2f..20ebacad3 100644
--- a/src/ephy-action-bar-end.c
+++ b/src/ephy-action-bar-end.c
@@ -76,7 +76,7 @@ add_attention (EphyActionBarEnd *self)
 
   gtk_style_context_add_class (style_context, "epiphany-downloads-button-needs-attention");
   self->downloads_button_attention_timeout_id = g_timeout_add (NEEDS_ATTENTION_ANIMATION_TIMEOUT,
-                                                               (GSourceFunc) 
on_remove_downloads_button_attention_style_timeout_cb,
+                                                               
(GSourceFunc)on_remove_downloads_button_attention_style_timeout_cb,
                                                                self);
 }
 
@@ -109,7 +109,7 @@ download_added_cb (EphyDownloadsManager *manager,
                              "width", rect.width,
                              "x", rect.x,
                              "y", rect.y,
-                            NULL);
+                             NULL);
 
     dzl_object_animate_full (theatric,
                              DZL_ANIMATION_EASE_IN_CUBIC,
@@ -142,7 +142,7 @@ begin_complete_theatrics_from_main (gpointer user_data)
 static void
 begin_complete_theatrics (EphyActionBarEnd *self)
 {
-  g_autoptr(GIcon) icon = NULL;
+  g_autoptr (GIcon) icon = NULL;
   DzlBoxTheatric *theatric;
   GtkAllocation rect;
 
@@ -267,7 +267,7 @@ ephy_action_bar_end_init (EphyActionBarEnd *action_bar_end)
   if (is_desktop_pantheon ()) {
     gtk_button_set_image (GTK_BUTTON (action_bar_end->bookmarks_button),
                           gtk_image_new_from_icon_name ("user-bookmarks",
-                          GTK_ICON_SIZE_LARGE_TOOLBAR));
+                                                        GTK_ICON_SIZE_LARGE_TOOLBAR));
   }
 
   g_signal_connect_object (downloads_manager, "download-added",
diff --git a/src/ephy-action-bar-start.c b/src/ephy-action-bar-start.c
index 464f3ea37..262b8f495 100644
--- a/src/ephy-action-bar-start.c
+++ b/src/ephy-action-bar-start.c
@@ -206,9 +206,9 @@ navigation_menu_item_pressed_cb (GtkWidget *menuitem,
 }
 
 static GList *
-construct_webkit_history_list (WebKitWebView    *web_view,
-                               WebKitHistoryType hist_type,
-                               int               limit)
+construct_webkit_history_list (WebKitWebView     *web_view,
+                               WebKitHistoryType  hist_type,
+                               int                limit)
 {
   WebKitBackForwardList *back_forward_list;
 
@@ -219,8 +219,8 @@ construct_webkit_history_list (WebKitWebView    *web_view,
 }
 
 static GtkWidget *
-build_dropdown_menu (EphyWindow                    *window,
-                     EphyNavigationHistoryDirection direction)
+build_dropdown_menu (EphyWindow                     *window,
+                     EphyNavigationHistoryDirection  direction)
 {
   GtkMenuShell *menu;
   EphyEmbed *embed;
@@ -274,10 +274,10 @@ build_dropdown_menu (EphyWindow                    *window,
 }
 
 static void
-popup_history_menu (GtkWidget                     *widget,
-                    EphyWindow                    *window,
-                    EphyNavigationHistoryDirection direction,
-                    GdkEventButton                *event)
+popup_history_menu (GtkWidget                      *widget,
+                    EphyWindow                     *window,
+                    EphyNavigationHistoryDirection  direction,
+                    GdkEventButton                 *event)
 {
   GtkWidget *menu;
 
@@ -325,9 +325,9 @@ navigation_button_press_event_cb (GtkButton *button,
     data->event = (GdkEventButton *)event;
 
     action_bar_start->navigation_buttons_menu_timeout = g_timeout_add_full (G_PRIORITY_DEFAULT, 500,
-                                                                      (GSourceFunc)menu_timeout_cb,
-                                                                      data,
-                                                                      (GDestroyNotify)g_free);
+                                                                            (GSourceFunc)menu_timeout_cb,
+                                                                            data,
+                                                                            (GDestroyNotify)g_free);
     g_source_set_name_by_id (action_bar_start->navigation_buttons_menu_timeout, "[epiphany] 
menu_timeout_cb");
   }
 
@@ -530,13 +530,13 @@ ephy_action_bar_start_constructed (GObject *object)
   if (is_desktop_pantheon ()) {
     gtk_button_set_image (GTK_BUTTON (action_bar_start->navigation_back),
                           gtk_image_new_from_icon_name ("go-previous-symbolic",
-                          get_icon_size ()));
+                                                        get_icon_size ()));
     gtk_button_set_image (GTK_BUTTON (action_bar_start->navigation_forward),
                           gtk_image_new_from_icon_name ("go-next-symbolic",
-                          get_icon_size ()));
+                                                        get_icon_size ()));
     gtk_button_set_image (GTK_BUTTON (action_bar_start->homepage_button),
                           gtk_image_new_from_icon_name ("go-home-symbolic",
-                          get_icon_size ()));
+                                                        get_icon_size ()));
   }
 }
 
@@ -600,14 +600,14 @@ ephy_action_bar_start_change_combined_stop_reload_state (EphyActionBarStart *act
   if (loading) {
     gtk_image_set_from_icon_name (GTK_IMAGE (action_bar_start->combined_stop_reload_image),
                                   "process-stop-symbolic",
-                                  get_icon_size());
+                                  get_icon_size ());
     /* Translators: tooltip for the stop button */
     gtk_widget_set_tooltip_text (action_bar_start->combined_stop_reload_button,
                                  _("Stop loading the current page"));
   } else {
     gtk_image_set_from_icon_name (GTK_IMAGE (action_bar_start->combined_stop_reload_image),
                                   "view-refresh-symbolic",
-                                  get_icon_size());
+                                  get_icon_size ());
     gtk_widget_set_tooltip_text (action_bar_start->combined_stop_reload_button,
                                  _(REFRESH_BUTTON_TOOLTIP));
   }
diff --git a/src/ephy-action-bar.c b/src/ephy-action-bar.c
index c4b901a96..c7651535c 100644
--- a/src/ephy-action-bar.c
+++ b/src/ephy-action-bar.c
@@ -200,13 +200,13 @@ ephy_action_bar_set_adaptive_mode (EphyActionBar    *action_bar,
                                    EphyAdaptiveMode  adaptive_mode)
 {
   switch (adaptive_mode) {
-  case EPHY_ADAPTIVE_MODE_NORMAL:
-    gtk_revealer_set_reveal_child (GTK_REVEALER (action_bar), FALSE);
+    case EPHY_ADAPTIVE_MODE_NORMAL:
+      gtk_revealer_set_reveal_child (GTK_REVEALER (action_bar), FALSE);
 
-    break;
-  case EPHY_ADAPTIVE_MODE_NARROW:
-    gtk_revealer_set_reveal_child (GTK_REVEALER (action_bar), TRUE);
+      break;
+    case EPHY_ADAPTIVE_MODE_NARROW:
+      gtk_revealer_set_reveal_child (GTK_REVEALER (action_bar), TRUE);
 
-    break;
+      break;
   }
 }
diff --git a/src/ephy-desktop-utils.c b/src/ephy-desktop-utils.c
index 3b48d7bdb..b8941906d 100644
--- a/src/ephy-desktop-utils.c
+++ b/src/ephy-desktop-utils.c
@@ -27,8 +27,7 @@ is_desktop_pantheon (void)
   const gchar *xdg_current_desktop = g_environ_getenv (g_get_environ (), "XDG_CURRENT_DESKTOP");
 
   if (!xdg_current_desktop)
-      return FALSE;
+    return FALSE;
 
   return strstr (xdg_current_desktop, "Pantheon") != NULL;
 }
-
diff --git a/src/ephy-encoding-dialog.c b/src/ephy-encoding-dialog.c
index 1dfa7705d..7433c704f 100644
--- a/src/ephy-encoding-dialog.c
+++ b/src/ephy-encoding-dialog.c
@@ -183,7 +183,9 @@ ephy_encoding_dialog_attach_embed (EphyEncodingDialog *dialog)
 }
 
 static void
-ephy_encoding_dialog_sync_embed (EphyWindow *window, GParamSpec *pspec, EphyEncodingDialog *dialog)
+ephy_encoding_dialog_sync_embed (EphyWindow         *window,
+                                 GParamSpec         *pspec,
+                                 EphyEncodingDialog *dialog)
 {
   ephy_encoding_dialog_detach_embed (dialog);
   ephy_encoding_dialog_attach_embed (dialog);
@@ -220,7 +222,8 @@ ephy_encoding_dialog_response_cb (GtkWidget          *widget,
 }
 
 static void
-clean_selected_row (gpointer row, gpointer null_pointer)
+clean_selected_row (gpointer row,
+                    gpointer null_pointer)
 {
   EphyEncodingRow *ephy_encoding_row;
   ephy_encoding_row = EPHY_ENCODING_ROW (gtk_bin_get_child (GTK_BIN (row)));
@@ -323,13 +326,15 @@ create_list_box_row (gpointer object,
 }
 
 static void
-add_list_item (EphyEncoding *encoding, GtkListBox *list_box)
+add_list_item (EphyEncoding *encoding,
+               GtkListBox   *list_box)
 {
   gtk_container_add (GTK_CONTAINER (list_box), GTK_WIDGET (ephy_encoding_row_new (encoding)));
 }
 
 static int
-sort_encodings (gconstpointer a, gconstpointer b)
+sort_encodings (gconstpointer a,
+                gconstpointer b)
 {
   EphyEncoding *enc1 = (EphyEncoding *)a;
   EphyEncoding *enc2 = (EphyEncoding *)b;
diff --git a/src/ephy-header-bar.c b/src/ephy-header-bar.c
index 4bad15b5b..218e654b1 100644
--- a/src/ephy-header-bar.c
+++ b/src/ephy-header-bar.c
@@ -232,8 +232,7 @@ ephy_header_bar_constructed (GObject *object)
 
     gtk_button_set_image (GTK_BUTTON (button),
                           gtk_image_new_from_icon_name ("open-menu",
-                          GTK_ICON_SIZE_LARGE_TOOLBAR));
-
+                                                        GTK_ICON_SIZE_LARGE_TOOLBAR));
   }
 
   gtk_menu_button_set_popover (GTK_MENU_BUTTON (button), page_menu_popover);
@@ -334,15 +333,15 @@ ephy_header_bar_set_adaptive_mode (EphyHeaderBar    *header_bar,
                                    EphyAdaptiveMode  adaptive_mode)
 {
   switch (adaptive_mode) {
-  case EPHY_ADAPTIVE_MODE_NORMAL:
-    gtk_revealer_set_reveal_child (GTK_REVEALER (header_bar->start_revealer), TRUE);
-    gtk_revealer_set_reveal_child (GTK_REVEALER (header_bar->end_revealer), TRUE);
+    case EPHY_ADAPTIVE_MODE_NORMAL:
+      gtk_revealer_set_reveal_child (GTK_REVEALER (header_bar->start_revealer), TRUE);
+      gtk_revealer_set_reveal_child (GTK_REVEALER (header_bar->end_revealer), TRUE);
 
-    break;
-  case EPHY_ADAPTIVE_MODE_NARROW:
-    gtk_revealer_set_reveal_child (GTK_REVEALER (header_bar->start_revealer), FALSE);
-    gtk_revealer_set_reveal_child (GTK_REVEALER (header_bar->end_revealer), FALSE);
+      break;
+    case EPHY_ADAPTIVE_MODE_NARROW:
+      gtk_revealer_set_reveal_child (GTK_REVEALER (header_bar->start_revealer), FALSE);
+      gtk_revealer_set_reveal_child (GTK_REVEALER (header_bar->end_revealer), FALSE);
 
-    break;
+      break;
   }
 }
diff --git a/src/ephy-history-dialog.c b/src/ephy-history-dialog.c
index 95035f80c..3a93ac445 100644
--- a/src/ephy-history-dialog.c
+++ b/src/ephy-history-dialog.c
@@ -260,7 +260,7 @@ create_row (EphyHistoryDialog *self,
 
   /* Date */
   date = gtk_label_new (ephy_time_helpers_utf_friendly_time (url->last_visit_time / 1000000));
-  gtk_label_set_ellipsize (GTK_LABEL(date), PANGO_ELLIPSIZE_END);
+  gtk_label_set_ellipsize (GTK_LABEL (date), PANGO_ELLIPSIZE_END);
   gtk_label_set_xalign (GTK_LABEL (date), 0);
 
   /* Separator */
@@ -315,7 +315,7 @@ add_urls_source (EphyHistoryDialog *self)
   url = element->data;
 
   row = create_row (self, url);
-  gtk_list_box_insert (GTK_LIST_BOX(self->listbox), row, -1);
+  gtk_list_box_insert (GTK_LIST_BOX (self->listbox), row, -1);
   gtk_stack_set_visible_child_name (GTK_STACK (self->stack), "results");
 
   self->urls = g_list_remove_link (self->urls, element);
@@ -403,7 +403,7 @@ forget_all (GSimpleAction *action,
 static GtkWidget *
 get_target_window (EphyHistoryDialog *self)
 {
-    return GTK_WIDGET (gtk_application_get_active_window (GTK_APPLICATION (ephy_shell_get_default ())));
+  return GTK_WIDGET (gtk_application_get_active_window (GTK_APPLICATION (ephy_shell_get_default ())));
 }
 
 static void
@@ -818,4 +818,3 @@ ephy_history_dialog_init (EphyHistoryDialog *self)
     update_selection_actions (self->action_group, FALSE);
   }
 }
-
diff --git a/src/ephy-link.c b/src/ephy-link.c
index 6a65a4644..00a51a4cc 100644
--- a/src/ephy-link.c
+++ b/src/ephy-link.c
@@ -78,10 +78,10 @@ ephy_link_default_init (EphyLinkInterface *iface)
  * Returns: (transfer none): the #EphyEmbed where @link opened.
  */
 EphyEmbed *
-ephy_link_open (EphyLink     *link,
-                const char   *address,
-                EphyEmbed    *embed,
-                EphyLinkFlags flags)
+ephy_link_open (EphyLink      *link,
+                const char    *address,
+                EphyEmbed     *embed,
+                EphyLinkFlags  flags)
 {
   EphyEmbed *new_embed = NULL;
 
diff --git a/src/ephy-location-controller.c b/src/ephy-location-controller.c
index 25284a803..e9098aa98 100644
--- a/src/ephy-location-controller.c
+++ b/src/ephy-location-controller.c
@@ -81,12 +81,13 @@ G_DEFINE_TYPE_WITH_CODE (EphyLocationController, ephy_location_controller, G_TYP
                                                 NULL))
 
 static void
-entry_drag_data_received_cb (GtkWidget *widget,
-                             GdkDragContext *context,
-                             gint x, gint y,
-                             GtkSelectionData *selection_data,
-                             guint info,
-                             guint time,
+entry_drag_data_received_cb (GtkWidget              *widget,
+                             GdkDragContext         *context,
+                             gint                    x,
+                             gint                    y,
+                             GtkSelectionData       *selection_data,
+                             guint                   info,
+                             guint                   time,
                              EphyLocationController *controller)
 {
   GtkEntry *entry;
@@ -191,7 +192,8 @@ entry_activate_cb (GtkEntry               *entry,
 
 
 static void
-user_changed_cb (GtkWidget *widget, EphyLocationController *controller)
+user_changed_cb (GtkWidget              *widget,
+                 EphyLocationController *controller)
 {
   const char *address;
   DzlSuggestionEntry *entry = DZL_SUGGESTION_ENTRY (ephy_location_entry_get_entry (EPHY_LOCATION_ENTRY 
(widget)));
diff --git a/src/ephy-main.c b/src/ephy-main.c
index bc362d8c1..bdbd0cb15 100644
--- a/src/ephy-main.c
+++ b/src/ephy-main.c
@@ -83,10 +83,10 @@ handle_shutdown_signal (gpointer user_data)
 }
 
 static gboolean
-application_mode_cb (const gchar *option_name,
-                     const gchar *value,
-                     gpointer     data,
-                     GError     **error)
+application_mode_cb (const gchar  *option_name,
+                     const gchar  *value,
+                     gpointer      data,
+                     GError      **error)
 {
   application_mode = TRUE;
   desktop_file_basename = g_strdup (value);
@@ -94,10 +94,10 @@ application_mode_cb (const gchar *option_name,
 }
 
 static gboolean
-option_version_cb (const gchar *option_name,
-                   const gchar *value,
-                   gpointer     data,
-                   GError     **error)
+option_version_cb (const gchar  *option_name,
+                   const gchar  *value,
+                   gpointer      data,
+                   GError      **error)
 {
   g_print ("%s %s\n", _("Web"), VERSION);
 
@@ -106,8 +106,7 @@ option_version_cb (const gchar *option_name,
 }
 
 /* If you're modifying this array then you need to update the manpage. */
-static const GOptionEntry option_entries[] =
-{
+static const GOptionEntry option_entries[] = {
   { "new-window", 0, 0, G_OPTION_ARG_NONE, &open_in_new_window,
     N_("Open a new browser window instead of a new tab"), NULL },
   { "load-session", 'l', 0, G_OPTION_ARG_FILENAME, &session_filename,
@@ -332,12 +331,12 @@ main (int   argc,
   }
 
   if (g_settings_get_boolean (EPHY_SETTINGS_MAIN, EPHY_PREFS_START_IN_INCOGNITO_MODE)) {
-     incognito_mode = TRUE;
+    incognito_mode = TRUE;
   }
 
   /* Run the migration in all cases, except when running a private
-     instance without a given profile directory or running in
-     incognito or automation mode. */
+   *  instance without a given profile directory or running in
+   *  incognito or automation mode. */
   if (!(private_instance && profile_directory == NULL) && !incognito_mode && !automation_mode) {
     /* If the migration fails we don't really want to continue. */
     if (!ephy_profile_utils_do_migration ((const char *)profile_directory, -1, FALSE)) {
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index ec3f6dee8..346fc1c64 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -79,8 +79,7 @@ static void ephy_notebook_page_reordered (GtkNotebook *notebook,
                                           GtkWidget   *child,
                                           guint        page_num);
 
-static const GtkTargetEntry url_drag_types [] =
-{
+static const GtkTargetEntry url_drag_types [] = {
   { (char *)"GTK_NOTEBOOK_TAB", GTK_TARGET_SAME_APP, 0 },
   { (char *)EPHY_DND_URI_LIST_TYPE, 0, 0 },
   { (char *)EPHY_DND_URL_TYPE, 0, 1 },
@@ -178,7 +177,9 @@ ephy_notebook_class_init (EphyNotebookClass *klass)
 }
 
 static gint
-find_tab_num_at_pos (EphyNotebook *notebook, gint abs_x, gint abs_y)
+find_tab_num_at_pos (EphyNotebook *notebook,
+                     gint          abs_x,
+                     gint          abs_y)
 {
   int page_num = 0;
   GtkNotebook *nb = GTK_NOTEBOOK (notebook);
@@ -372,7 +373,7 @@ update_tabs_visibility (EphyNotebook *nb,
   if (mode != EPHY_EMBED_SHELL_MODE_APPLICATION &&
       nb->adaptive_mode != EPHY_ADAPTIVE_MODE_NARROW &&
       ((policy == EPHY_PREFS_UI_TABS_BAR_VISIBILITY_POLICY_MORE_THAN_ONE && num > 1) ||
-        policy == EPHY_PREFS_UI_TABS_BAR_VISIBILITY_POLICY_ALWAYS))
+       policy == EPHY_PREFS_UI_TABS_BAR_VISIBILITY_POLICY_ALWAYS))
     show_tabs = TRUE;
 
   /* Only show the tabs when the "tabs-allowed" property is TRUE. */
@@ -694,7 +695,8 @@ title_changed_cb (EphyEmbed    *embed,
 }
 
 static void
-close_button_clicked_cb (GtkWidget *widget, GtkWidget *tab)
+close_button_clicked_cb (GtkWidget *widget,
+                         GtkWidget *tab)
 {
   GtkWidget *notebook;
 
@@ -703,7 +705,8 @@ close_button_clicked_cb (GtkWidget *widget, GtkWidget *tab)
 }
 
 static GtkWidget *
-build_tab_label (EphyNotebook *nb, EphyEmbed *embed)
+build_tab_label (EphyNotebook *nb,
+                 EphyEmbed    *embed)
 {
   GtkWidget *tab_label;
   EphyWebView *view;
diff --git a/src/ephy-page-row.c b/src/ephy-page-row.c
index 56a5bb346..594eef119 100644
--- a/src/ephy-page-row.c
+++ b/src/ephy-page-row.c
@@ -135,7 +135,7 @@ sync_favicon (EphyWebView *view,
               GParamSpec  *pspec,
               EphyPageRow *self)
 {
-  g_autoptr(GdkPixbuf) pixbuf = NULL;
+  g_autoptr (GdkPixbuf) pixbuf = NULL;
 
   if (ephy_web_view_get_icon (view))
     pixbuf = gdk_pixbuf_copy (ephy_web_view_get_icon (view));
@@ -192,23 +192,23 @@ ephy_page_row_set_adaptive_mode (EphyPageRow      *self,
   context = gtk_widget_get_style_context (GTK_WIDGET (self));
 
   switch (adaptive_mode) {
-  case EPHY_ADAPTIVE_MODE_NORMAL:
-    gtk_widget_set_size_request (GTK_WIDGET (self->box), -1, -1);
-    gtk_widget_set_margin_end (GTK_WIDGET (self->box), 0);
-    gtk_widget_set_margin_start (GTK_WIDGET (self->box), 4);
-    gtk_box_set_spacing (self->box, 0);
+    case EPHY_ADAPTIVE_MODE_NORMAL:
+      gtk_widget_set_size_request (GTK_WIDGET (self->box), -1, -1);
+      gtk_widget_set_margin_end (GTK_WIDGET (self->box), 0);
+      gtk_widget_set_margin_start (GTK_WIDGET (self->box), 4);
+      gtk_box_set_spacing (self->box, 0);
 
-    gtk_style_context_remove_class (context, "narrow");
+      gtk_style_context_remove_class (context, "narrow");
 
-    break;
-  case EPHY_ADAPTIVE_MODE_NARROW:
-    gtk_widget_set_size_request (GTK_WIDGET (self->box), -1, 50);
-    gtk_widget_set_margin_end (GTK_WIDGET (self->box), 4);
-    gtk_widget_set_margin_start (GTK_WIDGET (self->box), 8);
-    gtk_box_set_spacing (self->box, 4);
+      break;
+    case EPHY_ADAPTIVE_MODE_NARROW:
+      gtk_widget_set_size_request (GTK_WIDGET (self->box), -1, 50);
+      gtk_widget_set_margin_end (GTK_WIDGET (self->box), 4);
+      gtk_widget_set_margin_start (GTK_WIDGET (self->box), 8);
+      gtk_box_set_spacing (self->box, 4);
 
-    gtk_style_context_add_class (context, "narrow");
+      gtk_style_context_add_class (context, "narrow");
 
-    break;
+      break;
   }
 }
diff --git a/src/ephy-pages-popover.c b/src/ephy-pages-popover.c
index b490d1a4b..105acbfcf 100644
--- a/src/ephy-pages-popover.c
+++ b/src/ephy-pages-popover.c
@@ -62,7 +62,7 @@ release_notebook (EphyPagesPopover *self)
     g_signal_handlers_disconnect_by_data (pages_menu, self);
     g_signal_handlers_disconnect_by_data (self->notebook, self);
 
-    g_object_weak_unref (G_OBJECT (self->notebook), (GWeakNotify) drop_notebook, self);
+    g_object_weak_unref (G_OBJECT (self->notebook), (GWeakNotify)drop_notebook, self);
     drop_notebook (self);
   }
 }
@@ -139,7 +139,7 @@ items_changed_cb (EphyPagesPopover *self,
     g_signal_connect_swapped (items[i], "closed", G_CALLBACK (row_closed_cb), self);
   }
 
-  g_list_store_splice (self->list_store, position, removed, (gpointer) items, added);
+  g_list_store_splice (self->list_store, position, removed, (gpointer)items, added);
 
   current_page_changed_cb (self);
 }
@@ -274,7 +274,7 @@ ephy_pages_popover_set_notebook (EphyPagesPopover *self,
   if (!notebook)
     return;
 
-  g_object_weak_ref (G_OBJECT (notebook), (GWeakNotify) drop_notebook, self);
+  g_object_weak_ref (G_OBJECT (notebook), (GWeakNotify)drop_notebook, self);
   self->notebook = notebook;
   pages_menu = ephy_notebook_get_pages_menu (EPHY_NOTEBOOK (notebook));
 
@@ -311,19 +311,19 @@ ephy_pages_popover_set_adaptive_mode (EphyPagesPopover *self,
   }
 
   switch (adaptive_mode) {
-  case EPHY_ADAPTIVE_MODE_NORMAL:
-    gtk_widget_set_vexpand (GTK_WIDGET (self), FALSE);
-    /* This should be enough height in normal mode to fit in 900px hight screen. */
-    gtk_scrolled_window_set_max_content_height (self->scrolled_window, 700);
-    gtk_list_box_set_header_func (self->list_box, NULL, NULL, NULL);
-
-    break;
-  case EPHY_ADAPTIVE_MODE_NARROW:
-    gtk_widget_set_vexpand (GTK_WIDGET (self), TRUE);
-    /* Sets the max content to 0 and not -1 to ensure the popover doesn't pop out. */
-    gtk_scrolled_window_set_max_content_height (self->scrolled_window, 0);
-    gtk_list_box_set_header_func (self->list_box, hdy_list_box_separator_header, NULL, NULL);
-
-    break;
+    case EPHY_ADAPTIVE_MODE_NORMAL:
+      gtk_widget_set_vexpand (GTK_WIDGET (self), FALSE);
+      /* This should be enough height in normal mode to fit in 900px hight screen. */
+      gtk_scrolled_window_set_max_content_height (self->scrolled_window, 700);
+      gtk_list_box_set_header_func (self->list_box, NULL, NULL, NULL);
+
+      break;
+    case EPHY_ADAPTIVE_MODE_NARROW:
+      gtk_widget_set_vexpand (GTK_WIDGET (self), TRUE);
+      /* Sets the max content to 0 and not -1 to ensure the popover doesn't pop out. */
+      gtk_scrolled_window_set_max_content_height (self->scrolled_window, 0);
+      gtk_list_box_set_header_func (self->list_box, hdy_list_box_separator_header, NULL, NULL);
+
+      break;
   }
 }
diff --git a/src/ephy-pages-view.c b/src/ephy-pages-view.c
index 0cf78a24c..19e759946 100644
--- a/src/ephy-pages-view.c
+++ b/src/ephy-pages-view.c
@@ -127,7 +127,7 @@ items_changed_cb (EphyPagesView *self,
     g_signal_connect_swapped (items[i], "closed", G_CALLBACK (row_closed_cb), self);
   }
 
-  g_list_store_splice (self->list_store, position, removed, (gpointer) items, added);
+  g_list_store_splice (self->list_store, position, removed, (gpointer)items, added);
 }
 
 static void
@@ -259,18 +259,18 @@ ephy_pages_view_set_adaptive_mode (EphyPagesView    *self,
   }
 
   switch (adaptive_mode) {
-  case EPHY_ADAPTIVE_MODE_NORMAL:
-    gtk_widget_set_vexpand (GTK_WIDGET (self), FALSE);
-    /* This should be enough height in normal mode to fit in 900px hight screen. */
-    gtk_scrolled_window_set_max_content_height (GTK_SCROLLED_WINDOW(self), 700);
-    gtk_list_box_set_header_func (self->list_box, NULL, NULL, NULL);
-
-    break;
-  case EPHY_ADAPTIVE_MODE_NARROW:
-    gtk_widget_set_vexpand (GTK_WIDGET (self), TRUE);
-    gtk_scrolled_window_set_max_content_height (GTK_SCROLLED_WINDOW (self), 0);
-    gtk_list_box_set_header_func (self->list_box, hdy_list_box_separator_header, NULL, NULL);
-
-    break;
+    case EPHY_ADAPTIVE_MODE_NORMAL:
+      gtk_widget_set_vexpand (GTK_WIDGET (self), FALSE);
+      /* This should be enough height in normal mode to fit in 900px hight screen. */
+      gtk_scrolled_window_set_max_content_height (GTK_SCROLLED_WINDOW (self), 700);
+      gtk_list_box_set_header_func (self->list_box, NULL, NULL, NULL);
+
+      break;
+    case EPHY_ADAPTIVE_MODE_NARROW:
+      gtk_widget_set_vexpand (GTK_WIDGET (self), TRUE);
+      gtk_scrolled_window_set_max_content_height (GTK_SCROLLED_WINDOW (self), 0);
+      gtk_list_box_set_header_func (self->list_box, hdy_list_box_separator_header, NULL, NULL);
+
+      break;
   }
 }
diff --git a/src/ephy-search-engine-dialog.c b/src/ephy-search-engine-dialog.c
index c8f5a977c..9bc8fca53 100644
--- a/src/ephy-search-engine-dialog.c
+++ b/src/ephy-search-engine-dialog.c
@@ -148,9 +148,9 @@ dialog_check_name_entry (const char             *name,
 
   /* Check if name already exist in the search_engine_manager */
   if (ephy_search_engine_manager_get_address (manager, name) != NULL &&
-      g_strcmp0 (name, search_engine_name) != 0 ) {
-      dialog_set_entry_error_state (dialog->search_engine_name_entry);
-      return FALSE;
+      g_strcmp0 (name, search_engine_name) != 0) {
+    dialog_set_entry_error_state (dialog->search_engine_name_entry);
+    return FALSE;
   }
 
   dialog_set_entry_normal_state (dialog->search_engine_name_entry);
@@ -164,8 +164,7 @@ dialog_check_address_entry (const char             *address,
   if (address == NULL || !soup_uri_new (address) || strstr (address, "%s") == NULL) {
     dialog_set_entry_error_state (dialog->search_engine_address_entry);
     return FALSE;
-  }
-  else
+  } else
     dialog_set_entry_normal_state (dialog->search_engine_address_entry);
 
   return TRUE;
@@ -274,7 +273,7 @@ ephy_search_engine_dialog_fill_list_box (EphySearchEngineDialog *dialog)
   GtkListBox *listbox;
   GtkWidget *list_box_row;
   EphySearchEngineManager *manager;
-  char **engines_names ;
+  char **engines_names;
 
   listbox = GTK_LIST_BOX (dialog->search_engine_list_box);
   manager = dialog->search_engine_manager;
@@ -359,13 +358,13 @@ on_search_engine_remove_button_clicked (GtkButton              *button,
   /* Select the previous row before removing the current one */
   index = gtk_list_box_row_get_index (list_box_row);
   if (index == 0)
-    index = 2; // Trick in order to select the futur first row
+    index = 2; /* Trick in order to select the futur first row */
   prev_list_box_row = gtk_list_box_get_row_at_index (GTK_LIST_BOX (dialog->search_engine_list_box),
                                                      index - 1);
   /* If the removed engine is the default, choose the newly selected as default */
   default_search_engine = ephy_search_engine_manager_get_default_engine (dialog->search_engine_manager);
 
-  if (g_strcmp0(default_search_engine, search_engine_name) == 0) {
+  if (g_strcmp0 (default_search_engine, search_engine_name) == 0) {
     search_engine_label = container_get_first_child (GTK_CONTAINER (prev_list_box_row));
     search_engine_name = gtk_label_get_text (GTK_LABEL (search_engine_label));
     ephy_search_engine_manager_set_default_engine (dialog->search_engine_manager,
@@ -401,7 +400,7 @@ on_default_search_engine_switch_state_modified (GtkWidget              *switch_w
   search_engine_name = gtk_label_get_text (GTK_LABEL (search_engine_label));
   default_search_engine = ephy_search_engine_manager_get_default_engine (dialog->search_engine_manager);
 
-  if ( g_strcmp0(default_search_engine, search_engine_name) != 0) {
+  if (g_strcmp0 (default_search_engine, search_engine_name) != 0) {
     is_set = ephy_search_engine_manager_set_default_engine (dialog->search_engine_manager,
                                                             search_engine_name);
 
@@ -415,8 +414,7 @@ on_default_search_engine_switch_state_modified (GtkWidget              *switch_w
                            TRUE);
     gtk_widget_set_sensitive (dialog->search_engine_default_switch, FALSE);
     return TRUE;
-  }
-  else
+  } else
     return FALSE;
 }
 
@@ -474,7 +472,7 @@ sort_list_box_by_engine_name (GtkListBoxRow *row1,
 }
 
 static void
-dialog_entry_change_on_event (GtkWidget *entry,
+dialog_entry_change_on_event (GtkWidget              *entry,
                               EphySearchEngineDialog *dialog)
 {
   EphySearchEngineManager *manager;
@@ -535,8 +533,8 @@ dialog_entry_change_on_event (GtkWidget *entry,
 
 static gboolean
 address_entry_on_focus_out_cb (GtkWidget *entry,
-                              GdkEvent  *event,
-                              gpointer   data)
+                               GdkEvent  *event,
+                               gpointer   data)
 {
   EphySearchEngineDialog *dialog;
   dialog = EPHY_SEARCH_ENGINE_DIALOG (data);
@@ -546,7 +544,7 @@ address_entry_on_focus_out_cb (GtkWidget *entry,
 
 static void
 address_entry_on_activate_cb (GtkWidget *entry,
-                             gpointer   data)
+                              gpointer   data)
 {
   EphySearchEngineDialog *dialog;
   dialog = EPHY_SEARCH_ENGINE_DIALOG (data);
@@ -595,7 +593,7 @@ name_entry_change_on_event (GtkWidget              *entry,
   search_engine_label = container_get_first_child (GTK_CONTAINER (list_box_row));
   search_engine_name = gtk_label_get_text (GTK_LABEL (search_engine_label));
   new_search_engine_name = gtk_entry_get_text (GTK_ENTRY (entry));
-  search_engine_address =  gtk_entry_get_text (GTK_ENTRY (dialog->search_engine_address_entry));
+  search_engine_address = gtk_entry_get_text (GTK_ENTRY (dialog->search_engine_address_entry));
   search_engine_bang = gtk_entry_get_text (GTK_ENTRY (dialog->search_engine_bang_entry));
 
   if (g_strcmp0 (search_engine_name, new_search_engine_name) == 0) {
@@ -624,7 +622,7 @@ name_entry_change_on_event (GtkWidget              *entry,
   /* Change the name of the default searche engine too*/
   default_search_engine = ephy_search_engine_manager_get_default_engine (dialog->search_engine_manager);
 
-  if (g_strcmp0(default_search_engine, search_engine_name) == 0)
+  if (g_strcmp0 (default_search_engine, search_engine_name) == 0)
     ephy_search_engine_manager_set_default_engine (dialog->search_engine_manager,
                                                    new_search_engine_name);
 
diff --git a/src/ephy-session.c b/src/ephy-session.c
index 49212b6b1..bba7fad25 100644
--- a/src/ephy-session.c
+++ b/src/ephy-session.c
@@ -118,9 +118,9 @@ session_delete (EphySession *session)
 }
 
 static void
-load_changed_cb (WebKitWebView  *view,
-                 WebKitLoadEvent load_event,
-                 EphySession    *session)
+load_changed_cb (WebKitWebView   *view,
+                 WebKitLoadEvent  load_event,
+                 EphySession     *session)
 {
   if (!ephy_web_view_load_failed (EPHY_WEB_VIEW (view)))
     ephy_session_save (session);
@@ -179,7 +179,8 @@ closed_tab_get_notebook (ClosedTab *tab)
 }
 
 static int
-compare_func (ClosedTab *iter, EphyNotebook *notebook)
+compare_func (ClosedTab    *iter,
+              EphyNotebook *notebook)
 {
   return GTK_NOTEBOOK (closed_tab_get_notebook (iter)) - GTK_NOTEBOOK (notebook);
 }
@@ -688,8 +689,8 @@ save_data_free (SaveData *data)
 }
 
 static int
-write_tab (xmlTextWriterPtr writer,
-           SessionTab      *tab)
+write_tab (xmlTextWriterPtr  writer,
+           SessionTab       *tab)
 {
   int ret;
 
@@ -755,8 +756,8 @@ write_tab (xmlTextWriterPtr writer,
 }
 
 static int
-write_window_geometry (xmlTextWriterPtr writer,
-                       GdkRectangle    *geometry)
+write_window_geometry (xmlTextWriterPtr  writer,
+                       GdkRectangle     *geometry)
 {
   int ret;
 
@@ -782,8 +783,8 @@ write_window_geometry (xmlTextWriterPtr writer,
 }
 
 static int
-write_ephy_window (xmlTextWriterPtr writer,
-                   SessionWindow   *window)
+write_ephy_window (xmlTextWriterPtr  writer,
+                   SessionWindow    *window)
 {
   GList *l;
   int ret;
@@ -931,7 +932,7 @@ save_session_sync (GTask        *task,
 
   ret = xmlTextWriterEndDocument (writer);
 
- out:
+out:
   if (writer)
     xmlFreeTextWriter (writer);
 
@@ -1037,7 +1038,9 @@ ephy_session_save (EphySession *session)
 }
 
 static void
-confirm_before_recover (EphyWindow *window, const char *url, const char *title)
+confirm_before_recover (EphyWindow *window,
+                        const char *url,
+                        const char *title)
 {
   EphyEmbed *embed;
 
@@ -1096,9 +1099,9 @@ session_parser_context_free (SessionParserContext *context)
 }
 
 static void
-session_parse_window (SessionParserContext *context,
-                      const gchar         **names,
-                      const gchar         **values)
+session_parse_window (SessionParserContext  *context,
+                      const gchar          **names,
+                      const gchar          **values)
 {
   GdkRectangle geometry = { -1, -1, 0, 0 };
   guint i;
@@ -1132,9 +1135,9 @@ session_parse_window (SessionParserContext *context,
 }
 
 static void
-session_parse_embed (SessionParserContext *context,
-                     const gchar         **names,
-                     const gchar         **values)
+session_parse_embed (SessionParserContext  *context,
+                     const gchar          **names,
+                     const gchar          **values)
 {
   GtkWidget *notebook;
   const char *url = NULL;
@@ -1246,12 +1249,12 @@ session_parse_embed (SessionParserContext *context,
 }
 
 static void
-session_start_element (GMarkupParseContext *ctx,
-                       const gchar         *element_name,
-                       const gchar        **names,
-                       const gchar        **values,
-                       gpointer             user_data,
-                       GError             **error)
+session_start_element (GMarkupParseContext  *ctx,
+                       const gchar          *element_name,
+                       const gchar         **names,
+                       const gchar         **values,
+                       gpointer              user_data,
+                       GError              **error)
 {
   SessionParserContext *context = (SessionParserContext *)user_data;
 
@@ -1264,10 +1267,10 @@ session_start_element (GMarkupParseContext *ctx,
 }
 
 static void
-session_end_element (GMarkupParseContext *ctx,
-                     const gchar         *element_name,
-                     gpointer             user_data,
-                     GError             **error)
+session_end_element (GMarkupParseContext  *ctx,
+                     const gchar          *element_name,
+                     gpointer              user_data,
+                     GError              **error)
 {
   SessionParserContext *context = (SessionParserContext *)user_data;
 
@@ -1433,12 +1436,12 @@ load_stream_read_cb (GObject      *object,
  * the operation.
  **/
 void
-ephy_session_load_from_stream (EphySession        *session,
-                               GInputStream       *stream,
-                               guint32             user_time,
-                               GCancellable       *cancellable,
-                               GAsyncReadyCallback callback,
-                               gpointer            user_data)
+ephy_session_load_from_stream (EphySession         *session,
+                               GInputStream        *stream,
+                               guint32              user_time,
+                               GCancellable        *cancellable,
+                               GAsyncReadyCallback  callback,
+                               gpointer             user_data)
 {
   GTask *task;
   SessionParserContext *context;
@@ -1480,9 +1483,9 @@ ephy_session_load_from_stream (EphySession        *session,
  * Returns: %TRUE if at least a window has been opened
  **/
 gboolean
-ephy_session_load_from_stream_finish (EphySession  *session,
-                                      GAsyncResult *result,
-                                      GError      **error)
+ephy_session_load_from_stream_finish (EphySession   *session,
+                                      GAsyncResult  *result,
+                                      GError       **error)
 {
   g_assert (g_task_is_valid (result, session));
 
@@ -1573,12 +1576,12 @@ session_read_cb (GObject      *object,
  * the operation.
  **/
 void
-ephy_session_load (EphySession        *session,
-                   const char         *filename,
-                   guint32             user_time,
-                   GCancellable       *cancellable,
-                   GAsyncReadyCallback callback,
-                   gpointer            user_data)
+ephy_session_load (EphySession         *session,
+                   const char          *filename,
+                   guint32              user_time,
+                   GCancellable        *cancellable,
+                   GAsyncReadyCallback  callback,
+                   gpointer             user_data)
 {
   GFile *save_to_file;
   GTask *task;
@@ -1616,9 +1619,9 @@ ephy_session_load (EphySession        *session,
  * Returns: %TRUE if at least a window has been opened
  **/
 gboolean
-ephy_session_load_finish (EphySession  *session,
-                          GAsyncResult *result,
-                          GError      **error)
+ephy_session_load_finish (EphySession   *session,
+                          GAsyncResult  *result,
+                          GError       **error)
 {
   g_assert (g_task_is_valid (result, session));
 
@@ -1660,11 +1663,11 @@ session_resumed_cb (GObject      *object,
 }
 
 void
-ephy_session_resume (EphySession        *session,
-                     guint32             user_time,
-                     GCancellable       *cancellable,
-                     GAsyncReadyCallback callback,
-                     gpointer            user_data)
+ephy_session_resume (EphySession         *session,
+                     guint32              user_time,
+                     GCancellable        *cancellable,
+                     GAsyncReadyCallback  callback,
+                     gpointer             user_data)
 {
   GTask *task;
   gboolean has_session_state;
@@ -1702,9 +1705,9 @@ ephy_session_resume (EphySession        *session,
 }
 
 gboolean
-ephy_session_resume_finish (EphySession  *session,
-                            GAsyncResult *result,
-                            GError      **error)
+ephy_session_resume_finish (EphySession   *session,
+                            GAsyncResult  *result,
+                            GError       **error)
 {
   g_assert (g_task_is_valid (result, session));
 
diff --git a/src/ephy-suggestion-model.c b/src/ephy-suggestion-model.c
index c650b16b1..ca6b3d8ca 100644
--- a/src/ephy-suggestion-model.c
+++ b/src/ephy-suggestion-model.c
@@ -30,11 +30,11 @@
 #define MAX_COMPLETION_HISTORY_URLS 8
 
 struct _EphySuggestionModel {
-  GObject               parent;
-  EphyHistoryService   *history_service;
+  GObject parent;
+  EphyHistoryService *history_service;
   EphyBookmarksManager *bookmarks_manager;
-  GSequence            *items;
-  GCancellable         *icon_cancellable;
+  GSequence *items;
+  GCancellable *icon_cancellable;
 };
 
 enum {
@@ -334,7 +334,7 @@ add_search_engines (EphySuggestionModel *self,
     g_autofree char *address = NULL;
     g_autofree char *escaped_title = NULL;
     g_autofree char *markup = NULL;
-    g_autoptr(SoupURI) uri = NULL;
+    g_autoptr (SoupURI) uri = NULL;
 
     address = ephy_search_engine_manager_build_search_address (manager, engines[i], query);
     escaped_title = g_markup_escape_text (engines[i], -1);
@@ -364,7 +364,7 @@ add_tabs (EphySuggestionModel *self,
 {
   GApplication *application;
   EphyEmbedShell *shell;
-  EphyWindow *window ;
+  EphyWindow *window;
   GtkWidget *notebook;
   gint n_pages;
   gint current;
diff --git a/src/ephy-tab-header-bar.c b/src/ephy-tab-header-bar.c
index 38d1648b1..8a427d241 100644
--- a/src/ephy-tab-header-bar.c
+++ b/src/ephy-tab-header-bar.c
@@ -26,8 +26,8 @@
 struct _EphyTabHeaderBar {
   GtkHeaderBar parent_instance;
 
-  GtkWidget    *back_button;
-  GtkWidget    *new_tab_button;
+  GtkWidget *back_button;
+  GtkWidget *new_tab_button;
 };
 
 G_DEFINE_TYPE (EphyTabHeaderBar, ephy_tab_header_bar, GTK_TYPE_HEADER_BAR)
@@ -42,7 +42,7 @@ G_DEFINE_TYPE (EphyTabHeaderBar, ephy_tab_header_bar, GTK_TYPE_HEADER_BAR)
 GtkWidget *
 ephy_tab_header_bar_new (void)
 {
-  return GTK_WIDGET(g_object_new(EPHY_TYPE_TAB_HEADER_BAR, NULL));
+  return GTK_WIDGET (g_object_new (EPHY_TYPE_TAB_HEADER_BAR, NULL));
 }
 
 static void
@@ -53,7 +53,7 @@ ephy_tab_header_bar_constructed (GObject *object)
   EphyTabHeaderBar *self = EPHY_TAB_HEADER_BAR (object);
 
   G_OBJECT_CLASS (ephy_tab_header_bar_parent_class)->constructed (object);
-  
+
   back_button = GTK_WIDGET (gtk_button_new_from_icon_name ("go-previous-symbolic", GTK_ICON_SIZE_BUTTON));
   new_tab_button = GTK_WIDGET (gtk_button_new_from_icon_name ("tab-new-symbolic", GTK_ICON_SIZE_BUTTON));
 
@@ -64,7 +64,7 @@ ephy_tab_header_bar_constructed (GObject *object)
 
   gtk_header_bar_pack_start (GTK_HEADER_BAR (self), back_button);
   gtk_header_bar_pack_end (GTK_HEADER_BAR (self), new_tab_button);
-  
+
   gtk_header_bar_set_title (GTK_HEADER_BAR (self), _("Tabs"));
   gtk_header_bar_set_show_close_button (GTK_HEADER_BAR (self), TRUE);
 
diff --git a/src/ephy-tab-label.c b/src/ephy-tab-label.c
index 67cdd85c9..006da0245 100644
--- a/src/ephy-tab-label.c
+++ b/src/ephy-tab-label.c
@@ -96,37 +96,37 @@ ephy_tab_label_set_property (GObject      *object,
   const gchar *str;
 
   switch (prop_id) {
-  case PROP_LABEL_TEXT:
-    str = g_value_get_string (value);
-    if (str && strlen (str) != 0) {
-      gtk_label_set_text (GTK_LABEL (self->label), str);
-      gtk_widget_set_tooltip_text (GTK_WIDGET (self), str);
-    }
-    break;
-  case PROP_LABEL_URI:
-    str = g_value_get_string (value);
-    if (self->is_loading && !ephy_embed_utils_is_no_show_address (str)) {
-      gtk_label_set_text (GTK_LABEL (self->label), str);
-      gtk_widget_set_tooltip_text (GTK_WIDGET (self), str);
-    }
-    break;
-  case PROP_ICON_BUF:
-    gtk_image_set_from_pixbuf (GTK_IMAGE (self->icon), g_value_get_object (value));
-    self->has_icon = g_value_get_object (value) != NULL;
-    ephy_tab_label_update_icon (self);
-    break;
-  case PROP_SPINNING:
-    ephy_tab_label_set_spinning (self, g_value_get_boolean (value));
-    break;
-  case PROP_AUDIO:
-    gtk_widget_set_visible (self->audio_button, g_value_get_boolean (value));
-    break;
-  case PROP_PINNED:
-    self->is_pinned = g_value_get_boolean (value);
-    break;
-  default:
-    G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-    break;
+    case PROP_LABEL_TEXT:
+      str = g_value_get_string (value);
+      if (str && strlen (str) != 0) {
+        gtk_label_set_text (GTK_LABEL (self->label), str);
+        gtk_widget_set_tooltip_text (GTK_WIDGET (self), str);
+      }
+      break;
+    case PROP_LABEL_URI:
+      str = g_value_get_string (value);
+      if (self->is_loading && !ephy_embed_utils_is_no_show_address (str)) {
+        gtk_label_set_text (GTK_LABEL (self->label), str);
+        gtk_widget_set_tooltip_text (GTK_WIDGET (self), str);
+      }
+      break;
+    case PROP_ICON_BUF:
+      gtk_image_set_from_pixbuf (GTK_IMAGE (self->icon), g_value_get_object (value));
+      self->has_icon = g_value_get_object (value) != NULL;
+      ephy_tab_label_update_icon (self);
+      break;
+    case PROP_SPINNING:
+      ephy_tab_label_set_spinning (self, g_value_get_boolean (value));
+      break;
+    case PROP_AUDIO:
+      gtk_widget_set_visible (self->audio_button, g_value_get_boolean (value));
+      break;
+    case PROP_PINNED:
+      self->is_pinned = g_value_get_boolean (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
   }
 }
 
@@ -140,38 +140,38 @@ ephy_tab_label_get_property (GObject    *object,
   gboolean spinning = FALSE;
 
   switch (prop_id) {
-  case PROP_LABEL_TEXT:
-    g_value_set_string (value, gtk_label_get_text (GTK_LABEL (self->label)));
-    break;
-  case PROP_ICON_BUF:
-    g_value_set_object (value, gtk_image_get_pixbuf (GTK_IMAGE (self->icon)));
-    break;
-  case PROP_SPINNING:
-    g_object_get (self->spinner, "active", &spinning, NULL);
-    g_value_set_boolean (value, spinning);
-    break;
-  case PROP_AUDIO:
-    g_value_set_boolean (value, gtk_widget_get_visible (self->audio_button));
-    break;
-  case PROP_PINNED:
-    g_value_set_boolean (value, self->is_pinned);
-    break;
-  default:
-   G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-   break;
+    case PROP_LABEL_TEXT:
+      g_value_set_string (value, gtk_label_get_text (GTK_LABEL (self->label)));
+      break;
+    case PROP_ICON_BUF:
+      g_value_set_object (value, gtk_image_get_pixbuf (GTK_IMAGE (self->icon)));
+      break;
+    case PROP_SPINNING:
+      g_object_get (self->spinner, "active", &spinning, NULL);
+      g_value_set_boolean (value, spinning);
+      break;
+    case PROP_AUDIO:
+      g_value_set_boolean (value, gtk_widget_get_visible (self->audio_button));
+      break;
+    case PROP_PINNED:
+      g_value_set_boolean (value, self->is_pinned);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
   }
 }
 
 static void
 ephy_tab_label_init (EphyTabLabel *self)
 {
-   gtk_widget_init_template (GTK_WIDGET (self));
-   self->has_icon = FALSE;
+  gtk_widget_init_template (GTK_WIDGET (self));
+  self->has_icon = FALSE;
 }
 
 static void
-close_button_clicked_cb (GtkWidget     *widget,
-                         EphyTabLabel  *tab_label)
+close_button_clicked_cb (GtkWidget    *widget,
+                         EphyTabLabel *tab_label)
 {
   g_signal_emit (tab_label, signals[CLOSE_CLICKED], 0, NULL);
 }
@@ -276,7 +276,7 @@ ephy_tab_label_class_init (EphyTabLabelClass *klass)
                                          0);
 
   /* Bind class to template */
-  gtk_widget_class_set_template_from_resource (widget_class,  "/org/gnome/epiphany/gtk/tab-label.ui");
+  gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/epiphany/gtk/tab-label.ui");
 
   gtk_widget_class_bind_template_child (widget_class, EphyTabLabel, spinner);
   gtk_widget_class_bind_template_child (widget_class, EphyTabLabel, icon);
diff --git a/src/ephy-window.c b/src/ephy-window.c
index d3c138529..59ae9e03b 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -344,10 +344,10 @@ ephy_window_embed_container_iface_init (EphyEmbedContainerInterface *iface)
 }
 
 static EphyEmbed *
-ephy_window_open_link (EphyLink     *link,
-                       const char   *address,
-                       EphyEmbed    *embed,
-                       EphyLinkFlags flags)
+ephy_window_open_link (EphyLink      *link,
+                       const char    *address,
+                       EphyEmbed     *embed,
+                       EphyLinkFlags  flags)
 {
   EphyWindow *window = EPHY_WINDOW (link);
   EphyEmbed *new_embed;
@@ -437,8 +437,8 @@ sync_chromes_visibility (EphyWindow *window)
 }
 
 static void
-ephy_window_set_chrome (EphyWindow      *window,
-                        EphyWindowChrome chrome)
+ephy_window_set_chrome (EphyWindow       *window,
+                        EphyWindowChrome  chrome)
 {
   if (window->chrome == chrome)
     return;
@@ -452,9 +452,9 @@ ephy_window_set_chrome (EphyWindow      *window,
 }
 
 static void
-sync_tab_load_status (EphyWebView    *view,
-                      WebKitLoadEvent load_event,
-                      EphyWindow     *window)
+sync_tab_load_status (EphyWebView     *view,
+                      WebKitLoadEvent  load_event,
+                      EphyWindow      *window)
 {
   GActionGroup *action_group;
   GAction *action;
@@ -539,8 +539,8 @@ update_adaptive_mode (EphyWindow *window)
                         (gtk_window_is_maximized (GTK_WINDOW (window)) ||
                          window->is_fullscreen);
   adaptive_mode = is_narrow || is_mobile_landscape ?
-    EPHY_ADAPTIVE_MODE_NARROW :
-    EPHY_ADAPTIVE_MODE_NORMAL;
+                  EPHY_ADAPTIVE_MODE_NARROW :
+                  EPHY_ADAPTIVE_MODE_NORMAL;
   ephy_header_bar_set_adaptive_mode (header_bar, adaptive_mode);
   ephy_action_bar_set_adaptive_mode (action_bar, adaptive_mode);
   ephy_notebook_set_adaptive_mode (notebook, adaptive_mode);
@@ -619,7 +619,7 @@ ephy_window_should_view_receive_key_press_event (EphyWindow  *window,
            keyval != GDK_KEY_Page_Down && /* Next Tab */
            keyval != GDK_KEY_KP_3 &&      /* Next Tab */
            keyval != GDK_KEY_Tab &&       /* Next Tab */
-           keyval != GDK_KEY_ISO_Left_Tab;/* Previous Tab (Shift+Tab -> ISO Left Tab) */
+           keyval != GDK_KEY_ISO_Left_Tab; /* Previous Tab (Shift+Tab -> ISO Left Tab) */
 
   if ((event->state & state_mask) == (GDK_SHIFT_MASK | GDK_CONTROL_MASK))
     return keyval != GDK_KEY_n &&         /* New Incognito Window */
@@ -713,7 +713,10 @@ update_link_actions_sensitivity (EphyWindow *window,
 }
 
 static void
-update_edit_action_sensitivity (EphyWindow *window, const char *action_name, gboolean sensitive, gboolean 
hide)
+update_edit_action_sensitivity (EphyWindow *window,
+                                const char *action_name,
+                                gboolean    sensitive,
+                                gboolean    hide)
 {
   GActionGroup *action_group;
   GAction *action;
@@ -727,7 +730,8 @@ update_edit_action_sensitivity (EphyWindow *window, const char *action_name, gbo
 }
 
 static void
-update_edit_actions_sensitivity (EphyWindow *window, gboolean hide)
+update_edit_actions_sensitivity (EphyWindow *window,
+                                 gboolean    hide)
 {
   GtkWidget *widget = gtk_window_get_focus (GTK_WINDOW (window));
   gboolean can_cut, can_copy, can_undo, can_redo, can_paste;
@@ -810,8 +814,7 @@ change_combined_stop_reload_state (GSimpleAction *action,
   g_simple_action_set_state (action, loading);
 }
 
-static const GActionEntry window_entries [] =
-{
+static const GActionEntry window_entries [] = {
   { "page-menu", window_cmd_page_menu },
   { "new-tab", window_cmd_new_tab },
   { "open", window_cmd_open },
@@ -987,7 +990,8 @@ const struct {
 };
 
 static char *
-calculate_location (const char *typed_address, const char *address)
+calculate_location (const char *typed_address,
+                    const char *address)
 {
   const char *location;
 
@@ -1008,11 +1012,13 @@ _ephy_window_set_default_actions_sensitive (EphyWindow *window,
   GAction *action;
   int i;
 
-  const char *action_group_actions[] = { "save-as", "save-as-application", "print",
-                                         "find", "find-prev", "find-next",
-                                         "bookmark-page", "encoding", "page-source",
-                                         "send-to",
-                                         NULL };
+  const char *action_group_actions[] = {
+    "save-as", "save-as-application", "print",
+    "find", "find-prev", "find-next",
+    "bookmark-page", "encoding", "page-source",
+    "send-to",
+    NULL
+  };
 
   action_group = gtk_widget_get_action_group (GTK_WIDGET (window), "win");
 
@@ -1065,7 +1071,9 @@ sync_tab_address (EphyWebView *view,
 }
 
 static void
-sync_tab_zoom (WebKitWebView *web_view, GParamSpec *pspec, EphyWindow *window)
+sync_tab_zoom (WebKitWebView *web_view,
+               GParamSpec    *pspec,
+               EphyWindow    *window)
 {
   GActionGroup *action_group;
   GAction *action;
@@ -1149,8 +1157,8 @@ sync_tab_document_type (EphyWebView *view,
 }
 
 static void
-_ephy_window_set_navigation_flags (EphyWindow                *window,
-                                   EphyWebViewNavigationFlags flags)
+_ephy_window_set_navigation_flags (EphyWindow                 *window,
+                                   EphyWebViewNavigationFlags  flags)
 {
   GActionGroup *action_group;
   GAction *action;
@@ -1189,9 +1197,9 @@ sync_tab_is_blank (EphyWebView *view,
 }
 
 static void
-sync_tab_bookmarked_status (EphyWebView   *view,
-                            GParamSpec    *pspec,
-                            EphyWindow    *window)
+sync_tab_bookmarked_status (EphyWebView *view,
+                            GParamSpec  *pspec,
+                            EphyWindow  *window)
 {
   EphyBookmarksManager *manager = ephy_shell_get_bookmarks_manager (ephy_shell_get_default ());
   EphyEmbedShell *shell = ephy_embed_shell_get_default ();
@@ -1414,8 +1422,8 @@ add_item_to_context_menu (WebKitContextMenu     *context_menu,
 
 /* FIXME: Add webkit_context_menu_find() ? */
 static WebKitContextMenuItem *
-find_item_in_context_menu (WebKitContextMenu      *context_menu,
-                           WebKitContextMenuAction action)
+find_item_in_context_menu (WebKitContextMenu       *context_menu,
+                           WebKitContextMenuAction  action)
 {
   GList *items, *iter;
 
@@ -1466,8 +1474,8 @@ should_show_copy_outside_editable (WebKitWebView *view)
 }
 
 static void
-parse_context_menu_user_data (WebKitContextMenu *context_menu,
-                              const char       **selected_text)
+parse_context_menu_user_data (WebKitContextMenu  *context_menu,
+                              const char        **selected_text)
 {
   GVariantDict dict;
 
@@ -1723,7 +1731,6 @@ populate_context_menu (WebKitWebView       *web_view,
 
     webkit_context_menu_append (context_menu,
                                 webkit_context_menu_item_new_separator ());
-
   } else {
     is_document = TRUE;
 
@@ -2027,11 +2034,11 @@ create_web_view_cb (WebKitWebView          *web_view,
 }
 
 typedef struct {
-  EphyWindow               *window;
-  WebKitWebView            *web_view;
-  WebKitPolicyDecision     *decision;
-  WebKitPolicyDecisionType  decision_type;
-  char                     *request_uri;
+  EphyWindow *window;
+  WebKitWebView *web_view;
+  WebKitPolicyDecision *decision;
+  WebKitPolicyDecisionType decision_type;
+  char *request_uri;
 } VerifyUrlAsyncData;
 
 static inline VerifyUrlAsyncData *
@@ -2171,7 +2178,7 @@ decide_navigation_policy (WebKitWebView            *web_view,
     /* New background tab in existing window for middle click and
      * control+click */
     else if (button == GDK_BUTTON_MIDDLE ||
-            (button == GDK_BUTTON_PRIMARY && (state == GDK_CONTROL_MASK))) {
+             (button == GDK_BUTTON_PRIMARY && (state == GDK_CONTROL_MASK))) {
       flags |= EPHY_NEW_TAB_APPEND_AFTER;
     }
     /* New active tab in existing window for control+shift+click */
@@ -2250,10 +2257,10 @@ verify_url_cb (EphyGSBService     *service,
 }
 
 static gboolean
-decide_policy_cb (WebKitWebView           *web_view,
-                  WebKitPolicyDecision    *decision,
-                  WebKitPolicyDecisionType decision_type,
-                  EphyWindow              *window)
+decide_policy_cb (WebKitWebView            *web_view,
+                  WebKitPolicyDecision     *decision,
+                  WebKitPolicyDecisionType  decision_type,
+                  EphyWindow               *window)
 {
   EphyGSBService *service;
   WebKitNavigationPolicyDecision *navigation_decision;
@@ -2477,7 +2484,8 @@ ephy_window_disconnect_active_embed (EphyWindow *window)
 }
 
 static void
-ephy_window_set_active_tab (EphyWindow *window, EphyEmbed *new_embed)
+ephy_window_set_active_tab (EphyWindow *window,
+                            EphyEmbed  *new_embed)
 {
   EphyEmbed *old_embed;
 
@@ -2565,7 +2573,7 @@ setup_tab_accels (EphyWindow *window)
     g_action_map_add_action (G_ACTION_MAP (action_group), G_ACTION (simple_action));
     gtk_application_set_accels_for_action (GTK_APPLICATION (app),
                                            action_name_with_tab,
-                                           (const gchar*[]) {accel, NULL});
+                                           (const gchar *[]) {accel, NULL});
 
     g_signal_connect (G_ACTION (simple_action), "activate",
                       G_CALLBACK (tab_accels_item_activate), window);
@@ -2912,7 +2920,7 @@ static void
 run_downloads_in_background (EphyWindow *window,
                              int         num)
 {
-  g_autoptr(GNotification) notification = NULL;
+  g_autoptr (GNotification) notification = NULL;
   g_autofree char *body = NULL;
 
   notification = g_notification_new (_("Download operation"));
@@ -2961,12 +2969,12 @@ notebook_page_close_request_cb (EphyNotebook *notebook,
                               EPHY_PREFS_WARN_ON_CLOSE_UNSUBMITTED_DATA)) {
     TabHasModifiedFormsData *data;
 
-     /* The modified forms check runs in the web process, which is problematic
-      * because we don't want our codepath for closing a web view to depend on
-      * executing web process code, in case the web process has hung. (This can
-      * also be caused by a network process hang!) We'll assume the process has
-      * been hung if there's no response after one second.
-      */
+    /* The modified forms check runs in the web process, which is problematic
+     * because we don't want our codepath for closing a web view to depend on
+     * executing web process code, in case the web process has hung. (This can
+     * also be caused by a network process hang!) We'll assume the process has
+     * been hung if there's no response after one second.
+     */
     data = tab_has_modified_forms_data_new (window, embed);
     data->id = g_timeout_add_seconds (1, (GSourceFunc)tab_has_modified_forms_timeout_cb, data);
     ephy_web_view_has_modified_forms (ephy_embed_get_web_view (embed),
@@ -2996,7 +3004,8 @@ notebook_create_window_cb (GtkNotebook *notebook,
 }
 
 static EphyEmbed *
-real_get_active_tab (EphyWindow *window, int page_num)
+real_get_active_tab (EphyWindow *window,
+                     int         page_num)
 {
   GtkWidget *embed;
 
@@ -3165,7 +3174,7 @@ ephy_window_get_property (GObject    *object,
 }
 
 static gboolean
-ephy_window_configure_event (GtkWidget *widget,
+ephy_window_configure_event (GtkWidget         *widget,
                              GdkEventConfigure *event)
 {
   EphyWindow *window = EPHY_WINDOW (widget);
@@ -3483,12 +3492,14 @@ setup_action_bar (EphyWindow *window)
   return action_bar;
 }
 
-static const char *disabled_actions_for_app_mode[] = { "open",
-                                                       "save-as-application",
-                                                       "encoding",
-                                                       "bookmark-page",
-                                                       "new-tab",
-                                                       "home" };
+static const char *disabled_actions_for_app_mode[] = {
+  "open",
+  "save-as-application",
+  "encoding",
+  "bookmark-page",
+  "new-tab",
+  "home"
+};
 
 static gboolean
 browse_with_caret_get_mapping (GValue   *value,
@@ -3512,7 +3523,7 @@ const gchar *supported_mime_types[] = {
 static void
 set_as_default_browser ()
 {
-  g_autoptr(GError) error = NULL;
+  g_autoptr (GError) error = NULL;
   GDesktopAppInfo *desktop_info;
   GAppInfo *info = NULL;
   g_autofree gchar *id = g_strconcat (APPLICATION_ID, ".desktop", NULL);
@@ -3583,7 +3594,7 @@ add_default_browser_question (GtkBox *box)
 static gboolean
 is_browser_default (void)
 {
-  g_autoptr(GAppInfo) info = g_app_info_get_default_for_type (supported_mime_types[0], TRUE);
+  g_autoptr (GAppInfo) info = g_app_info_get_default_for_type (supported_mime_types[0], TRUE);
 
   if (info) {
     g_autofree gchar *id = g_strconcat (APPLICATION_ID, ".desktop", NULL);
@@ -3742,12 +3753,12 @@ ephy_window_constructed (GObject *object)
   /* other notifiers */
   action_group = gtk_widget_get_action_group (GTK_WIDGET (window), "win");
   action = g_action_map_lookup_action (G_ACTION_MAP (action_group),
-                                           "browse-with-caret");
+                                       "browse-with-caret");
 
   g_settings_bind_with_mapping (EPHY_SETTINGS_MAIN,
                                 EPHY_PREFS_ENABLE_CARET_BROWSING,
                                 G_SIMPLE_ACTION (action), "state",
-                                G_SETTINGS_BIND_GET|G_SETTINGS_BIND_GET_NO_CHANGES,
+                                G_SETTINGS_BIND_GET | G_SETTINGS_BIND_GET_NO_CHANGES,
                                 browse_with_caret_get_mapping,
                                 NULL,
                                 action, NULL);
@@ -4247,7 +4258,6 @@ ephy_window_close (EphyWindow *window)
       g_settings_get_boolean (EPHY_SETTINGS_MAIN,
                               EPHY_PREFS_WARN_ON_CLOSE_UNSUBMITTED_DATA) &&
       gtk_notebook_get_n_pages (window->notebook) > 0) {
-
     ephy_window_check_modified_forms (window);
     /* stop window close */
     return FALSE;
@@ -4256,8 +4266,8 @@ ephy_window_close (EphyWindow *window)
   if (ephy_shell_get_n_windows (ephy_shell_get_default ()) > 1 &&
       gtk_notebook_get_n_pages (window->notebook) > 1 &&
       !confirm_close_with_multiple_tabs (window)) {
-      /* stop window close */
-      return FALSE;
+    /* stop window close */
+    return FALSE;
   }
 
   /* If this is the last window, check ongoing downloads and save its state in the session. */
diff --git a/src/passwords-dialog.c b/src/passwords-dialog.c
index a6cc4a1f1..1d12df527 100644
--- a/src/passwords-dialog.c
+++ b/src/passwords-dialog.c
@@ -260,8 +260,8 @@ on_search_entry_changed (GtkSearchEntry      *entry,
 }
 
 static char *
-get_selected_item (EphyPasswordsDialog  *dialog,
-                   PasswordsDialogColumn column)
+get_selected_item (EphyPasswordsDialog   *dialog,
+                   PasswordsDialogColumn  column)
 {
   GtkTreeModel *model;
   GList *selected;
diff --git a/src/popup-commands.c b/src/popup-commands.c
index ffbbed3c2..4ae810baf 100644
--- a/src/popup-commands.c
+++ b/src/popup-commands.c
@@ -43,9 +43,9 @@ typedef enum {
 } LinkDestination;
 
 static void
-view_in_destination (EphyWindow     *window,
-                     const char     *property_name,
-                     LinkDestination destination)
+view_in_destination (EphyWindow      *window,
+                     const char      *property_name,
+                     LinkDestination  destination)
 {
   EphyEmbedEvent *event;
   GValue value = { 0, };
@@ -102,7 +102,8 @@ popup_cmd_media_in_new_window (GSimpleAction *action,
 }
 
 static void
-popup_cmd_copy_to_clipboard (EphyWindow *window, const char *text)
+popup_cmd_copy_to_clipboard (EphyWindow *window,
+                             const char *text)
 {
   gtk_clipboard_set_text (gtk_clipboard_get_default (gdk_display_get_default ()),
                           text, -1);
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index dc967fa6e..ed565f992 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -567,20 +567,20 @@ sync_setup_firefox_iframe (PrefsDialog *dialog)
 
   if (!dialog->fxa_web_view) {
     script =
-             /* Handle sign-in messages from the FxA content server. */
-             "function handleToChromeMessage(event) {"
-             "  let e = JSON.stringify({type: event.type, detail: event.detail});"
-             "  window.webkit.messageHandlers.toChromeMessageHandler.postMessage(e);"
-             "};"
-             "window.addEventListener('WebChannelMessageToChrome', handleToChromeMessage);"
-             /* Handle open-webmail click event. */
-             "function handleOpenWebmailClick(event) {"
-             "  if (event.target.id == 'open-webmail' && event.target.hasAttribute('href'))"
-             "    
window.webkit.messageHandlers.openWebmailClickHandler.postMessage(event.target.getAttribute('href'));"
-             "};"
-             "var stage = document.getElementById('stage');"
-             "if (stage)"
-             "  stage.addEventListener('click', handleOpenWebmailClick);";
+      /* Handle sign-in messages from the FxA content server. */
+      "function handleToChromeMessage(event) {"
+      "  let e = JSON.stringify({type: event.type, detail: event.detail});"
+      "  window.webkit.messageHandlers.toChromeMessageHandler.postMessage(e);"
+      "};"
+      "window.addEventListener('WebChannelMessageToChrome', handleToChromeMessage);"
+      /* Handle open-webmail click event. */
+      "function handleOpenWebmailClick(event) {"
+      "  if (event.target.id == 'open-webmail' && event.target.hasAttribute('href'))"
+      "    
window.webkit.messageHandlers.openWebmailClickHandler.postMessage(event.target.getAttribute('href'));"
+      "};"
+      "var stage = document.getElementById('stage');"
+      "if (stage)"
+      "  stage.addEventListener('click', handleOpenWebmailClick);";
 
     dialog->fxa_script = webkit_user_script_new (script,
                                                  WEBKIT_USER_CONTENT_INJECT_TOP_FRAME,
@@ -898,7 +898,7 @@ on_manage_passwords_button_clicked (GtkWidget   *button,
   EphyPasswordsDialog *passwords_dialog;
   EphyPasswordManager *password_manager;
 
-  password_manager = ephy_embed_shell_get_password_manager (EPHY_EMBED_SHELL(ephy_shell_get_default ()));
+  password_manager = ephy_embed_shell_get_password_manager (EPHY_EMBED_SHELL (ephy_shell_get_default ()));
   passwords_dialog = ephy_passwords_dialog_new (password_manager);
 
   gtk_window_set_transient_for (GTK_WINDOW (passwords_dialog), GTK_WINDOW (dialog));
@@ -944,7 +944,7 @@ on_default_zoom_spin_button_value_changed (GtkSpinButton *spin,
 
   adjustment = gtk_spin_button_get_adjustment (spin);
   value = gtk_adjustment_get_value (adjustment);
-  value = roundf(value) / 100;
+  value = roundf (value) / 100;
   g_settings_set_double (EPHY_SETTINGS_WEB, EPHY_PREFS_WEB_DEFAULT_ZOOM_LEVEL, value);
 }
 
@@ -1298,7 +1298,7 @@ setup_add_language_dialog (PrefsDialog *dialog)
   GtkTreeIter iter;
   guint i, n;
   GtkBuilder *builder;
-  g_auto(GStrv) locales;
+  g_auto (GStrv) locales;
 
   builder = gtk_builder_new_from_resource ("/org/gnome/epiphany/gtk/prefs-lang-dialog.ui");
   ad = GTK_WIDGET (gtk_builder_get_object (builder, "add_language_dialog"));
@@ -1678,7 +1678,7 @@ sync_frequency_get_mapping (GValue   *value,
 {
   uint minutes = g_variant_get_uint32 (variant);
 
-  for (gint i = 0; i < (gint) G_N_ELEMENTS (sync_frequency_minutes); i++) {
+  for (gint i = 0; i < (gint)G_N_ELEMENTS (sync_frequency_minutes); i++) {
     if (sync_frequency_minutes[i] != minutes)
       continue;
 
@@ -1697,7 +1697,7 @@ sync_frequency_set_mapping (const GValue       *value,
 {
   gint i = g_value_get_int (value);
 
-  if (i >= (gint) G_N_ELEMENTS (sync_frequency_minutes))
+  if (i >= (gint)G_N_ELEMENTS (sync_frequency_minutes))
     return NULL;
 
   return g_variant_new_uint32 (sync_frequency_minutes[i]);
@@ -1785,7 +1785,7 @@ blank_homepage_get_mapping (GValue   *value,
 
   setting = g_variant_get_string (variant, NULL);
   if (g_strcmp0 (setting, "about:blank") == 0)
-      g_value_set_boolean (value, TRUE);
+    g_value_set_boolean (value, TRUE);
 
   return TRUE;
 }
@@ -1859,8 +1859,8 @@ custom_homepage_entry_changed (GtkEntry    *entry,
 }
 
 static void
-custom_homepage_entry_icon_released (GtkEntry            *entry,
-                                     GtkEntryIconPosition icon_pos)
+custom_homepage_entry_icon_released (GtkEntry             *entry,
+                                     GtkEntryIconPosition  icon_pos)
 {
   if (icon_pos == GTK_ENTRY_ICON_SECONDARY)
     gtk_entry_set_text (entry, "");
@@ -2028,12 +2028,12 @@ reader_font_style_get_name (HdyEnumValueObject *value,
   g_assert (HDY_IS_ENUM_VALUE_OBJECT (value));
 
   switch (hdy_enum_value_object_get_value (value)) {
-  case EPHY_PREFS_READER_FONT_STYLE_SANS:
-    return g_strdup (N_("Sans"));
-  case EPHY_PREFS_READER_FONT_STYLE_SERIF:
-    return g_strdup (N_("Serif"));
-  default:
-    return NULL;
+    case EPHY_PREFS_READER_FONT_STYLE_SANS:
+      return g_strdup (N_("Sans"));
+    case EPHY_PREFS_READER_FONT_STYLE_SERIF:
+      return g_strdup (N_("Serif"));
+    default:
+      return NULL;
   }
 }
 
@@ -2058,12 +2058,12 @@ reader_font_style_set_mapping (const GValue       *value,
                                gpointer            user_data)
 {
   switch (g_value_get_int (value)) {
-  case EPHY_PREFS_READER_FONT_STYLE_SANS:
-    return g_variant_new_string ("sans");
-  case EPHY_PREFS_READER_FONT_STYLE_SERIF:
-    return g_variant_new_string ("serif");
-  default:
-    return g_variant_new_string ("crashed");
+    case EPHY_PREFS_READER_FONT_STYLE_SANS:
+      return g_variant_new_string ("sans");
+    case EPHY_PREFS_READER_FONT_STYLE_SERIF:
+      return g_variant_new_string ("serif");
+    default:
+      return g_variant_new_string ("crashed");
   }
 }
 
@@ -2074,12 +2074,12 @@ reader_color_scheme_get_name (HdyEnumValueObject *value,
   g_assert (HDY_IS_ENUM_VALUE_OBJECT (value));
 
   switch (hdy_enum_value_object_get_value (value)) {
-  case EPHY_PREFS_READER_COLORS_LIGHT:
-    return g_strdup (N_("Light"));
-  case EPHY_PREFS_READER_COLORS_DARK:
-    return g_strdup (N_("Dark"));
-  default:
-    return NULL;
+    case EPHY_PREFS_READER_COLORS_LIGHT:
+      return g_strdup (N_("Light"));
+    case EPHY_PREFS_READER_COLORS_DARK:
+      return g_strdup (N_("Dark"));
+    default:
+      return NULL;
   }
 }
 
@@ -2104,12 +2104,12 @@ reader_color_scheme_set_mapping (const GValue       *value,
                                  gpointer            user_data)
 {
   switch (g_value_get_int (value)) {
-  case EPHY_PREFS_READER_COLORS_LIGHT:
-    return g_variant_new_string ("light");
-  case EPHY_PREFS_READER_COLORS_DARK:
-    return g_variant_new_string ("dark");
-  default:
-    return g_variant_new_string ("crashed");
+    case EPHY_PREFS_READER_COLORS_LIGHT:
+      return g_variant_new_string ("light");
+    case EPHY_PREFS_READER_COLORS_DARK:
+      return g_variant_new_string ("dark");
+    default:
+      return g_variant_new_string ("crashed");
   }
 }
 
@@ -2254,7 +2254,7 @@ create_sync_frequency_minutes_model ()
 {
   GListStore *list_store = g_list_store_new (HDY_TYPE_VALUE_OBJECT);
   HdyValueObject *obj;
-  g_auto(GValue) value = G_VALUE_INIT;
+  g_auto (GValue) value = G_VALUE_INIT;
   guint i;
 
   g_value_init (&value, G_TYPE_UINT);
@@ -2282,7 +2282,7 @@ setup_sync_page (PrefsDialog *dialog)
   GSettings *sync_settings = ephy_settings_get (EPHY_PREFS_SYNC_SCHEMA);
   char *user = ephy_sync_utils_get_sync_user ();
   char *name = ephy_sync_utils_get_device_name ();
-  g_autoptr(GListModel) sync_frequency_minutes_model = create_sync_frequency_minutes_model ();
+  g_autoptr (GListModel) sync_frequency_minutes_model = create_sync_frequency_minutes_model ();
 
   gtk_entry_set_text (GTK_ENTRY (dialog->sync_device_name_entry), name);
 
@@ -2319,7 +2319,7 @@ setup_sync_page (PrefsDialog *dialog)
 
   hdy_combo_row_bind_name_model (HDY_COMBO_ROW (dialog->sync_frequency_row),
                                  sync_frequency_minutes_model,
-                                 (HdyComboRowGetNameFunc) get_sync_frequency_minutes_name,
+                                 (HdyComboRowGetNameFunc)get_sync_frequency_minutes_name,
                                  NULL,
                                  NULL);
   g_settings_bind_with_mapping (sync_settings,
diff --git a/src/profile-migrator/ephy-profile-migrator.c b/src/profile-migrator/ephy-profile-migrator.c
index aa3b068c6..f4faeab47 100644
--- a/src/profile-migrator/ephy-profile-migrator.c
+++ b/src/profile-migrator/ephy-profile-migrator.c
@@ -73,19 +73,15 @@ static const char *
 legacy_profile_dir (void)
 {
   static char *dir = NULL;
-  if (dir == NULL)
-    {
-      /* FIXME: This is fragile and not correct.
-       */
-      if (profile_dir != NULL)
-        {
-          dir = profile_dir;
-        }
-      else
-        {
-          dir = (char *)legacy_default_profile_dir ();
-        }
+  if (dir == NULL) {
+    /* FIXME: This is fragile and not correct.
+     */
+    if (profile_dir != NULL) {
+      dir = profile_dir;
+    } else {
+      dir = (char *)legacy_default_profile_dir ();
     }
+  }
   return dir;
 }
 
@@ -445,8 +441,8 @@ migrate_adblock_filters (void)
 
   if (content_size > 0) {
     char **filter_list;
-    guint  filter_list_length;
-    guint  i;
+    guint filter_list_length;
+    guint i;
 
     filter_list = g_strsplit (contents, ";", -1);
     filter_list_length = g_strv_length (filter_list);
@@ -714,7 +710,7 @@ migrate_passwords_add_target_origin (void)
     /* In most cases target_origin has the same value as origin
      * We don't have a way of figuring out the correct value retroactively,
      * so just use the origin value.
-    */
+     */
     if (target_origin == NULL)
       g_hash_table_insert (attrs, g_strdup (TARGET_ORIGIN_KEY), g_strdup (origin));
 
@@ -964,7 +960,7 @@ migrate_passwords_timestamp (void)
 
     timestamp_d = g_ascii_strtod (timestamp, NULL);
     timestamp_i = (gint64)ceil (timestamp_d);
-    g_hash_table_insert (attrs, g_strdup (SERVER_TIME_MODIFIED_KEY), g_strdup_printf ("%"PRId64, 
timestamp_i));
+    g_hash_table_insert (attrs, g_strdup (SERVER_TIME_MODIFIED_KEY), g_strdup_printf ("%" PRId64, 
timestamp_i));
 
     if (username)
       label = g_strdup_printf ("Password for %s in a form in %s", username, origin);
@@ -1105,10 +1101,10 @@ static gboolean
 move_directory_contents (const char *source_path,
                          const char *dest_path)
 {
-  g_autoptr(GFile) source = g_file_new_for_path (source_path);
-  g_autoptr(GFile) dest = g_file_new_for_path (dest_path);
-  g_autoptr(GFileEnumerator) direnum = NULL;
-  g_autoptr(GError) error = NULL;
+  g_autoptr (GFile) source = g_file_new_for_path (source_path);
+  g_autoptr (GFile) dest = g_file_new_for_path (dest_path);
+  g_autoptr (GFileEnumerator) direnum = NULL;
+  g_autoptr (GError) error = NULL;
 
   /* Just a sanity check as it should already exist */
   g_file_make_directory (dest, NULL, NULL);
@@ -1123,9 +1119,9 @@ move_directory_contents (const char *source_path,
 
   while (TRUE) {
     GFileInfo *info;
-    g_autoptr(GError) error = NULL;
-    g_autoptr(GFile) source_file = NULL;
-    g_autoptr(GFile) dest_file = NULL;
+    g_autoptr (GError) error = NULL;
+    g_autoptr (GFile) source_file = NULL;
+    g_autoptr (GFile) dest_file = NULL;
 
     if (!g_file_enumerator_iterate (direnum, &info, NULL, NULL, &error)) {
       g_warning ("Failed to enumerate dir: %s", error->message);
@@ -1163,10 +1159,10 @@ migrate_webapps_harder (void)
    * contained this bug. But now migrate_profile_directories() has to be run
    * later to correct a different bug in earlier versions.
    */
-  g_autoptr(GFileEnumerator) children = NULL;
-  g_autoptr(GFileInfo) info;
+  g_autoptr (GFileEnumerator) children = NULL;
+  g_autoptr (GFileInfo) info;
   g_autofree char *parent_directory_path = NULL;
-  g_autoptr(GFile) parent_directory = NULL;
+  g_autoptr (GFile) parent_directory = NULL;
 
   parent_directory_path = g_build_filename (g_get_user_data_dir (), "epiphany", NULL);
 
@@ -1187,8 +1183,8 @@ migrate_webapps_harder (void)
       g_autofree char *app_file = g_build_filename (incorrect_profile_dir, ".app", NULL);
 
       if (g_file_test (app_file, G_FILE_TEST_EXISTS)) {
-        g_autoptr(GKeyFile) file = g_key_file_new ();
-        g_autoptr(GFile) desktop_symlink = NULL;
+        g_autoptr (GKeyFile) file = g_key_file_new ();
+        g_autoptr (GFile) desktop_symlink = NULL;
         g_autofree char *desktop_file_name = g_strconcat (name, ".desktop", NULL);
         g_autofree char *desktop_file_path = g_build_filename (correct_profile_dir, desktop_file_name, NULL);
         g_autofree char *exec = NULL;
@@ -1196,11 +1192,11 @@ migrate_webapps_harder (void)
         g_autofree char *icon = NULL;
         g_autofree char *new_icon = NULL;
         g_autofree char *desktop_symlink_path = NULL;
-        g_autoptr(GError) error = NULL;
+        g_autoptr (GError) error = NULL;
 
         move_directory_contents (incorrect_profile_dir, correct_profile_dir);
 
-        // Update Exec and Icon to point to the new profile dir
+        /* Update Exec and Icon to point to the new profile dir */
         g_key_file_load_from_file (file, desktop_file_path, G_KEY_FILE_NONE, NULL);
 
         exec = g_key_file_get_string (file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_EXEC, &error);
@@ -1230,7 +1226,7 @@ migrate_webapps_harder (void)
         desktop_symlink = g_file_new_for_path (desktop_symlink_path);
         LOG ("Symlinking %s to %s", desktop_symlink_path, desktop_file_path);
 
-        // Try removing old symlink, failure is ok assuming it doesn't exist.
+        /* Try removing old symlink, failure is ok assuming it doesn't exist. */
         if (!g_file_delete (desktop_symlink, NULL, &error)) {
           g_warning ("Failed to remove old symbolic link: %s", error->message);
           g_clear_error (&error);
@@ -1249,10 +1245,10 @@ migrate_webapps_harder (void)
 static void
 migrate_profile_directories (void)
 {
-  g_autoptr(GFile) new_directory = NULL;
-  g_autoptr(GFile) adblock_directory = NULL;
-  g_autoptr(GFile) gsb_file = NULL;
-  g_autoptr(GFile) gsb_journal_file = NULL;
+  g_autoptr (GFile) new_directory = NULL;
+  g_autoptr (GFile) adblock_directory = NULL;
+  g_autoptr (GFile) gsb_file = NULL;
+  g_autoptr (GFile) gsb_journal_file = NULL;
   GList *web_apps;
   GList *l;
 
@@ -1263,9 +1259,9 @@ migrate_profile_directories (void)
   web_apps = ephy_web_application_get_legacy_application_list ();
   for (l = web_apps; l; l = l->next) {
     EphyWebApplication *app = (EphyWebApplication *)l->data;
-    g_autoptr(GError) error = NULL;
-    g_autoptr(GKeyFile) file = NULL;
-    g_autoptr(GFile) desktop_symlink = NULL;
+    g_autoptr (GError) error = NULL;
+    g_autoptr (GKeyFile) file = NULL;
+    g_autoptr (GFile) desktop_symlink = NULL;
     g_autofree char *old_name = g_strconcat ("app-epiphany-", app->id, NULL);
     g_autofree char *old_path = g_build_filename (legacy_default_profile_dir (), old_name, NULL);
     g_autofree char *app_path = ephy_web_application_get_profile_directory (app->id);
@@ -1283,15 +1279,15 @@ migrate_profile_directories (void)
     if (!move_directory_contents (old_path, app_path))
       continue;
 
-    // Create an empty file to indicate it's an app
+    /* Create an empty file to indicate it's an app */
     app_file = g_build_filename (app_path, ".app", NULL);
-    fd = g_open (app_file, O_WRONLY|O_CREAT|O_TRUNC, 0644);
+    fd = g_open (app_file, O_WRONLY | O_CREAT | O_TRUNC, 0644);
     if (fd < 0)
       g_warning ("Failed to create .app file: %s", g_strerror (errno));
     else
       close (fd);
 
-    // Update Exec and Icon to point to the new profile dir
+    /* Update Exec and Icon to point to the new profile dir */
     old_profile_prefix = g_build_filename (legacy_default_profile_dir (), "app-epiphany-", NULL);
     new_profile_prefix = g_build_filename (g_get_user_data_dir (), "epiphany-", NULL);
     file = g_key_file_new ();
@@ -1326,7 +1322,7 @@ migrate_profile_directories (void)
     desktop_symlink = g_file_new_for_path (desktop_symlink_path);
     LOG ("Symlinking %s to %s", desktop_symlink_path, desktop_file_path);
 
-    // Try removing old symlink, failure is ok assuming it doesn't exist.
+    /* Try removing old symlink, failure is ok assuming it doesn't exist. */
     if (!g_file_delete (desktop_symlink, NULL, &error)) {
       g_warning ("Failed to remove old symbolic link: %s", error->message);
       g_clear_error (&error);
@@ -1371,7 +1367,8 @@ migrate_nothing (void)
 /* If adding anything here, you need to edit EPHY_PROFILE_MIGRATION_VERSION
  * in ephy-profile-utils.h. */
 const EphyProfileMigrator migrators[] = {
-  /*  1 */ migrate_nothing,
+  /*  1 */
+  migrate_nothing,
   /*  2 */ migrate_nothing,
   /*  3 */ migrate_nothing,
   /*  4 */ migrate_nothing,
@@ -1467,8 +1464,7 @@ ephy_migrator (void)
   return TRUE;
 }
 
-static const GOptionEntry option_entries[] =
-{
+static const GOptionEntry option_entries[] = {
   { "do-step", 'd', 0, G_OPTION_ARG_INT, &do_step_n,
     N_("Executes only the n-th migration step"), NULL },
   { "version", 'v', 0, G_OPTION_ARG_INT, &migration_version,
@@ -1479,7 +1475,8 @@ static const GOptionEntry option_entries[] =
 };
 
 int
-main (int argc, char *argv[])
+main (int   argc,
+      char *argv[])
 {
   GOptionContext *option_context;
   GOptionGroup *option_group;
diff --git a/src/search-provider/ephy-search-provider-main.c b/src/search-provider/ephy-search-provider-main.c
index 282f543d0..14a014a26 100644
--- a/src/search-provider/ephy-search-provider-main.c
+++ b/src/search-provider/ephy-search-provider-main.c
@@ -27,7 +27,8 @@
 #include <glib/gi18n.h>
 #include <locale.h>
 
-gint main (gint argc, gchar **argv)
+gint main (gint    argc,
+           gchar **argv)
 {
   EphySearchProvider *search_provider;
   int status;
diff --git a/src/search-provider/ephy-search-provider.c b/src/search-provider/ephy-search-provider.c
index 9834f8671..9993667a2 100644
--- a/src/search-provider/ephy-search-provider.c
+++ b/src/search-provider/ephy-search-provider.c
@@ -40,11 +40,11 @@ struct _EphySearchProvider {
   GApplication parent_instance;
 
   EphyShellSearchProvider2 *skeleton;
-  GCancellable             *cancellable;
+  GCancellable *cancellable;
 
-  GSettings                *settings;
-  EphyBookmarksManager     *bookmarks_manager;
-  EphySuggestionModel      *model;
+  GSettings *settings;
+  EphyBookmarksManager *bookmarks_manager;
+  EphySuggestionModel *model;
 };
 
 struct _EphySearchProviderClass {
@@ -91,19 +91,19 @@ on_model_updated (GObject      *source_object,
 }
 
 static char **
-gather_results_finish (EphySearchProvider *self,
-                       GAsyncResult       *result,
-                       GError            **error)
+gather_results_finish (EphySearchProvider  *self,
+                       GAsyncResult        *result,
+                       GError             **error)
 {
   return g_task_propagate_pointer (G_TASK (result), error);
 }
 
 static void
-gather_results_async (EphySearchProvider *self,
-                      char              **terms,
-                      GCancellable       *cancellable,
-                      GAsyncReadyCallback callback,
-                      gpointer            user_data)
+gather_results_async (EphySearchProvider   *self,
+                      char                **terms,
+                      GCancellable         *cancellable,
+                      GAsyncReadyCallback   callback,
+                      gpointer              user_data)
 {
   GTask *task;
   char *search_string;
@@ -143,10 +143,10 @@ complete_request (GObject      *object,
 }
 
 static gboolean
-handle_get_initial_result_set (EphyShellSearchProvider2 *skeleton,
-                               GDBusMethodInvocation    *invocation,
-                               char                    **terms,
-                               EphySearchProvider       *self)
+handle_get_initial_result_set (EphyShellSearchProvider2  *skeleton,
+                               GDBusMethodInvocation     *invocation,
+                               char                     **terms,
+                               EphySearchProvider        *self)
 {
   g_application_hold (G_APPLICATION (self));
   g_cancellable_reset (self->cancellable);
@@ -158,11 +158,11 @@ handle_get_initial_result_set (EphyShellSearchProvider2 *skeleton,
 }
 
 static gboolean
-handle_get_subsearch_result_set (EphyShellSearchProvider2 *skeleton,
-                                 GDBusMethodInvocation    *invocation,
-                                 char                    **previous_results,
-                                 char                    **terms,
-                                 EphySearchProvider       *self)
+handle_get_subsearch_result_set (EphyShellSearchProvider2  *skeleton,
+                                 GDBusMethodInvocation     *invocation,
+                                 char                     **previous_results,
+                                 char                     **terms,
+                                 EphySearchProvider        *self)
 {
   g_application_hold (G_APPLICATION (self));
   g_cancellable_reset (self->cancellable);
@@ -174,10 +174,10 @@ handle_get_subsearch_result_set (EphyShellSearchProvider2 *skeleton,
 }
 
 static gboolean
-handle_get_result_metas (EphyShellSearchProvider2 *skeleton,
-                         GDBusMethodInvocation    *invocation,
-                         char                    **results,
-                         EphySearchProvider       *self)
+handle_get_result_metas (EphyShellSearchProvider2  *skeleton,
+                         GDBusMethodInvocation     *invocation,
+                         char                     **results,
+                         EphySearchProvider        *self)
 {
   int i;
   GVariantBuilder builder;
@@ -244,9 +244,9 @@ launch_uri (const char *uri,
 }
 
 static void
-launch_search (EphySearchProvider *self,
-               char              **terms,
-               guint               timestamp)
+launch_search (EphySearchProvider  *self,
+               char               **terms,
+               guint                timestamp)
 {
   g_autofree char *search_string = NULL;
   g_autofree char *query_param = NULL;
@@ -273,12 +273,12 @@ launch_search (EphySearchProvider *self,
 }
 
 static gboolean
-handle_activate_result (EphyShellSearchProvider2 *skeleton,
-                        GDBusMethodInvocation    *invocation,
-                        char                     *identifier,
-                        char                    **terms,
-                        guint                     timestamp,
-                        EphySearchProvider       *self)
+handle_activate_result (EphyShellSearchProvider2  *skeleton,
+                        GDBusMethodInvocation     *invocation,
+                        char                      *identifier,
+                        char                     **terms,
+                        guint                      timestamp,
+                        EphySearchProvider        *self)
 {
   g_application_hold (G_APPLICATION (self));
   g_cancellable_cancel (self->cancellable);
@@ -295,11 +295,11 @@ handle_activate_result (EphyShellSearchProvider2 *skeleton,
 }
 
 static gboolean
-handle_launch_search (EphyShellSearchProvider2 *skeleton,
-                      GDBusMethodInvocation    *invocation,
-                      char                    **terms,
-                      guint                     timestamp,
-                      EphySearchProvider       *self)
+handle_launch_search (EphyShellSearchProvider2  *skeleton,
+                      GDBusMethodInvocation     *invocation,
+                      char                     **terms,
+                      guint                      timestamp,
+                      EphySearchProvider        *self)
 {
   g_application_hold (G_APPLICATION (self));
   g_cancellable_cancel (self->cancellable);
@@ -333,10 +333,10 @@ ephy_search_provider_init (EphySearchProvider *self)
 }
 
 static gboolean
-ephy_search_provider_dbus_register (GApplication    *application,
-                                    GDBusConnection *connection,
-                                    const gchar     *object_path,
-                                    GError         **error)
+ephy_search_provider_dbus_register (GApplication     *application,
+                                    GDBusConnection  *connection,
+                                    const gchar      *object_path,
+                                    GError          **error)
 {
   EphySearchProvider *self;
 
diff --git a/src/synced-tabs-dialog.c b/src/synced-tabs-dialog.c
index 70034b2a7..bab10fa3d 100644
--- a/src/synced-tabs-dialog.c
+++ b/src/synced-tabs-dialog.c
@@ -61,9 +61,9 @@ static GParamSpec *obj_properties[LAST_PROP];
 
 typedef struct {
   SyncedTabsDialog *dialog;
-  char             *title;
-  char             *url;
-  guint             parent_index;
+  char *title;
+  char *url;
+  guint parent_index;
 } PopulateRowAsyncData;
 
 static PopulateRowAsyncData *
diff --git a/src/webapp-additional-urls-dialog.c b/src/webapp-additional-urls-dialog.c
index b57db25f2..8cae4d005 100644
--- a/src/webapp-additional-urls-dialog.c
+++ b/src/webapp-additional-urls-dialog.c
@@ -97,7 +97,7 @@ update_selection_actions (GActionMap *action_map,
 }
 
 static void
-on_treeview_selection_changed (GtkTreeSelection    *selection,
+on_treeview_selection_changed (GtkTreeSelection               *selection,
                                EphyWebappAdditionalURLsDialog *dialog)
 {
   update_selection_actions (G_ACTION_MAP (dialog->action_group),
diff --git a/src/window-commands.c b/src/window-commands.c
index 081f7f9d4..1575484d5 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -217,7 +217,8 @@ create_tree_model (void)
 }
 
 static gchar *
-show_profile_selector (GtkWidget *parent, GSList *profiles)
+show_profile_selector (GtkWidget *parent,
+                       GSList    *profiles)
 {
   GtkWidget *selector;
   GtkWidget *list_box;
@@ -443,7 +444,7 @@ bookmarks_export_cb (GObject      *source_object,
   EphyBookmarksManager *manager = EPHY_BOOKMARKS_MANAGER (source_object);
   GtkWidget *export_info_dialog;
   gboolean exported;
-  g_autoptr(GError) error = NULL;
+  g_autoptr (GError) error = NULL;
 
   exported = ephy_bookmarks_export_finish (manager, result, &error);
 
@@ -453,7 +454,7 @@ bookmarks_export_cb (GObject      *source_object,
                                                GTK_BUTTONS_OK,
                                                "%s",
                                                exported ? _("Bookmarks successfully exported!") :
-                                                          error->message);
+                                               error->message);
   gtk_dialog_run (GTK_DIALOG (export_info_dialog));
   gtk_widget_destroy (export_info_dialog);
 }
@@ -708,41 +709,41 @@ window_cmd_navigation_new_tab (GSimpleAction *action,
   web_view = EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed);
 
   if (strstr (g_action_get_name (G_ACTION (action)), "back")) {
-      const char *back_uri;
-      WebKitBackForwardList *history;
-      WebKitBackForwardListItem *back_item;
-
-      history = webkit_web_view_get_back_forward_list (web_view);
-      back_item = webkit_back_forward_list_get_back_item (history);
-      back_uri = webkit_back_forward_list_item_get_original_uri (back_item);
-
-      embed = ephy_shell_new_tab (ephy_shell_get_default (),
-                                  EPHY_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (embed))),
-                                  NULL,
-                                  0);
-
-      web_view = EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed);
-      webkit_web_view_load_uri (web_view, back_uri);
-      gtk_widget_grab_focus (GTK_WIDGET (embed));
-  } else {
-      const char *forward_uri;
-      WebKitBackForwardList *history;
-      WebKitBackForwardListItem *forward_item;
-
-      /* Forward history is not copied when opening
-         a new tab, so get the forward URI manually
-         and load it */
-      history = webkit_web_view_get_back_forward_list (EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed));
-      forward_item = webkit_back_forward_list_get_forward_item (history);
-      forward_uri = webkit_back_forward_list_item_get_original_uri (forward_item);
-
-      embed = ephy_shell_new_tab (ephy_shell_get_default (),
-                                  EPHY_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (embed))),
-                                  embed,
-                                  0);
+    const char *back_uri;
+    WebKitBackForwardList *history;
+    WebKitBackForwardListItem *back_item;
 
-      web_view = EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed);
-      webkit_web_view_load_uri (web_view, forward_uri);
+    history = webkit_web_view_get_back_forward_list (web_view);
+    back_item = webkit_back_forward_list_get_back_item (history);
+    back_uri = webkit_back_forward_list_item_get_original_uri (back_item);
+
+    embed = ephy_shell_new_tab (ephy_shell_get_default (),
+                                EPHY_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (embed))),
+                                NULL,
+                                0);
+
+    web_view = EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed);
+    webkit_web_view_load_uri (web_view, back_uri);
+    gtk_widget_grab_focus (GTK_WIDGET (embed));
+  } else {
+    const char *forward_uri;
+    WebKitBackForwardList *history;
+    WebKitBackForwardListItem *forward_item;
+
+    /* Forward history is not copied when opening
+     *  a new tab, so get the forward URI manually
+     *  and load it */
+    history = webkit_web_view_get_back_forward_list (EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed));
+    forward_item = webkit_back_forward_list_get_forward_item (history);
+    forward_uri = webkit_back_forward_list_item_get_original_uri (forward_item);
+
+    embed = ephy_shell_new_tab (ephy_shell_get_default (),
+                                EPHY_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (embed))),
+                                embed,
+                                0);
+
+    web_view = EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed);
+    webkit_web_view_load_uri (web_view, forward_uri);
   }
 }
 
@@ -855,7 +856,9 @@ window_cmd_new_tab (GSimpleAction *action,
 }
 
 static void
-open_response_cb (GtkNativeDialog *dialog, int response, EphyWindow *window)
+open_response_cb (GtkNativeDialog *dialog,
+                  int              response,
+                  EphyWindow      *window)
 {
   if (response == GTK_RESPONSE_ACCEPT) {
     char *uri, *converted;
@@ -1243,7 +1246,8 @@ notify_launch_cb (NotifyNotification *notification,
 }
 
 static gboolean
-confirm_web_application_overwrite (GtkWindow *parent, const char *title)
+confirm_web_application_overwrite (GtkWindow  *parent,
+                                   const char *title)
 {
   GtkResponseType response;
   GtkWidget *dialog;
@@ -1276,7 +1280,7 @@ session_bus_ready_cb (GObject      *source,
                       GAsyncResult *res,
                       gpointer      user_data)
 {
-  g_autoptr(GDBusConnection) connection = g_bus_get_finish (res, NULL);
+  g_autoptr (GDBusConnection) connection = g_bus_get_finish (res, NULL);
   g_autofree gchar *desktop_file = user_data;
   g_autofree gchar *app_id = NULL;
   GVariant *app;
@@ -1502,9 +1506,9 @@ static void
 save_snapshot (cairo_surface_t *surface,
                const char      *file)
 {
-  g_autoptr(GdkPixbuf) pixbuf = NULL;
+  g_autoptr (GdkPixbuf) pixbuf = NULL;
   g_autofree char *snapshot_path = NULL;
-  g_autoptr(GError) error = NULL;
+  g_autoptr (GError) error = NULL;
   int width;
   int height;
   gboolean ret;
@@ -1568,7 +1572,9 @@ take_snapshot (EphyEmbed *embed,
 
 
 static void
-save_response_cb (GtkNativeDialog *dialog, int response, EphyEmbed *embed)
+save_response_cb (GtkNativeDialog *dialog,
+                  int              response,
+                  EphyEmbed       *embed)
 {
   if (response == GTK_RESPONSE_ACCEPT) {
     char *uri, *converted;
@@ -1901,7 +1907,8 @@ window_cmd_encoding (GSimpleAction *action,
 }
 
 static void
-view_source_embedded (const char *uri, EphyEmbed *embed)
+view_source_embedded (const char *uri,
+                      EphyEmbed  *embed)
 {
   EphyEmbed *new_embed;
   SoupURI *soup_uri;
@@ -1936,7 +1943,9 @@ view_source_embedded (const char *uri, EphyEmbed *embed)
 }
 
 static void
-tmp_source_delete_cb (GObject *source, GAsyncResult *result, gpointer data)
+tmp_source_delete_cb (GObject      *source,
+                      GAsyncResult *result,
+                      gpointer      data)
 {
   GFile *file = G_FILE (source);
   GError *error = NULL;
@@ -1963,7 +1972,9 @@ delete_tmp_source_file (GOutputStream *ostream)
 }
 
 static void
-portal_opened_cb (GObject *source, GAsyncResult *result, gpointer data)
+portal_opened_cb (GObject      *source,
+                  GAsyncResult *result,
+                  gpointer      data)
 {
   char *path = data;
   GFile *file;
@@ -1985,7 +1996,9 @@ portal_opened_cb (GObject *source, GAsyncResult *result, gpointer data)
 }
 
 static void
-save_temp_source_close_cb (GOutputStream *ostream, GAsyncResult *result, gpointer data)
+save_temp_source_close_cb (GOutputStream *ostream,
+                           GAsyncResult  *result,
+                           gpointer       data)
 {
   const char *uri;
   GFile *file;
@@ -2028,7 +2041,9 @@ out:
 }
 
 static void
-save_temp_source_write_cb (GOutputStream *ostream, GAsyncResult *result, GString *data)
+save_temp_source_write_cb (GOutputStream *ostream,
+                           GAsyncResult  *result,
+                           GString       *data)
 {
   GError *error = NULL;
   gssize written;
@@ -2067,7 +2082,9 @@ save_temp_source_write_cb (GOutputStream *ostream, GAsyncResult *result, GString
 }
 
 static void
-get_main_resource_data_cb (WebKitWebResource *resource, GAsyncResult *result, GOutputStream *ostream)
+get_main_resource_data_cb (WebKitWebResource *resource,
+                           GAsyncResult      *result,
+                           GOutputStream     *ostream)
 {
   guchar *data;
   gsize data_length;
@@ -2095,7 +2112,9 @@ get_main_resource_data_cb (WebKitWebResource *resource, GAsyncResult *result, GO
 }
 
 static void
-save_temp_source_replace_cb (GFile *file, GAsyncResult *result, EphyEmbed *embed)
+save_temp_source_replace_cb (GFile        *file,
+                             GAsyncResult *result,
+                             EphyEmbed    *embed)
 {
   EphyWebView *view;
   WebKitWebResource *resource;
@@ -2849,11 +2868,11 @@ window_cmd_set_spell_checker (GSimpleAction *action,
                               gpointer       user_data)
 {
   WebKitWebContext *context = webkit_web_context_get_default ();
-  g_autoptr(GPtrArray) languages = g_ptr_array_new ();
+  g_autoptr (GPtrArray) languages = g_ptr_array_new ();
   const gchar *lang = g_variant_get_string (parameter, NULL);
 
   g_ptr_array_add (languages, (gchar *)lang);
 
-  webkit_web_context_set_spell_checking_languages (context, (const char * const *) languages->pdata);
+  webkit_web_context_set_spell_checking_languages (context, (const char * const *)languages->pdata);
   g_settings_set_string (EPHY_SETTINGS_WEB, EPHY_PREFS_WEB_SPELL_CHECKER_LANGUAGE, lang);
 }
diff --git a/tests/ephy-download-test.c b/tests/ephy-download-test.c
index ea5643ae4..f7f20bb72 100644
--- a/tests/ephy-download-test.c
+++ b/tests/ephy-download-test.c
@@ -74,7 +74,8 @@ typedef struct {
 } Fixture;
 
 static void
-fixture_setup (Fixture *fixture, gconstpointer data)
+fixture_setup (Fixture       *fixture,
+               gconstpointer  data)
 {
   char *tmp_filename;
   char *dest_file;
@@ -94,7 +95,8 @@ fixture_setup (Fixture *fixture, gconstpointer data)
 }
 
 static void
-fixture_teardown (Fixture *fixture, gconstpointer data)
+fixture_teardown (Fixture       *fixture,
+                  gconstpointer  data)
 {
   g_free (fixture->destination);
   g_free (fixture->source);
@@ -128,13 +130,15 @@ completed_cb (EphyDownload *download,
 }
 
 static void
-test_ephy_download_new (Fixture *fixture, gconstpointer data)
+test_ephy_download_new (Fixture       *fixture,
+                        gconstpointer  data)
 {
   g_assert_true (EPHY_IS_DOWNLOAD (fixture->download));
 }
 
 static void
-test_ephy_download_new_for_uri (Fixture *fixture, gconstpointer data)
+test_ephy_download_new_for_uri (Fixture       *fixture,
+                                gconstpointer  data)
 {
   WebKitDownload *download = ephy_download_get_webkit_download (fixture->download);
   WebKitURIRequest *request = webkit_download_get_request (download);
@@ -144,7 +148,8 @@ test_ephy_download_new_for_uri (Fixture *fixture, gconstpointer data)
 }
 
 static void
-test_ephy_download_start (Fixture *fixture, gconstpointer data)
+test_ephy_download_start (Fixture       *fixture,
+                          gconstpointer  data)
 {
   g_signal_connect (G_OBJECT (fixture->download), "completed",
                     G_CALLBACK (completed_cb), fixture);
@@ -153,7 +158,8 @@ test_ephy_download_start (Fixture *fixture, gconstpointer data)
 }
 
 int
-main (int argc, char *argv[])
+main (int   argc,
+      char *argv[])
 {
   int ret;
   GSList *uris;
diff --git a/tests/ephy-embed-shell-test.c b/tests/ephy-embed-shell-test.c
index 1f233dd94..a3107dac9 100644
--- a/tests/ephy-embed-shell-test.c
+++ b/tests/ephy-embed-shell-test.c
@@ -31,7 +31,9 @@
 #include <gtk/gtk.h>
 
 static void
-web_view_created_cb (EphyEmbedShell *shell, EphyWebView *view, gpointer user_data)
+web_view_created_cb (EphyEmbedShell *shell,
+                     EphyWebView    *view,
+                     gpointer        user_data)
 {
   gboolean *web_view_created = (gboolean *)user_data;
   *web_view_created = TRUE;
@@ -54,7 +56,8 @@ test_ephy_embed_shell_web_view_created (void)
 }
 
 int
-main (int argc, char *argv[])
+main (int   argc,
+      char *argv[])
 {
   int ret;
 
diff --git a/tests/ephy-embed-utils-test.c b/tests/ephy-embed-utils-test.c
index c6435a7bd..b9c4c405f 100644
--- a/tests/ephy-embed-utils-test.c
+++ b/tests/ephy-embed-utils-test.c
@@ -128,7 +128,8 @@ test_is_empty (const IsEmptyTest *test)
 }
 
 int
-main (int argc, char *argv[])
+main (int   argc,
+      char *argv[])
 {
   int ret;
   guint i;
diff --git a/tests/ephy-encodings-test.c b/tests/ephy-encodings-test.c
index e143b596e..a6bf38ab9 100644
--- a/tests/ephy-encodings-test.c
+++ b/tests/ephy-encodings-test.c
@@ -73,7 +73,8 @@ test_ephy_encodings_get (void)
 }
 
 int
-main (int argc, char *argv[])
+main (int   argc,
+      char *argv[])
 {
   int ret;
 
diff --git a/tests/ephy-file-helpers-test.c b/tests/ephy-file-helpers-test.c
index 50d011e9c..b3139b67e 100644
--- a/tests/ephy-file-helpers-test.c
+++ b/tests/ephy-file-helpers-test.c
@@ -32,8 +32,7 @@ typedef struct {
   EphyFileHelpersFlags flags;
 } FileInitTest;
 
-static const FileInitTest private_tests[] =
-{
+static const FileInitTest private_tests[] = {
   { "private", EPHY_FILE_HELPERS_PRIVATE_PROFILE },
   { "private, keep-dir", EPHY_FILE_HELPERS_PRIVATE_PROFILE | EPHY_FILE_HELPERS_KEEP_DIR }
 };
@@ -106,8 +105,7 @@ typedef struct {
   gboolean in_flatpak;
 } DownloadsDirTest;
 
-static const DownloadsDirTest downloads_tests[] =
-{
+static const DownloadsDirTest downloads_tests[] = {
   { "Desktop", NULL, G_USER_DIRECTORY_DESKTOP, FALSE },
 
   { "Downloads", NULL, G_USER_DIRECTORY_DOWNLOAD, TRUE },
@@ -163,8 +161,7 @@ typedef struct {
   gboolean can_delete;
 } DirTest;
 
-static const DirTest dir_tests[] =
-{
+static const DirTest dir_tests[] = {
   { "/tmp/ephy-test-dir", FALSE, TRUE, TRUE },
   /* Unreadable */
   { "/root/ephy-test-dir", FALSE, FALSE, FALSE },
@@ -222,7 +219,7 @@ test_ephy_file_desktop_dir (void)
 static void
 delete_uri (const char *uri)
 {
-  g_autoptr(GFile) file = NULL;
+  g_autoptr (GFile) file = NULL;
 
   g_assert_nonnull (uri);
 
@@ -300,8 +297,7 @@ typedef struct {
   const char *expected;
 } SanitizeFilenameTest;
 
-static const SanitizeFilenameTest sanitize_filename_tests[] =
-{
+static const SanitizeFilenameTest sanitize_filename_tests[] = {
   { "Normal Filename", "Normal Filename" },
   { "filename/with/slashes", "filename_with_slashes" }
 };
@@ -329,7 +325,8 @@ test_ephy_sanitize_filename (void)
 }
 
 int
-main (int argc, char *argv[])
+main (int   argc,
+      char *argv[])
 {
   int ret;
 
diff --git a/tests/ephy-gsb-service-test.c b/tests/ephy-gsb-service-test.c
index b86236635..86ae23e7d 100644
--- a/tests/ephy-gsb-service-test.c
+++ b/tests/ephy-gsb-service-test.c
@@ -89,7 +89,7 @@ test_ephy_gsb_utils_canonicalize (void)
 
 typedef struct {
   const char *url;
-  guint       num_hashes;
+  guint num_hashes;
   const char *hashes_hex[64];
 } ComputeHashesTest;
 
@@ -177,23 +177,23 @@ test_ephy_gsb_utils_compute_hashes (void)
 
 typedef struct {
   const char *url;
-  gboolean    is_threat;
+  gboolean is_threat;
 } VerifyURLTest;
 
 static const VerifyURLTest verify_url_tests[] = {
-  {"https://testsafebrowsing.appspot.com/apiv4/LINUX/MALWARE/URL/";,                    TRUE},
-  {"https://testsafebrowsing.appspot.com/apiv4/LINUX/SOCIAL_ENGINEERING/URL/";,         TRUE},
-  {"https://testsafebrowsing.appspot.com/apiv4/LINUX/UNWANTED_SOFTWARE/URL/";,          TRUE},
-  {"https://testsafebrowsing.appspot.com/apiv4/ANY_PLATFORM/MALWARE/URL/";,             TRUE},
-  {"https://testsafebrowsing.appspot.com/apiv4/ANY_PLATFORM/SOCIAL_ENGINEERING/URL/";,  TRUE},
-  {"https://testsafebrowsing.appspot.com/apiv4/ANY_PLATFORM/UNWANTED_SOFTWARE/URL/";,   TRUE},
-  {"https://testsafebrowsing.appspot.com/apiv4/WINDOWS/MALWARE/URL/";,                  TRUE},
-  {"https://testsafebrowsing.appspot.com/apiv4/WINDOWS/SOCIAL_ENGINEERING/URL/";,       TRUE},
-  {"https://testsafebrowsing.appspot.com/apiv4/WINDOWS/UNWANTED_SOFTWARE/URL/";,        TRUE},
+  {"https://testsafebrowsing.appspot.com/apiv4/LINUX/MALWARE/URL/";, TRUE},
+  {"https://testsafebrowsing.appspot.com/apiv4/LINUX/SOCIAL_ENGINEERING/URL/";, TRUE},
+  {"https://testsafebrowsing.appspot.com/apiv4/LINUX/UNWANTED_SOFTWARE/URL/";, TRUE},
+  {"https://testsafebrowsing.appspot.com/apiv4/ANY_PLATFORM/MALWARE/URL/";, TRUE},
+  {"https://testsafebrowsing.appspot.com/apiv4/ANY_PLATFORM/SOCIAL_ENGINEERING/URL/";, TRUE},
+  {"https://testsafebrowsing.appspot.com/apiv4/ANY_PLATFORM/UNWANTED_SOFTWARE/URL/";, TRUE},
+  {"https://testsafebrowsing.appspot.com/apiv4/WINDOWS/MALWARE/URL/";, TRUE},
+  {"https://testsafebrowsing.appspot.com/apiv4/WINDOWS/SOCIAL_ENGINEERING/URL/";, TRUE},
+  {"https://testsafebrowsing.appspot.com/apiv4/WINDOWS/UNWANTED_SOFTWARE/URL/";, TRUE},
 };
 
 static GMainLoop *test_verify_url_loop;
-static int        test_verify_url_counter;
+static int test_verify_url_counter;
 
 static void
 test_verify_url_cb (EphyGSBService *service,
@@ -254,7 +254,8 @@ test_ephy_gsb_service_verify_url (void)
 }
 
 int
-main (int argc, char *argv[])
+main (int   argc,
+      char *argv[])
 {
   int ret;
   GError *error = NULL;
diff --git a/tests/ephy-history-test.c b/tests/ephy-history-test.c
index b42ebd023..e0fd21a08 100644
--- a/tests/ephy-history-test.c
+++ b/tests/ephy-history-test.c
@@ -71,7 +71,10 @@ test_create_history_service_and_destroy_later (void)
 }
 
 static void
-page_vist_created (EphyHistoryService *service, gboolean success, gpointer result_data, gpointer user_data)
+page_vist_created (EphyHistoryService *service,
+                   gboolean            success,
+                   gpointer            result_data,
+                   gpointer            user_data)
 {
   if (user_data != NULL) {
     g_assert_true (EPHY_IS_HISTORY_SERVICE (user_data));
@@ -125,7 +128,10 @@ create_test_page_visit_list (void)
 }
 
 static void
-verify_create_history_entry_cb (EphyHistoryService *service, gboolean success, gpointer result_data, 
gpointer user_data)
+verify_create_history_entry_cb (EphyHistoryService *service,
+                                gboolean            success,
+                                gpointer            result_data,
+                                gpointer            user_data)
 {
   GList *visits = (GList *)result_data;
   GList *baseline_visits = create_test_page_visit_list ();
@@ -161,7 +167,10 @@ verify_create_history_entry_cb (EphyHistoryService *service, gboolean success, g
 }
 
 static void
-verify_create_history_entry (EphyHistoryService *service, gboolean success, gpointer result_data, gpointer 
user_data)
+verify_create_history_entry (EphyHistoryService *service,
+                             gboolean            success,
+                             gpointer            result_data,
+                             gpointer            user_data)
 {
   g_assert_null (result_data);
   g_assert_cmpint (42, ==, GPOINTER_TO_INT (user_data));
@@ -184,7 +193,10 @@ test_create_history_entries (void)
 }
 
 static void
-get_url (EphyHistoryService *service, gboolean success, gpointer result_data, gpointer user_data)
+get_url (EphyHistoryService *service,
+         gboolean            success,
+         gpointer            result_data,
+         gpointer            user_data)
 {
   EphyHistoryURL *url = (EphyHistoryURL *)result_data;
 
@@ -198,7 +210,10 @@ get_url (EphyHistoryService *service, gboolean success, gpointer result_data, gp
 }
 
 static void
-set_url_title (EphyHistoryService *service, gboolean success, gpointer result_data, gpointer user_data)
+set_url_title (EphyHistoryService *service,
+               gboolean            success,
+               gpointer            result_data,
+               gpointer            user_data)
 {
   gboolean test_result = GPOINTER_TO_INT (user_data);
   g_assert_true (success);
@@ -211,7 +226,10 @@ set_url_title (EphyHistoryService *service, gboolean success, gpointer result_da
 }
 
 static void
-set_url_title_visit_created (EphyHistoryService *service, gboolean success, gpointer result_data, gpointer 
user_data)
+set_url_title_visit_created (EphyHistoryService *service,
+                             gboolean            success,
+                             gpointer            result_data,
+                             gpointer            user_data)
 {
   ephy_history_service_set_url_title (service, "http://www.gnome.org";, "GNOME", NULL, set_url_title, 
user_data);
 }
@@ -241,7 +259,10 @@ test_set_url_title_is_correct (void)
 }
 
 static void
-set_url_title_url_not_existent (EphyHistoryService *service, gboolean success, gpointer result_data, 
gpointer user_data)
+set_url_title_url_not_existent (EphyHistoryService *service,
+                                gboolean            success,
+                                gpointer            result_data,
+                                gpointer            user_data)
 {
   g_assert_false (success);
   g_object_unref (service);
@@ -259,7 +280,10 @@ test_set_url_title_url_not_existent (void)
 }
 
 static void
-test_get_url_done (EphyHistoryService *service, gboolean success, gpointer result_data, gpointer user_data)
+test_get_url_done (EphyHistoryService *service,
+                   gboolean            success,
+                   gpointer            result_data,
+                   gpointer            user_data)
 {
   EphyHistoryURL *url;
   gboolean expected_success = GPOINTER_TO_INT (user_data);
@@ -281,7 +305,10 @@ test_get_url_done (EphyHistoryService *service, gboolean success, gpointer resul
 }
 
 static void
-test_get_url_visit_added (EphyHistoryService *service, gboolean success, gpointer result_data, gpointer 
user_data)
+test_get_url_visit_added (EphyHistoryService *service,
+                          gboolean            success,
+                          gpointer            result_data,
+                          gpointer            user_data)
 {
   g_assert_true (success);
 
@@ -483,7 +510,8 @@ test_clear (void)
 }
 
 int
-main (int argc, char *argv[])
+main (int   argc,
+      char *argv[])
 {
   int ret;
 
diff --git a/tests/ephy-location-entry-test.c b/tests/ephy-location-entry-test.c
index df0771cdd..edd8d7062 100644
--- a/tests/ephy-location-entry-test.c
+++ b/tests/ephy-location-entry-test.c
@@ -140,7 +140,8 @@ test_entry_can_redo (void)
 }
 
 int
-main (int argc, char *argv[])
+main (int   argc,
+      char *argv[])
 {
   gtk_test_init (&argc, &argv);
   ephy_debug_init ();
diff --git a/tests/ephy-migration-test.c b/tests/ephy-migration-test.c
index a09d80361..68f0a7d20 100644
--- a/tests/ephy-migration-test.c
+++ b/tests/ephy-migration-test.c
@@ -80,7 +80,8 @@ test_do_migration_invalid (void)
 }
 
 int
-main (int argc, char *argv[])
+main (int   argc,
+      char *argv[])
 {
   int ret;
   gtk_test_init (&argc, &argv);
diff --git a/tests/ephy-session-test.c b/tests/ephy-session-test.c
index a71037777..0a21f5f54 100644
--- a/tests/ephy-session-test.c
+++ b/tests/ephy-session-test.c
@@ -246,7 +246,8 @@ test_ephy_session_load_many_windows (void)
 }
 
 static void
-open_uris_after_loading_session (const char **uris, int final_num_windows)
+open_uris_after_loading_session (const char **uris,
+                                 int          final_num_windows)
 {
   EphySession *session;
   gboolean ret;
@@ -336,7 +337,8 @@ test_ephy_session_open_empty_uri_forces_new_window (void)
 }
 
 int
-main (int argc, char *argv[])
+main (int   argc,
+      char *argv[])
 {
   int ret;
 
diff --git a/tests/ephy-shell-test.c b/tests/ephy-shell-test.c
index fdd18fc0a..c47035da9 100644
--- a/tests/ephy-shell-test.c
+++ b/tests/ephy-shell-test.c
@@ -169,7 +169,8 @@ test_ephy_shell_tab_load (void)
 }
 
 static int
-get_notebook_page_num (GtkWidget *notebook, EphyEmbed *embed)
+get_notebook_page_num (GtkWidget *notebook,
+                       EphyEmbed *embed)
 {
   return gtk_notebook_page_num (GTK_NOTEBOOK (notebook), GTK_WIDGET (embed));
 }
@@ -308,7 +309,8 @@ test_ephy_shell_tab_no_history (void)
 }
 
 int
-main (int argc, char *argv[])
+main (int   argc,
+      char *argv[])
 {
   int ret;
 
diff --git a/tests/ephy-snapshot-service-test.c b/tests/ephy-snapshot-service-test.c
index e550a3e8c..3bffec707 100644
--- a/tests/ephy-snapshot-service-test.c
+++ b/tests/ephy-snapshot-service-test.c
@@ -208,9 +208,12 @@ test_snapshot_and_timed_cancellation (void)
 }
 
 static void
-server_callback (SoupServer *s, SoupMessage *msg,
-                 const char *path, GHashTable *query,
-                 SoupClientContext *context, gpointer data)
+server_callback (SoupServer        *s,
+                 SoupMessage       *msg,
+                 const char        *path,
+                 GHashTable        *query,
+                 SoupClientContext *context,
+                 gpointer           data)
 {
   const char *response = "<html><h1>This is a header</h1></html>";
 
@@ -224,7 +227,8 @@ server_callback (SoupServer *s, SoupMessage *msg,
 }
 
 int
-main (int argc, char *argv[])
+main (int   argc,
+      char *argv[])
 {
   gtk_test_init (&argc, &argv);
   ephy_debug_init ();
diff --git a/tests/ephy-sqlite-test.c b/tests/ephy-sqlite-test.c
index c80849cb1..c75fdef15 100644
--- a/tests/ephy-sqlite-test.c
+++ b/tests/ephy-sqlite-test.c
@@ -218,7 +218,8 @@ test_table_exists (void)
 }
 
 int
-main (int argc, char *argv[])
+main (int   argc,
+      char *argv[])
 {
   gtk_test_init (&argc, &argv);
 
diff --git a/tests/ephy-string-test.c b/tests/ephy-string-test.c
index 4ac879e92..5482dd9b2 100644
--- a/tests/ephy-string-test.c
+++ b/tests/ephy-string-test.c
@@ -57,7 +57,8 @@ test_ephy_string_get_hostname (void)
 }
 
 int
-main (int argc, char *argv[])
+main (int   argc,
+      char *argv[])
 {
   gboolean ret;
 
diff --git a/tests/ephy-test-utils.c b/tests/ephy-test-utils.c
index 8cd77f4fa..0fea05f9f 100644
--- a/tests/ephy-test-utils.c
+++ b/tests/ephy-test-utils.c
@@ -48,9 +48,9 @@ ephy_test_utils_check_ephy_embed_address (EphyEmbed   *embed,
 }
 
 static void
-load_changed_cb (WebKitWebView  *web_view,
-                 WebKitLoadEvent status,
-                 GMainLoop      *loop)
+load_changed_cb (WebKitWebView   *web_view,
+                 WebKitLoadEvent  status,
+                 GMainLoop       *loop)
 {
   if (status == WEBKIT_LOAD_COMMITTED) {
     web_view_ready_counter--;
@@ -62,13 +62,16 @@ load_changed_cb (WebKitWebView  *web_view,
 }
 
 static void
-wait_until_load_is_committed (WebKitWebView *web_view, GMainLoop *loop)
+wait_until_load_is_committed (WebKitWebView *web_view,
+                              GMainLoop     *loop)
 {
   g_signal_connect (web_view, "load-changed", G_CALLBACK (load_changed_cb), loop);
 }
 
 static void
-web_view_created_cb (EphyEmbedShell *shell, EphyWebView *view, GMainLoop *loop)
+web_view_created_cb (EphyEmbedShell *shell,
+                     EphyWebView    *view,
+                     GMainLoop      *loop)
 {
   web_view_ready_counter++;
   wait_until_load_is_committed (WEBKIT_WEB_VIEW (view), loop);
diff --git a/tests/ephy-uri-helpers-test.c b/tests/ephy-uri-helpers-test.c
index f536ab9eb..8cdd23913 100644
--- a/tests/ephy-uri-helpers-test.c
+++ b/tests/ephy-uri-helpers-test.c
@@ -66,7 +66,8 @@ test_ephy_uri_helpers_remove_tracking (void)
 }
 
 int
-main (int argc, char *argv[])
+main (int   argc,
+      char *argv[])
 {
   int ret;
 
diff --git a/tests/ephy-web-app-utils-test.c b/tests/ephy-web-app-utils-test.c
index 8b1a918d8..b0389303a 100644
--- a/tests/ephy-web-app-utils-test.c
+++ b/tests/ephy-web-app-utils-test.c
@@ -139,7 +139,8 @@ test_web_app_lifetime (void)
 }
 
 int
-main (int argc, char *argv[])
+main (int   argc,
+      char *argv[])
 {
   int ret;
 
diff --git a/tests/ephy-web-view-test.c b/tests/ephy-web-view-test.c
index d2cc89861..d6712c7c2 100644
--- a/tests/ephy-web-view-test.c
+++ b/tests/ephy-web-view-test.c
@@ -62,7 +62,9 @@ server_callback (SoupServer        *server,
 }
 
 static void
-load_changed_cb (WebKitWebView *view, WebKitLoadEvent load_event, GMainLoop *loop)
+load_changed_cb (WebKitWebView   *view,
+                 WebKitLoadEvent  load_event,
+                 GMainLoop       *loop)
 {
   char *expected_url;
   const char *loaded_url;
@@ -325,7 +327,9 @@ test_ephy_web_view_normalize_or_autosearch (void)
 }
 
 static void
-quit_main_loop_when_load_finished (WebKitWebView *view, WebKitLoadEvent load_event, GMainLoop *loop)
+quit_main_loop_when_load_finished (WebKitWebView   *view,
+                                   WebKitLoadEvent  load_event,
+                                   GMainLoop       *loop)
 {
   if (load_event != WEBKIT_LOAD_FINISHED)
     return;
@@ -445,7 +449,8 @@ test_ephy_web_view_error_pages_not_stored_in_history (void)
 }
 
 int
-main (int argc, char *argv[])
+main (int   argc,
+      char *argv[])
 {
   int ret;
   SoupServer *server;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]