[epiphany/f20] Backport many patches
catanzaro
catanzaro at fedoraproject.org
Sat Aug 23 04:57:32 UTC 2014
commit 4709a21d6eb8f2b4836db94c0ee8fd31bd0a55da
Author: Michael Catanzaro <mcatanzaro at gnome.org>
Date: Fri Aug 22 22:28:04 2014 -0500
Backport many patches
0001-close-tab-created-for-download.patch | 116 ++++++
0001-search-provider-causing-problems.patch | 256 +++++++++++++
0002-close-tab-created-for-download.patch | 74 ++++
0002-search-provider-causing-problems.patch | 194 ++++++++++
0003-search-provider-causing-problems.patch | 124 +++++++
0004-search-provider-causing-problems.patch | 531 +++++++++++++++++++++++++++
0005-search-provider-causing-problems.patch | 128 +++++++
0006-search-provider-causing-problems.patch | 43 +++
epiphany-fix-adblock.patch | 50 +++
epiphany-overaggressive-adblock.patch | 27 ++
epiphany-use-https-duckduckgo.patch | 100 +++++
epiphany.spec | 47 +++-
12 files changed, 1688 insertions(+), 2 deletions(-)
---
diff --git a/0001-close-tab-created-for-download.patch b/0001-close-tab-created-for-download.patch
new file mode 100644
index 0000000..c5187e0
--- /dev/null
+++ b/0001-close-tab-created-for-download.patch
@@ -0,0 +1,116 @@
+From 29c990d5a4662467e4708db1ab1cc06c4901fc7f Mon Sep 17 00:00:00 2001
+From: Gustavo Noronha Silva <gns at gnome.org>
+Date: Sat, 10 Aug 2013 22:06:32 -0300
+Subject: If a tab is created only for a download, close it
+
+If a tab that has just been created ends up being just a download, then
+close it down. If it's the only one on the window, then make it show the
+overview instead.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=607233
+
+diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
+index f4e0136..b48aae9 100644
+--- a/embed/ephy-web-view.c
++++ b/embed/ephy-web-view.c
+@@ -1245,6 +1245,22 @@ ephy_web_view_class_init (EphyWebViewClass *klass)
+ G_TYPE_NONE,
+ 0);
+
++/**
++ * EphyWebView::donload-only-load:
++ * @view: the #EphyWebView that received the signal
++ *
++ * The ::download-only-load signal is emitted when the @view has its main load
++ * replaced by a download, and that is the only reason why the @view has been created.
++ **/
++ g_signal_new ("download-only-load",
++ EPHY_TYPE_WEB_VIEW,
++ G_SIGNAL_RUN_FIRST,
++ 0,
++ NULL, NULL,
++ g_cclosure_marshal_VOID__VOID,
++ G_TYPE_NONE,
++ 0);
++
+ g_type_class_add_private (gobject_class, sizeof (EphyWebViewPrivate));
+ }
+
+@@ -1852,10 +1868,15 @@ load_failed_cb (WebKitWebView *web_view,
+ }
+ }
+ break;
+- /* In case we are downloading something or the resource is going to
+- * be showed with a plugin just let WebKit do it */
+- case WEBKIT_PLUGIN_ERROR_WILL_HANDLE_LOAD:
+ case WEBKIT_POLICY_ERROR_FRAME_LOAD_INTERRUPTED_BY_POLICY_CHANGE:
++ /* If we are going to download something, and this is the first
++ * page to load in this tab, we may want to close it down. */
++ if (!webkit_web_view_can_go_back (web_view))
++ g_signal_emit_by_name (view, "download-only-load", NULL);
++ break;
++ /* In case the resource is going to be showed with a plugin just let
++ * WebKit do it */
++ case WEBKIT_PLUGIN_ERROR_WILL_HANDLE_LOAD:
+ default:
+ break;
+ }
+diff --git a/src/ephy-window.c b/src/ephy-window.c
+index 67bbf06..1ceca46 100644
+--- a/src/ephy-window.c
++++ b/src/ephy-window.c
+@@ -2605,6 +2605,31 @@ present_on_idle_cb (GtkWindow *window)
+ return FALSE;
+ }
+
++static gboolean
++delayed_remove_child (gpointer data)
++{
++ GtkWidget *widget = GTK_WIDGET (data);
++ EphyEmbedContainer *container = EPHY_EMBED_CONTAINER (gtk_widget_get_toplevel (widget));
++
++ ephy_embed_container_remove_child (container, widget);
++
++ return FALSE;
++}
++
++static void
++download_only_load_cb (EphyWebView *view,
++ EphyWindow *window)
++{
++ EphyWindowPrivate *priv = window->priv;
++
++ if (gtk_notebook_get_n_pages (priv->notebook) == 1) {
++ ephy_web_view_load_homepage (view);
++ return;
++ }
++
++ g_idle_add (delayed_remove_child, EPHY_GET_EMBED_FROM_EPHY_WEB_VIEW (view));
++}
++
+ static void
+ notebook_page_added_cb (EphyNotebook *notebook,
+ EphyEmbed *embed,
+@@ -2623,6 +2648,9 @@ notebook_page_added_cb (EphyNotebook *notebook,
+ G_CONNECT_SWAPPED);
+ #endif
+
++ g_signal_connect_object (ephy_embed_get_web_view (embed), "download-only-load",
++ G_CALLBACK (download_only_load_cb), window, G_CONNECT_AFTER);
++
+ g_signal_connect_object (ephy_embed_get_web_view (embed), "ge-modal-alert",
+ G_CALLBACK (embed_modal_alert_cb), window, G_CONNECT_AFTER);
+
+@@ -2656,6 +2684,9 @@ notebook_page_removed_cb (EphyNotebook *notebook,
+ #endif
+
+ g_signal_handlers_disconnect_by_func
++ (ephy_embed_get_web_view (embed), G_CALLBACK (download_only_load_cb), window);
++
++ g_signal_handlers_disconnect_by_func
+ (ephy_embed_get_web_view (embed), G_CALLBACK (embed_modal_alert_cb), window);
+
+ tab_accels_update (window);
+--
+cgit v0.10.1
+
diff --git a/0001-search-provider-causing-problems.patch b/0001-search-provider-causing-problems.patch
new file mode 100644
index 0000000..8034199
--- /dev/null
+++ b/0001-search-provider-causing-problems.patch
@@ -0,0 +1,256 @@
+From d90f134be3b8c19190fd4a2052c92a9003f60023 Mon Sep 17 00:00:00 2001
+From: Carlos Garcia Campos <cgarcia at igalia.com>
+Date: Mon, 9 Dec 2013 19:17:49 +0100
+Subject: Add a way to create a history service in read only mode
+
+
+diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
+index 7fd8f79..e15d062 100644
+--- a/embed/ephy-embed-shell.c
++++ b/embed/ephy-embed-shell.c
+@@ -213,7 +213,7 @@ ephy_embed_shell_get_global_history_service (EphyEmbedShell *shell)
+ char *filename;
+
+ filename = g_build_filename (ephy_dot_dir (), EPHY_HISTORY_FILE, NULL);
+- shell->priv->global_history_service = ephy_history_service_new (filename);
++ shell->priv->global_history_service = ephy_history_service_new (filename, FALSE);
+ g_free (filename);
+ g_return_val_if_fail (shell->priv->global_history_service, NULL);
+ }
+diff --git a/lib/ephy-profile-migrator.c b/lib/ephy-profile-migrator.c
+index ac991af..a3f7d61 100644
+--- a/lib/ephy-profile-migrator.c
++++ b/lib/ephy-profile-migrator.c
+@@ -570,7 +570,7 @@ migrate_history (void)
+ return;
+ }
+
+- history_service = ephy_history_service_new (temporary_file);
++ history_service = ephy_history_service_new (temporary_file, FALSE);
+ g_free (temporary_file);
+
+ memset (&parse_data, 0, sizeof (HistoryParseData));
+diff --git a/lib/history/ephy-history-service-private.h b/lib/history/ephy-history-service-private.h
+index 7fb96bd..8f059ec 100644
+--- a/lib/history/ephy-history-service-private.h
++++ b/lib/history/ephy-history-service-private.h
+@@ -29,6 +29,7 @@ struct _EphyHistoryServicePrivate {
+ GAsyncQueue *queue;
+ gboolean scheduled_to_quit;
+ gboolean scheduled_to_commit;
++ gboolean read_only;
+ int queue_urls_visited_id;
+ };
+
+diff --git a/lib/history/ephy-history-service.c b/lib/history/ephy-history-service.c
+index bfbe348..fc1737d 100644
+--- a/lib/history/ephy-history-service.c
++++ b/lib/history/ephy-history-service.c
+@@ -80,6 +80,7 @@ static void ephy_history_service_quit (EphyH
+ enum {
+ PROP_0,
+ PROP_HISTORY_FILENAME,
++ PROP_READ_ONLY
+ };
+
+ #define EPHY_HISTORY_SERVICE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), EPHY_TYPE_HISTORY_SERVICE, EphyHistoryServicePrivate))
+@@ -96,6 +97,9 @@ ephy_history_service_set_property (GObject *object, guint property_id, const GVa
+ g_free (self->priv->history_filename);
+ self->priv->history_filename = g_strdup (g_value_get_string (value));
+ break;
++ case PROP_READ_ONLY:
++ self->priv->read_only = g_value_get_boolean (value);
++ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (self, property_id, pspec);
+ break;
+@@ -268,6 +272,13 @@ ephy_history_service_class_init (EphyHistoryServiceClass *klass)
+ "The filename of the SQLite file holding containing history",
+ NULL,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
++ g_object_class_install_property (gobject_class,
++ PROP_READ_ONLY,
++ g_param_spec_boolean ("read-only",
++ "Read only mode",
++ "Whether the history service works in read only mode",
++ FALSE,
++ G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
+
+ g_type_class_add_private (gobject_class, sizeof (EphyHistoryServicePrivate));
+ }
+@@ -282,10 +293,12 @@ ephy_history_service_init (EphyHistoryService *self)
+ }
+
+ EphyHistoryService *
+-ephy_history_service_new (const char *history_filename)
++ephy_history_service_new (const char *history_filename,
++ gboolean read_only)
+ {
+ return EPHY_HISTORY_SERVICE (g_object_new (EPHY_TYPE_HISTORY_SERVICE,
+ "history-filename", history_filename,
++ "read-only", read_only,
+ NULL));
+ }
+
+@@ -313,6 +326,9 @@ ephy_history_service_commit (EphyHistoryService *self)
+ if (NULL == priv->history_database)
+ return;
+
++ if (priv->read_only)
++ return;
++
+ ephy_sqlite_connection_commit_transaction (priv->history_database, &error);
+ if (NULL != error) {
+ g_error ("Could not commit idle history database transaction: %s", error->message);
+@@ -372,9 +388,10 @@ ephy_history_service_open_database_connections (EphyHistoryService *self)
+ return FALSE;
+ }
+
+- if ((ephy_history_service_initialize_hosts_table (self) == FALSE) ||
+- (ephy_history_service_initialize_urls_table (self) == FALSE) ||
+- (ephy_history_service_initialize_visits_table (self) == FALSE))
++ if (!priv->read_only &&
++ ((ephy_history_service_initialize_hosts_table (self) == FALSE) ||
++ (ephy_history_service_initialize_urls_table (self) == FALSE) ||
++ (ephy_history_service_initialize_visits_table (self) == FALSE)))
+ return FALSE;
+
+ return TRUE;
+@@ -401,6 +418,9 @@ ephy_history_service_clear_all (EphyHistoryService *self)
+ if (NULL == priv->history_database)
+ return;
+
++ if (priv->read_only)
++ return;
++
+ ephy_sqlite_connection_execute (priv->history_database,
+ "DELETE FROM hosts;", &error);
+ if (error) {
+@@ -424,7 +444,8 @@ ephy_history_service_is_scheduled_to_commit (EphyHistoryService *self)
+ void
+ ephy_history_service_schedule_commit (EphyHistoryService *self)
+ {
+- self->priv->scheduled_to_commit = TRUE;
++ if (!self->priv->read_only)
++ self->priv->scheduled_to_commit = TRUE;
+ }
+
+ static gboolean
+@@ -610,6 +631,9 @@ ephy_history_service_execute_add_visit (EphyHistoryService *self, EphyHistoryPag
+ gboolean success;
+ g_assert (self->priv->history_thread == g_thread_self ());
+
++ if (self->priv->read_only)
++ return FALSE;
++
+ success = ephy_history_service_execute_add_visit_helper (self, visit);
+ return success;
+ }
+@@ -620,6 +644,9 @@ ephy_history_service_execute_add_visits (EphyHistoryService *self, GList *visits
+ gboolean success = TRUE;
+ g_assert (self->priv->history_thread == g_thread_self ());
+
++ if (self->priv->read_only)
++ return FALSE;
++
+ while (visits) {
+ success = success && ephy_history_service_execute_add_visit_helper (self, (EphyHistoryPageVisit *) visits->data);
+ visits = visits->next;
+@@ -809,6 +836,9 @@ ephy_history_service_execute_set_url_title (EphyHistoryService *self,
+ {
+ char *title = g_strdup (url->title);
+
++ if (self->priv->read_only)
++ return FALSE;
++
+ if (NULL == ephy_history_service_get_url_row (self, NULL, url)) {
+ /* The URL is not yet in the database, so we can't update it.. */
+ g_free (title);
+@@ -861,6 +891,9 @@ ephy_history_service_execute_set_url_zoom_level (EphyHistoryService *self,
+ double zoom_level;
+ EphyHistoryHost *host;
+
++ if (self->priv->read_only)
++ return FALSE;
++
+ g_variant_get (variant, "(sd)", &url_string, &zoom_level);
+
+ host = ephy_history_service_get_host_row_from_url (self, url_string);
+@@ -904,6 +937,9 @@ ephy_history_service_execute_set_url_hidden (EphyHistoryService *self,
+ {
+ gboolean hidden;
+
++ if (self->priv->read_only)
++ return FALSE;
++
+ hidden = url->hidden;
+
+ if (NULL == ephy_history_service_get_url_row (self, NULL, url)) {
+@@ -947,6 +983,9 @@ ephy_history_service_execute_set_url_thumbnail_time (EphyHistoryService *self,
+ {
+ int thumbnail_time;
+
++ if (self->priv->read_only)
++ return FALSE;
++
+ thumbnail_time = url->thumbnail_time;
+
+ if (NULL == ephy_history_service_get_url_row (self, NULL, url))
+@@ -1065,6 +1104,9 @@ ephy_history_service_execute_delete_urls (EphyHistoryService *self,
+ EphyHistoryURL *url;
+ SignalEmissionContext *ctx;
+
++ if (self->priv->read_only)
++ return FALSE;
++
+ for (l = urls; l != NULL; l = l->next) {
+ url = l->data;
+ ephy_history_service_delete_url (self, url);
+@@ -1101,6 +1143,9 @@ ephy_history_service_execute_delete_host (EphyHistoryService *self,
+ {
+ SignalEmissionContext *ctx;
+
++ if (self->priv->read_only)
++ return FALSE;
++
+ ephy_history_service_delete_host_row (self, host);
+ ephy_history_service_schedule_commit (self);
+
+@@ -1119,6 +1164,8 @@ ephy_history_service_execute_clear (EphyHistoryService *self,
+ gpointer pointer,
+ gpointer *result)
+ {
++ if (self->priv->read_only)
++ return FALSE;
+
+ ephy_history_service_clear_all (self);
+ ephy_history_service_schedule_commit (self);
+diff --git a/lib/history/ephy-history-service.h b/lib/history/ephy-history-service.h
+index d6db3a5..07cc348 100644
+--- a/lib/history/ephy-history-service.h
++++ b/lib/history/ephy-history-service.h
+@@ -58,7 +58,7 @@ struct _EphyHistoryServiceClass {
+ };
+
+ GType ephy_history_service_get_type (void);
+-EphyHistoryService * ephy_history_service_new (const char *history_filename);
++EphyHistoryService * ephy_history_service_new (const char *history_filename, gboolean read_only);
+
+ void ephy_history_service_add_visit (EphyHistoryService *self, EphyHistoryPageVisit *visit, GCancellable *cancellable, EphyHistoryJobCallback callback, gpointer user_data);
+ void ephy_history_service_add_visits (EphyHistoryService *self, GList *visits, GCancellable *cancellable, EphyHistoryJobCallback callback, gpointer user_data);
+diff --git a/tests/ephy-history-test.c b/tests/ephy-history-test.c
+index 9e10b08..d636bcd 100644
+--- a/tests/ephy-history-test.c
++++ b/tests/ephy-history-test.c
+@@ -34,7 +34,7 @@ ensure_empty_history (const char* filename)
+ if (g_file_test (filename, G_FILE_TEST_IS_REGULAR))
+ g_unlink (filename);
+
+- return ephy_history_service_new (filename);
++ return ephy_history_service_new (filename, FALSE);
+ }
+
+ static void
+--
+cgit v0.10.1
+
diff --git a/0002-close-tab-created-for-download.patch b/0002-close-tab-created-for-download.patch
new file mode 100644
index 0000000..26dcd8c
--- /dev/null
+++ b/0002-close-tab-created-for-download.patch
@@ -0,0 +1,74 @@
+From ac9cae2c84ad4e8e7746429ecb9995503468c419 Mon Sep 17 00:00:00 2001
+From: Gustavo Noronha Silva <gns at gnome.org>
+Date: Tue, 17 Dec 2013 13:34:33 -0200
+Subject: Use a flag to decide if a tab is download-only
+
+There are some cases in which a view may not be able to go back and still be not
+just for a download: if the view has been opened by middle clicking somewhere or
+by having an URL provided on startup, then the navigation from the overview to
+the first page won't have happened. By tracking whether the page has ever
+committed a load we can be sure it has been opened just for the download.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=720609
+
+diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
+index 0743b4f..8d67a9c 100644
+--- a/embed/ephy-web-view.c
++++ b/embed/ephy-web-view.c
+@@ -77,6 +77,7 @@ struct _EphyWebViewPrivate {
+ guint is_setting_zoom : 1;
+ guint load_failed : 1;
+ guint history_frozen : 1;
++ guint ever_committed : 1;
+
+ char *address;
+ char *typed_address;
+@@ -1594,6 +1595,8 @@ load_changed_cb (WebKitWebView *web_view,
+ const char* uri;
+ EphyWebViewSecurityLevel security_level = EPHY_WEB_VIEW_STATE_IS_UNKNOWN;
+
++ priv->ever_committed = TRUE;
++
+ /* Title and location. */
+ uri = webkit_web_view_get_uri (web_view);
+ ephy_web_view_location_changed (view, uri);
+@@ -1826,8 +1829,9 @@ load_failed_cb (WebKitWebView *web_view,
+ gpointer user_data)
+ {
+ EphyWebView *view = EPHY_WEB_VIEW (web_view);
++ EphyWebViewPrivate *priv = view->priv;
+
+- view->priv->load_failed = TRUE;
++ priv->load_failed = TRUE;
+ ephy_web_view_set_link_message (view, NULL);
+ update_navigation_flags (view);
+
+@@ -1858,8 +1862,6 @@ load_failed_cb (WebKitWebView *web_view,
+ return TRUE;
+ case WEBKIT_NETWORK_ERROR_CANCELLED:
+ {
+- EphyWebViewPrivate *priv = view->priv;
+-
+ if (!priv->typed_address) {
+ const char* prev_uri;
+
+@@ -1871,7 +1873,7 @@ load_failed_cb (WebKitWebView *web_view,
+ case WEBKIT_POLICY_ERROR_FRAME_LOAD_INTERRUPTED_BY_POLICY_CHANGE:
+ /* If we are going to download something, and this is the first
+ * page to load in this tab, we may want to close it down. */
+- if (!webkit_web_view_can_go_back (web_view))
++ if (!priv->ever_committed)
+ g_signal_emit_by_name (view, "download-only-load", NULL);
+ break;
+ /* In case the resource is going to be showed with a plugin just let
+@@ -1931,6 +1933,7 @@ ephy_web_view_init (EphyWebView *web_view)
+ priv = web_view->priv = EPHY_WEB_VIEW_GET_PRIVATE (web_view);
+
+ priv->is_blank = TRUE;
++ priv->ever_committed = FALSE;
+ priv->title = g_strdup (EMPTY_PAGE);
+ priv->document_type = EPHY_WEB_VIEW_DOCUMENT_HTML;
+ priv->security_level = EPHY_WEB_VIEW_STATE_IS_UNKNOWN;
+--
+cgit v0.10.1
+
diff --git a/0002-search-provider-causing-problems.patch b/0002-search-provider-causing-problems.patch
new file mode 100644
index 0000000..2cf003a
--- /dev/null
+++ b/0002-search-provider-causing-problems.patch
@@ -0,0 +1,194 @@
+From 7c7c8fb8432ea04c14d70138a4de12675fa2fa0f Mon Sep 17 00:00:00 2001
+From: Carlos Garcia Campos <cgarcia at igalia.com>
+Date: Mon, 9 Dec 2013 19:46:23 +0100
+Subject: Create the EphyCompletionModel with a history service and bookmarks
+ objects
+
+Instead of getting them from the global shell.
+
+diff --git a/src/ephy-completion-model.c b/src/ephy-completion-model.c
+index 35bd43e..5bf408b 100644
+--- a/src/ephy-completion-model.c
++++ b/src/ephy-completion-model.c
+@@ -29,6 +29,12 @@
+
+ #include <string.h>
+
++enum {
++ PROP_0,
++ PROP_HISTORY_SERVICE,
++ PROP_BOOKMARKS
++};
++
+ G_DEFINE_TYPE (EphyCompletionModel, ephy_completion_model, GTK_TYPE_LIST_STORE)
+
+ #define EPHY_COMPLETION_MODEL_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_COMPLETION_MODEL, EphyCompletionModelPrivate))
+@@ -65,6 +71,24 @@ free_search_terms (GSList *search_terms)
+ }
+
+ static void
++ephy_completion_model_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
++{
++ EphyCompletionModel *self = EPHY_COMPLETION_MODEL (object);
++
++ switch (property_id) {
++ case PROP_HISTORY_SERVICE:
++ self->priv->history_service = EPHY_HISTORY_SERVICE (g_value_get_pointer (value));
++ break;
++ case PROP_BOOKMARKS:
++ self->priv->bookmarks = ephy_bookmarks_get_bookmarks (EPHY_BOOKMARKS (g_value_get_pointer (value)));
++ break;
++ default:
++ G_OBJECT_WARN_INVALID_PROPERTY_ID (self, property_id, pspec);
++ break;
++ }
++}
++
++static void
+ ephy_completion_model_finalize (GObject *object)
+ {
+ EphyCompletionModelPrivate *priv = EPHY_COMPLETION_MODEL (object)->priv;
+@@ -87,24 +111,30 @@ ephy_completion_model_class_init (EphyCompletionModelClass *klass)
+ {
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
++ object_class->set_property = ephy_completion_model_set_property;
+ object_class->constructed = ephy_completion_model_constructed;
+ object_class->finalize = ephy_completion_model_finalize;
+
++ g_object_class_install_property (object_class,
++ PROP_HISTORY_SERVICE,
++ g_param_spec_pointer ("history-service",
++ "History Service",
++ "The history service",
++ G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
++ g_object_class_install_property (object_class,
++ PROP_BOOKMARKS,
++ g_param_spec_pointer ("bookmarks",
++ "Bookmarks",
++ "The bookmarks",
++ G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
++
+ g_type_class_add_private (object_class, sizeof (EphyCompletionModelPrivate));
+ }
+
+ static void
+ ephy_completion_model_init (EphyCompletionModel *model)
+ {
+- EphyCompletionModelPrivate *priv;
+- EphyBookmarks *bookmarks_service;
+-
+- model->priv = priv = EPHY_COMPLETION_MODEL_GET_PRIVATE (model);
+-
+- priv->history_service = EPHY_HISTORY_SERVICE (ephy_embed_shell_get_global_history_service (ephy_embed_shell_get_default ()));
+-
+- bookmarks_service = ephy_shell_get_bookmarks (ephy_shell_get_default ());
+- priv->bookmarks = ephy_bookmarks_get_bookmarks (bookmarks_service);
++ model->priv = EPHY_COMPLETION_MODEL_GET_PRIVATE (model);
+ }
+
+ static gboolean
+@@ -553,7 +583,14 @@ ephy_completion_model_update_for_string (EphyCompletionModel *model,
+ }
+
+ EphyCompletionModel *
+-ephy_completion_model_new (void)
++ephy_completion_model_new (EphyHistoryService *history_service,
++ EphyBookmarks *bookmarks)
+ {
+- return g_object_new (EPHY_TYPE_COMPLETION_MODEL, NULL);
++ g_return_val_if_fail (EPHY_IS_HISTORY_SERVICE (history_service), NULL);
++ g_return_val_if_fail (EPHY_IS_BOOKMARKS (bookmarks), NULL);
++
++ return g_object_new (EPHY_TYPE_COMPLETION_MODEL,
++ "history-service", history_service,
++ "bookmarks", bookmarks,
++ NULL);
+ }
+diff --git a/src/ephy-completion-model.h b/src/ephy-completion-model.h
+index f02f812..4fb7afe 100644
+--- a/src/ephy-completion-model.h
++++ b/src/ephy-completion-model.h
+@@ -24,6 +24,7 @@
+ #ifndef EPHY_COMPLETION_MODEL_H
+ #define EPHY_COMPLETION_MODEL_H
+
++#include "ephy-bookmarks.h"
+ #include "ephy-history-service.h"
+
+ #include <gtk/gtk.h>
+@@ -66,7 +67,8 @@ typedef struct
+
+ GType ephy_completion_model_get_type (void);
+
+-EphyCompletionModel *ephy_completion_model_new (void);
++EphyCompletionModel *ephy_completion_model_new (EphyHistoryService *history_service,
++ EphyBookmarks *bookmarks);
+
+ void ephy_completion_model_update_for_string (EphyCompletionModel *model,
+ const char *string,
+diff --git a/src/ephy-location-controller.c b/src/ephy-location-controller.c
+index 0ff9e4d..a1884c4 100644
+--- a/src/ephy-location-controller.c
++++ b/src/ephy-location-controller.c
+@@ -342,6 +342,8 @@ ephy_location_controller_constructed (GObject *object)
+ {
+ EphyLocationController *controller = EPHY_LOCATION_CONTROLLER (object);
+ EphyLocationControllerPrivate *priv = controller->priv;
++ EphyHistoryService *history_service;
++ EphyBookmarks *bookmarks;
+ EphyCompletionModel *model;
+ GtkWidget *notebook, *widget;
+
+@@ -353,7 +355,9 @@ ephy_location_controller_constructed (GObject *object)
+ g_signal_connect (notebook, "switch-page",
+ G_CALLBACK (switch_page_cb), controller);
+
+- model = ephy_completion_model_new ();
++ history_service = EPHY_HISTORY_SERVICE (ephy_embed_shell_get_global_history_service (ephy_embed_shell_get_default ()));
++ bookmarks = ephy_shell_get_bookmarks (ephy_shell_get_default ());
++ model = ephy_completion_model_new (history_service, bookmarks);
+ ephy_location_entry_set_completion (priv->location_entry,
+ GTK_TREE_MODEL (model),
+ EPHY_COMPLETION_TEXT_COL,
+diff --git a/src/ephy-search-provider.c b/src/ephy-search-provider.c
+index cbdba11..5d69467 100644
+--- a/src/ephy-search-provider.c
++++ b/src/ephy-search-provider.c
+@@ -361,7 +361,8 @@ ephy_search_provider_init (EphySearchProvider *self)
+
+ self->settings = g_settings_new (EPHY_PREFS_SCHEMA);
+
+- self->model = ephy_completion_model_new ();
++ self->model = ephy_completion_model_new (EPHY_HISTORY_SERVICE (ephy_embed_shell_get_global_history_service (ephy_embed_shell_get_default ())),
++ ephy_shell_get_bookmarks (ephy_shell_get_default ()));
+ self->cancellable = g_cancellable_new ();
+ }
+
+diff --git a/tests/ephy-completion-model-test.c b/tests/ephy-completion-model-test.c
+index b20ecb5..c717210 100644
+--- a/tests/ephy-completion-model-test.c
++++ b/tests/ephy-completion-model-test.c
+@@ -31,7 +31,8 @@ static void
+ test_ephy_completion_model_create (void)
+ {
+ EphyCompletionModel *model;
+- model = ephy_completion_model_new ();
++ model = ephy_completion_model_new (EPHY_HISTORY_SERVICE (ephy_embed_shell_get_global_history_service (ephy_embed_shell_get_default ())),
++ ephy_shell_get_bookmarks (ephy_shell_get_default ()));
+ g_assert (model);
+ g_object_unref (model);
+ }
+@@ -56,7 +57,8 @@ test_ephy_completion_model_update_empty (void)
+ EphyCompletionModel *model;
+ GMainLoop *loop = NULL;
+
+- model = ephy_completion_model_new ();
++ model = ephy_completion_model_new (EPHY_HISTORY_SERVICE (ephy_embed_shell_get_global_history_service (ephy_embed_shell_get_default ())),
++ ephy_shell_get_bookmarks (ephy_shell_get_default ()));
+ g_assert (model);
+
+ loop = g_main_loop_new (NULL, FALSE);
+--
+cgit v0.10.1
+
diff --git a/0003-search-provider-causing-problems.patch b/0003-search-provider-causing-problems.patch
new file mode 100644
index 0000000..6c39876
--- /dev/null
+++ b/0003-search-provider-causing-problems.patch
@@ -0,0 +1,124 @@
+From 83affc44c78a486fa77db47a469a28d17771b64e Mon Sep 17 00:00:00 2001
+From: Carlos Garcia Campos <cgarcia at igalia.com>
+Date: Wed, 11 Dec 2013 10:15:50 +0100
+Subject: Make the history service work even when the database could not be
+ opened
+
+The history could be used by the search provider even before the ephy
+config dir has been created, if epiphany has never been launched. In
+such case, the methods will simply fail to get results, and the search
+provider will only return the special case for searching in the web.
+
+diff --git a/lib/history/ephy-history-service.c b/lib/history/ephy-history-service.c
+index fc1737d..af4a238 100644
+--- a/lib/history/ephy-history-service.c
++++ b/lib/history/ephy-history-service.c
+@@ -308,12 +308,54 @@ sort_messages (EphyHistoryServiceMessage* a, EphyHistoryServiceMessage* b, gpoin
+ 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)
++{
++ EphyHistoryServiceMessage *message = g_slice_alloc0 (sizeof (EphyHistoryServiceMessage));
++
++ message->service = service;
++ message->type = type;
++ message->method_argument = method_argument;
++ message->method_argument_cleanup = method_argument_cleanup;
++ message->cancellable = cancellable ? g_object_ref (cancellable) : NULL;
++ message->callback = callback;
++ message->user_data = user_data;
++
++ return message;
++}
++
++static void
++ephy_history_service_message_free (EphyHistoryServiceMessage *message)
++{
++ if (message->method_argument_cleanup)
++ message->method_argument_cleanup (message->method_argument);
++
++ if (message->cancellable)
++ g_object_unref (message->cancellable);
++
++ g_slice_free1 (sizeof (EphyHistoryServiceMessage), message);
++}
++
+ static void
+ ephy_history_service_send_message (EphyHistoryService *self, EphyHistoryServiceMessage *message)
+ {
+ EphyHistoryServicePrivate *priv = self->priv;
+
+- g_async_queue_push_sorted (priv->queue, message, (GCompareDataFunc)sort_messages, NULL);
++ if (priv->history_database)
++ g_async_queue_push_sorted (priv->queue, message, (GCompareDataFunc)sort_messages, NULL);
++ else {
++ message->result = NULL;
++ message->success = FALSE;
++ if (message->callback)
++ message->callback (message->service, message->success, message->result, message->user_data);
++ ephy_history_service_message_free (message);
++ }
+ }
+
+ static void
+@@ -374,7 +416,7 @@ ephy_history_service_open_database_connections (EphyHistoryService *self)
+ if (error) {
+ g_object_unref (priv->history_database);
+ priv->history_database = NULL;
+- g_error ("Could not open history database at %s: %s", priv->history_filename, error->message);
++ g_warning ("Could not open history database at %s: %s", priv->history_filename, error->message);
+ g_error_free (error);
+ return FALSE;
+ }
+@@ -496,40 +538,6 @@ run_history_service_thread (EphyHistoryService *self)
+ return NULL;
+ }
+
+-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)
+-{
+- EphyHistoryServiceMessage *message = g_slice_alloc0 (sizeof (EphyHistoryServiceMessage));
+-
+- message->service = service;
+- message->type = type;
+- message->method_argument = method_argument;
+- message->method_argument_cleanup = method_argument_cleanup;
+- message->cancellable = cancellable ? g_object_ref (cancellable) : NULL;
+- message->callback = callback;
+- message->user_data = user_data;
+-
+- return message;
+-}
+-
+-static void
+-ephy_history_service_message_free (EphyHistoryServiceMessage *message)
+-{
+- if (message->method_argument_cleanup)
+- message->method_argument_cleanup (message->method_argument);
+-
+- if (message->cancellable)
+- g_object_unref (message->cancellable);
+-
+- g_slice_free1 (sizeof (EphyHistoryServiceMessage), message);
+-}
+-
+ static gboolean
+ ephy_history_service_execute_job_callback (gpointer data)
+ {
+--
+cgit v0.10.1
+
diff --git a/0004-search-provider-causing-problems.patch b/0004-search-provider-causing-problems.patch
new file mode 100644
index 0000000..c3d8259
--- /dev/null
+++ b/0004-search-provider-causing-problems.patch
@@ -0,0 +1,531 @@
+From 78e8d7f045396cd753a73f9106e19b3bb3fe5d57 Mon Sep 17 00:00:00 2001
+From: Carlos Garcia Campos <cgarcia at igalia.com>
+Date: Mon, 9 Dec 2013 20:16:02 +0100
+Subject: Move the search provider to its own binary
+
+https://bugzilla.gnome.org/show_bug.cgi?id=711409
+
+diff --git a/data/Makefile.am b/data/Makefile.am
+index 7c4f0d8..b3f6944 100644
+--- a/data/Makefile.am
++++ b/data/Makefile.am
+@@ -40,7 +40,7 @@ service_DATA = $(service_in_files:.service.in=.service)
+
+ # Rule to make the service file with bindir expanded
+ $(service_DATA): $(service_in_files) Makefile
+- @sed -e "s|\@bindir\@|$(bindir)|" $< > $@
++ @sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
+
+ # Default bookmarks
+ # We don't put translations in the resulting rdf since the code can get
+diff --git a/data/epiphany-search-provider.ini b/data/epiphany-search-provider.ini
+index 08fb260..b523f7d 100644
+--- a/data/epiphany-search-provider.ini
++++ b/data/epiphany-search-provider.ini
+@@ -1,5 +1,5 @@
+ [Shell Search Provider]
+ DesktopId=epiphany.desktop
+-BusName=org.gnome.Epiphany
+-ObjectPath=/org/gnome/Epiphany
++BusName=org.gnome.EpiphanySearchProvider
++ObjectPath=/org/gnome/EpiphanySearchProvider
+ Version=2
+diff --git a/data/org.gnome.Epiphany.service.in b/data/org.gnome.Epiphany.service.in
+index 5af8cf1..1c4633f 100644
+--- a/data/org.gnome.Epiphany.service.in
++++ b/data/org.gnome.Epiphany.service.in
+@@ -1,3 +1,3 @@
+ [D-BUS Service]
+-Name=org.gnome.Epiphany
+-Exec=@bindir@/epiphany --headless-mode
++Name=org.gnome.EpiphanySearchProvider
++Exec=@libexecdir@/epiphany-search-provider
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 544bac3..2de16bc 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -44,7 +44,6 @@ INST_H_FILES = \
+ $(NULL)
+
+ libephymain_la_SOURCES = \
+- $(dbus_shell_search_provider_built_sources) \
+ ephy-action-helper.c \
+ ephy-completion-model.c \
+ ephy-completion-model.h \
+@@ -60,7 +59,6 @@ libephymain_la_SOURCES = \
+ ephy-navigation-history-action.c \
+ ephy-notebook.c \
+ ephy-page-menu-action.c \
+- ephy-search-provider.c \
+ ephy-session.c \
+ ephy-shell.c \
+ ephy-toolbar.c \
+@@ -165,6 +163,34 @@ epiphany_LDADD = \
+ $(CODE_COVERAGE_LDFLAGS) \
+ $(LIBINTL)
+
++libexec_PROGRAMS = epiphany-search-provider
++
++epiphany_search_provider_SOURCES = \
++ $(dbus_shell_search_provider_built_sources) \
++ ephy-search-provider.c \
++ ephy-search-provider-main.c
++
++epiphany_search_provider_CPPFLAGS = \
++ -I$(top_builddir)/lib \
++ -I$(top_srcdir)/lib \
++ -I$(top_srcdir)/lib/history \
++ -I$(top_srcdir)/src/bookmarks \
++ -DDATADIR=\""$(datadir)"\" \
++ -DGNOMELOCALEDIR=\"$(datadir)/locale\" \
++ $(INCINTL) \
++ $(AM_CPPFLAGS)
++
++epiphany_search_provider_CFLAGS = $(epiphany_CFLAGS)
++
++epiphany_search_provider_LDADD = \
++ libephymain.la \
++ $(top_builddir)/src/bookmarks/libephybookmarks.la \
++ $(top_builddir)/lib/history/libephyhistory.la \
++ $(top_builddir)/lib/libephymisc.la \
++ $(DEPENDENCIES_LIBS) \
++ $(CODE_COVERAGE_LDFLAGS) \
++ $(LIBINTL)
++
+ TYPES_SOURCE = \
+ ephy-type-builtins.c \
+ ephy-type-builtins.h
+diff --git a/src/ephy-search-provider-main.c b/src/ephy-search-provider-main.c
+new file mode 100644
+index 0000000..5c5905a
+--- /dev/null
++++ b/src/ephy-search-provider-main.c
+@@ -0,0 +1,46 @@
++/*
++ * Copyright (c) 2013 Igalia S.L.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by the
++ * Free Software Foundation; either version 2 of the License, or (at your
++ * option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
++ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++ * for more details.
++ *
++ * You should have received a copy of the GNU General Public License along
++ * with the Control Center; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
++ *
++ */
++
++#include "config.h"
++
++#include "ephy-search-provider.h"
++#include "ephy-file-helpers.h"
++
++gint main (gint argc, gchar** argv)
++{
++ EphySearchProvider *search_provider;
++ int status;
++ GError *error = NULL;
++
++ if (!ephy_file_helpers_init (NULL, 0, &error)) {
++ g_printerr ("%s\n", error->message);
++ g_error_free (error);
++
++ return 1;
++ }
++
++ search_provider = ephy_search_provider_new ();
++ status = g_application_run (G_APPLICATION (search_provider), argc, argv);
++ g_object_unref (search_provider);
++
++ ephy_file_helpers_shutdown ();
++
++ return status;
++}
++
+diff --git a/src/ephy-search-provider.c b/src/ephy-search-provider.c
+index 5d69467..ec9d4a3 100644
+--- a/src/ephy-search-provider.c
++++ b/src/ephy-search-provider.c
+@@ -21,39 +21,36 @@
+
+ #include "ephy-search-provider.h"
+
+-#include "ephy-bookmarks.h"
+ #include "ephy-completion-model.h"
+ #include "ephy-file-helpers.h"
+-#include "ephy-history-service.h"
+ #include "ephy-prefs.h"
+ #include "ephy-profile-utils.h"
+-#include "ephy-shell.h"
+
+ #include <string.h>
+ #include <glib/gi18n.h>
+ #include <gio/gio.h>
+ #include <gio/gdesktopappinfo.h>
+-#include <gtk/gtk.h>
+-#include <gdk-pixbuf/gdk-pixbuf.h>
+ #include <libsoup/soup.h>
+
+ struct _EphySearchProvider
+ {
+- GObject parent;
++ GApplication parent;
+
+ EphyShellSearchProvider2 *skeleton;
+ GCancellable *cancellable;
+
+ GSettings *settings;
++ EphyHistoryService *history_service;
++ EphyBookmarks *bookmarks;
+ EphyCompletionModel *model;
+ };
+
+ struct _EphySearchProviderClass
+ {
+- GObjectClass parent_class;
++ GApplicationClass parent_class;
+ };
+
+-G_DEFINE_TYPE (EphySearchProvider, ephy_search_provider, G_TYPE_OBJECT);
++G_DEFINE_TYPE (EphySearchProvider, ephy_search_provider, G_TYPE_APPLICATION)
+
+ static void
+ on_model_updated (EphyHistoryService *service,
+@@ -139,7 +136,7 @@ complete_request (GObject *object,
+ g_dbus_method_invocation_take_error (user_data, error);
+ }
+
+- g_application_release (G_APPLICATION (ephy_shell_get_default ()));
++ g_application_release (G_APPLICATION (self));
+ }
+
+ static gboolean
+@@ -148,7 +145,7 @@ handle_get_initial_result_set (EphyShellSearchProvider2 *skeleton,
+ char **terms,
+ EphySearchProvider *self)
+ {
+- g_application_hold (G_APPLICATION (ephy_shell_get_default ()));
++ g_application_hold (G_APPLICATION (self));
+ g_cancellable_reset (self->cancellable);
+
+ gather_results_async (self, terms, self->cancellable,
+@@ -164,7 +161,7 @@ handle_get_subsearch_result_set (EphyShellSearchProvider2 *skeleton,
+ char **terms,
+ EphySearchProvider *self)
+ {
+- g_application_hold (G_APPLICATION (ephy_shell_get_default ()));
++ g_application_hold (G_APPLICATION (self));
+ g_cancellable_reset (self->cancellable);
+
+ gather_results_async (self, terms, self->cancellable,
+@@ -187,7 +184,7 @@ handle_get_result_metas (EphyShellSearchProvider2 *skeleton,
+ char *name, *url;
+ gboolean is_bookmark;
+
+- g_application_hold (G_APPLICATION (ephy_shell_get_default ()));
++ g_application_hold (G_APPLICATION (self));
+ g_cancellable_cancel (self->cancellable);
+
+ g_variant_builder_init (&builder, G_VARIANT_TYPE ("aa{sv}"));
+@@ -258,7 +255,7 @@ handle_get_result_metas (EphyShellSearchProvider2 *skeleton,
+ invocation,
+ g_variant_builder_end (&builder));
+
+- g_application_release (G_APPLICATION (ephy_shell_get_default ()));
++ g_application_release (G_APPLICATION (self));
+
+ return TRUE;
+ }
+@@ -267,12 +264,12 @@ static void
+ launch_uri (const char *uri,
+ guint timestamp)
+ {
+- const char *uris[2];
++ char *str;
+
+- uris[0] = uri;
+- uris[1] = NULL;
+-
+- ephy_shell_open_uris (ephy_shell_get_default (), uris, 0, timestamp);
++ /* TODO: Handle the timestamp */
++ str = g_strdup_printf ("epiphany %s", uri);
++ g_spawn_command_line_async (str, NULL);
++ g_free (str);
+ }
+
+ static void
+@@ -311,7 +308,7 @@ handle_activate_result (EphyShellSearchProvider2 *skeleton,
+ guint timestamp,
+ EphySearchProvider *self)
+ {
+- g_application_hold (G_APPLICATION (ephy_shell_get_default ()));
++ g_application_hold (G_APPLICATION (self));
+ g_cancellable_cancel (self->cancellable);
+
+ if (strcmp (identifier, "special:search") == 0)
+@@ -320,7 +317,7 @@ handle_activate_result (EphyShellSearchProvider2 *skeleton,
+ launch_uri (identifier, timestamp);
+
+ ephy_shell_search_provider2_complete_activate_result (skeleton, invocation);
+- g_application_release (G_APPLICATION (ephy_shell_get_default ()));
++ g_application_release (G_APPLICATION (self));
+
+ return TRUE;
+ }
+@@ -332,13 +329,13 @@ handle_launch_search (EphyShellSearchProvider2 *skeleton,
+ guint timestamp,
+ EphySearchProvider *self)
+ {
+- g_application_hold (G_APPLICATION (ephy_shell_get_default ()));
++ g_application_hold (G_APPLICATION (self));
+ g_cancellable_cancel (self->cancellable);
+
+ launch_search (self, terms, timestamp);
+
+ ephy_shell_search_provider2_complete_launch_search (skeleton, invocation);
+- g_application_release (G_APPLICATION (ephy_shell_get_default ()));
++ g_application_release (G_APPLICATION (self));
+
+ return TRUE;
+ }
+@@ -346,6 +343,10 @@ handle_launch_search (EphyShellSearchProvider2 *skeleton,
+ static void
+ ephy_search_provider_init (EphySearchProvider *self)
+ {
++ char *filename;
++
++ g_application_set_flags (G_APPLICATION (self), G_APPLICATION_IS_SERVICE);
++
+ self->skeleton = ephy_shell_search_provider2_skeleton_new ();
+
+ g_signal_connect (self->skeleton, "handle-get-initial-result-set",
+@@ -361,35 +362,54 @@ ephy_search_provider_init (EphySearchProvider *self)
+
+ self->settings = g_settings_new (EPHY_PREFS_SCHEMA);
+
+- self->model = ephy_completion_model_new (EPHY_HISTORY_SERVICE (ephy_embed_shell_get_global_history_service (ephy_embed_shell_get_default ())),
+- ephy_shell_get_bookmarks (ephy_shell_get_default ()));
++ filename = g_build_filename (ephy_dot_dir (), EPHY_HISTORY_FILE, NULL);
++ self->history_service = ephy_history_service_new (filename, TRUE);
++ self->bookmarks = ephy_bookmarks_new ();
++ self->model = ephy_completion_model_new (self->history_service, self->bookmarks);
++ g_free (filename);
++
+ self->cancellable = g_cancellable_new ();
+ }
+
+-gboolean
+-ephy_search_provider_dbus_register (EphySearchProvider *self,
+- GDBusConnection *connection,
+- const gchar *object_path,
+- GError **error)
++static gboolean
++ephy_search_provider_dbus_register (GApplication *application,
++ GDBusConnection *connection,
++ const gchar *object_path,
++ GError **error)
+ {
++ EphySearchProvider *self;
+ GDBusInterfaceSkeleton *skeleton;
+
++ if (!G_APPLICATION_CLASS (ephy_search_provider_parent_class)->dbus_register (application,
++ connection,
++ object_path,
++ error))
++ return FALSE;
++
++ self = EPHY_SEARCH_PROVIDER (application);
+ skeleton = G_DBUS_INTERFACE_SKELETON (self->skeleton);
+
+ return g_dbus_interface_skeleton_export (skeleton, connection, object_path, error);
+ }
+
+-void
+-ephy_search_provider_dbus_unregister (EphySearchProvider *self,
+- GDBusConnection *connection,
+- const gchar *object_path)
++static void
++ephy_search_provider_dbus_unregister (GApplication *application,
++ GDBusConnection *connection,
++ const gchar *object_path)
+ {
++ EphySearchProvider *self;
+ GDBusInterfaceSkeleton *skeleton;
+
++ self = EPHY_SEARCH_PROVIDER (application);
+ skeleton = G_DBUS_INTERFACE_SKELETON (self->skeleton);
+-
+ if (g_dbus_interface_skeleton_has_connection (skeleton, connection))
+- g_dbus_interface_skeleton_unexport_from_connection (skeleton, connection);
++ g_dbus_interface_skeleton_unexport_from_connection (skeleton, connection);
++
++ g_clear_object (&self->skeleton);
++
++ G_APPLICATION_CLASS (ephy_search_provider_parent_class)->dbus_unregister (application,
++ connection,
++ object_path);
+ }
+
+ static void
+@@ -399,10 +419,11 @@ ephy_search_provider_dispose (GObject *object)
+
+ self = EPHY_SEARCH_PROVIDER (object);
+
+- g_clear_object (&self->skeleton);
+ g_clear_object (&self->settings);
+ g_clear_object (&self->cancellable);
+ g_clear_object (&self->model);
++ g_clear_object (&self->history_service);
++ g_clear_object (&self->bookmarks);
+
+ G_OBJECT_CLASS (ephy_search_provider_parent_class)->dispose (object);
+ }
+@@ -411,13 +432,19 @@ static void
+ ephy_search_provider_class_init (EphySearchProviderClass *klass)
+ {
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
++ GApplicationClass *application_class = G_APPLICATION_CLASS (klass);
+
+ object_class->dispose = ephy_search_provider_dispose;
++
++ application_class->dbus_register = ephy_search_provider_dbus_register;
++ application_class->dbus_unregister = ephy_search_provider_dbus_unregister;
+ }
+
+ EphySearchProvider *
+ ephy_search_provider_new (void)
+ {
+- return g_object_new (EPHY_TYPE_SEARCH_PROVIDER, NULL);
++ return g_object_new (EPHY_TYPE_SEARCH_PROVIDER,
++ "application-id", "org.gnome.EpiphanySearchProvider",
++ NULL);
+ }
+
+diff --git a/src/ephy-search-provider.h b/src/ephy-search-provider.h
+index 5ad7d92..74faac3 100644
+--- a/src/ephy-search-provider.h
++++ b/src/ephy-search-provider.h
+@@ -42,14 +42,6 @@ GType ephy_search_provider_get_type (void) G_GNUC_CONST;
+
+ EphySearchProvider *ephy_search_provider_new (void);
+
+-gboolean ephy_search_provider_dbus_register (EphySearchProvider *provider,
+- GDBusConnection *connection,
+- const char *object_path,
+- GError **error);
+-void ephy_search_provider_dbus_unregister (EphySearchProvider *provider,
+- GDBusConnection *connection,
+- const char *object_path);
+-
+ G_END_DECLS
+
+ #endif /* _EPHY_SEARCH_PROVIDER_H */
+diff --git a/src/ephy-shell.c b/src/ephy-shell.c
+index 4f182e7..3be7cf0 100644
+--- a/src/ephy-shell.c
++++ b/src/ephy-shell.c
+@@ -35,7 +35,6 @@
+ #include "ephy-lockdown.h"
+ #include "ephy-prefs.h"
+ #include "ephy-private.h"
+-#include "ephy-search-provider.h"
+ #include "ephy-session.h"
+ #include "ephy-settings.h"
+ #include "ephy-type-builtins.h"
+@@ -54,7 +53,6 @@
+ #define EPHY_SHELL_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_SHELL, EphyShellPrivate))
+
+ struct _EphyShellPrivate {
+- EphySearchProvider *search_provider;
+ EphySession *session;
+ GList *windows;
+ GObject *lockdown;
+@@ -518,42 +516,6 @@ ephy_shell_constructed (GObject *object)
+ G_OBJECT_CLASS (ephy_shell_parent_class)->constructed (object);
+ }
+
+-static gboolean
+-ephy_shell_dbus_register (GApplication *application,
+- GDBusConnection *connection,
+- const gchar *object_path,
+- GError **error)
+-{
+- EphyShell *self;
+-
+- if (!G_APPLICATION_CLASS (ephy_shell_parent_class)->dbus_register (application,
+- connection,
+- object_path,
+- error))
+- return FALSE;
+-
+- self = EPHY_SHELL (application);
+-
+- return ephy_search_provider_dbus_register (self->priv->search_provider, connection,
+- object_path, error);
+-}
+-
+-static void
+-ephy_shell_dbus_unregister (GApplication *application,
+- GDBusConnection *connection,
+- const gchar *object_path)
+-{
+- EphyShell *self;
+-
+- self = EPHY_SHELL (application);
+- if (self->priv->search_provider)
+- ephy_search_provider_dbus_unregister (self->priv->search_provider, connection, object_path);
+-
+- G_APPLICATION_CLASS (ephy_shell_parent_class)->dbus_unregister (application,
+- connection,
+- object_path);
+-}
+-
+ static void
+ ephy_shell_class_init (EphyShellClass *klass)
+ {
+@@ -568,8 +530,6 @@ ephy_shell_class_init (EphyShellClass *klass)
+ application_class->activate = ephy_shell_activate;
+ application_class->before_emit = ephy_shell_before_emit;
+ application_class->add_platform_data = ephy_shell_add_platform_data;
+- application_class->dbus_register = ephy_shell_dbus_register;
+- application_class->dbus_unregister = ephy_shell_dbus_unregister;
+
+ g_type_class_add_private (object_class, sizeof(EphyShellPrivate));
+ }
+@@ -644,10 +604,6 @@ ephy_shell_init (EphyShell *shell)
+
+ webkit_web_context_set_favicon_database_directory (web_context, favicon_db_path);
+ g_free (favicon_db_path);
+-
+- shell->priv->search_provider = ephy_search_provider_new ();
+-
+- g_application_set_inactivity_timeout (G_APPLICATION (shell), 60 * 1000);
+ }
+
+ static void
+@@ -657,7 +613,6 @@ ephy_shell_dispose (GObject *object)
+
+ LOG ("EphyShell disposing");
+
+- g_clear_object (&priv->search_provider);
+ g_clear_object (&priv->session);
+ g_clear_object (&priv->lockdown);
+ g_clear_pointer (&priv->bme, gtk_widget_destroy);
+@@ -1169,9 +1124,6 @@ ephy_shell_open_uris_idle (OpenURIsData *data)
+ const char *url;
+ WebKitURIRequest *request = NULL;
+
+- if (!data->window && !data->flags)
+- return FALSE;
+-
+ url = data->uris[data->current_uri];
+ if (url[0] == '\0') {
+ page_flags = EPHY_NEW_TAB_HOME_PAGE;
+--
+cgit v0.10.1
+
diff --git a/0005-search-provider-causing-problems.patch b/0005-search-provider-causing-problems.patch
new file mode 100644
index 0000000..7a9d081
--- /dev/null
+++ b/0005-search-provider-causing-problems.patch
@@ -0,0 +1,128 @@
+From 480634f1262d6be652746e98e0caaf7d974220bd Mon Sep 17 00:00:00 2001
+From: Carlos Garcia Campos <cgarcia at igalia.com>
+Date: Mon, 9 Dec 2013 21:05:01 +0100
+Subject: Remove the headless mode
+
+We don't need it anymore now that the search provider is in its own
+binary
+
+diff --git a/src/ephy-main.c b/src/ephy-main.c
+index 0347a57..96ac40b 100644
+--- a/src/ephy-main.c
++++ b/src/ephy-main.c
+@@ -56,7 +56,6 @@ static char *application_to_delete = NULL;
+ static gboolean private_instance = FALSE;
+ static gboolean incognito_mode = FALSE;
+ static gboolean application_mode = FALSE;
+-static gboolean headless_mode = FALSE;
+ static char *profile_directory = NULL;
+
+ static gboolean
+@@ -91,8 +90,6 @@ static const GOptionEntry option_entries[] =
+ N_("Start an instance in netbank mode"), NULL },
+ { "application-mode", 'a', 0, G_OPTION_ARG_NONE, &application_mode,
+ N_("Start the browser in application mode"), NULL },
+- { "headless-mode", 0, 0, G_OPTION_ARG_NONE, &headless_mode,
+- N_("Start the application without opening windows"), NULL },
+ { "profile", 0, 0, G_OPTION_ARG_STRING, &profile_directory,
+ N_("Profile directory to use in the private instance"), N_("DIR") },
+ { G_OPTION_REMAINING, '\0', 0, G_OPTION_ARG_FILENAME_ARRAY, &arguments,
+@@ -217,9 +214,6 @@ get_startup_flags (void)
+ {
+ EphyStartupFlags flags = 0;
+
+- if (headless_mode)
+- return EPHY_STARTUP_OPEN_NOTHING;
+-
+ if (open_in_new_tab)
+ flags |= EPHY_STARTUP_NEW_TAB;
+ if (open_in_new_window)
+diff --git a/src/ephy-session.c b/src/ephy-session.c
+index 3efbc22..3ab0df8 100644
+--- a/src/ephy-session.c
++++ b/src/ephy-session.c
+@@ -1561,7 +1561,7 @@ ephy_session_resume (EphySession *session,
+ return;
+ }
+
+- g_task_return_boolean (task, FALSE);
++ g_task_return_boolean (task, TRUE);
+ g_object_unref (task);
+ }
+
+diff --git a/src/ephy-shell.c b/src/ephy-shell.c
+index 3be7cf0..4455ebc 100644
+--- a/src/ephy-shell.c
++++ b/src/ephy-shell.c
+@@ -286,23 +286,7 @@ session_load_cb (GObject *object,
+ EphySession *session = EPHY_SESSION (object);
+ EphyShell *shell = EPHY_SHELL (user_data);
+
+- if (ephy_session_resume_finish (session, result, NULL))
+- shell->priv->startup_context->startup_flags |= EPHY_STARTUP_RESUMING_SESSION;
+-
+- ephy_shell_startup_continue (shell);
+-}
+-
+-static void
+-ephy_shell_start_headless (EphyShell *shell)
+-{
+- /* A bit of a hack: because we don't pass IS_SERVICE to GApplication
+- (because otherwise we would need a separate launcher binary), we
+- don't get the 10 seconds timeout for the first DBus call.
+- So just hold/release to get the inactivity timeout started instead.
+- */
+-
+- g_application_hold (G_APPLICATION (shell));
+- g_application_release (G_APPLICATION (shell));
++ ephy_session_resume_finish (session, result, NULL);
+ ephy_shell_startup_continue (shell);
+ }
+
+@@ -313,18 +297,14 @@ ephy_shell_activate (GApplication *application)
+
+ /*
+ * We get here on each new instance (remote or not). Autoresume the
+- * session unless we are in application or headless mode and queue the
+- * commands.
++ * session unless we are in application mode and queue the commands.
+ */
+ if (ephy_embed_shell_get_mode (EPHY_EMBED_SHELL (shell)) != EPHY_EMBED_SHELL_MODE_APPLICATION) {
+ EphyShellStartupContext *ctx;
+
+ ctx = shell->priv->startup_context;
+- if (ctx->startup_flags != EPHY_STARTUP_OPEN_NOTHING) {
+- ephy_session_resume (ephy_shell_get_session (shell),
+- ctx->user_time, NULL, session_load_cb, shell);
+- } else
+- ephy_shell_start_headless (shell);
++ ephy_session_resume (ephy_shell_get_session (shell),
++ ctx->user_time, NULL, session_load_cb, shell);
+ } else
+ ephy_shell_startup_continue (shell);
+ }
+@@ -1096,7 +1076,7 @@ open_uris_data_new (EphyShell *shell,
+ data->flags |= EPHY_NEW_TAB_IN_NEW_WINDOW;
+ } else if (startup_flags & EPHY_STARTUP_NEW_TAB || (new_windows_in_tabs && have_uris)) {
+ data->flags |= EPHY_NEW_TAB_IN_EXISTING_WINDOW | EPHY_NEW_TAB_JUMP | EPHY_NEW_TAB_PRESENT_WINDOW | EPHY_NEW_TAB_FROM_EXTERNAL;
+- } else if (!have_uris && !(startup_flags & EPHY_STARTUP_RESUMING_SESSION)) {
++ } else if (!have_uris) {
+ data->window = NULL;
+ data->flags |= EPHY_NEW_TAB_IN_NEW_WINDOW;
+ }
+diff --git a/src/ephy-shell.h b/src/ephy-shell.h
+index 404fcb8..8aa3294 100644
+--- a/src/ephy-shell.h
++++ b/src/ephy-shell.h
+@@ -109,8 +109,6 @@ typedef enum {
+ typedef enum {
+ EPHY_STARTUP_NEW_TAB = 1 << 0,
+ EPHY_STARTUP_NEW_WINDOW = 1 << 1,
+- EPHY_STARTUP_OPEN_NOTHING = 1 << 2,
+- EPHY_STARTUP_RESUMING_SESSION = 1 << 3,
+ } EphyStartupFlags;
+
+ typedef struct {
+--
+cgit v0.10.1
+
diff --git a/0006-search-provider-causing-problems.patch b/0006-search-provider-causing-problems.patch
new file mode 100644
index 0000000..7ef4f09
--- /dev/null
+++ b/0006-search-provider-causing-problems.patch
@@ -0,0 +1,43 @@
+From 8415282998dea92b550943321c1f6c5b01f77040 Mon Sep 17 00:00:00 2001
+From: Claudio Saavedra <csaavedra at igalia.com>
+Date: Fri, 20 Dec 2013 16:58:38 +0200
+Subject: ephy-history-service: fix race-condition
+
+Database shouldn't be accessed from the main thread.
+
+diff --git a/lib/history/ephy-history-service.c b/lib/history/ephy-history-service.c
+index af4a238..7ae37e3 100644
+--- a/lib/history/ephy-history-service.c
++++ b/lib/history/ephy-history-service.c
+@@ -347,15 +347,7 @@ ephy_history_service_send_message (EphyHistoryService *self, EphyHistoryServiceM
+ {
+ EphyHistoryServicePrivate *priv = self->priv;
+
+- if (priv->history_database)
+- g_async_queue_push_sorted (priv->queue, message, (GCompareDataFunc)sort_messages, NULL);
+- else {
+- message->result = NULL;
+- message->success = FALSE;
+- if (message->callback)
+- message->callback (message->service, message->success, message->result, message->user_data);
+- ephy_history_service_message_free (message);
+- }
++ g_async_queue_push_sorted (priv->queue, message, (GCompareDataFunc)sort_messages, NULL);
+ }
+
+ static void
+@@ -1282,7 +1274,10 @@ ephy_history_service_process_message (EphyHistoryService *self,
+
+ method = methods[message->type];
+ message->result = NULL;
+- message->success = method (message->service, message->method_argument, &message->result);
++ if (message->service->priv->history_database)
++ message->success = method (message->service, message->method_argument, &message->result);
++ else
++ message->success = FALSE;
+
+ if (message->callback || message->type == CLEAR)
+ g_idle_add ((GSourceFunc)ephy_history_service_execute_job_callback, message);
+--
+cgit v0.10.1
+
diff --git a/epiphany-fix-adblock.patch b/epiphany-fix-adblock.patch
new file mode 100644
index 0000000..703d2d1
--- /dev/null
+++ b/epiphany-fix-adblock.patch
@@ -0,0 +1,50 @@
+From 7d6d68d0fecf3c999a8d897505b1e418ad868f7c Mon Sep 17 00:00:00 2001
+From: Michael Catanzaro <mcatanzaro at igalia.com>
+Date: Thu, 21 Aug 2014 17:52:28 -0500
+Subject: [PATCH] Don't accidentally delete adblock filters
+
+The uri-tester is created from the web extension. When created, it opens
+~/.config/epiphany/adblock/filters.list for reading in
+uri_tester_load_filters(), then calls uri_tester_set_filters() with the
+read filters. uri_tester_set_filters() unconditionally calls
+uri_tester_save_filters(), so we immediately write back what we read to
+filters.list. But this is racy: if you are starting multiple web
+processes at the same time, such as when opening epiphany with multiple
+saved tabs, then one process may open the file for reading after another
+has opened it for writing (which clears the file) but before the filters
+have been written back to the file, so now one UriTester instance has an
+empty list of filters, and it will immediately write back that empty list.
+
+The original list is completely doomed because the only time we ever
+write to filters.list is immediately after the filters are read, since
+we do not support modifying filters. That's right, these writes are
+NEVER necessary, so let's just remove them completely so we can be
+completely sure the problem is gone.
+
+Now we have an ununsued uri_tester_save_filters() function, but I don't
+want to get rid of it quite yet as I do want to support at least a
+couple different types of filters in the future (for tracking
+protection). Also, there are already other unused functions here as
+well, so one more is no difference for now, but refactor is imminent.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=697329
+---
+ embed/uri-tester.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/embed/uri-tester.c b/embed/uri-tester.c
+index eebd7b6..7c3944c 100644
+--- a/embed/uri-tester.c
++++ b/embed/uri-tester.c
+@@ -934,9 +934,7 @@ uri_tester_set_filters (UriTester *tester, GSList *filters)
+ g_slist_free (priv->filters);
+ }
+
+- /* Update private variable and save to disk. */
+ priv->filters = filters;
+- uri_tester_save_filters (tester);
+ }
+
+ GSList *
+--
+1.9.3
diff --git a/epiphany-overaggressive-adblock.patch b/epiphany-overaggressive-adblock.patch
new file mode 100644
index 0000000..96fcb47
--- /dev/null
+++ b/epiphany-overaggressive-adblock.patch
@@ -0,0 +1,27 @@
+From bb3fbbdd6798d22ba515dc9332b24d87e0fd26a1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= <fpeters at 0d.be>
+Date: Fri, 3 Jan 2014 20:29:03 +0100
+Subject: [PATCH] uri-tester: do not block on rules we do not handle
+
+https://bugzilla.gnome.org/show_bug.cgi?id=711124
+---
+ embed/uri-tester.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/embed/uri-tester.c b/embed/uri-tester.c
+index 5c4d470..ab701c4 100644
+--- a/embed/uri-tester.c
++++ b/embed/uri-tester.c
+@@ -665,6 +665,9 @@ uri_tester_parse_line (UriTester *tester, char *line)
+ /* FIXME: No support for [include] and [exclude] tags */
+ if (line[0] == '[')
+ return NULL;
++ /* FIXME: No support for domain= */
++ if (strstr (line, "domain="))
++ return NULL;
+
+ /* Skip garbage */
+ if (line[0] == ' ' || !line[0])
+--
+1.8.5.2
+
diff --git a/epiphany-use-https-duckduckgo.patch b/epiphany-use-https-duckduckgo.patch
new file mode 100644
index 0000000..20decfc
--- /dev/null
+++ b/epiphany-use-https-duckduckgo.patch
@@ -0,0 +1,100 @@
+From d065c0e8b0cde10044ea21b13e6356be1af31d69 Mon Sep 17 00:00:00 2001
+From: Michael Catanzaro <mcatanzaro at igalia.com>
+Date: Fri, 22 Aug 2014 23:14:42 -0500
+Subject: [PATCH] Default to HTTPS when searching DuckDuckGo
+
+DDG will redirect us to the HTTPS site anyway, but this prevents us from
+leaking search terms to passive adversaries.
+
+This intentionally breaks region-specific results on DuckDuckGo, but
+probably users will prefer actually private searches, and DDG lets you
+set a region with cookies anyway.
+---
+ data/default-bookmarks.rdf.in | 12 ++++++------
+ data/org.gnome.epiphany.gschema.xml | 2 +-
+ embed/ephy-web-view.c | 2 +-
+ src/ephy-search-provider.c | 2 +-
+ 4 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/data/default-bookmarks.rdf.in b/data/default-bookmarks.rdf.in
+index 2f2b7a3..f882b00 100644
+--- a/data/default-bookmarks.rdf.in
++++ b/data/default-bookmarks.rdf.in
+@@ -5,11 +5,11 @@
+ <link>http://www.gnome.org/projects/epiphany/</link>
+ <items>
+ <rdf:Seq>
+- <rdf:li rdf:resource="http://duckduckgo.com"/>
++ <rdf:li rdf:resource="https://duckduckgo.com"/>
+ </rdf:Seq>
+ </items>
+ </channel>
+- <item rdf:about="http://duckduckgo.com">
++ <item rdf:about="https://duckduckgo.com">
+ <_title>Search the web</_title>
+ <!-- Translators: you can use the regions listed in
+ https://duckduckgo.com/params to boost a particular region
+@@ -20,9 +20,9 @@
+ duckduckgo must be translated. So, for a Finnish localized
+ version of duckduckgo that will render results tailored for
+ Finland, the string would be:
+- http://duckduckgo.com/?t=epiphany&kl=fi-fi&kad=fi_FI
++ https://duckduckgo.com/?t=epiphany&kl=fi-fi&kad=fi_FI
+ -->
+- <_link>http://duckduckgo.com/?t=epiphany</_link>
++ <_link>https://duckduckgo.com/?t=epiphany</_link>
+ <!-- Translators: you can use the regions listed in
+ https://duckduckgo.com/params to boost a particular region
+ associated with your language. For instance, for translators
+@@ -31,7 +31,7 @@
+ 'kad' parameter can be used to specify the locale in which
+ duckduckgo must be translated. For such case, the search url
+ would be
+- http://duckduckgo.com/?q=%s&t=epiphany&kl=fi-fi&kad=fi_FI -->
+- <_ephy:smartlink>http://duckduckgo.com/?q=%s&t=epiphany</_ephy:smartlink>
++ https://duckduckgo.com/?q=%s&t=epiphany&kl=fi-fi&kad=fi_FI -->
++ <_ephy:smartlink>https://duckduckgo.com/?q=%s&t=epiphany</_ephy:smartlink>
+ </item>
+ </rdf:RDF>
+diff --git a/data/org.gnome.epiphany.gschema.xml b/data/org.gnome.epiphany.gschema.xml
+index 45b9cbf..d367012 100644
+--- a/data/org.gnome.epiphany.gschema.xml
++++ b/data/org.gnome.epiphany.gschema.xml
+@@ -10,7 +10,7 @@
+ <summary>Browse with caret</summary>
+ </key>
+ <key type="s" name="keyword-search-url">
+- <default>'http://duckduckgo.com/?q=%s&t=epiphany'</default>
++ <default>'https://duckduckgo.com/?q=%s&t=epiphany'</default>
+ <summary>URL Search</summary>
+ <description>Search string for keywords entered in the URL bar.</description>
+ </key>
+diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
+index d4be61e..1620062 100644
+--- a/embed/ephy-web-view.c
++++ b/embed/ephy-web-view.c
+@@ -2062,7 +2062,7 @@ ephy_web_view_normalize_or_autosearch_url (EphyWebView *view, const char *url)
+ if (url_search == NULL || url_search[0] == '\0') {
+ g_free (url_search);
+
+- url_search = g_strdup (_("http://duckduckgo.com/?q=%s&t=epiphany"));
++ url_search = g_strdup (_("https://duckduckgo.com/?q=%s&t=epiphany"));
+ }
+
+ query_param = soup_form_encode ("q", url, NULL);
+diff --git a/src/ephy-search-provider.c b/src/ephy-search-provider.c
+index cbdba11..4f3e4bf 100644
+--- a/src/ephy-search-provider.c
++++ b/src/ephy-search-provider.c
+@@ -287,7 +287,7 @@ launch_search (EphySearchProvider *self,
+ if (url_search == NULL || url_search[0] == '\0') {
+ g_free (url_search);
+
+- url_search = g_strdup (_("http://duckduckgo.com/?q=%s&t=epiphany"));
++ url_search = g_strdup (_("https://duckduckgo.com/?q=%s&t=epiphany"));
+ }
+
+ search_string = g_strjoinv (" ", terms);
+--
+1.9.3
+
diff --git a/epiphany.spec b/epiphany.spec
index ed630a9..68192cf 100644
--- a/epiphany.spec
+++ b/epiphany.spec
@@ -2,7 +2,7 @@ Summary: Web browser for GNOME
Name: epiphany
Epoch: 1
Version: 3.10.3
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2+ and GFDL
Group: Applications/Internet
URL: https://wiki.gnome.org/Apps/Web
@@ -46,6 +46,17 @@ Obsoletes: epiphany-devel < 1:3.7.90
# Patches
Patch2: epiphany-default-bookmarks.patch
Patch3: 0001-Fix-bookmark-importing.patch
+Patch4: epiphany-overaggressive-adblock.patch
+Patch5: epiphany-fix-adblock.patch
+Patch6: epiphany-use-https-duckduckgo.patch
+Patch7: 0001-close-tab-created-for-download.patch
+Patch8: 0002-close-tab-created-for-download.patch
+Patch9: 0001-search-provider-causing-problems.patch
+Patch10: 0002-search-provider-causing-problems.patch
+Patch11: 0003-search-provider-causing-problems.patch
+Patch12: 0004-search-provider-causing-problems.patch
+Patch13: 0005-search-provider-causing-problems.patch
+Patch14: 0006-search-provider-causing-problems.patch
%description
Epiphany is the web browser for the GNOME desktop. Its goal is to be
@@ -56,9 +67,30 @@ application.
%prep
%setup -q
-
+# Temporary, to avoid rebasing patch12
+%global _default_patch_fuzz 3
+# Fedora bookmarks
%patch2 -p1 -b .default-bookmarks
+# https://bugzilla.gnome.org/show_bug.cgi?id=719821
%patch3 -p1 -b .import-bookmarks
+# https://bugzilla.gnome.org/show_bug.cgi?id=711124
+%patch4 -p1 -b .overaggressive-adblock
+# https://bugzilla.gnome.org/show_bug.cgi?id=697329
+%patch5 -p1 -b .fix-adblock
+# Fixed upstream, but that patch doesn't apply
+%patch6 -p1 -b .use-https-duckduckgo
+# https://bugzilla.gnome.org/show_bug.cgi?id=607233
+%patch7 -p1 -b .1-close-tab-created-for-download
+%patch8 -p1 -b .2-close-tab-created-for-download
+# https://bugzilla.gnome.org/show_bug.cgi?id=711409
+# Caused multiple crashes, the window sometimes not
+# opening, and the window often opening twice
+%patch9 -p1 -b .1-search-provider-causing-problems.patch
+%patch10 -p1 -b .2-search-provider-causing-problems.patch
+%patch11 -p1 -b .3-search-provider-causing-problems.patch
+%patch12 -p1 -b .4-search-provider-causing-problems.patch
+%patch13 -p1 -b .5-search-provider-causing-problems.patch
+%patch14 -p1 -b .6-search-provider-causing-problems.patch
# Fedora Epiphany version
cat >> data/default-prefs-common.js << EOF
@@ -67,6 +99,8 @@ pref("general.useragent.vendorSub", "%{version}-%{release}");
EOF
%build
+# autoreconf needed for search-provider-causing-problems.patch series
+autoreconf -vfi
%configure --with-distributor-name=Fedora
make %{?_smp_mflags}
@@ -100,6 +134,7 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
%{_bindir}/epiphany
%{_bindir}/ephy-profile-migrator
%{_libdir}/epiphany/
+%{_libexecdir}/epiphany-search-provider
%dir %{_datadir}/appdata/
%{_datadir}/appdata/epiphany.appdata.xml
%{_datadir}/applications/epiphany.desktop
@@ -112,6 +147,14 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
%changelog
+* Fri Aug 22 2014 Michael Catanzaro <mcatanzaro at gnome.org> - 1:3.10.3-3
+- Add epiphany-fix-adblock.patch
+- Add epiphany-overaggressive-adblock.patch
+- Add epiphany-use-https-duckduckgo.patch
+- Add close-tab-created-for-download patch series
+- Add search-provider-causing-problems patch series, splitting the
+ search provider into a separate binary. Update filelist.
+
* Mon Jun 23 2014 Debarshi Ray <rishi at fedoraproject.org> - 1:3.10.3-2
- Fix bookmark importing (GNOME #719821)
More information about the scm-commits
mailing list