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
This commit is contained in:
Michael Drake 2008-07-19 17:07:20 +00:00
parent 89da5c5eed
commit eb613cfedd
1 changed files with 5 additions and 1 deletions

View File

@ -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 */