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

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

Issue 42543007: StyleResolver should update RuleSets lazily. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 1 month 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 | Annotate | Revision Log
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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698