layout: list handling: Scope reduce some variables in the recursive call.

This commit is contained in:
Michael Drake 2021-02-10 17:42:29 +00:00
parent d29f6d6c1e
commit 496b1eca08
1 changed files with 3 additions and 3 deletions

View File

@ -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,