From 7a981bb70a1f23fffe51b023add3322e8a59d716 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Mon, 8 Aug 2005 19:19:20 +0000 Subject: [project @ 2005-08-08 19:19:20 by bursa] Fix redraw of underlines and other text-decoration. svn path=/import/netsurf/; revision=1845 --- render/layout.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/render/layout.c b/render/layout.c index 6e0f68835..6201098b2 100644 --- a/render/layout.c +++ b/render/layout.c @@ -2382,6 +2382,38 @@ void layout_calculate_descendant_bboxes(struct box *box) return; } + if (box->type == BOX_INLINE || box->type == BOX_TEXT) + return; + + if (box->type == BOX_INLINE_END) { + box = box->inline_end; + for (child = box->next; + child && child != box->inline_end; + child = child->next) { + if (child->type == BOX_FLOAT_LEFT || + child->type == BOX_FLOAT_RIGHT) + continue; + + if (child->x + child->descendant_x0 - box->x < + box->descendant_x0) + box->descendant_x0 = child->x + + child->descendant_x0 - box->x; + if (box->descendant_x1 < child->x + + child->descendant_x1 - box->x) + box->descendant_x1 = child->x + + child->descendant_x1 - box->x; + if (child->y + child->descendant_y0 - box->y < + box->descendant_y0) + box->descendant_y0 = child->y + + child->descendant_y0 - box->y; + if (box->descendant_y1 < child->y + + child->descendant_y1 - box->y) + box->descendant_y1 = child->y + + child->descendant_y1 - box->y; + } + return; + } + for (child = box->children; child; child = child->next) { if (child->type == BOX_FLOAT_LEFT || child->type == BOX_FLOAT_RIGHT) -- cgit v1.2.3