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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 // Now map the font property longhands into the style. | 416 // Now map the font property longhands into the style. |
417 CSSPropertyValue properties[] = { | 417 CSSPropertyValue properties[] = { |
418 CSSPropertyValue(CSSPropertyFontFamily, *parsedStyle), | 418 CSSPropertyValue(CSSPropertyFontFamily, *parsedStyle), |
419 CSSPropertyValue(CSSPropertyFontStyle, *parsedStyle), | 419 CSSPropertyValue(CSSPropertyFontStyle, *parsedStyle), |
420 CSSPropertyValue(CSSPropertyFontVariant, *parsedStyle), | 420 CSSPropertyValue(CSSPropertyFontVariant, *parsedStyle), |
421 CSSPropertyValue(CSSPropertyFontWeight, *parsedStyle), | 421 CSSPropertyValue(CSSPropertyFontWeight, *parsedStyle), |
422 CSSPropertyValue(CSSPropertyFontSize, *parsedStyle), | 422 CSSPropertyValue(CSSPropertyFontSize, *parsedStyle), |
423 CSSPropertyValue(CSSPropertyLineHeight, *parsedStyle), | 423 CSSPropertyValue(CSSPropertyLineHeight, *parsedStyle), |
424 }; | 424 }; |
425 StyleResolver* styleResolver = document()->styleResolver(); | 425 StyleResolver* styleResolver = document()->styleResolver(); |
| 426 appendPendingStyleSheetsIfNeeded(styleResolver); |
426 styleResolver->applyPropertiesToStyle(properties, WTF_ARRAY_LENGTH(propertie
s), style.get()); | 427 styleResolver->applyPropertiesToStyle(properties, WTF_ARRAY_LENGTH(propertie
s), style.get()); |
427 | 428 |
428 font = style->font(); | 429 font = style->font(); |
429 font.update(styleResolver->fontSelector()); | 430 font.update(styleResolver->fontSelector()); |
430 return true; | 431 return true; |
431 } | 432 } |
432 | 433 |
433 void FontFaceSet::FontLoadHistogram::record() | 434 void FontFaceSet::FontLoadHistogram::record() |
434 { | 435 { |
435 if (m_recorded) | 436 if (m_recorded) |
(...skipping 19 matching lines...) Expand all Loading... |
455 } | 456 } |
456 | 457 |
457 void FontFaceSet::didLayout(Document* document) | 458 void FontFaceSet::didLayout(Document* document) |
458 { | 459 { |
459 if (FontFaceSet* fonts = static_cast<FontFaceSet*>(SupplementType::from(docu
ment, supplementName()))) | 460 if (FontFaceSet* fonts = static_cast<FontFaceSet*>(SupplementType::from(docu
ment, supplementName()))) |
460 fonts->didLayout(); | 461 fonts->didLayout(); |
461 } | 462 } |
462 | 463 |
463 | 464 |
464 } // namespace WebCore | 465 } // namespace WebCore |
OLD | NEW |