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

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

Issue 143003016: More code problems detected by cppcheck (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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
« no previous file with comments | « no previous file | Source/core/html/parser/HTMLTreeBuilder.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r ights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r ights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 if (selector->m_match == CSSSelector::Id) 174 if (selector->m_match == CSSSelector::Id)
175 idsInRules.add(selector->value()); 175 idsInRules.add(selector->value());
176 else if (selector->m_match == CSSSelector::Class) 176 else if (selector->m_match == CSSSelector::Class)
177 classesInRules.add(selector->value()); 177 classesInRules.add(selector->value());
178 else if (selector->isAttributeSelector()) 178 else if (selector->isAttributeSelector())
179 attrsInRules.add(selector->attribute().localName()); 179 attrsInRules.add(selector->attribute().localName());
180 switch (selector->pseudoType()) { 180 switch (selector->pseudoType()) {
181 case CSSSelector::PseudoFirstLine: 181 case CSSSelector::PseudoFirstLine:
182 m_usesFirstLineRules = true; 182 m_usesFirstLineRules = true;
183 break; 183 break;
184 break;
185 case CSSSelector::PseudoHost: 184 case CSSSelector::PseudoHost:
186 collectFeaturesFromSelectorList(selector->selectorList()); 185 collectFeaturesFromSelectorList(selector->selectorList());
187 break; 186 break;
188 default: 187 default:
189 break; 188 break;
190 } 189 }
191 } 190 }
192 191
193 void RuleFeatureSet::collectFeaturesFromSelectorList(const CSSSelectorList* sele ctorList) 192 void RuleFeatureSet::collectFeaturesFromSelectorList(const CSSSelectorList* sele ctorList)
194 { 193 {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 idsInRules.clear(); 226 idsInRules.clear();
228 classesInRules.clear(); 227 classesInRules.clear();
229 attrsInRules.clear(); 228 attrsInRules.clear();
230 siblingRules.clear(); 229 siblingRules.clear();
231 uncommonAttributeRules.clear(); 230 uncommonAttributeRules.clear();
232 m_usesFirstLineRules = false; 231 m_usesFirstLineRules = false;
233 m_maxDirectAdjacentSelectors = 0; 232 m_maxDirectAdjacentSelectors = 0;
234 } 233 }
235 234
236 } // namespace WebCore 235 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/parser/HTMLTreeBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698