| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 static bool hasDistributedRule(StyleSheetContents* styleSheetContents) | 73 static bool hasDistributedRule(StyleSheetContents* styleSheetContents) |
| 74 { | 74 { |
| 75 const Vector<RefPtr<StyleRuleBase> >& rules = styleSheetContents->childRules
(); | 75 const Vector<RefPtr<StyleRuleBase> >& rules = styleSheetContents->childRules
(); |
| 76 for (unsigned i = 0; i < rules.size(); i++) { | 76 for (unsigned i = 0; i < rules.size(); i++) { |
| 77 const StyleRuleBase* rule = rules[i].get(); | 77 const StyleRuleBase* rule = rules[i].get(); |
| 78 if (!rule->isStyleRule()) | 78 if (!rule->isStyleRule()) |
| 79 continue; | 79 continue; |
| 80 | 80 |
| 81 const StyleRule* styleRule = toStyleRule(rule); | 81 const StyleRule* styleRule = toStyleRule(rule); |
| 82 const CSSSelectorList& selectorList = styleRule->selectorList(); | 82 const CSSSelectorList& selectorList = styleRule->selectorList(); |
| 83 for (size_t selectorIndex = 0; selectorIndex != notFound; selectorIndex
= selectorList.indexOfNextSelectorAfter(selectorIndex)) { | 83 for (size_t selectorIndex = 0; selectorIndex != kNotFound; selectorIndex
= selectorList.indexOfNextSelectorAfter(selectorIndex)) { |
| 84 if (selectorList.hasShadowDistributedAt(selectorIndex)) | 84 if (selectorList.hasShadowDistributedAt(selectorIndex)) |
| 85 return true; | 85 return true; |
| 86 } | 86 } |
| 87 } | 87 } |
| 88 return false; | 88 return false; |
| 89 } | 89 } |
| 90 | 90 |
| 91 static bool hasAtHostRule(StyleSheetContents* styleSheetContents) | 91 static bool hasAtHostRule(StyleSheetContents* styleSheetContents) |
| 92 { | 92 { |
| 93 const Vector<RefPtr<StyleRuleBase> >& rules = styleSheetContents->childRules
(); | 93 const Vector<RefPtr<StyleRuleBase> >& rules = styleSheetContents->childRules
(); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 element->setNeedsStyleRecalc(); | 188 element->setNeedsStyleRecalc(); |
| 189 // The whole subtree is now invalidated, we can skip to the next sib
ling. | 189 // The whole subtree is now invalidated, we can skip to the next sib
ling. |
| 190 element = ElementTraversal::nextSkippingChildren(element); | 190 element = ElementTraversal::nextSkippingChildren(element); |
| 191 continue; | 191 continue; |
| 192 } | 192 } |
| 193 element = ElementTraversal::next(element); | 193 element = ElementTraversal::next(element); |
| 194 } | 194 } |
| 195 } | 195 } |
| 196 | 196 |
| 197 } | 197 } |
| OLD | NEW |