summaryrefslogtreecommitdiff
path: root/render/layout.c
diff options
context:
space:
mode:
Diffstat (limited to 'render/layout.c')
-rw-r--r--render/layout.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/render/layout.c b/render/layout.c
index af1904a66..d618af2f7 100644
--- a/render/layout.c
+++ b/render/layout.c
@@ -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);
}