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

Unified Diff: third_party/WebKit/Source/core/css/RuleSet.cpp

Issue 1523843004: Add support for new CSS ::slotted() pseudo element (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tentative fix for crash / querySelector test Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/RuleSet.cpp
diff --git a/third_party/WebKit/Source/core/css/RuleSet.cpp b/third_party/WebKit/Source/core/css/RuleSet.cpp
index 7839eba7360970244f995cb81d97c6ae6ca9ffe5..ea98fd774fb8b64ee77b394b2838ba25c4f155f2 100644
--- a/third_party/WebKit/Source/core/css/RuleSet.cpp
+++ b/third_party/WebKit/Source/core/css/RuleSet.cpp
@@ -262,6 +262,8 @@ void RuleSet::addChildRules(const WillBeHeapVector<RefPtrWillBeMember<StyleRuleB
m_deepCombinatorOrShadowPseudoRules.append(MinimalRuleData(styleRule, selectorIndex, addRuleFlags));
} else if (selectorList.selectorHasShadowDistributed(selectorIndex)) {
m_shadowDistributedRules.append(MinimalRuleData(styleRule, selectorIndex, addRuleFlags));
+ } else if (selectorList.selectorHasShadowSlotted(selectorIndex)) {
+ m_shadowSlottedRules.append(MinimalRuleData(styleRule, selectorIndex, addRuleFlags));
} else {
addRule(styleRule, selectorIndex, addRuleFlags);
}
@@ -342,6 +344,7 @@ void RuleSet::compactRules()
m_keyframesRules.shrinkToFit();
m_deepCombinatorOrShadowPseudoRules.shrinkToFit();
m_shadowDistributedRules.shrinkToFit();
+ m_shadowSlottedRules.shrinkToFit();
}
DEFINE_TRACE(MinimalRuleData)
@@ -383,6 +386,7 @@ DEFINE_TRACE(RuleSet)
visitor->trace(m_keyframesRules);
visitor->trace(m_deepCombinatorOrShadowPseudoRules);
visitor->trace(m_shadowDistributedRules);
+ visitor->trace(m_shadowSlottedRules);
visitor->trace(m_viewportDependentMediaQueryResults);
visitor->trace(m_pendingRules);
#ifndef NDEBUG

Powered by Google App Engine
This is Rietveld 408576698