diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/css.cc | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -85,10 +85,18 @@ void CssPropertyList::set (CssPropertyName name, CssValueType type, * \brief Merge properties into argument property list. */ void CssPropertyList::apply (CssPropertyList *props) { - for (int i = 0; i < size (); i++) + for (int i = 0; i < size (); i++) { + CssPropertyValue value = getRef (i)->value; + + if (props->ownerOfStrings && + (getRef (i)->type == CSS_TYPE_STRING || + getRef (i)->type == CSS_TYPE_SYMBOL)) + value.strVal = strdup(value.strVal); + props->set ((CssPropertyName) getRef (i)->name, (CssValueType) getRef (i)->type, - getRef (i)->value); + value); + } } void CssPropertyList::print () { |