summaryrefslogtreecommitdiff
path: root/src/parse/properties
diff options
context:
space:
mode:
authorJohn-Mark Bell <jmb@netsurf-browser.org>2017-02-04 17:57:47 +0000
committerMichael Drake <michael.drake@codethink.co.uk>2019-03-10 13:42:03 +0000
commita1347619c5f9ad96d2462a568e625fec567594e2 (patch)
tree71acb3d9532fbf9bcfd77d6cfe24df99751e4bb6 /src/parse/properties
parentdc5dc8aaba115bb678be2a5a59a6054027bf28c1 (diff)
downloadlibcss-a1347619c5f9ad96d2462a568e625fec567594e2.tar.gz
libcss-a1347619c5f9ad96d2462a568e625fec567594e2.tar.bz2
Units: parse new unit names
Diffstat (limited to 'src/parse/properties')
-rw-r--r--src/parse/properties/utils.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/parse/properties/utils.c b/src/parse/properties/utils.c
index 7abef24..0e49853 100644
--- a/src/parse/properties/utils.c
+++ b/src/parse/properties/utils.c
@@ -1007,6 +1007,12 @@ css_error css__parse_unit_keyword(const char *ptr, size_t len, uint32_t *unit)
if (len == 4) {
if (strncasecmp(ptr, "grad", 4) == 0)
*unit = UNIT_GRAD;
+ else if (strncasecmp(ptr, "turn", 4) == 0)
+ *unit = UNIT_TURN;
+ else if (strncasecmp(ptr, "dppx", 4) == 0)
+ *unit = UNIT_DPPX;
+ else if (strncasecmp(ptr, "dpcm", 4) == 0)
+ *unit = UNIT_DPCM;
else if (strncasecmp(ptr, "vmin", 4) == 0)
*unit = UNIT_VMIN;
else if (strncasecmp(ptr, "vmax", 4) == 0)
@@ -1026,6 +1032,8 @@ css_error css__parse_unit_keyword(const char *ptr, size_t len, uint32_t *unit)
*unit = UNIT_REM;
else if (strncasecmp(ptr, "rlh", 3) == 0)
*unit = UNIT_RLH;
+ else if (strncasecmp(ptr, "dpi", 3) == 0)
+ *unit = UNIT_DPI;
else
return CSS_INVALID;
} else if (len == 2) {