Chromium Code Reviews| Index: Source/core/css/FontFace.cpp |
| diff --git a/Source/core/css/FontFace.cpp b/Source/core/css/FontFace.cpp |
| index 0d7ce68af047895fbb4990aa04d659debf436d70..2ef48cb734e3e3b6579345fe98cb003912022752 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->isIdentValue()) { |
| + family = AtomicString(toCSSIdentValue(familyValue)->getStringValue()); |
| + } else if (familyValue->isPrimitiveValue() && toCSSPrimitiveValue(familyValue)->isValueID()) { |
|
Timothy Loh
2015/09/10 07:36:51
This check probably isn't needed (and would be wro
sashab
2015/09/17 04:19:49
Fair enough, now it will ASSERT fail if its not a
|
| // 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; |