summaryrefslogtreecommitdiff
path: root/src/parse/properties/utils.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-06-18 20:07:47 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-06-18 20:07:47 +0000
commit4ff509a419cf48774d31f27e11a59edef1fd52d2 (patch)
tree42b86995bf3d9bb890e20a703b94acc0f2e538da /src/parse/properties/utils.c
parent2e21ea7e931bc501a6af8f1761d68407fb232731 (diff)
downloadlibcss-4ff509a419cf48774d31f27e11a59edef1fd52d2.tar.gz
libcss-4ff509a419cf48774d31f27e11a59edef1fd52d2.tar.bz2
Centralise !important handling.
Document background-attachment parser and make it behave correctly. svn path=/trunk/libcss/; revision=7856
Diffstat (limited to 'src/parse/properties/utils.c')
-rw-r--r--src/parse/properties/utils.c46
1 files changed, 0 insertions, 46 deletions
diff --git a/src/parse/properties/utils.c b/src/parse/properties/utils.c
index b0a4c1b..bc1fd30 100644
--- a/src/parse/properties/utils.c
+++ b/src/parse/properties/utils.c
@@ -13,52 +13,6 @@
#include "parse/properties/utils.h"
/**
- * Parse !important
- *
- * \param c Parsing context
- * \param vector Vector of tokens to process
- * \param ctx Pointer to vector iteration context
- * \param result Pointer to location to receive result
- * \return CSS_OK on success,
- * CSS_INVALID if "S* ! S* important" is not at the start of the vector
- *
- * Post condition: \a *ctx is updated with the next token to process
- * If the input is invalid, then \a *ctx remains unchanged.
- */
-css_error parse_important(css_language *c,
- const parserutils_vector *vector, int *ctx,
- uint8_t *result)
-{
- int orig_ctx = *ctx;
- const css_token *token;
-
- consumeWhitespace(vector, ctx);
-
- token = parserutils_vector_iterate(vector, ctx);
- if (token != NULL && tokenIsChar(token, '!')) {
- consumeWhitespace(vector, ctx);
-
- token = parserutils_vector_iterate(vector, ctx);
- if (token == NULL || token->type != CSS_TOKEN_IDENT) {
- *ctx = orig_ctx;
- return CSS_INVALID;
- }
-
- if (token->ilower == c->strings[IMPORTANT]) {
- *result |= FLAG_IMPORTANT;
- } else {
- *ctx = orig_ctx;
- return CSS_INVALID;
- }
- } else if (token != NULL) {
- *ctx = orig_ctx;
- return CSS_INVALID;
- }
-
- return CSS_OK;
-}
-
-/**
* Parse a colour specifier
*
* \param c Parsing context