| Index: third_party/WebKit/Source/core/css/resolver/ScopedStyleResolver.cpp
|
| diff --git a/third_party/WebKit/Source/core/css/resolver/ScopedStyleResolver.cpp b/third_party/WebKit/Source/core/css/resolver/ScopedStyleResolver.cpp
|
| index 101fcdf190ab495b588ebd6a6d3e8af44584c9dc..356f29542fa275d1efdbca8d97b1a2989a7f2d10 100644
|
| --- a/third_party/WebKit/Source/core/css/resolver/ScopedStyleResolver.cpp
|
| +++ b/third_party/WebKit/Source/core/css/resolver/ScopedStyleResolver.cpp
|
| @@ -206,7 +206,8 @@ static void addRules(RuleSet* ruleSet, const WillBeHeapVector<MinimalRuleData>&
|
| void ScopedStyleResolver::addTreeBoundaryCrossingRules(const RuleSet& authorRules, CSSStyleSheet* parentStyleSheet, unsigned sheetIndex)
|
| {
|
| bool isDocumentScope = treeScope().rootNode().isDocumentNode();
|
| - if (authorRules.deepCombinatorOrShadowPseudoRules().isEmpty() && (isDocumentScope || authorRules.shadowDistributedRules().isEmpty()))
|
| + if (authorRules.deepCombinatorOrShadowPseudoRules().isEmpty()
|
| + && (isDocumentScope || (authorRules.shadowDistributedRules().isEmpty() && authorRules.shadowSlottedRules().isEmpty())))
|
| return;
|
|
|
| if (!authorRules.deepCombinatorOrShadowPseudoRules().isEmpty())
|
| @@ -215,8 +216,10 @@ void ScopedStyleResolver::addTreeBoundaryCrossingRules(const RuleSet& authorRule
|
| OwnPtrWillBeRawPtr<RuleSet> ruleSetForScope = RuleSet::create();
|
| addRules(ruleSetForScope.get(), authorRules.deepCombinatorOrShadowPseudoRules());
|
|
|
| - if (!isDocumentScope)
|
| + if (!isDocumentScope) {
|
| addRules(ruleSetForScope.get(), authorRules.shadowDistributedRules());
|
| + addRules(ruleSetForScope.get(), authorRules.shadowSlottedRules());
|
| + }
|
|
|
| if (!m_treeBoundaryCrossingRuleSet) {
|
| m_treeBoundaryCrossingRuleSet = adoptPtrWillBeNoop(new CSSStyleSheetRuleSubSet());
|
|
|