summaryrefslogtreecommitdiff
path: root/content/handlers/html/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'content/handlers/html/html.c')
-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 */