aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-02-06 21:17:42 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-02-06 21:17:42 +0100
commitb65e704d76928e1a3f3984e8206840d87ea19a64 (patch)
tree26655491f1ecfe645f5a84f3265b1835a44f20d1
parent4c20db174b4d8ccb982a650c4923794497fdf68f (diff)
set type in CssPropertyList::set()
-rw-r--r--src/css.cc12
-rw-r--r--src/cssparser.cc1
2 files changed, 9 insertions, 4 deletions
diff --git a/src/css.cc b/src/css.cc
index b9f0cd40..884e7b69 100644
--- a/src/css.cc
+++ b/src/css.cc
@@ -32,13 +32,17 @@ CssPropertyList::~CssPropertyList () {
void CssPropertyList::set (CssPropertyName name, CssValueType type,
CssPropertyValue value) {
- for (int i = 0; i < size (); i++)
- if (getRef (i)->name == name) {
+ for (int i = 0; i < size (); i++) {
+ CssProperty *prop = getRef (i);
+
+ if (prop->name == name) {
if (ownerOfStrings)
- getRef (i)->free ();
- getRef (i)->value = value;
+ prop->free ();
+ prop->type = type;
+ prop->value = value;
return;
}
+ }
increase ();
getRef (size () - 1)->name = name;
diff --git a/src/cssparser.cc b/src/cssparser.cc
index b7923c07..73182d09 100644
--- a/src/cssparser.cc
+++ b/src/cssparser.cc
@@ -625,6 +625,7 @@ static bool Css_token_matches_property(CssParser * parser,
}
}
+ *type = CSS_TYPE_UNUSED;
return false;
}