| 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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 break; | 436 break; |
| 437 case CSSValue500: | 437 case CSSValue500: |
| 438 weight = FontWeight500; | 438 weight = FontWeight500; |
| 439 break; | 439 break; |
| 440 case CSSValue300: | 440 case CSSValue300: |
| 441 weight = FontWeight300; | 441 weight = FontWeight300; |
| 442 break; | 442 break; |
| 443 case CSSValue200: | 443 case CSSValue200: |
| 444 weight = FontWeight200; | 444 weight = FontWeight200; |
| 445 break; | 445 break; |
| 446 case CSSValueLighter: | |
| 447 case CSSValue100: | 446 case CSSValue100: |
| 448 weight = FontWeight100; | 447 weight = FontWeight100; |
| 449 break; | 448 break; |
| 449 // Although 'lighter' and 'bolder' are valid keywords for font-weights,
they are invalid |
| 450 // inside font-face rules so they are ignored. Reference: http://www.w3.
org/TR/css3-fonts/#descdef-font-weight. |
| 451 case CSSValueLighter: |
| 452 case CSSValueBolder: |
| 453 break; |
| 450 default: | 454 default: |
| 451 ASSERT_NOT_REACHED(); | 455 ASSERT_NOT_REACHED(); |
| 452 break; | 456 break; |
| 453 } | 457 } |
| 454 } | 458 } |
| 455 | 459 |
| 456 FontVariant variant = FontVariantNormal; | 460 FontVariant variant = FontVariantNormal; |
| 457 if (RefPtrWillBeRawPtr<CSSValue> fontVariant = m_variant) { | 461 if (RefPtrWillBeRawPtr<CSSValue> fontVariant = m_variant) { |
| 458 // font-variant descriptor can be a value list. | 462 // font-variant descriptor can be a value list. |
| 459 if (fontVariant->isPrimitiveValue()) { | 463 if (fontVariant->isPrimitiveValue()) { |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 590 visitor->trace(m_cssFontFace); | 594 visitor->trace(m_cssFontFace); |
| 591 visitor->trace(m_callbacks); | 595 visitor->trace(m_callbacks); |
| 592 } | 596 } |
| 593 | 597 |
| 594 bool FontFace::hadBlankText() const | 598 bool FontFace::hadBlankText() const |
| 595 { | 599 { |
| 596 return m_cssFontFace->hadBlankText(); | 600 return m_cssFontFace->hadBlankText(); |
| 597 } | 601 } |
| 598 | 602 |
| 599 } // namespace blink | 603 } // namespace blink |
| OLD | NEW |