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

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

Issue 1162583002: Use begin/end istead of first/last for rule ranges. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | « no previous file | Source/core/css/resolver/MatchResult.h » ('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, 2013 Apple Inc. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights 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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 return; 264 return;
265 } 265 }
266 266
267 // Now transfer the set of matched rules over to our list of declarations. 267 // Now transfer the set of matched rules over to our list of declarations.
268 for (unsigned i = 0; i < m_matchedRules.size(); i++) { 268 for (unsigned i = 0; i < m_matchedRules.size(); i++) {
269 const RuleData* ruleData = m_matchedRules[i].ruleData(); 269 const RuleData* ruleData = m_matchedRules[i].ruleData();
270 m_result.addMatchedProperties(&ruleData->rule()->properties(), ruleData- >linkMatchType(), ruleData->propertyWhitelistType(m_matchingUARules)); 270 m_result.addMatchedProperties(&ruleData->rule()->properties(), ruleData- >linkMatchType(), ruleData->propertyWhitelistType(m_matchingUARules));
271 } 271 }
272 272
273 if (m_matchingUARules) 273 if (m_matchingUARules)
274 m_result.lastUARuleIndex = m_result.matchedProperties.size() - 1; 274 m_result.uaEnd = m_result.matchedProperties.size();
275 } 275 }
276 276
277 void ElementRuleCollector::didMatchRule(const RuleData& ruleData, const Selector Checker::MatchResult& result, CascadeOrder cascadeOrder, const MatchRequest& mat chRequest) 277 void ElementRuleCollector::didMatchRule(const RuleData& ruleData, const Selector Checker::MatchResult& result, CascadeOrder cascadeOrder, const MatchRequest& mat chRequest)
278 { 278 {
279 PseudoId dynamicPseudo = result.dynamicPseudo; 279 PseudoId dynamicPseudo = result.dynamicPseudo;
280 // If we're matching normal rules, set a pseudo bit if 280 // If we're matching normal rules, set a pseudo bit if
281 // we really just matched a pseudo-element. 281 // we really just matched a pseudo-element.
282 if (dynamicPseudo != NOPSEUDO && m_pseudoStyleRequest.pseudoId == NOPSEUDO) { 282 if (dynamicPseudo != NOPSEUDO && m_pseudoStyleRequest.pseudoId == NOPSEUDO) {
283 if (m_mode == SelectorChecker::CollectingCSSRules || m_mode == SelectorC hecker::CollectingStyleRules) 283 if (m_mode == SelectorChecker::CollectingCSSRules || m_mode == SelectorC hecker::CollectingStyleRules)
284 return; 284 return;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 // should not see the element's treescope. Because RuleSet has no 320 // should not see the element's treescope. Because RuleSet has no
321 // information about "scope". 321 // information about "scope".
322 MatchRequest matchRequest(ruleSet); 322 MatchRequest matchRequest(ruleSet);
323 collectMatchingRules(matchRequest); 323 collectMatchingRules(matchRequest);
324 collectMatchingShadowHostRules(matchRequest); 324 collectMatchingShadowHostRules(matchRequest);
325 325
326 return !m_matchedRules.isEmpty(); 326 return !m_matchedRules.isEmpty();
327 } 327 }
328 328
329 } // namespace blink 329 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/resolver/MatchResult.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698