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

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

Issue 23464095: WTF::notFound looks too much like a local variable. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 months 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
« no previous file with comments | « Source/core/css/SelectorChecker.cpp ('k') | Source/core/css/StylePropertySet.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/core/css/SelectorChecker.cpp ('k') | Source/core/css/StylePropertySet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698