Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1192)

Side by Side Diff: third_party/WebKit/Source/core/css/FontFaceSet.cpp

Issue 1372823002: No need to recalc style before StyleResolver::computeFont. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/css/invalidation/font-face-load-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/css/invalidation/font-face-load-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698