diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2008-12-27 15:03:54 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2008-12-27 15:03:54 +0000 |
commit | e5e68a3feb245f4e4c6055e737456f05ce7832f9 (patch) | |
tree | 99ae59eb4e66647f73c1356a80e88505cfdca54f | |
parent | 8dea43fc35c4a65b96b255100493a12b4eecaf96 (diff) | |
download | netsurf-e5e68a3feb245f4e4c6055e737456f05ce7832f9.tar.gz netsurf-e5e68a3feb245f4e4c6055e737456f05ce7832f9.tar.bz2 |
Handle replaced inline borders and backgrounds like blocks.
svn path=/trunk/netsurf/; revision=5930
-rw-r--r-- | render/html_redraw.c | 12 |
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 || |