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

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

Issue 1099963003: Support type selector for camel-cased SVG elements in HTML. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed review issues. Created 5 years, 7 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 | « LayoutTests/svg/css/type-selector-expected.txt ('k') | Source/core/css/SelectorChecker.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, 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 collectMatchingRulesForList(matchRequest.ruleSet->idRules(element.idForS tyleResolution()), cascadeOrder, matchRequest, ruleRange); 159 collectMatchingRulesForList(matchRequest.ruleSet->idRules(element.idForS tyleResolution()), cascadeOrder, matchRequest, ruleRange);
160 if (element.isStyledElement() && element.hasClass()) { 160 if (element.isStyledElement() && element.hasClass()) {
161 for (size_t i = 0; i < element.classNames().size(); ++i) 161 for (size_t i = 0; i < element.classNames().size(); ++i)
162 collectMatchingRulesForList(matchRequest.ruleSet->classRules(element .classNames()[i]), cascadeOrder, matchRequest, ruleRange); 162 collectMatchingRulesForList(matchRequest.ruleSet->classRules(element .classNames()[i]), cascadeOrder, matchRequest, ruleRange);
163 } 163 }
164 164
165 if (element.isLink()) 165 if (element.isLink())
166 collectMatchingRulesForList(matchRequest.ruleSet->linkPseudoClassRules() , cascadeOrder, matchRequest, ruleRange); 166 collectMatchingRulesForList(matchRequest.ruleSet->linkPseudoClassRules() , cascadeOrder, matchRequest, ruleRange);
167 if (SelectorChecker::matchesFocusPseudoClass(element)) 167 if (SelectorChecker::matchesFocusPseudoClass(element))
168 collectMatchingRulesForList(matchRequest.ruleSet->focusPseudoClassRules( ), cascadeOrder, matchRequest, ruleRange); 168 collectMatchingRulesForList(matchRequest.ruleSet->focusPseudoClassRules( ), cascadeOrder, matchRequest, ruleRange);
169 collectMatchingRulesForList(matchRequest.ruleSet->tagRules(element.localName ()), cascadeOrder, matchRequest, ruleRange); 169 collectMatchingRulesForList(matchRequest.ruleSet->tagRules(element.localName ForSelectorMatching()), cascadeOrder, matchRequest, ruleRange);
170 collectMatchingRulesForList(matchRequest.ruleSet->universalRules(), cascadeO rder, matchRequest, ruleRange); 170 collectMatchingRulesForList(matchRequest.ruleSet->universalRules(), cascadeO rder, matchRequest, ruleRange);
171 } 171 }
172 172
173 void ElementRuleCollector::collectMatchingShadowHostRules(const MatchRequest& ma tchRequest, RuleRange& ruleRange, CascadeOrder cascadeOrder, bool matchingTreeBo undaryRules) 173 void ElementRuleCollector::collectMatchingShadowHostRules(const MatchRequest& ma tchRequest, RuleRange& ruleRange, CascadeOrder cascadeOrder, bool matchingTreeBo undaryRules)
174 { 174 {
175 collectMatchingRulesForList(matchRequest.ruleSet->shadowHostRules(), cascade Order, matchRequest, ruleRange); 175 collectMatchingRulesForList(matchRequest.ruleSet->shadowHostRules(), cascade Order, matchRequest, ruleRange);
176 } 176 }
177 177
178 CSSRuleList* ElementRuleCollector::nestedRuleList(CSSRule* rule) 178 CSSRuleList* ElementRuleCollector::nestedRuleList(CSSRule* rule)
179 { 179 {
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 int firstRuleIndex = -1, lastRuleIndex = -1; 343 int firstRuleIndex = -1, lastRuleIndex = -1;
344 RuleRange ruleRange(firstRuleIndex, lastRuleIndex); 344 RuleRange ruleRange(firstRuleIndex, lastRuleIndex);
345 MatchRequest matchRequest(ruleSet); 345 MatchRequest matchRequest(ruleSet);
346 collectMatchingRules(matchRequest, ruleRange); 346 collectMatchingRules(matchRequest, ruleRange);
347 collectMatchingShadowHostRules(matchRequest, ruleRange); 347 collectMatchingShadowHostRules(matchRequest, ruleRange);
348 348
349 return !m_matchedRules.isEmpty(); 349 return !m_matchedRules.isEmpty();
350 } 350 }
351 351
352 } // namespace blink 352 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/svg/css/type-selector-expected.txt ('k') | Source/core/css/SelectorChecker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698