summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2008-12-27 15:03:54 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2008-12-27 15:03:54 +0000
commite5e68a3feb245f4e4c6055e737456f05ce7832f9 (patch)
tree99ae59eb4e66647f73c1356a80e88505cfdca54f /render
parent8dea43fc35c4a65b96b255100493a12b4eecaf96 (diff)
downloadnetsurf-e5e68a3feb245f4e4c6055e737456f05ce7832f9.tar.gz
netsurf-e5e68a3feb245f4e4c6055e737456f05ce7832f9.tar.bz2
Handle replaced inline borders and backgrounds like blocks.
svn path=/trunk/netsurf/; revision=5930
Diffstat (limited to 'render')
-rw-r--r--render/html_redraw.c12
1 files 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 ||