summaryrefslogtreecommitdiff
path: root/src/parse/properties/padding.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse/properties/padding.c')
-rw-r--r--src/parse/properties/padding.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/parse/properties/padding.c b/src/parse/properties/padding.c
index 507159d..3a77c26 100644
--- a/src/parse/properties/padding.c
+++ b/src/parse/properties/padding.c
@@ -45,12 +45,16 @@ css_error parse_padding(css_language *c,
css_style *ret = NULL;
uint32_t num_sides = 0;
uint32_t required_size;
+ bool match;
css_error error;
/* Firstly, handle inherit */
token = parserutils_vector_peek(vector, *ctx);
if (token != NULL && token->type == CSS_TOKEN_IDENT &&
- token->ilower == c->strings[INHERIT]) {
+ (lwc_context_string_caseless_isequal(
+ c->sheet->dictionary,
+ token->idata, c->strings[INHERIT],
+ &match) == lwc_error_ok && match)) {
uint32_t *bytecode;
error = css_stylesheet_style_create(c->sheet,
@@ -90,7 +94,10 @@ css_error parse_padding(css_language *c,
/* Ensure that we're not about to parse another inherit */
token = parserutils_vector_peek(vector, *ctx);
if (token != NULL && token->type == CSS_TOKEN_IDENT &&
- token->ilower == c->strings[INHERIT]) {
+ (lwc_context_string_caseless_isequal(
+ c->sheet->dictionary,
+ token->idata, c->strings[INHERIT],
+ &match) == lwc_error_ok && match)) {
error = CSS_INVALID;
goto cleanup;
}
@@ -375,6 +382,7 @@ css_error parse_padding_side(css_language *c,
css_fixed length = 0;
uint32_t unit = 0;
uint32_t required_size;
+ bool match;
/* length | percentage | IDENT(inherit) */
token = parserutils_vector_peek(vector, *ctx);
@@ -384,7 +392,10 @@ css_error parse_padding_side(css_language *c,
}
if (token->type == CSS_TOKEN_IDENT &&
- token->ilower == c->strings[INHERIT]) {
+ (lwc_context_string_caseless_isequal(
+ c->sheet->dictionary,
+ token->idata, c->strings[INHERIT],
+ &match) == lwc_error_ok && match)) {
parserutils_vector_iterate(vector, ctx);
flags = FLAG_INHERIT;
} else {