summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--css/ruleset.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/css/ruleset.c b/css/ruleset.c
index ae1d097fa..92686a384 100644
--- a/css/ruleset.c
+++ b/css/ruleset.c
@@ -661,14 +661,12 @@ int parse_length(struct css_length * const length,
return 1;
num_length = strspn(v->data, "0123456789+-.");
-
- if (v->type == CSS_NODE_DIMENSION) {
- u = css_unit_parse(v->data + num_length,
- v->data_length - num_length);
- if (u == CSS_UNIT_UNKNOWN) {
- return 1;
- }
- }
+
+ u = css_unit_parse(v->data + num_length,
+ v->data_length - num_length);
+ if (u == CSS_UNIT_UNKNOWN) {
+ return 1;
+ }
value = atof(v->data);
if (non_negative && value < 0)
return 1;