Index: yelp-html.cpp
===================================================================
--- yelp-html.cpp	(revision 3170)
+++ yelp-html.cpp	(working copy)
@@ -375,6 +375,29 @@
 {
     debug_print (DB_FUNCTION, "entering\n");
     gtk_moz_embed_close_stream (GTK_MOZ_EMBED (html));
+
+    /* When Gecko accessibility module init, it will overwrite atk_class->get_root.
+     * But the top level accessible of yelp is not controlled by Gecko.
+     * So we need to restore the callback. See Bug #545162.
+     * It only need to do once.
+     * We do it here because Gecko a11y module inits when it is actually used,
+     * we call gtk_widget_get_accessible to pull the trigger. */
+
+    static gboolean gail_get_root_restored = FALSE;
+    if (!gail_get_root_restored) {
+	gail_get_root_restored = TRUE;
+	gpointer data;
+	data = g_type_class_peek (ATK_TYPE_UTIL);
+	if (data) {
+	    AtkUtilClass *atk_class;
+	    AtkObject * (*gail_get_root) (void);
+	    atk_class = ATK_UTIL_CLASS (data);
+	    gail_get_root = atk_class->get_root;
+	    gtk_widget_get_accessible (GTK_WIDGET (html));
+	    atk_class->get_root = gail_get_root;
+	}
+    }
+
     html->priv->timeout = g_timeout_add (2000, 
 					 (GSourceFunc) timeout_update_gok,
 					 html);
