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

Unified Diff: Source/core/css/RuleFeature.cpp

Issue 222643002: Support tag names as invalidation set features. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 6 years, 9 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/RuleFeature.cpp
diff --git a/Source/core/css/RuleFeature.cpp b/Source/core/css/RuleFeature.cpp
index fe9e40e0dd322807423bb9f00dd762d57573aa87..42f039951dff4ca6ccc4066cc9cb70779a21a559 100644
--- a/Source/core/css/RuleFeature.cpp
+++ b/Source/core/css/RuleFeature.cpp
@@ -109,8 +109,9 @@ RuleFeatureSet::InvalidationSetMode RuleFeatureSet::invalidationSetModeForSelect
bool foundIdent = false;
for (const CSSSelector* component = &selector; component; component = component->tagHistory()) {
- // FIXME: next up: Tag.
- if (component->m_match == CSSSelector::Class || component->m_match == CSSSelector::Id || component->isAttributeSelector() || component->isCustomPseudoElement()) {
+ if (component->m_match == CSSSelector::Class || component->m_match == CSSSelector::Id
+ || (component->m_match == CSSSelector::Tag && component->tagQName().localName() != starAtom)
+ || component->isAttributeSelector() || component->isCustomPseudoElement()) {
if (!foundDescendantRelation)
foundIdent = true;
} else if (component->pseudoType() == CSSSelector::PseudoHost || component->pseudoType() == CSSSelector::PseudoAny) {
« no previous file with comments | « LayoutTests/fast/layout/display-none-no-relayout.html ('k') | Source/core/css/invalidation/DescendantInvalidationSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698