summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2008-07-19 17:07:20 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2008-07-19 17:07:20 +0000
commiteb613cfedd2a1578a87f0ec941af7646dec92a81 (patch)
tree77469b60b391be7b7ced973f72b8b05726d652ff
parent89da5c5eedcc8d76f84fc41e9d09307db4684b63 (diff)
downloadnetsurf-eb613cfedd2a1578a87f0ec941af7646dec92a81.tar.gz
netsurf-eb613cfedd2a1578a87f0ec941af7646dec92a81.tar.bz2
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
-rw-r--r--render/html_redraw.c6
1 files changed, 5 insertions, 1 deletions
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 */