mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-03 17:54:33 +03:00
layout: list handling: Scope reduce some variables in the recursive call.
This commit is contained in:
parent
d29f6d6c1e
commit
496b1eca08
@ -4674,14 +4674,13 @@ static void
|
|||||||
layout_lists(const html_content *content, struct box *box)
|
layout_lists(const html_content *content, struct box *box)
|
||||||
{
|
{
|
||||||
struct box *child;
|
struct box *child;
|
||||||
struct box *marker;
|
|
||||||
plot_font_style_t fstyle;
|
|
||||||
|
|
||||||
layout__ordered_list_count(box);
|
layout__ordered_list_count(box);
|
||||||
|
|
||||||
for (child = box->children; child; child = child->next) {
|
for (child = box->children; child; child = child->next) {
|
||||||
if (child->list_marker) {
|
if (child->list_marker) {
|
||||||
marker = child->list_marker;
|
struct box *marker = child->list_marker;
|
||||||
|
|
||||||
if (layout__list_item_is_numerical(child)) {
|
if (layout__list_item_is_numerical(child)) {
|
||||||
if (marker->text == NULL) {
|
if (marker->text == NULL) {
|
||||||
layout__set_numerical_marker_text(
|
layout__set_numerical_marker_text(
|
||||||
@ -4700,6 +4699,7 @@ layout_lists(const html_content *content, struct box *box)
|
|||||||
marker->height) / 2;
|
marker->height) / 2;
|
||||||
} else if (marker->text) {
|
} else if (marker->text) {
|
||||||
if (marker->width == UNKNOWN_WIDTH) {
|
if (marker->width == UNKNOWN_WIDTH) {
|
||||||
|
plot_font_style_t fstyle;
|
||||||
font_plot_style_from_css(
|
font_plot_style_from_css(
|
||||||
&content->len_ctx,
|
&content->len_ctx,
|
||||||
marker->style,
|
marker->style,
|
||||||
|
Loading…
Reference in New Issue
Block a user