diff options
author | James Bursa <james@netsurf-browser.org> | 2004-04-26 13:47:51 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2004-04-26 13:47:51 +0000 |
commit | 199eee4b0bc2d825d0b48fda3644e81712a2b892 (patch) | |
tree | a04d46eee99bdc1a88bc0d176f4d81e863389549 /render/html.c | |
parent | 330a3bb64c58ff12d8ac7d08de74f3064c670a75 (diff) | |
download | netsurf-199eee4b0bc2d825d0b48fda3644e81712a2b892.tar.gz netsurf-199eee4b0bc2d825d0b48fda3644e81712a2b892.tar.bz2 |
[project @ 2004-04-26 13:47:51 by bursa]
Fix scaled GIF animations.
svn path=/import/netsurf/; revision=805
Diffstat (limited to 'render/html.c')
-rw-r--r-- | render/html.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/render/html.c b/render/html.c index 9047e661f..376b42ddc 100644 --- a/render/html.c +++ b/render/html.c @@ -675,10 +675,22 @@ void html_object_callback(content_msg msg, struct content *object, case CONTENT_MSG_REDRAW: box_coords(box, &x, &y); - data.redraw.x += x; - data.redraw.y += y; - data.redraw.object_x += x; - data.redraw.object_y += y; + if (box->object == data.redraw.object) { + data.redraw.x = data.redraw.x * + box->width / box->object->width; + data.redraw.y = data.redraw.y * + box->height / box->object->height; + data.redraw.width = data.redraw.width * + box->width / box->object->width; + data.redraw.height = data.redraw.height * + box->height / box->object->height; + data.redraw.object_width = box->width; + data.redraw.object_height = box->height; + } + data.redraw.x += x + box->padding[LEFT]; + data.redraw.y += y + box->padding[TOP]; + data.redraw.object_x += x + box->padding[LEFT]; + data.redraw.object_y += y + box->padding[TOP]; content_broadcast(c, CONTENT_MSG_REDRAW, data); break; |