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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 break; | 430 break; |
431 case CSSValue500: | 431 case CSSValue500: |
432 traitsMask |= FontWeight500Mask; | 432 traitsMask |= FontWeight500Mask; |
433 break; | 433 break; |
434 case CSSValue300: | 434 case CSSValue300: |
435 traitsMask |= FontWeight300Mask; | 435 traitsMask |= FontWeight300Mask; |
436 break; | 436 break; |
437 case CSSValue200: | 437 case CSSValue200: |
438 traitsMask |= FontWeight200Mask; | 438 traitsMask |= FontWeight200Mask; |
439 break; | 439 break; |
| 440 case CSSValueLighter: |
440 case CSSValue100: | 441 case CSSValue100: |
441 traitsMask |= FontWeight100Mask; | 442 traitsMask |= FontWeight100Mask; |
442 break; | 443 break; |
443 default: | 444 default: |
| 445 ASSERT_NOT_REACHED(); |
444 break; | 446 break; |
445 } | 447 } |
446 } else { | 448 } else { |
447 traitsMask |= FontWeight400Mask; | 449 traitsMask |= FontWeight400Mask; |
448 } | 450 } |
449 | 451 |
450 if (RefPtr<CSSValue> fontVariant = m_variant) { | 452 if (RefPtr<CSSValue> fontVariant = m_variant) { |
451 // font-variant descriptor can be a value list. | 453 // font-variant descriptor can be a value list. |
452 if (fontVariant->isPrimitiveValue()) { | 454 if (fontVariant->isPrimitiveValue()) { |
453 RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated(); | 455 RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated(); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 unsigned numRanges = rangeList->length(); | 533 unsigned numRanges = rangeList->length(); |
532 for (unsigned i = 0; i < numRanges; i++) { | 534 for (unsigned i = 0; i < numRanges; i++) { |
533 CSSUnicodeRangeValue* range = toCSSUnicodeRangeValue(rangeList->item
WithoutBoundsCheck(i)); | 535 CSSUnicodeRangeValue* range = toCSSUnicodeRangeValue(rangeList->item
WithoutBoundsCheck(i)); |
534 cssFontFace->ranges().add(range->from(), range->to()); | 536 cssFontFace->ranges().add(range->from(), range->to()); |
535 } | 537 } |
536 } | 538 } |
537 return cssFontFace; | 539 return cssFontFace; |
538 } | 540 } |
539 | 541 |
540 } // namespace WebCore | 542 } // namespace WebCore |
OLD | NEW |