summaryrefslogtreecommitdiff
path: root/content/handlers/html/box_normalise.c
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2021-03-29 10:45:59 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2021-05-30 11:52:33 +0100
commitfa64d91d12c94c9aa230cd231b1d2e16054b41f2 (patch)
treebb25197831ca661cec35c69940c5b7c08eaaca36 /content/handlers/html/box_normalise.c
parent638a408ddee7329f8de2a6e550b7fcc2a4baa4a3 (diff)
downloadnetsurf-fa64d91d12c94c9aa230cd231b1d2e16054b41f2.tar.gz
netsurf-fa64d91d12c94c9aa230cd231b1d2e16054b41f2.tar.bz2
Switch to new libcss API for unit conversion.
Diffstat (limited to 'content/handlers/html/box_normalise.c')
-rw-r--r--content/handlers/html/box_normalise.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/content/handlers/html/box_normalise.c b/content/handlers/html/box_normalise.c
index b7032da55..1b6a345d5 100644
--- a/content/handlers/html/box_normalise.c
+++ b/content/handlers/html/box_normalise.c
@@ -190,7 +190,8 @@ box_normalise_table_row(struct box *row,
ctx.base_url = c->base_url;
ctx.universal = c->universal;
- style = nscss_get_blank_style(&ctx, row->style);
+ style = nscss_get_blank_style(&ctx, &c->unit_len_ctx,
+ row->style);
if (style == NULL)
return false;
@@ -326,7 +327,8 @@ box_normalise_table_row_group(struct box *row_group,
ctx.base_url = c->base_url;
ctx.universal = c->universal;
- style = nscss_get_blank_style(&ctx, row_group->style);
+ style = nscss_get_blank_style(&ctx, &c->unit_len_ctx,
+ row_group->style);
if (style == NULL)
return false;
@@ -402,7 +404,8 @@ box_normalise_table_row_group(struct box *row_group,
ctx.base_url = c->base_url;
ctx.universal = c->universal;
- style = nscss_get_blank_style(&ctx, row_group->style);
+ style = nscss_get_blank_style(&ctx, &c->unit_len_ctx,
+ row_group->style);
if (style == NULL) {
return false;
}
@@ -533,6 +536,7 @@ box_normalise_table_spans(struct box *table,
ctx.universal = c->universal;
style = nscss_get_blank_style(&ctx,
+ &c->unit_len_ctx,
table_row->style);
if (style == NULL)
return false;
@@ -657,7 +661,8 @@ box_normalise_table(struct box *table, const struct box *root, html_content * c)
ctx.base_url = c->base_url;
ctx.universal = c->universal;
- style = nscss_get_blank_style(&ctx, table->style);
+ style = nscss_get_blank_style(&ctx, &c->unit_len_ctx,
+ table->style);
if (style == NULL) {
free(col_info.spans);
return false;
@@ -744,7 +749,8 @@ box_normalise_table(struct box *table, const struct box *root, html_content * c)
ctx.base_url = c->base_url;
ctx.universal = c->universal;
- style = nscss_get_blank_style(&ctx, table->style);
+ style = nscss_get_blank_style(&ctx, &c->unit_len_ctx,
+ table->style);
if (style == NULL) {
free(col_info.spans);
return false;
@@ -759,7 +765,8 @@ box_normalise_table(struct box *table, const struct box *root, html_content * c)
}
row_group->type = BOX_TABLE_ROW_GROUP;
- style = nscss_get_blank_style(&ctx, row_group->style);
+ style = nscss_get_blank_style(&ctx, &c->unit_len_ctx,
+ row_group->style);
if (style == NULL) {
box_free(row_group);
free(col_info.spans);
@@ -948,7 +955,8 @@ box_normalise_block(struct box *block, const struct box *root, html_content *c)
ctx.base_url = c->base_url;
ctx.universal = c->universal;
- style = nscss_get_blank_style(&ctx, block->style);
+ style = nscss_get_blank_style(&ctx, &c->unit_len_ctx,
+ block->style);
if (style == NULL)
return false;