diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2018-01-05 23:17:44 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2018-01-05 23:17:44 +0000 |
commit | 850a55e0feb026ace04b63b9cb8a8c3313768327 (patch) | |
tree | 6c137cd5bfeacdc8b7fab4bc91569a81d88c9220 /src/parse/properties/utils.c | |
parent | a827023bed3815e332a33dc9f061584cbf424313 (diff) | |
parent | b8997eb73a1b966939fca4b7e2f4ef799b872ab9 (diff) | |
download | libcss-850a55e0feb026ace04b63b9cb8a8c3313768327.tar.gz libcss-850a55e0feb026ace04b63b9cb8a8c3313768327.tar.bz2 |
Merge branch 'tlsa/lcneves/select-autogen'
Diffstat (limited to 'src/parse/properties/utils.c')
-rw-r--r-- | src/parse/properties/utils.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/parse/properties/utils.c b/src/parse/properties/utils.c index 47b06e3..76b406b 100644 --- a/src/parse/properties/utils.c +++ b/src/parse/properties/utils.c @@ -1007,6 +1007,10 @@ 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, "vmin", 4) == 0) + *unit = UNIT_VMIN; + else if (strncasecmp(ptr, "vmax", 4) == 0) + *unit = UNIT_VMAX; else return CSS_INVALID; } else if (len == 3) { @@ -1016,6 +1020,12 @@ css_error css__parse_unit_keyword(const char *ptr, size_t len, uint32_t *unit) *unit = UNIT_DEG; else if (strncasecmp(ptr, "rad", 3) == 0) *unit = UNIT_RAD; + else if (strncasecmp(ptr, "cap", 3) == 0) + *unit = UNIT_CAP; + else if (strncasecmp(ptr, "rem", 3) == 0) + *unit = UNIT_REM; + else if (strncasecmp(ptr, "rlh", 3) == 0) + *unit = UNIT_RLH; else return CSS_INVALID; } else if (len == 2) { @@ -1039,11 +1049,27 @@ css_error css__parse_unit_keyword(const char *ptr, size_t len, uint32_t *unit) *unit = UNIT_PT; else if (strncasecmp(ptr, "pc", 2) == 0) *unit = UNIT_PC; + else if (strncasecmp(ptr, "ch", 2) == 0) + *unit = UNIT_CH; + else if (strncasecmp(ptr, "ic", 2) == 0) + *unit = UNIT_IC; + else if (strncasecmp(ptr, "lh", 2) == 0) + *unit = UNIT_LH; + else if (strncasecmp(ptr, "vh", 2) == 0) + *unit = UNIT_VH; + else if (strncasecmp(ptr, "vw", 2) == 0) + *unit = UNIT_VW; + else if (strncasecmp(ptr, "vi", 2) == 0) + *unit = UNIT_VI; + else if (strncasecmp(ptr, "vb", 2) == 0) + *unit = UNIT_VB; else return CSS_INVALID; } else if (len == 1) { if (strncasecmp(ptr, "s", 1) == 0) *unit = UNIT_S; + else if (strncasecmp(ptr, "q", 1) == 0) + *unit = UNIT_Q; else return CSS_INVALID; } else |