From 804faacf826856e1d939c20ce30be7b766c492db Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Fri, 22 May 2020 20:26:51 +0100 Subject: html: Handle canvas width/height stated explicitly in px Signed-off-by: Daniel Silverstone --- content/handlers/html/dom_event.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'content') diff --git a/content/handlers/html/dom_event.c b/content/handlers/html/dom_event.c index b874d71f5..533c9d599 100644 --- a/content/handlers/html/dom_event.c +++ b/content/handlers/html/dom_event.c @@ -200,7 +200,7 @@ static nserror html_process_inserted_canvas(html_content *htmlc, dom_node *node) char * ended; unsigned long width_n = strtoul(ptr, &ended, 10); - if (ended == endptr) { + if (ended == endptr || strcasecmp(ended, "px") == 0) { /* parsed it all */ width = width_n; } @@ -217,7 +217,7 @@ static nserror html_process_inserted_canvas(html_content *htmlc, dom_node *node) char * ended; unsigned long height_n = strtoul(ptr, &ended, 10); - if (ended == endptr) { + if (ended == endptr || strcasecmp(ended, "px") == 0) { /* parsed it all */ height = height_n; } -- cgit v1.2.3