diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2022-11-01 13:03:00 +0000 |
---|---|---|
committer | Michael Drake <mdrake.unique@gmail.com> | 2022-11-02 20:16:41 +0000 |
commit | e9147bdeea34b862e029c4a500cd87049875df4b (patch) | |
tree | 08ec427cf58a08310d049602f01763403e5e589f | |
parent | b91d61b89f1b3eba0bd523bc8b5beadf68a3c952 (diff) | |
download | netsurf-e9147bdeea34b862e029c4a500cd87049875df4b.tar.gz netsurf-e9147bdeea34b862e029c4a500cd87049875df4b.tar.bz2 |
html: layout: flex: Don't pass content around unnecessarily
-rw-r--r-- | content/handlers/html/layout_flex.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/content/handlers/html/layout_flex.c b/content/handlers/html/layout_flex.c index 9242a831f..1d7478e74 100644 --- a/content/handlers/html/layout_flex.c +++ b/content/handlers/html/layout_flex.c @@ -314,7 +314,7 @@ static bool layout_flex_ctx__ensure_line(struct flex_ctx *ctx) } static struct flex_line_data *layout_flex__build_line(struct flex_ctx *ctx, - size_t item_index, int available_width, html_content *content) + size_t item_index, int available_width) { struct flex_line_data *line; int available_main; @@ -713,16 +713,14 @@ static bool layout_flex__resolve_line( static bool layout_flex__collect_items_into_lines( struct flex_ctx *ctx, - int available_width, - html_content *content) + int available_width) { size_t pos = 0; while (pos < ctx->item.count) { struct flex_line_data *line; - line = layout_flex__build_line(ctx, pos, - available_width, content); + line = layout_flex__build_line(ctx, pos, available_width); if (line == NULL) { return false; } @@ -782,8 +780,7 @@ bool layout_flex(struct box *flex, int available_width, layout_flex_ctx__populate_item_data(ctx, flex, available_width); /* Place items onto lines. */ - success = layout_flex__collect_items_into_lines(ctx, - available_width, content); + success = layout_flex__collect_items_into_lines(ctx, available_width); if (!success) { goto cleanup; } |