Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/a11y/ChangeLog,v
retrieving revision 1.26
diff -u -p -r1.26 ChangeLog
--- ChangeLog	4 Aug 2005 09:19:07 -0000	1.26
+++ ChangeLog	10 Aug 2005 07:45:45 -0000
@@ -1,3 +1,13 @@
+2005-08-10  Mengjie Yu  <meng-jie.yu@sun.com>
+
+	* text.c: (html_a11y_text_get_run_attributes):
+	Use html_text_prepare_attrs to get the PangoAttrList of a htmltext instead of
+	getting it directly from the htmltext object structure. The former's pango
+	infomation is more sufficient than the latter, e.g. the color of the link text,
+	the size and weight of the HEADER text.
+
+	Fixes #312189
+
 2005-08-04  Mengjie Yu  <meng-jie.yu@sun.com>
 
 	* text.c: (atk_text_interface_init),
Index: text.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/a11y/text.c,v
retrieving revision 1.17
diff -u -p -r1.17 text.c
--- text.c	4 Aug 2005 09:19:07 -0000	1.17
+++ text.c	10 Aug 2005 07:45:46 -0000
@@ -738,14 +738,25 @@ html_a11y_text_get_run_attributes (AtkTe
 	glong len;
 	gchar *textstring;
 	AtkAttributeSet *attrib_set = NULL;
+	GtkHTMLA11Y *a11y;
+	GtkHTML *html;
+	HTMLEngine *e;
 	HTMLText *t = HTML_TEXT (HTML_A11Y_HTML (text));	
 	
 	g_return_val_if_fail (t, NULL);
-
 	textstring = t->text;
-	attr = t->attr_list;
+	g_return_val_if_fail (textstring, NULL);
+
+	a11y = html_a11y_get_top_gtkhtml_parent (HTML_A11Y (text));
+	g_return_val_if_fail (a11y, NULL);
+
+	html = GTK_HTML_A11Y_GTKHTML (a11y);
+	g_return_val_if_fail (html && GTK_IS_HTML(html) && html->engine, NULL);
+
+	e = html->engine;
+	attr = html_text_prepare_attrs (t, e->painter);
+	g_return_val_if_fail (attr, NULL);
 
-	g_return_val_if_fail (attr && textstring, NULL);
 
 	len = g_utf8_strlen (textstring, -1);
 	iter = pango_attr_list_get_iterator (attr);
@@ -875,6 +886,7 @@ html_a11y_text_get_run_attributes (AtkTe
 	} 
 
 	pango_attr_iterator_destroy (iter);
+	pango_attr_list_unref (attr);
 	return attrib_set;
 
 }
