From b330fd9f0ef3e923f47537690c3ef05fc55498cd Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Tue, 7 May 2019 14:01:51 +0100 Subject: HTML: Update selection media data for new libcss API. --- content/handlers/html/html.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'content/handlers/html') 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 */ -- cgit v1.2.3