From 9fd638f098b36399e3ca7c90df3c283ab07ed08e Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 19 Oct 2003 17:17:26 +0000 Subject: [project @ 2003-10-19 17:17:26 by jmb] Make text-decoration span child elements. Add text-decoration to css_dump() svn path=/import/netsurf/; revision=371 --- riscos/htmlredraw.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'riscos/htmlredraw.c') diff --git a/riscos/htmlredraw.c b/riscos/htmlredraw.c index f9569ea95..83e7b4009 100644 --- a/riscos/htmlredraw.c +++ b/riscos/htmlredraw.c @@ -283,14 +283,15 @@ void html_redraw_box(struct content *content, struct box * box, colourtrans_set_font_colours(box->font->handle, current_background_color << 8, box->style->color << 8, 14, 0, 0, 0); + if (box->style->text_decoration == CSS_TEXT_DECORATION_NONE || box->style->text_decoration == CSS_TEXT_DECORATION_BLINK) { - font_paint(box->font->handle, box->text, - font_OS_UNITS | font_GIVEN_FONT | font_KERN | font_GIVEN_LENGTH, - x, y - (int) (box->height * 1.5), - NULL, NULL, (int) box->length); + font_paint(box->font->handle, box->text, + font_OS_UNITS | font_GIVEN_FONT | font_KERN | font_GIVEN_LENGTH, + x, y - (int) (box->height * 1.5), + NULL, NULL, (int) box->length); } - if (box->style->text_decoration == CSS_TEXT_DECORATION_UNDERLINE) { + if (box->style->text_decoration == CSS_TEXT_DECORATION_UNDERLINE || (box->parent->parent->style->text_decoration == CSS_TEXT_DECORATION_UNDERLINE && box->parent->parent->type == BOX_BLOCK)) { char ulctrl[3]; char *temp = xcalloc(strlen(box->text)+4, sizeof(char)); @@ -303,7 +304,7 @@ void html_redraw_box(struct content *content, struct box * box, NULL, NULL, (int) box->length + 3); xfree(temp); } - if (box->style->text_decoration == CSS_TEXT_DECORATION_LINE_THROUGH){ + if (box->style->text_decoration == CSS_TEXT_DECORATION_LINE_THROUGH || (box->parent->parent->style->text_decoration == CSS_TEXT_DECORATION_LINE_THROUGH && box->parent->parent->type == BOX_BLOCK)) { char ulctrl[3]; char *temp = xcalloc(strlen(box->text)+4, sizeof(char)); @@ -316,7 +317,7 @@ void html_redraw_box(struct content *content, struct box * box, NULL, NULL, (int) box->length + 3); xfree(temp); } - if (box->style->text_decoration == CSS_TEXT_DECORATION_OVERLINE) { + if (box->style->text_decoration == CSS_TEXT_DECORATION_OVERLINE || (box->parent->parent->style->text_decoration == CSS_TEXT_DECORATION_OVERLINE && box->parent->parent->type == BOX_BLOCK)) { char ulctrl[3]; char *temp = xcalloc(strlen(box->text)+4, sizeof(char)); -- cgit v1.2.3