From e5e68a3feb245f4e4c6055e737456f05ce7832f9 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 27 Dec 2008 15:03:54 +0000 Subject: Handle replaced inline borders and backgrounds like blocks. svn path=/trunk/netsurf/; revision=5930 --- render/html_redraw.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/render/html_redraw.c b/render/html_redraw.c index 149c00a19..44c393230 100644 --- a/render/html_redraw.c +++ b/render/html_redraw.c @@ -333,7 +333,8 @@ bool html_redraw_box(struct box *box, y1 = clip_y1; } - /* background colour and image for block level content */ + /* background colour and image for block level content and replaced + * inlines */ /* Thanks to backwards compatibility, CSS defines the following: * @@ -403,8 +404,9 @@ bool html_redraw_box(struct box *box, if (bg_box && bg_box->style && bg_box->type != BOX_BR && bg_box->type != BOX_TEXT && - bg_box->type != BOX_INLINE && bg_box->type != BOX_INLINE_END && + (bg_box->type != BOX_INLINE || + bg_box->object) && ((bg_box->style->background_color != TRANSPARENT) || (bg_box->background))) { @@ -451,10 +453,10 @@ bool html_redraw_box(struct box *box, } } - /* borders for block level content */ + /* borders for block level content and replaced inlines */ if (box->style && box->type != BOX_TEXT && - box->type != BOX_INLINE && box->type != BOX_INLINE_END && + (bg_box->type != BOX_INLINE || bg_box->object) && (border_top || border_right || border_bottom || border_left)) if (!html_redraw_borders(box, x_parent, y_parent, @@ -462,7 +464,7 @@ bool html_redraw_box(struct box *box, scale)) return false; - /* backgrounds and borders for inlines */ + /* backgrounds and borders for non-replaced inlines */ if (box->style && box->type == BOX_INLINE && box->inline_end && (box->style->background_color != TRANSPARENT || box->background || border_top || border_right || -- cgit v1.2.3