| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 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 19 matching lines...) Expand all Loading... |
| 30 #include "core/css/StyleRuleImport.h" | 30 #include "core/css/StyleRuleImport.h" |
| 31 #include "core/css/StyleSheetContents.h" | 31 #include "core/css/StyleSheetContents.h" |
| 32 #include "core/dom/ContainerNode.h" | 32 #include "core/dom/ContainerNode.h" |
| 33 #include "core/dom/Document.h" | 33 #include "core/dom/Document.h" |
| 34 #include "core/dom/ElementTraversal.h" | 34 #include "core/dom/ElementTraversal.h" |
| 35 #include "core/dom/shadow/ShadowRoot.h" | 35 #include "core/dom/shadow/ShadowRoot.h" |
| 36 #include "core/html/HTMLStyleElement.h" | 36 #include "core/html/HTMLStyleElement.h" |
| 37 | 37 |
| 38 namespace WebCore { | 38 namespace WebCore { |
| 39 | 39 |
| 40 StyleInvalidationAnalysis::StyleInvalidationAnalysis(const Vector<StyleSheetCont
ents*>& sheets) | 40 StyleInvalidationAnalysis::StyleInvalidationAnalysis(const WillBeHeapVector<RawP
trWillBeMember<StyleSheetContents> >& sheets) |
| 41 : m_dirtiesAllStyle(false) | 41 : m_dirtiesAllStyle(false) |
| 42 { | 42 { |
| 43 for (unsigned i = 0; i < sheets.size() && !m_dirtiesAllStyle; ++i) | 43 for (unsigned i = 0; i < sheets.size() && !m_dirtiesAllStyle; ++i) |
| 44 analyzeStyleSheet(sheets[i]); | 44 analyzeStyleSheet(sheets[i]); |
| 45 } | 45 } |
| 46 | 46 |
| 47 static bool determineSelectorScopes(const CSSSelectorList& selectorList, HashSet
<StringImpl*>& idScopes, HashSet<StringImpl*>& classScopes) | 47 static bool determineSelectorScopes(const CSSSelectorList& selectorList, HashSet
<StringImpl*>& idScopes, HashSet<StringImpl*>& classScopes) |
| 48 { | 48 { |
| 49 for (const CSSSelector* selector = selectorList.first(); selector; selector
= CSSSelectorList::next(*selector)) { | 49 for (const CSSSelector* selector = selectorList.first(); selector; selector
= CSSSelectorList::next(*selector)) { |
| 50 const CSSSelector* scopeSelector = 0; | 50 const CSSSelector* scopeSelector = 0; |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 element->setNeedsStyleRecalc(SubtreeStyleChange); | 212 element->setNeedsStyleRecalc(SubtreeStyleChange); |
| 213 // The whole subtree is now invalidated, we can skip to the next sib
ling. | 213 // The whole subtree is now invalidated, we can skip to the next sib
ling. |
| 214 element = ElementTraversal::nextSkippingChildren(*element); | 214 element = ElementTraversal::nextSkippingChildren(*element); |
| 215 continue; | 215 continue; |
| 216 } | 216 } |
| 217 element = ElementTraversal::next(*element); | 217 element = ElementTraversal::next(*element); |
| 218 } | 218 } |
| 219 } | 219 } |
| 220 | 220 |
| 221 } | 221 } |
| OLD | NEW |