diff options
author | Chris Lord <chris@openedhand.com> | 2006-02-13 17:13:07 +0000 |
---|---|---|
committer | Chris Lord <chris@openedhand.com> | 2006-02-13 17:13:07 +0000 |
commit | deb4dd0de43dda3840d99fcc47156658938d421f (patch) | |
tree | 5b2f5713a806f31fc143e4fe1b1623003ff78fd3 /openembedded/packages/gtkhtml2/files/fix-infinite-loop.patch | |
parent | aaeed35c6102608d0b11896eef2c8b428b07e2ee (diff) | |
download | openembedded-core-deb4dd0de43dda3840d99fcc47156658938d421f.tar.gz openembedded-core-deb4dd0de43dda3840d99fcc47156658938d421f.tar.bz2 openembedded-core-deb4dd0de43dda3840d99fcc47156658938d421f.tar.xz openembedded-core-deb4dd0de43dda3840d99fcc47156658938d421f.zip |
Fix libcurl RPROVIDES, update gtkhtml2 patches and add web to oh-image
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@277 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'openembedded/packages/gtkhtml2/files/fix-infinite-loop.patch')
-rw-r--r-- | openembedded/packages/gtkhtml2/files/fix-infinite-loop.patch | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/openembedded/packages/gtkhtml2/files/fix-infinite-loop.patch b/openembedded/packages/gtkhtml2/files/fix-infinite-loop.patch new file mode 100644 index 000000000..c2f36daf8 --- /dev/null +++ b/openembedded/packages/gtkhtml2/files/fix-infinite-loop.patch @@ -0,0 +1,91 @@ +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 { |