| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 } | 271 } |
| 272 | 272 |
| 273 bool FontFace::setFamilyValue(CSSValueList* familyList) | 273 bool FontFace::setFamilyValue(CSSValueList* familyList) |
| 274 { | 274 { |
| 275 // The font-family descriptor has to have exactly one family name. | 275 // The font-family descriptor has to have exactly one family name. |
| 276 if (familyList->length() != 1) | 276 if (familyList->length() != 1) |
| 277 return false; | 277 return false; |
| 278 | 278 |
| 279 CSSPrimitiveValue* familyValue = toCSSPrimitiveValue(familyList->item(0)); | 279 CSSPrimitiveValue* familyValue = toCSSPrimitiveValue(familyList->item(0)); |
| 280 AtomicString family; | 280 AtomicString family; |
| 281 if (familyValue->isString()) { | 281 if (familyValue->isCustomIdent()) { |
| 282 family = AtomicString(familyValue->getStringValue()); | 282 family = AtomicString(familyValue->getStringValue()); |
| 283 } else if (familyValue->isValueID()) { | 283 } else if (familyValue->isValueID()) { |
| 284 // We need to use the raw text for all the generic family types, since @
font-face is a way of actually | 284 // We need to use the raw text for all the generic family types, since @
font-face is a way of actually |
| 285 // defining what font to use for those types. | 285 // defining what font to use for those types. |
| 286 switch (familyValue->getValueID()) { | 286 switch (familyValue->getValueID()) { |
| 287 case CSSValueSerif: | 287 case CSSValueSerif: |
| 288 family = FontFamilyNames::webkit_serif; | 288 family = FontFamilyNames::webkit_serif; |
| 289 break; | 289 break; |
| 290 case CSSValueSansSerif: | 290 case CSSValueSansSerif: |
| 291 family = FontFamilyNames::webkit_sans_serif; | 291 family = FontFamilyNames::webkit_sans_serif; |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 { | 580 { |
| 581 return m_cssFontFace->hadBlankText(); | 581 return m_cssFontFace->hadBlankText(); |
| 582 } | 582 } |
| 583 | 583 |
| 584 bool FontFace::hasPendingActivity() const | 584 bool FontFace::hasPendingActivity() const |
| 585 { | 585 { |
| 586 return m_status == Loading && executionContext() && !executionContext()->act
iveDOMObjectsAreStopped(); | 586 return m_status == Loading && executionContext() && !executionContext()->act
iveDOMObjectsAreStopped(); |
| 587 } | 587 } |
| 588 | 588 |
| 589 } // namespace blink | 589 } // namespace blink |
| OLD | NEW |