summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDon Scorgie <dscorgie@src.gnome.org>2008-09-11 17:29:24 +0000
committerDon Scorgie <dscorgie@src.gnome.org>2008-09-11 17:29:24 +0000
commit3fe4cadf02f99c5ae577e1737f56d1cf80945e9b (patch)
tree192951f892205ec2b7e777fe0f6e8a2a7e03986f
parent506a1f88dfb077c1df9f1371a6a0c0b0946c1ef1 (diff)
downloadyelp-3fe4cadf02f99c5ae577e1737f56d1cf80945e9b.tar.gz
Add workaround for Gecko 1.9 accessibility issue bug #545162 - Ginn Chen
* src/yelp-html.cpp: Add workaround for Gecko 1.9 accessibility issue bug #545162 - Ginn Chen svn path=/trunk/; revision=3191
-rw-r--r--ChangeLog6
-rw-r--r--src/yelp-html.cpp29
2 files changed, 35 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index ef81a5a6..3e016c80 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-09-11 Don Scorgie <dscorgie@svn.gnome.org>
+
+ * src/yelp-html.cpp:
+ Add workaround for Gecko 1.9 accessibility issue
+ bug #545162 - Ginn Chen
+
== 2.23.91 ==
2008-09-01 Don Scorgie <dscorgie@svn.gnome.org>
diff --git a/src/yelp-html.cpp b/src/yelp-html.cpp
index deaf812f..f1af4fda 100644
--- a/src/yelp-html.cpp
+++ b/src/yelp-html.cpp
@@ -375,9 +375,38 @@ yelp_html_close (YelpHtml *html)
{
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