| Index: Source/core/css/FontFace.cpp
|
| diff --git a/Source/core/css/FontFace.cpp b/Source/core/css/FontFace.cpp
|
| index 0d7ce68af047895fbb4990aa04d659debf436d70..afc9e091a605e58f881375971644a2b9ead2904c 100644
|
| --- a/Source/core/css/FontFace.cpp
|
| +++ b/Source/core/css/FontFace.cpp
|
| @@ -40,6 +40,7 @@
|
| #include "core/css/CSSFontFaceSrcValue.h"
|
| #include "core/css/CSSFontSelector.h"
|
| #include "core/css/CSSPrimitiveValue.h"
|
| +#include "core/css/CSSStringValue.h"
|
| #include "core/css/CSSUnicodeRangeValue.h"
|
| #include "core/css/CSSValueList.h"
|
| #include "core/css/FontFaceDescriptors.h"
|
| @@ -276,14 +277,14 @@ bool FontFace::setFamilyValue(CSSValueList* familyList)
|
| if (familyList->length() != 1)
|
| return false;
|
|
|
| - CSSPrimitiveValue* familyValue = toCSSPrimitiveValue(familyList->item(0));
|
| + CSSValue* familyValue = familyList->item(0);
|
| AtomicString family;
|
| - if (familyValue->isCustomIdent()) {
|
| - family = AtomicString(familyValue->getStringValue());
|
| - } else if (familyValue->isValueID()) {
|
| + if (familyValue->isStringValue() && toCSSStringValue(familyValue)->serializationType() == CSSStringValue::SerializeAsCustomIdentifier) {
|
| + family = AtomicString(toCSSStringValue(familyValue)->getStringValue());
|
| + } else if (familyValue->isPrimitiveValue() && toCSSPrimitiveValue(familyValue)->isValueID()) {
|
| // We need to use the raw text for all the generic family types, since @font-face is a way of actually
|
| // defining what font to use for those types.
|
| - switch (familyValue->getValueID()) {
|
| + switch (toCSSPrimitiveValue(familyValue)->getValueID()) {
|
| case CSSValueSerif:
|
| family = FontFamilyNames::webkit_serif;
|
| break;
|
|
|