| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. | 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. |
| 4 * All rights reserved. | 4 * All rights reserved. |
| 5 * Copyright (C) 2012 Google Inc. All rights reserved. | 5 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 6 * | 6 * |
| 7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
| 8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
| 9 * are met: | 9 * are met: |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 72 |
| 73 Document& document = treeScope().document(); | 73 Document& document = treeScope().document(); |
| 74 CSSFontSelector* cssFontSelector = document.styleEngine().fontSelector(); | 74 CSSFontSelector* cssFontSelector = document.styleEngine().fontSelector(); |
| 75 const HeapVector<Member<StyleRuleFontFace>> fontFaceRules = | 75 const HeapVector<Member<StyleRuleFontFace>> fontFaceRules = |
| 76 ruleSet.fontFaceRules(); | 76 ruleSet.fontFaceRules(); |
| 77 for (auto& fontFaceRule : fontFaceRules) { | 77 for (auto& fontFaceRule : fontFaceRules) { |
| 78 if (FontFace* fontFace = FontFace::create(&document, fontFaceRule)) | 78 if (FontFace* fontFace = FontFace::create(&document, fontFaceRule)) |
| 79 cssFontSelector->fontFaceCache()->add(cssFontSelector, fontFaceRule, | 79 cssFontSelector->fontFaceCache()->add(cssFontSelector, fontFaceRule, |
| 80 fontFace); | 80 fontFace); |
| 81 } | 81 } |
| 82 if (fontFaceRules.size()) | 82 if (fontFaceRules.size() && document.styleResolver()) |
| 83 document.styleResolver()->invalidateMatchedPropertiesCache(); | 83 document.styleResolver()->invalidateMatchedPropertiesCache(); |
| 84 } | 84 } |
| 85 | 85 |
| 86 void ScopedStyleResolver::appendCSSStyleSheet( | 86 void ScopedStyleResolver::appendCSSStyleSheet( |
| 87 CSSStyleSheet& cssSheet, | 87 CSSStyleSheet& cssSheet, |
| 88 const MediaQueryEvaluator& medium) { | 88 const MediaQueryEvaluator& medium) { |
| 89 unsigned index = m_authorStyleSheets.size(); | 89 unsigned index = m_authorStyleSheets.size(); |
| 90 m_authorStyleSheets.append(&cssSheet); | 90 m_authorStyleSheets.append(&cssSheet); |
| 91 StyleSheetContents* sheet = cssSheet.contents(); | 91 StyleSheetContents* sheet = cssSheet.contents(); |
| 92 AddRuleFlags addRuleFlags = | 92 AddRuleFlags addRuleFlags = |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 m_treeBoundaryCrossingRuleSet->append( | 304 m_treeBoundaryCrossingRuleSet->append( |
| 305 RuleSubSet::create(parentStyleSheet, sheetIndex, ruleSetForScope)); | 305 RuleSubSet::create(parentStyleSheet, sheetIndex, ruleSetForScope)); |
| 306 } | 306 } |
| 307 | 307 |
| 308 DEFINE_TRACE(ScopedStyleResolver::RuleSubSet) { | 308 DEFINE_TRACE(ScopedStyleResolver::RuleSubSet) { |
| 309 visitor->trace(m_parentStyleSheet); | 309 visitor->trace(m_parentStyleSheet); |
| 310 visitor->trace(m_ruleSet); | 310 visitor->trace(m_ruleSet); |
| 311 } | 311 } |
| 312 | 312 |
| 313 } // namespace blink | 313 } // namespace blink |
| OLD | NEW |