summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bytecode/bytecode.h23
-rw-r--r--src/parse/properties/font.c3
-rw-r--r--src/parse/properties/utils.c6
-rw-r--r--src/select/helpers.h3
-rw-r--r--src/select/mq.h11
5 files changed, 10 insertions, 36 deletions
diff --git a/src/bytecode/bytecode.h b/src/bytecode/bytecode.h
index 7518281..7f5ea9d 100644
--- a/src/bytecode/bytecode.h
+++ b/src/bytecode/bytecode.h
@@ -34,19 +34,16 @@ typedef enum unit {
UNIT_MM = (1u << 8) + 5,
UNIT_PT = (1u << 8) + 6,
UNIT_PC = (1u << 8) + 7,
- UNIT_CAP = (1u << 8) + 8,
- UNIT_CH = (1u << 8) + 9,
- UNIT_IC = (1u << 8) + 10,
- UNIT_REM = (1u << 8) + 11,
- UNIT_LH = (1u << 8) + 12,
- UNIT_RLH = (1u << 8) + 13,
- UNIT_VH = (1u << 8) + 14,
- UNIT_VW = (1u << 8) + 15,
- UNIT_VI = (1u << 8) + 16,
- UNIT_VB = (1u << 8) + 17,
- UNIT_VMIN = (1u << 8) + 18,
- UNIT_VMAX = (1u << 8) + 19,
- UNIT_Q = (1u << 8) + 20,
+ UNIT_CH = (1u << 8) + 8,
+ UNIT_REM = (1u << 8) + 9,
+ UNIT_LH = (1u << 8) + 10,
+ UNIT_VH = (1u << 8) + 11,
+ UNIT_VW = (1u << 8) + 12,
+ UNIT_VI = (1u << 8) + 13,
+ UNIT_VB = (1u << 8) + 14,
+ UNIT_VMIN = (1u << 8) + 15,
+ UNIT_VMAX = (1u << 8) + 16,
+ UNIT_Q = (1u << 8) + 17,
UNIT_PCT = (1 << 9),
diff --git a/src/parse/properties/font.c b/src/parse/properties/font.c
index 681c613..5010242 100644
--- a/src/parse/properties/font.c
+++ b/src/parse/properties/font.c
@@ -27,12 +27,9 @@ static inline uint32_t css__to_parse_unit(css_unit u)
case CSS_UNIT_MM: return UNIT_MM;
case CSS_UNIT_PT: return UNIT_PT;
case CSS_UNIT_PC: return UNIT_PC;
- case CSS_UNIT_CAP: return UNIT_CAP;
case CSS_UNIT_CH: return UNIT_CH;
- case CSS_UNIT_IC: return UNIT_IC;
case CSS_UNIT_REM: return UNIT_REM;
case CSS_UNIT_LH: return UNIT_LH;
- case CSS_UNIT_RLH: return UNIT_RLH;
case CSS_UNIT_VH: return UNIT_VH;
case CSS_UNIT_VW: return UNIT_VW;
case CSS_UNIT_VI: return UNIT_VI;
diff --git a/src/parse/properties/utils.c b/src/parse/properties/utils.c
index 707a22b..1e184f8 100644
--- a/src/parse/properties/utils.c
+++ b/src/parse/properties/utils.c
@@ -1032,12 +1032,8 @@ 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 if (strncasecmp(ptr, "dpi", 3) == 0)
*unit = UNIT_DPI;
else
@@ -1065,8 +1061,6 @@ css_error css__parse_unit_keyword(const char *ptr, size_t len, uint32_t *unit)
*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)
diff --git a/src/select/helpers.h b/src/select/helpers.h
index ba2e3be..19ff7de 100644
--- a/src/select/helpers.h
+++ b/src/select/helpers.h
@@ -22,12 +22,9 @@ static inline css_unit css__to_css_unit(uint32_t u)
case UNIT_MM: return CSS_UNIT_MM;
case UNIT_PT: return CSS_UNIT_PT;
case UNIT_PC: return CSS_UNIT_PC;
- case UNIT_CAP: return CSS_UNIT_CAP;
case UNIT_CH: return CSS_UNIT_CH;
- case UNIT_IC: return CSS_UNIT_IC;
case UNIT_REM: return CSS_UNIT_REM;
case UNIT_LH: return CSS_UNIT_LH;
- case UNIT_RLH: return CSS_UNIT_RLH;
case UNIT_VH: return CSS_UNIT_VH;
case UNIT_VW: return CSS_UNIT_VW;
case UNIT_VI: return CSS_UNIT_VI;
diff --git a/src/select/mq.h b/src/select/mq.h
index 79303e9..6f98387 100644
--- a/src/select/mq.h
+++ b/src/select/mq.h
@@ -42,9 +42,7 @@ static inline css_fixed css_len2px(
switch (unit) {
case CSS_UNIT_EM:
case CSS_UNIT_EX:
- case CSS_UNIT_CAP:
case CSS_UNIT_CH:
- case CSS_UNIT_IC:
{
px_per_unit = FDIV(FMUL(media->client_font_size, F_96), F_72);
@@ -53,15 +51,9 @@ static inline css_fixed css_len2px(
case CSS_UNIT_EX:
px_per_unit = FMUL(px_per_unit, FLTTOFIX(0.6));
break;
- case CSS_UNIT_CAP:
- px_per_unit = FMUL(px_per_unit, FLTTOFIX(0.9));
- break;
case CSS_UNIT_CH:
px_per_unit = FMUL(px_per_unit, FLTTOFIX(0.4));
break;
- case CSS_UNIT_IC:
- px_per_unit = FMUL(px_per_unit, FLTTOFIX(1.1));
- break;
default:
break;
}
@@ -90,9 +82,6 @@ static inline css_fixed css_len2px(
case CSS_UNIT_REM:
px_per_unit = FDIV(FMUL(media->client_font_size, F_96), F_72);
break;
- case CSS_UNIT_RLH:
- px_per_unit = media->client_line_height;
- break;
case CSS_UNIT_VH:
px_per_unit = FDIV(media->height, F_100);
break;