--- /pkg/epiphany-git/bug-710542/embed/ephy-find-toolbar.c
+++ /pkg/epiphany-git/711668/src/ephy-find-toolbar.c
@@ -23,7 +23,7 @@
 #include "ephy-find-toolbar.h"
 
 #include "ephy-debug.h"
-#include "ephy-web-view.h"
+#include "ephy-embed-utils.h"
 
 #include <math.h>
 
@@ -41,6 +41,7 @@
 
 struct _EphyFindToolbarPrivate
 {
+	EphyWindow *window;
 	WebKitWebView *web_view;
 #ifdef HAVE_WEBKIT2
         WebKitFindController *controller;
@@ -61,7 +62,7 @@
 enum
 {
 	PROP_0,
-	PROP_WEB_VIEW
+	PROP_WINDOW
 };
 
 enum
@@ -145,7 +146,7 @@
 		case EPHY_FIND_RESULT_NOTFOUND:
 			icon_name = "face-uncertain-symbolic";
 			tooltip = _("Text not found");
-			gtk_widget_error_bell (GTK_WIDGET (toolbar));
+			gtk_widget_error_bell (GTK_WIDGET (priv->window));
 
 			break;
 		case EPHY_FIND_RESULT_FOUNDWRAPPED:
@@ -190,7 +191,7 @@
  * gtk_tree_view_real_start_interactive_seach()
  */
 static gboolean
-tab_search_key_press_cb (WebKitWebView *web_view,
+tab_search_key_press_cb (EphyEmbed *embed,
 			 GdkEventKey *event,
 			 EphyFindToolbar *toolbar)
 {
@@ -472,12 +473,12 @@
 }
 
 static void
-_ephy_find_toolbar_set_web_view (EphyFindToolbar *toolbar,
-				 WebKitWebView *web_view)
-{
-	EphyFindToolbarPrivate *priv = toolbar->priv;
-
-	priv->web_view = web_view;
+ephy_find_toolbar_set_window (EphyFindToolbar *toolbar,
+			      EphyWindow *window)
+{
+	EphyFindToolbarPrivate *priv = toolbar->priv;
+
+	priv->window = window;
 }
 
 static void
@@ -660,8 +661,8 @@
 
 	switch (prop_id)
 	{
-		case PROP_WEB_VIEW:
-			_ephy_find_toolbar_set_web_view (toolbar, (WebKitWebView *) g_value_get_object (value));
+		case PROP_WINDOW:
+			ephy_find_toolbar_set_window (toolbar, (EphyWindow *) g_value_get_object (value));
 			break;
 	}
 }
@@ -722,11 +723,11 @@
 
 	g_object_class_install_property
 		(object_class,
-		 PROP_WEB_VIEW,
-		 g_param_spec_object ("web-view",
-				      "WebView",
-				      "Parent web view",
-				      WEBKIT_TYPE_WEB_VIEW,
+		 PROP_WINDOW,
+		 g_param_spec_object ("window",
+				      "Window",
+				      "Parent window",
+				      EPHY_TYPE_WINDOW,
 				      (GParamFlags) (G_PARAM_WRITABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_CONSTRUCT_ONLY)));
 
 	g_type_class_add_private (klass, sizeof (EphyFindToolbarPrivate));
@@ -735,10 +736,10 @@
 /* public functions */
 
 EphyFindToolbar *
-ephy_find_toolbar_new (WebKitWebView *web_view)
+ephy_find_toolbar_new (EphyWindow *window)
 {
 	return g_object_new (EPHY_TYPE_FIND_TOOLBAR,
-			     "web-view", web_view,
+			     "window", window,
 			     NULL);
 }
 
@@ -751,10 +752,11 @@
 }
 
 void
-ephy_find_toolbar_set_web_view (EphyFindToolbar *toolbar,
-				WebKitWebView *web_view)
-{
-	EphyFindToolbarPrivate *priv = toolbar->priv;
+ephy_find_toolbar_set_embed (EphyFindToolbar *toolbar,
+			     EphyEmbed *embed)
+{
+	EphyFindToolbarPrivate *priv = toolbar->priv;
+	WebKitWebView *web_view = EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED(embed);
 
 	if (priv->web_view == web_view) return;
 
