[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
This commit is contained in:
John Mark Bell 2003-10-19 17:17:26 +00:00
parent 6f33e2d42e
commit 9fd638f098
2 changed files with 9 additions and 7 deletions

View File

@ -638,6 +638,7 @@ void css_dump_style(const struct css_style * const style)
}
fprintf(stderr, "; ");
fprintf(stderr, "text-align: %s; ", css_text_align_name[style->text_align]);
fprintf(stderr, "text-decoration: %s; ", css_text_decoration_name[style->text_decoration]);
fprintf(stderr, "visibility: %s; ", css_visibility_name[style->visibility]);
fprintf(stderr, "width: ");
switch (style->width.width) {

View File

@ -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));