| 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 met: | 5 * modification, are permitted provided that the following conditions are met: |
| 6 * | 6 * |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 defaultFontDescription.setSpecifiedSize(defaultFontSize); | 490 defaultFontDescription.setSpecifiedSize(defaultFontSize); |
| 491 defaultFontDescription.setComputedSize(defaultFontSize); | 491 defaultFontDescription.setComputedSize(defaultFontSize); |
| 492 | 492 |
| 493 style->setFontDescription(defaultFontDescription); | 493 style->setFontDescription(defaultFontDescription); |
| 494 | 494 |
| 495 style->font().update(style->font().fontSelector()); | 495 style->font().update(style->font().fontSelector()); |
| 496 | 496 |
| 497 // Now map the font property longhands into the style. | 497 // Now map the font property longhands into the style. |
| 498 CSSPropertyValue properties[] = { | 498 CSSPropertyValue properties[] = { |
| 499 CSSPropertyValue(CSSPropertyFontFamily, *parsedStyle), | 499 CSSPropertyValue(CSSPropertyFontFamily, *parsedStyle), |
| 500 CSSPropertyValue(CSSPropertyFontStretch, *parsedStyle), |
| 500 CSSPropertyValue(CSSPropertyFontStyle, *parsedStyle), | 501 CSSPropertyValue(CSSPropertyFontStyle, *parsedStyle), |
| 501 CSSPropertyValue(CSSPropertyFontVariant, *parsedStyle), | 502 CSSPropertyValue(CSSPropertyFontVariant, *parsedStyle), |
| 502 CSSPropertyValue(CSSPropertyFontWeight, *parsedStyle), | 503 CSSPropertyValue(CSSPropertyFontWeight, *parsedStyle), |
| 503 CSSPropertyValue(CSSPropertyFontSize, *parsedStyle), | 504 CSSPropertyValue(CSSPropertyFontSize, *parsedStyle), |
| 504 CSSPropertyValue(CSSPropertyLineHeight, *parsedStyle), | 505 CSSPropertyValue(CSSPropertyLineHeight, *parsedStyle), |
| 505 }; | 506 }; |
| 506 StyleResolver& styleResolver = document()->ensureStyleResolver(); | 507 StyleResolver& styleResolver = document()->ensureStyleResolver(); |
| 507 styleResolver.applyPropertiesToStyle(properties, WTF_ARRAY_LENGTH(properties
), style.get()); | 508 styleResolver.applyPropertiesToStyle(properties, WTF_ARRAY_LENGTH(properties
), style.get()); |
| 508 | 509 |
| 509 font = style->font(); | 510 font = style->font(); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 } | 551 } |
| 551 | 552 |
| 552 void FontFaceSet::didLayout(Document& document) | 553 void FontFaceSet::didLayout(Document& document) |
| 553 { | 554 { |
| 554 if (FontFaceSet* fonts = static_cast<FontFaceSet*>(SupplementType::from(docu
ment, supplementName()))) | 555 if (FontFaceSet* fonts = static_cast<FontFaceSet*>(SupplementType::from(docu
ment, supplementName()))) |
| 555 fonts->didLayout(); | 556 fonts->didLayout(); |
| 556 } | 557 } |
| 557 | 558 |
| 558 | 559 |
| 559 } // namespace WebCore | 560 } // namespace WebCore |
| OLD | NEW |