better fix
This commit is contained in:
parent
d693c5a9f8
commit
c816e01003
|
@ -1,12 +1,16 @@
|
||||||
diff -up kdelibs-4.7.3/khtml/css/cssparser.cpp.orig kdelibs-4.7.3/khtml/css/cssparser.cpp
|
diff -up kdelibs-4.7.3/khtml/css/cssparser.cpp.orig kdelibs-4.7.3/khtml/css/cssparser.cpp
|
||||||
--- kdelibs-4.7.3/khtml/css/cssparser.cpp.orig 2011-11-07 19:14:53.000000000 +0100
|
--- kdelibs-4.7.3/khtml/css/cssparser.cpp.orig 2011-11-07 19:14:53.000000000 +0100
|
||||||
+++ kdelibs-4.7.3/khtml/css/cssparser.cpp 2011-11-07 19:15:21.000000000 +0100
|
+++ kdelibs-4.7.3/khtml/css/cssparser.cpp 2011-11-09 16:02:11.000000000 +0100
|
||||||
@@ -2283,7 +2283,7 @@ bool CSSParser::parseFontFaceSrc()
|
@@ -2275,8 +2275,11 @@ bool CSSParser::parseFontFaceSrc()
|
||||||
Value* a = args->current();
|
expectComma = true;
|
||||||
uriValue = 0;
|
} else if (val->unit == Value::Function) {
|
||||||
parsedValue = new CSSFontFaceSrcValueImpl( domString( a->string ), true /*local src*/ );
|
// There are two allowed functions: local() and format().
|
||||||
- } else if (!strcasecmp(domString(val->function->name), "format(") && allowFormat && uriValue) {
|
+ // For both we expect a string argument
|
||||||
+ } else if (!strcasecmp(domString(val->function->name), "format(") && allowFormat && uriValue && (args->current()->unit == CSSPrimitiveValue::CSS_STRING || args->current()->unit == CSSPrimitiveValue::CSS_IDENT)) {
|
ValueList *args = val->function->args;
|
||||||
|
- if (args && args->size() == 1) {
|
||||||
|
+ if (args && args->size() == 1 &&
|
||||||
|
+ (args->current()->unit == CSSPrimitiveValue::CSS_STRING ||
|
||||||
|
+ args->current()->unit == CSSPrimitiveValue::CSS_IDENT)) {
|
||||||
|
if (!strcasecmp(domString(val->function->name), "local(") && !expectComma) {
|
||||||
expectComma = true;
|
expectComma = true;
|
||||||
allowFormat = false;
|
allowFormat = false;
|
||||||
uriValue->setFormat( domString( args->current()->string ) );
|
|
||||||
|
|
Loading…
Reference in New Issue