Commit 880293f5 authored by Andrea Iacovitti's avatar Andrea Iacovitti
Browse files

(Forward-port kdelibs commit 534b15605dfd37c5d096c402093b43c1c1742759)

@font-face rule: fix overriding of src property declarations.

BUG: 328982
FIXED-IN: 4.11.5
parent 0d3cd043
......@@ -384,6 +384,7 @@ CSSStyleDeclarationImpl *CSSParser::createStyleDeclaration(CSSStyleRuleImpl *rul
CSSStyleDeclarationImpl *CSSParser::createFontFaceStyleDeclaration(CSSFontFaceRuleImpl *rule)
{
QList<CSSProperty *> *propList = new QList<CSSProperty *>;
CSSProperty *overriddenSrcProperty = 0;
for (int i = 0; i < numParsedProperties; i++) {
CSSProperty *property = parsedProperties[i];
int id = property->id();
......@@ -394,9 +395,18 @@ CSSStyleDeclarationImpl *CSSParser::createFontFaceStyleDeclaration(CSSFontFaceRu
property->setValue(new CSSValueListImpl(CSSValueListImpl::Comma));
static_cast<CSSValueListImpl *>(property->value())->append(value);
value->deref();
} else if (id == CSS_PROP_SRC) {
overriddenSrcProperty = property;
continue;
}
propList->append(parsedProperties[i]);
propList->append(property);
}
if (overriddenSrcProperty) {
propList->append(overriddenSrcProperty);
}
numParsedProperties = 0;
return new CSSStyleDeclarationImpl(rule, propList);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment