[evolution-patches] The first patch, fix #70084



Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/ChangeLog,v
retrieving revision 1.2062
diff -u -p -r1.2062 ChangeLog
--- ChangeLog	6 Dec 2004 16:41:35 -0000	1.2062
+++ ChangeLog	14 Dec 2004 07:02:20 -0000
@@ -1,3 +1,13 @@
+2004-12-14  Mengjie Yu  <meng-jie yu sun com>
+
+	* htmlengine-edit-table.c: (delete_column_undo_action):
+	fix #70084 Before doing undo, we need move the cursor back 
+		   to original position.
+
+	* htmlinterval.c: (do_downtree_lines_intersection),
+	(html_interval_forall):
+	fix #70084 add more judgement to avoid crash.
+
 2004-09-29  Radek Doulik  <rodo ximian com>
 
 	* gtkhtml.c (drag_data_received): call gdk_window_get_pointer so
Index: htmlengine-edit-table.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmlengine-edit-table.c,v
retrieving revision 1.75
diff -u -p -r1.75 htmlengine-edit-table.c
--- htmlengine-edit-table.c	20 Apr 2004 09:57:06 -0000	1.75
+++ htmlengine-edit-table.c	14 Dec 2004 07:02:41 -0000
@@ -340,6 +340,7 @@ delete_column_undo_action (HTMLEngine *e
 	DeleteCellsUndo *data = (DeleteCellsUndo *) undo_data;
 	HTMLTable *table;
 
+	html_cursor_jump_to_position (e->cursor, e, position_after);
 	table = html_engine_get_table (e);
 	g_assert (data->size == table->totalRows);
 	html_table_insert_column (table, e, data->pos, data->cells, html_undo_direction_reverse (dir));
Index: htmlinterval.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmlinterval.c,v
retrieving revision 1.20
diff -u -p -r1.20 htmlinterval.c
--- htmlinterval.c	15 Oct 2003 14:42:23 -0000	1.20
+++ htmlinterval.c	14 Dec 2004 07:02:58 -0000
@@ -218,8 +218,6 @@ get_downtree_line (HTMLObject *o)
 static HTMLEngine *
 do_downtree_lines_intersection (GSList **l1, GSList **l2, HTMLEngine *e)
 {
-	g_assert ((*l1)->data == (*l2)->data);
-
 	while (*l1 && *l2 && (*l1)->data == (*l2)->data) {
 		e = html_object_get_engine (HTML_OBJECT ((*l1)->data), e);
 		*l1 = g_slist_remove_link (*l1, *l1);
@@ -292,14 +290,16 @@ html_interval_forall (HTMLInterval *i, H
 
 	from_downline = get_downtree_line (i->from.object);
 	to_downline   = get_downtree_line (i->to.object);
-	engine = do_downtree_lines_intersection  (&from_downline, &to_downline, e);
+	if (from_downline && to_downline) {
+		engine = do_downtree_lines_intersection  (&from_downline, &to_downline, e);
 
-	if (from_downline)
-		interval_forall    (HTML_OBJECT (from_downline->data)->parent, from_downline, to_downline,
-				    html_object_get_engine (HTML_OBJECT (from_downline->data)->parent, engine), f, data);
-	else {
-		g_assert (i->from.object == i->to.object);
-		html_object_forall (i->from.object, html_object_get_engine (i->from.object, engine), f, data);
+	if (from_downline && HTML_OBJECT (from_downline->data)->parent)
+			interval_forall    (HTML_OBJECT (from_downline->data)->parent, from_downline, to_downline,
+					    html_object_get_engine (HTML_OBJECT (from_downline->data)->parent, engine), f, data);
+		else {
+			if (i->from.object == i->to.object)
+				html_object_forall (i->from.object, html_object_get_engine (i->from.object, engine), f, data);
+		}
 	}
 
 	g_slist_free (from_downline);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]