diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2021-02-10 17:42:29 +0000 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2021-02-10 17:57:57 +0000 |
commit | 496b1eca087490346a29c6c062c53a21e679ddd5 (patch) | |
tree | 98165c84443a351b3e243a083f2ca00fb61a5c86 /content/handlers/html | |
parent | d29f6d6c1e8433f718b6de3d31626cd6f06c352f (diff) | |
download | netsurf-496b1eca087490346a29c6c062c53a21e679ddd5.tar.gz netsurf-496b1eca087490346a29c6c062c53a21e679ddd5.tar.bz2 |
layout: list handling: Scope reduce some variables in the recursive call.
Diffstat (limited to 'content/handlers/html')
-rw-r--r-- | content/handlers/html/layout.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/content/handlers/html/layout.c b/content/handlers/html/layout.c index 6d7d70f31..672084a6b 100644 --- a/content/handlers/html/layout.c +++ b/content/handlers/html/layout.c @@ -4674,14 +4674,13 @@ static void layout_lists(const html_content *content, struct box *box) { struct box *child; - struct box *marker; - plot_font_style_t fstyle; layout__ordered_list_count(box); for (child = box->children; child; child = child->next) { if (child->list_marker) { - marker = child->list_marker; + struct box *marker = child->list_marker; + if (layout__list_item_is_numerical(child)) { if (marker->text == NULL) { layout__set_numerical_marker_text( @@ -4700,6 +4699,7 @@ layout_lists(const html_content *content, struct box *box) marker->height) / 2; } else if (marker->text) { if (marker->width == UNKNOWN_WIDTH) { + plot_font_style_t fstyle; font_plot_style_from_css( &content->len_ctx, marker->style, |