yelp r3191 - in trunk: . src
- From: dscorgie svn gnome org
- To: svn-commits-list gnome org
- Subject: yelp r3191 - in trunk: . src
- Date: Thu, 11 Sep 2008 17:29:24 +0000 (UTC)
Author: dscorgie
Date: Thu Sep 11 17:29:24 2008
New Revision: 3191
URL: http://svn.gnome.org/viewvc/yelp?rev=3191&view=rev
Log:
* src/yelp-html.cpp:
Add workaround for Gecko 1.9 accessibility issue
bug #545162 - Ginn Chen
Modified:
trunk/ChangeLog
trunk/src/yelp-html.cpp
Modified: trunk/src/yelp-html.cpp
==============================================================================
--- trunk/src/yelp-html.cpp (original)
+++ trunk/src/yelp-html.cpp Thu Sep 11 17:29:24 2008
@@ -375,9 +375,38 @@
{
debug_print (DB_FUNCTION, "entering\n");
gtk_moz_embed_close_stream (GTK_MOZ_EMBED (html));
+
+#ifdef HAVE_GECKO_1_9
+ /* 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;
+ }
+ }
+
+#else /* All other gecko's need this timeout to update GOK accessible
+ * tree
+ */
html->priv->timeout = g_timeout_add (2000,
(GSourceFunc) timeout_update_gok,
html);
+#endif
}
gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]