| 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.
All rights reserved. | 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
| 4 * Copyright (C) 2012 Google Inc. All rights reserved. | 4 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 } | 76 } |
| 77 if (fontFaceRules.size()) | 77 if (fontFaceRules.size()) |
| 78 document.styleResolver()->invalidateMatchedPropertiesCache(); | 78 document.styleResolver()->invalidateMatchedPropertiesCache(); |
| 79 } | 79 } |
| 80 | 80 |
| 81 void ScopedStyleResolver::appendCSSStyleSheet(CSSStyleSheet& cssSheet, const Med
iaQueryEvaluator& medium) | 81 void ScopedStyleResolver::appendCSSStyleSheet(CSSStyleSheet& cssSheet, const Med
iaQueryEvaluator& medium) |
| 82 { | 82 { |
| 83 unsigned index = m_authorStyleSheets.size(); | 83 unsigned index = m_authorStyleSheets.size(); |
| 84 m_authorStyleSheets.append(&cssSheet); | 84 m_authorStyleSheets.append(&cssSheet); |
| 85 StyleSheetContents* sheet = cssSheet.contents(); | 85 StyleSheetContents* sheet = cssSheet.contents(); |
| 86 AddRuleFlags addRuleFlags = treeScope().document().securityOrigin()->canRequ
est(sheet->baseURL()) ? RuleHasDocumentSecurityOrigin : RuleHasNoSpecialState; | 86 AddRuleFlags addRuleFlags = treeScope().document().getSecurityOrigin()->canR
equest(sheet->baseURL()) ? RuleHasDocumentSecurityOrigin : RuleHasNoSpecialState
; |
| 87 const RuleSet& ruleSet = sheet->ensureRuleSet(medium, addRuleFlags); | 87 const RuleSet& ruleSet = sheet->ensureRuleSet(medium, addRuleFlags); |
| 88 | 88 |
| 89 addKeyframeRules(ruleSet); | 89 addKeyframeRules(ruleSet); |
| 90 addFontFaceRules(ruleSet); | 90 addFontFaceRules(ruleSet); |
| 91 addTreeBoundaryCrossingRules(ruleSet, &cssSheet, index); | 91 addTreeBoundaryCrossingRules(ruleSet, &cssSheet, index); |
| 92 treeScope().document().styleResolver()->addViewportDependentMediaQueries(rul
eSet.viewportDependentMediaQueryResults()); | 92 treeScope().document().styleResolver()->addViewportDependentMediaQueries(rul
eSet.viewportDependentMediaQueryResults()); |
| 93 treeScope().document().styleResolver()->addDeviceDependentMediaQueries(ruleS
et.deviceDependentMediaQueryResults()); | 93 treeScope().document().styleResolver()->addDeviceDependentMediaQueries(ruleS
et.deviceDependentMediaQueryResults()); |
| 94 } | 94 } |
| 95 | 95 |
| 96 void ScopedStyleResolver::collectFeaturesTo(RuleFeatureSet& features, WillBeHeap
HashSet<RawPtrWillBeMember<const StyleSheetContents>>& visitedSharedStyleSheetCo
ntents) const | 96 void ScopedStyleResolver::collectFeaturesTo(RuleFeatureSet& features, WillBeHeap
HashSet<RawPtrWillBeMember<const StyleSheetContents>>& visitedSharedStyleSheetCo
ntents) const |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 m_treeBoundaryCrossingRuleSet->append(RuleSubSet::create(parentStyleSheet, s
heetIndex, ruleSetForScope.release())); | 230 m_treeBoundaryCrossingRuleSet->append(RuleSubSet::create(parentStyleSheet, s
heetIndex, ruleSetForScope.release())); |
| 231 } | 231 } |
| 232 | 232 |
| 233 DEFINE_TRACE(ScopedStyleResolver::RuleSubSet) | 233 DEFINE_TRACE(ScopedStyleResolver::RuleSubSet) |
| 234 { | 234 { |
| 235 visitor->trace(m_parentStyleSheet); | 235 visitor->trace(m_parentStyleSheet); |
| 236 visitor->trace(m_ruleSet); | 236 visitor->trace(m_ruleSet); |
| 237 } | 237 } |
| 238 | 238 |
| 239 } // namespace blink | 239 } // namespace blink |
| OLD | NEW |