equal
deleted
inserted
replaced
3326 } |
3326 } |
3327 |
3327 |
3328 return false; |
3328 return false; |
3329 } |
3329 } |
3330 |
3330 |
|
3331 static bool isValidFormatFunction(CSSParserValue* val) |
|
3332 { |
|
3333 CSSParserValueList* args = val->function->args; |
|
3334 return equalIgnoringCase(val->function->name, "format(") && (args->current()->unit == CSSPrimitiveValue::CSS_STRING || args->current()->unit == CSSPrimitiveValue::CSS_IDENT); |
|
3335 } |
|
3336 |
3331 bool CSSParser::parseFontFaceSrc() |
3337 bool CSSParser::parseFontFaceSrc() |
3332 { |
3338 { |
3333 RefPtr<CSSValueList> values(CSSValueList::createCommaSeparated()); |
3339 RefPtr<CSSValueList> values(CSSValueList::createCommaSeparated()); |
3334 CSSParserValue* val; |
3340 CSSParserValue* val; |
3335 bool expectComma = false; |
3341 bool expectComma = false; |
3353 expectComma = true; |
3359 expectComma = true; |
3354 allowFormat = false; |
3360 allowFormat = false; |
3355 CSSParserValue* a = args->current(); |
3361 CSSParserValue* a = args->current(); |
3356 uriValue.clear(); |
3362 uriValue.clear(); |
3357 parsedValue = CSSFontFaceSrcValue::createLocal(a->string); |
3363 parsedValue = CSSFontFaceSrcValue::createLocal(a->string); |
3358 } else if (equalIgnoringCase(val->function->name, "format(") && allowFormat && uriValue) { |
3364 } else if (allowFormat && uriValue && isValidFormatFunction(val)) { |
3359 expectComma = true; |
3365 expectComma = true; |
3360 allowFormat = false; |
3366 allowFormat = false; |
3361 uriValue->setFormat(args->current()->string); |
3367 uriValue->setFormat(args->current()->string); |
3362 uriValue.clear(); |
3368 uriValue.clear(); |
3363 m_valueList->next(); |
3369 m_valueList->next(); |