Fix distortion of list marker images.

svn path=/trunk/netsurf/; revision=3039
This commit is contained in:
James Bursa 2006-11-07 21:49:03 +00:00
parent 6d6ab5399c
commit df7912f96b

View File

@ -2394,12 +2394,22 @@ void layout_lists(struct box *box)
for (child = box->children; child; child = child->next) {
if (child->list_marker) {
marker = child->list_marker;
if (marker->width == UNKNOWN_WIDTH)
nsfont_width(marker->style, marker->text,
marker->length, &marker->width);
marker->x = -marker->width;
marker->y = 0;
marker->height = line_height(marker->style);
if (marker->object) {
marker->width = marker->object->width;
marker->x = -marker->width;
marker->height = marker->object->height;
marker->y = (line_height(marker->style) -
marker->height) / 2;
} else {
if (marker->width == UNKNOWN_WIDTH)
nsfont_width(marker->style,
marker->text,
marker->length,
&marker->width);
marker->x = -marker->width;
marker->y = 0;
marker->height = line_height(marker->style);
}
}
layout_lists(child);
}