summaryrefslogtreecommitdiff
path: root/src/parse/properties/positioning.c
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@netsurf-browser.org>2010-03-27 16:10:57 +0000
committerDaniel Silverstone <dsilvers@netsurf-browser.org>2010-03-27 16:10:57 +0000
commit80cfe125983eb126a9f8afd974196cf0bf347877 (patch)
treee6fe993a7ad2fc6859509b661d2d4f721e846e60 /src/parse/properties/positioning.c
parent46e3a946d7b2f7d68f3753a37c6f68a732a36f01 (diff)
downloadlibcss-80cfe125983eb126a9f8afd974196cf0bf347877.tar.gz
libcss-80cfe125983eb126a9f8afd974196cf0bf347877.tar.bz2
Fix libcss to use new libwapcaplet behaviour.
TODO: update the tests to include a refcounting proof svn path=/trunk/libcss/; revision=10162
Diffstat (limited to 'src/parse/properties/positioning.c')
-rw-r--r--src/parse/properties/positioning.c75
1 files changed, 25 insertions, 50 deletions
diff --git a/src/parse/properties/positioning.c b/src/parse/properties/positioning.c
index 813b113..c4393aa 100644
--- a/src/parse/properties/positioning.c
+++ b/src/parse/properties/positioning.c
@@ -133,28 +133,23 @@ css_error parse_position(css_language *c,
return CSS_INVALID;
}
- if ((lwc_context_string_caseless_isequal(
- c->sheet->dictionary,
+ if ((lwc_string_caseless_isequal(
ident->idata, c->strings[INHERIT],
&match) == lwc_error_ok && match)) {
flags |= FLAG_INHERIT;
- } else if ((lwc_context_string_caseless_isequal(
- c->sheet->dictionary,
+ } else if ((lwc_string_caseless_isequal(
ident->idata, c->strings[STATIC],
&match) == lwc_error_ok && match)) {
value = POSITION_STATIC;
- } else if ((lwc_context_string_caseless_isequal(
- c->sheet->dictionary,
+ } else if ((lwc_string_caseless_isequal(
ident->idata, c->strings[RELATIVE],
&match) == lwc_error_ok && match)) {
value = POSITION_RELATIVE;
- } else if ((lwc_context_string_caseless_isequal(
- c->sheet->dictionary,
+ } else if ((lwc_string_caseless_isequal(
ident->idata, c->strings[ABSOLUTE],
&match) == lwc_error_ok && match)) {
value = POSITION_ABSOLUTE;
- } else if ((lwc_context_string_caseless_isequal(
- c->sheet->dictionary,
+ } else if ((lwc_string_caseless_isequal(
ident->idata, c->strings[FIXED],
&match) == lwc_error_ok && match)) {
value = POSITION_FIXED;
@@ -211,28 +206,23 @@ css_error parse_clear(css_language *c,
return CSS_INVALID;
}
- if ((lwc_context_string_caseless_isequal(
- c->sheet->dictionary,
+ if ((lwc_string_caseless_isequal(
ident->idata, c->strings[INHERIT],
&match) == lwc_error_ok && match)) {
flags |= FLAG_INHERIT;
- } else if ((lwc_context_string_caseless_isequal(
- c->sheet->dictionary,
+ } else if ((lwc_string_caseless_isequal(
ident->idata, c->strings[RIGHT],
&match) == lwc_error_ok && match)) {
value = CLEAR_RIGHT;
- } else if ((lwc_context_string_caseless_isequal(
- c->sheet->dictionary,
+ } else if ((lwc_string_caseless_isequal(
ident->idata, c->strings[LEFT],
&match) == lwc_error_ok && match)) {
value = CLEAR_LEFT;
- } else if ((lwc_context_string_caseless_isequal(
- c->sheet->dictionary,
+ } else if ((lwc_string_caseless_isequal(
ident->idata, c->strings[BOTH],
&match) == lwc_error_ok && match)) {
value = CLEAR_BOTH;
- } else if ((lwc_context_string_caseless_isequal(
- c->sheet->dictionary,
+ } else if ((lwc_string_caseless_isequal(
ident->idata, c->strings[NONE],
&match) == lwc_error_ok && match)) {
value = CLEAR_NONE;
@@ -289,23 +279,19 @@ css_error parse_float(css_language *c,
return CSS_INVALID;
}
- if ((lwc_context_string_caseless_isequal(
- c->sheet->dictionary,
+ if ((lwc_string_caseless_isequal(
ident->idata, c->strings[INHERIT],
&match) == lwc_error_ok && match)) {
flags |= FLAG_INHERIT;
- } else if ((lwc_context_string_caseless_isequal(
- c->sheet->dictionary,
+ } else if ((lwc_string_caseless_isequal(
ident->idata, c->strings[LEFT],
&match) == lwc_error_ok && match)) {
value = FLOAT_LEFT;
- } else if ((lwc_context_string_caseless_isequal(
- c->sheet->dictionary,
+ } else if ((lwc_string_caseless_isequal(
ident->idata, c->strings[RIGHT],
&match) == lwc_error_ok && match)) {
value = FLOAT_RIGHT;
- } else if ((lwc_context_string_caseless_isequal(
- c->sheet->dictionary,
+ } else if ((lwc_string_caseless_isequal(
ident->idata, c->strings[NONE],
&match) == lwc_error_ok && match)) {
value = FLOAT_NONE;
@@ -368,64 +354,55 @@ css_error parse_vertical_align(css_language *c,
}
if (token->type == CSS_TOKEN_IDENT &&
- (lwc_context_string_caseless_isequal(
- c->sheet->dictionary,
+ (lwc_string_caseless_isequal(
token->idata, c->strings[INHERIT],
&match) == lwc_error_ok && match)) {
parserutils_vector_iterate(vector, ctx);
flags = FLAG_INHERIT;
} else if (token->type == CSS_TOKEN_IDENT &&
- (lwc_context_string_caseless_isequal(
- c->sheet->dictionary,
+ (lwc_string_caseless_isequal(
token->idata, c->strings[BASELINE],
&match) == lwc_error_ok && match)) {
parserutils_vector_iterate(vector, ctx);
value = VERTICAL_ALIGN_BASELINE;
} else if (token->type == CSS_TOKEN_IDENT &&
- (lwc_context_string_caseless_isequal(
- c->sheet->dictionary,
+ (lwc_string_caseless_isequal(
token->idata, c->strings[SUB],
&match) == lwc_error_ok && match)) {
parserutils_vector_iterate(vector, ctx);
value = VERTICAL_ALIGN_SUB;
} else if (token->type == CSS_TOKEN_IDENT &&
- (lwc_context_string_caseless_isequal(
- c->sheet->dictionary,
+ (lwc_string_caseless_isequal(
token->idata, c->strings[SUPER],
&match) == lwc_error_ok && match)) {
parserutils_vector_iterate(vector, ctx);
value = VERTICAL_ALIGN_SUPER;
} else if (token->type == CSS_TOKEN_IDENT &&
- (lwc_context_string_caseless_isequal(
- c->sheet->dictionary,
+ (lwc_string_caseless_isequal(
token->idata, c->strings[TOP],
&match) == lwc_error_ok && match)) {
parserutils_vector_iterate(vector, ctx);
value = VERTICAL_ALIGN_TOP;
} else if (token->type == CSS_TOKEN_IDENT &&
- (lwc_context_string_caseless_isequal(
- c->sheet->dictionary,
+ (lwc_string_caseless_isequal(
token->idata, c->strings[TEXT_TOP],
&match) == lwc_error_ok && match)) {
parserutils_vector_iterate(vector, ctx);
value = VERTICAL_ALIGN_TEXT_TOP;
} else if (token->type == CSS_TOKEN_IDENT &&
- (lwc_context_string_caseless_isequal(
- c->sheet->dictionary,
+ (lwc_string_caseless_isequal(
token->idata, c->strings[MIDDLE],
&match) == lwc_error_ok && match)) {
parserutils_vector_iterate(vector, ctx);
value = VERTICAL_ALIGN_MIDDLE;
} else if (token->type == CSS_TOKEN_IDENT &&
- (lwc_context_string_caseless_isequal(
- c->sheet->dictionary,
+ (lwc_string_caseless_isequal(
token->idata, c->strings[BOTTOM],
&match) == lwc_error_ok && match)) {
parserutils_vector_iterate(vector, ctx);
value = VERTICAL_ALIGN_BOTTOM;
} else if (token->type == CSS_TOKEN_IDENT &&
- (lwc_context_string_caseless_isequal(
- c->sheet->dictionary,
+ (lwc_string_caseless_isequal(
token->idata, c->strings[TEXT_BOTTOM],
&match) == lwc_error_ok && match)) {
parserutils_vector_iterate(vector, ctx);
@@ -509,15 +486,13 @@ css_error parse_side(css_language *c,
}
if (token->type == CSS_TOKEN_IDENT &&
- (lwc_context_string_caseless_isequal(
- c->sheet->dictionary,
+ (lwc_string_caseless_isequal(
token->idata, c->strings[INHERIT],
&match) == lwc_error_ok && match)) {
parserutils_vector_iterate(vector, ctx);
flags = FLAG_INHERIT;
} else if (token->type == CSS_TOKEN_IDENT &&
- (lwc_context_string_caseless_isequal(
- c->sheet->dictionary,
+ (lwc_string_caseless_isequal(
token->idata, c->strings[AUTO],
&match) == lwc_error_ok && match)) {
parserutils_vector_iterate(vector, ctx);