patch to fix #335625 (gtkhtml) : keyboard navigation perform the wrong order

Li Yuan <[email protected]>
Newsgroups gmane.comp.gnome.evolution.patches
Message-ID <[email protected]>
Hi,

When user press "tab" to navigate the attached web page, gtkhtml will
omit the 2nd link in the table. With my patch, the order will be
corrected.
Please see bug: http://bugzilla.gnome.org/show_bug.cgi?id=335625

Regards,
Li

_______________________________________________
Evolution-patches mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/evolution-patches
apr11_335625.diff (text/x-patch, 1.2 KB)
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/ChangeLog,v
retrieving revision 1.2174
diff -u -r1.2174 ChangeLog
--- ChangeLog	5 Apr 2006 10:37:26 -0000	1.2174
+++ ChangeLog	11 Apr 2006 06:29:02 -0000
@@ -1,3 +1,11 @@
+2006-04-11  Li Yuan <[email protected]>
+
+	* htmlobject.c: (move_object_downtree_cursor):
+	The second htmlobject in a clue could be a clue too, so we need
+	a recursive function.
+
+	Fixes bug #335625.
+
 2006-04-05  Jeff Cai <[email protected]>
 
 	* htmlengine-edit-cut-and-paste.c: (remove_empty_and_merge):
Index: htmlobject.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmlobject.c,v
retrieving revision 1.191
diff -u -r1.191 htmlobject.c
--- htmlobject.c	31 Mar 2005 12:44:42 -0000	1.191
+++ htmlobject.c	11 Apr 2006 06:29:02 -0000
@@ -1672,9 +1672,14 @@
 	if (!obj && last_obj) {
 		obj = last_obj;
 
-		while ((obj = (*next_fn) (obj)))
+		while ((obj = (*next_fn) (obj))) {
 			if (html_object_accepts_cursor (obj))
 				break;
+			last_obj = obj;
+			if (obj = move_object_downtree_cursor (obj, down_fn, next_fn))
+				break;
+			obj = last_obj;
+		}
 	}
 
 	return obj;
test10.html (text/html, 644 B)
<html>
<head>
<title>Test 6</title>
</head>

<body>
<h1>Example 6: Table Stress Test</h1>

<br>
<h2><a href="www.gnome.org">title link</a>Auto-width tables with spans nested 8 levels deep</h2>
<hr>
<table border=1 bgcolor=lightgreen>
<TR><TD><a href="www.gnome.org">Cell</a></TD><TD COLSPAN=2 ROWSPAN=2></TD></TR>
<TR><TD><a name="New">new</a><a href="www.gnome.org">Cell</a></TD></TR>
<TR><TD><a href="www.gnome.org">Cell</a></TD><TD> <a href="#New">Cell</a>, and stuff to test out table cell layout. This should be long  enough for testing.</TD><TD><a href="www.gnome.org">Cell</a><a name="New1">new1</a></TD></TR>
</table>

</body>
</html>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.