summaryrefslogtreecommitdiff
path: root/src/parse/properties/border_outline.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse/properties/border_outline.c')
-rw-r--r--src/parse/properties/border_outline.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/parse/properties/border_outline.c b/src/parse/properties/border_outline.c
index 2de19c8..4fd73da 100644
--- a/src/parse/properties/border_outline.c
+++ b/src/parse/properties/border_outline.c
@@ -338,6 +338,14 @@ css_error parse_border_color(css_language *c,
prev_ctx = *ctx;
error = CSS_OK;
+ /* 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]) {
+ error = CSS_INVALID;
+ goto cleanup;
+ }
+
if (top == NULL &&
(error = parse_border_side_color(c, vector,
ctx, CSS_PROP_BORDER_TOP_COLOR, &top)) ==
@@ -877,6 +885,14 @@ css_error parse_border_style(css_language *c,
prev_ctx = *ctx;
error = CSS_OK;
+ /* 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]) {
+ error = CSS_INVALID;
+ goto cleanup;
+ }
+
if (top == NULL &&
(error = parse_border_side_style(c, vector,
ctx, CSS_PROP_BORDER_TOP_STYLE, &top)) ==
@@ -1203,6 +1219,14 @@ css_error parse_border_width(css_language *c,
prev_ctx = *ctx;
error = CSS_OK;
+ /* 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]) {
+ error = CSS_INVALID;
+ goto cleanup;
+ }
+
if (top == NULL &&
(error = parse_border_side_width(c, vector,
ctx, CSS_PROP_BORDER_TOP_WIDTH, &top)) ==
@@ -1438,6 +1462,14 @@ css_error parse_outline(css_language *c,
prev_ctx = *ctx;
error = CSS_OK;
+ /* 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]) {
+ error = CSS_INVALID;
+ goto cleanup;
+ }
+
if (color == NULL &&
(error = parse_outline_color(c, vector,
ctx, &color)) == CSS_OK) {
@@ -1751,6 +1783,14 @@ css_error parse_border_side(css_language *c,
prev_ctx = *ctx;
error = CSS_OK;
+ /* 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]) {
+ error = CSS_INVALID;
+ goto cleanup;
+ }
+
if (color == NULL &&
(error = parse_border_side_color(c, vector, ctx,
CSS_PROP_BORDER_TOP_COLOR + side, &color)) ==