From 15484b8c50f836a51484e1228e509ff03f39d935 Mon Sep 17 00:00:00 2001 From: Chris Lord Date: Fri, 24 Mar 2006 14:29:37 +0000 Subject: Update gtkhtml2 and Web packages git-svn-id: https://svn.o-hand.com/repos/poky/trunk@338 311d38ba-8fff-0310-9ca6-ca027cbcb966 --- .../gtkhtml2/files/fix-infinite-loop.patch | 91 ---------------------- 1 file changed, 91 deletions(-) delete mode 100644 openembedded/packages/gtkhtml2/files/fix-infinite-loop.patch (limited to 'openembedded/packages/gtkhtml2/files/fix-infinite-loop.patch') diff --git a/openembedded/packages/gtkhtml2/files/fix-infinite-loop.patch b/openembedded/packages/gtkhtml2/files/fix-infinite-loop.patch deleted file mode 100644 index c2f36daf8..000000000 --- a/openembedded/packages/gtkhtml2/files/fix-infinite-loop.patch +++ /dev/null @@ -1,91 +0,0 @@ -Index: libgtkhtml/layout/htmlbox.c -=================================================================== ---- libgtkhtml/layout/htmlbox.c.orig 2006-02-08 23:43:30.000000000 +0000 -+++ libgtkhtml/layout/htmlbox.c 2006-02-11 04:49:55.000000000 +0000 -@@ -873,26 +873,21 @@ html_box_check_min_max_width_height (Htm - *boxheight = html_length_get_value (&HTML_BOX_GET_STYLE (self)->box->max_height, 0); - } - -- /* Maintain aspect ratio if it's an image - bias towards making image smaller */ -+ /* Maintain aspect ratio if it's an image */ - if (HTML_IS_BOX_IMAGE (self)) { - if ((*boxwidth > old_width) && (*boxheight >= old_height)) { - *boxheight = *boxheight * (gdouble)(*boxwidth / (gdouble)old_width); -- html_box_check_min_max_width_height (self, boxwidth, boxheight); - return; - } -- -- if ((*boxheight > old_height) && (*boxwidth >= old_width)) { -+ else if ((*boxheight > old_height) && (*boxwidth >= old_width)) { - *boxwidth = *boxwidth * (gdouble)(*boxheight / (gdouble)old_height); -- html_box_check_min_max_width_height (self, boxwidth, boxheight); - return; - } -- -- if ((*boxwidth < old_width) && (*boxheight <= old_height)) { -+ else if ((*boxwidth < old_width) && (*boxheight <= old_height)) { - *boxheight = *boxheight * (gdouble)(*boxwidth / (gdouble)old_width); - return; - } -- -- if ((*boxheight < old_height) && (*boxwidth <= old_width)) { -+ else if ((*boxheight < old_height) && (*boxwidth <= old_width)) { - *boxwidth = *boxwidth * (gdouble)(*boxheight / (gdouble)old_height); - return; - } -Index: libgtkhtml/layout/html/htmlboximage.c -=================================================================== ---- libgtkhtml/layout/html/htmlboximage.c.orig 2006-02-08 23:41:33.000000000 +0000 -+++ libgtkhtml/layout/html/htmlboximage.c 2006-02-11 05:01:36.000000000 +0000 -@@ -176,8 +176,26 @@ html_box_image_relayout (HtmlBox *box, H - - html_box_check_min_max_width_height (box, &width, &height); - -- if (old_width != width || old_height != height) -+ /* Guard against oscillation - When max-width/height alters the -+ * size of an image, the aspect ratio is maintained, but this -+ * can cause an infinite resizing loop as the size oscillates -+ * between two sizes that alternately require and don't -+ * require a scrollbar. -+ */ -+ if ((old_width != width || old_height != height) && (width != image->last_width[1] || height != image->last_height[1])) { - html_box_image_update_scaled_pixbuf (image, width, height); -+ image->last_width[1] = image->last_width[0]; -+ image->last_height[1] = image->last_height[0]; -+ image->last_width[0] = width; -+ image->last_height[0] = height; -+ } else { -+ image->last_width[1] = image->last_width[0]; -+ image->last_height[1] = image->last_height[0]; -+ image->last_width[0] = width; -+ image->last_height[0] = height; -+ width = old_width; -+ height = old_height; -+ } - } - else { - if (style->width.type != HTML_LENGTH_AUTO) -@@ -239,6 +257,10 @@ html_box_image_init (HtmlBoxImage *image - image->content_height = 20; - image->image = NULL; - image->scaled_pixbuf = NULL; -+ image->last_width[0] = 0; -+ image->last_height[0] = 0; -+ image->last_width[1] = 0; -+ image->last_height[1] = 0; - } - - GType -Index: libgtkhtml/layout/html/htmlboximage.h -=================================================================== ---- libgtkhtml/layout/html/htmlboximage.h.orig 2001-08-05 12:45:30.000000000 +0100 -+++ libgtkhtml/layout/html/htmlboximage.h 2006-02-11 04:40:44.000000000 +0000 -@@ -49,6 +49,8 @@ struct _HtmlBoxImage { - GdkPixbuf *scaled_pixbuf; - gboolean updated; - HtmlView *view; -+ -+ gint last_width[2], last_height[2]; - }; - - struct _HtmlBoxImageClass { -- cgit v1.2.3