[evolution-patches] iframe selection fixes.
- From: Larry Ewing <lewing ximian com>
- To: Radek Doulik <rodo ximian com>, patches <evolution-patches ximian com>
- Subject: [evolution-patches] iframe selection fixes.
- Date: 15 Apr 2003 01:19:36 -0500
This fixes #39754 and makes selection redraw pretty, and fast.
Animations should be faster now too, especially offscreen ones.
http://bugzilla.ximian.com/show_bug.cgi?id=36953
--Larry
Index: htmliframe.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmliframe.c,v
retrieving revision 1.72
diff -u -p -r1.72 htmliframe.c
--- htmliframe.c 19 Mar 2003 21:50:03 -0000 1.72
+++ htmliframe.c 15 Apr 2003 06:13:35 -0000
@@ -349,6 +349,8 @@ calc_size (HTMLObject *o, HTMLPainter *p
html_iframe_set_scrolling (iframe, GTK_POLICY_NEVER);
+ e->width = width;
+ e->height = height;
o->width = width;
o->ascent = height;
o->descent = 0;
Index: htmlengine.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmlengine.c,v
retrieving revision 1.534
diff -u -p -r1.534 htmlengine.c
--- htmlengine.c 9 Apr 2003 23:54:50 -0000 1.534
+++ htmlengine.c 15 Apr 2003 06:13:37 -0000
@@ -4786,20 +4786,52 @@ html_engine_freeze (HTMLEngine *engine)
engine->freeze_count++;
}
+static void
+html_engine_get_viewport (HTMLEngine *e, GdkRectangle *viewport)
+{
+ viewport->x = e->x_offset;
+ viewport->y = e->y_offset;
+ viewport->width = e->width;
+ viewport->height = e->height;
+}
+
gboolean
html_engine_intersection (HTMLEngine *e, gint *x1, gint *y1, gint *x2, gint *y2)
{
- if (*x2 < e->x_offset || *y2 < e->y_offset || *x1 > e->x_offset + e->width || *y1 > e->y_offset + e->height)
+ HTMLEngine *top = html_engine_get_top_html_engine (e);
+ GdkRectangle draw;
+ GdkRectangle clip;
+ GdkRectangle paint;
+
+ html_engine_get_viewport (e, &clip);
+
+ if (e != top) {
+ GdkRectangle top_clip;
+ gint abs_x = 0, abs_y = 0;
+
+ html_object_calc_abs_position (e->clue->parent, &abs_x, &abs_y);
+ abs_y -= e->clue->parent->ascent;
+
+ html_engine_get_viewport (top, &top_clip);
+ top_clip.x -= abs_x;
+ top_clip.y -= abs_y;
+
+ if (!gdk_rectangle_intersect (&clip, &top_clip, &clip))
+ return FALSE;
+ }
+
+ draw.x = *x1;
+ draw.y = *y1;
+ draw.width = *x2 - *x1;
+ draw.height = *y2 - *y1;
+
+ if (!gdk_rectangle_intersect (&clip, &draw, &paint))
return FALSE;
- if (*x1 < e->x_offset)
- *x1 = e->x_offset;
- if (*y1 < e->y_offset)
- *y1 = e->y_offset;
- if (*x2 > e->x_offset + e->width)
- *x2 = e->x_offset + e->width;
- if (*y2 > e->y_offset + e->height)
- *y2 = e->y_offset + e->height;
+ *x1 = paint.x;
+ *x2 = paint.x + paint.width;
+ *y1 = paint.y;
+ *y2 = paint.y + paint.height;
return TRUE;
}
+++ ChangeLog 15 Apr 2003 06:13:43 -0000
@@ -1,3 +1,23 @@
+2003-04-15 Larry Ewing <lewing ximian com>
+
+ * htmliframe.c (calc_size): let the engine know what size we
+ decided it was (for later clipping).
+
+ * htmlengine.c (html_engine_intersection): clip to the top iframe
+ always.
+ (html_engine_get_viewport): simple helper function.
+
+2003-04-14 Larry Ewing <lewing ximian com>
+
+ * htmlengine.c (thaw_idle): fix the area passed to the cleanup
+ function.
+ (clear_changed_area): pass the correct extents to
+ ::draw_background.
+
+ * htmldrawqueue.c (clear): pass the correct extents to
+ draw_background.
+ (draw_obj): the same.
+
2003-04-09 Larry Ewing <lewing ximian com>
* htmlengine.c (html_engine_finalize): remove any pending
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]