From eb613cfedd2a1578a87f0ec941af7646dec92a81 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 19 Jul 2008 17:07:20 +0000 Subject: BOX_TEXT only plotted with background when parent is BOX_INLINE. (Fix "Explore the BBC" button on BBC News etc.) svn path=/trunk/netsurf/; revision=4707 --- render/html_redraw.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/render/html_redraw.c b/render/html_redraw.c index 9edb5cbb7..e53e3346a 100644 --- a/render/html_redraw.c +++ b/render/html_redraw.c @@ -329,11 +329,15 @@ bool html_redraw_box(struct box *box, /* bg_box == NULL implies that this box should not have * its background rendered. Otherwise filter out linebreaks, - * optimize away non-differing inlines and ensure the bg_box + * optimize away non-differing inlines, only plot background + * for BOX_TEXT if parent is a BOX_INLINE and ensure the bg_box * has something worth rendering */ if (bg_box && (bg_box->style && bg_box->type != BOX_BR && (bg_box->type != BOX_INLINE || bg_box->style != bg_box->parent->parent->style)) && + (!bg_box->parent || !bg_box->parent->parent || + bg_box->type != BOX_TEXT || (bg_box->type == BOX_TEXT && + bg_box->parent->type == BOX_INLINE)) && ((bg_box->style->background_color != TRANSPARENT) || (bg_box->background))) { /* find intersection of clip box and border edge */ -- cgit v1.2.3