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 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 | 492 |
493 FontDescription defaultFontDescription; | 493 FontDescription defaultFontDescription; |
494 defaultFontDescription.setFamily(fontFamily); | 494 defaultFontDescription.setFamily(fontFamily); |
495 defaultFontDescription.setSpecifiedSize(defaultFontSize); | 495 defaultFontDescription.setSpecifiedSize(defaultFontSize); |
496 defaultFontDescription.setComputedSize(defaultFontSize); | 496 defaultFontDescription.setComputedSize(defaultFontSize); |
497 | 497 |
498 style->setFontDescription(defaultFontDescription); | 498 style->setFontDescription(defaultFontDescription); |
499 | 499 |
500 style->font().update(style->font().fontSelector()); | 500 style->font().update(style->font().fontSelector()); |
501 | 501 |
502 document()->updateLayoutTreeIfNeeded(); | |
503 document()->ensureStyleResolver().computeFont(style.get(), *parsedStyle); | 502 document()->ensureStyleResolver().computeFont(style.get(), *parsedStyle); |
504 | 503 |
505 font = style->font(); | 504 font = style->font(); |
506 font.update(document()->styleEngine().fontSelector()); | 505 font.update(document()->styleEngine().fontSelector()); |
507 return true; | 506 return true; |
508 } | 507 } |
509 | 508 |
510 void FontFaceSet::FontLoadHistogram::updateStatus(FontFace* fontFace) | 509 void FontFaceSet::FontLoadHistogram::updateStatus(FontFace* fontFace) |
511 { | 510 { |
512 if (m_status == Reported) | 511 if (m_status == Reported) |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 visitor->trace(m_loadedFonts); | 558 visitor->trace(m_loadedFonts); |
560 visitor->trace(m_failedFonts); | 559 visitor->trace(m_failedFonts); |
561 visitor->trace(m_nonCSSConnectedFaces); | 560 visitor->trace(m_nonCSSConnectedFaces); |
562 HeapSupplement<Document>::trace(visitor); | 561 HeapSupplement<Document>::trace(visitor); |
563 #endif | 562 #endif |
564 EventTargetWithInlineData::trace(visitor); | 563 EventTargetWithInlineData::trace(visitor); |
565 ActiveDOMObject::trace(visitor); | 564 ActiveDOMObject::trace(visitor); |
566 } | 565 } |
567 | 566 |
568 } // namespace blink | 567 } // namespace blink |
OLD | NEW |