summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2019-05-07 14:01:51 +0100
committerMichael Drake <michael.drake@codethink.co.uk>2019-05-07 14:01:51 +0100
commitb330fd9f0ef3e923f47537690c3ef05fc55498cd (patch)
tree067b92979db1b30caac1ebe24f70fba67f87beae
parent31655be43bb6a1eda4f53a6d2a5d5a35c2a89232 (diff)
downloadnetsurf-b330fd9f0ef3e923f47537690c3ef05fc55498cd.tar.gz
netsurf-b330fd9f0ef3e923f47537690c3ef05fc55498cd.tar.bz2
HTML: Update selection media data for new libcss API.
-rw-r--r--content/handlers/html/html.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/content/handlers/html/html.c b/content/handlers/html/html.c
index cc3e0155b..af1040b40 100644
--- a/content/handlers/html/html.c
+++ b/content/handlers/html/html.c
@@ -583,10 +583,13 @@ static void html_get_dimensions(html_content *htmlc)
content_broadcast(&htmlc->base, CONTENT_MSG_GETDIMS, &msg_data);
- htmlc->media.width.value = INTTOFIX(w);
- htmlc->media.width.unit = CSS_UNIT_PX;
- htmlc->media.height.value = INTTOFIX(h);
- htmlc->media.height.unit = CSS_UNIT_PX;
+ htmlc->media.width = nscss_pixels_physical_to_css(INTTOFIX(w));
+ htmlc->media.height = nscss_pixels_physical_to_css(INTTOFIX(h));
+ htmlc->media.client_font_size =
+ FDIV(INTTOFIX(nsoption_int(font_size)), F_10);
+ htmlc->media.client_line_height =
+ FMUL(nscss_len2px(NULL, htmlc->media.client_font_size,
+ CSS_UNIT_PT, NULL), FLTTOFIX(1.33));
}
/* exported function documented in html/html_internal.h */