Commit 534b1560 authored by Andrea Iacovitti's avatar Andrea Iacovitti
Browse files

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

BUG: 328982
FIXED-IN: 4.11.5
parent 4f0d3ec4
......@@ -375,6 +375,7 @@ CSSStyleDeclarationImpl *CSSParser::createStyleDeclaration( CSSStyleRuleImpl *ru
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();
......@@ -385,9 +386,18 @@ CSSStyleDeclarationImpl *CSSParser::createFontFaceStyleDeclaration( CSSFontFaceR
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);
}
......
Supports Markdown
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