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

Unified 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: Removed stray include 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/css/ElementRuleCollector.cpp
diff --git a/Source/core/css/ElementRuleCollector.cpp b/Source/core/css/ElementRuleCollector.cpp
index 3323fd75aba6a469845221af945a2e73e858f94e..32c7e791296e0ce805cb558c455dd4bb9e417f23 100644
--- a/Source/core/css/ElementRuleCollector.cpp
+++ b/Source/core/css/ElementRuleCollector.cpp
@@ -166,7 +166,10 @@ void ElementRuleCollector::collectMatchingRules(const MatchRequest& matchRequest
collectMatchingRulesForList(matchRequest.ruleSet->linkPseudoClassRules(), cascadeOrder, matchRequest, ruleRange);
if (SelectorChecker::matchesFocusPseudoClass(element))
collectMatchingRulesForList(matchRequest.ruleSet->focusPseudoClassRules(), cascadeOrder, matchRequest, ruleRange);
- collectMatchingRulesForList(matchRequest.ruleSet->tagRules(element.localName()), cascadeOrder, matchRequest, ruleRange);
+ AtomicString localName = element.localName();
+ if (!element.isHTMLElement() && element.document().isHTMLDocument())
esprehn 2015/05/07 02:21:27 You do this in two places, should we add a tagName
rune 2015/05/07 07:59:48 Done. Named it localNameForSelectorMatching as th
+ localName = localName.lower();
+ collectMatchingRulesForList(matchRequest.ruleSet->tagRules(localName), cascadeOrder, matchRequest, ruleRange);
collectMatchingRulesForList(matchRequest.ruleSet->universalRules(), cascadeOrder, matchRequest, ruleRange);
}

Powered by Google App Engine
This is Rietveld 408576698