| Index: Source/core/css/resolver/ScopedStyleTree.cpp
|
| diff --git a/Source/core/css/resolver/ScopedStyleTree.cpp b/Source/core/css/resolver/ScopedStyleTree.cpp
|
| index 3b27951217e81ca846ab4b8b9ccfe951809e3798..369a8e2450bd497e4514ca10b529281ba391b2a4 100644
|
| --- a/Source/core/css/resolver/ScopedStyleTree.cpp
|
| +++ b/Source/core/css/resolver/ScopedStyleTree.cpp
|
| @@ -47,7 +47,8 @@
|
|
|
| ScopedStyleResolver* ScopedStyleTree::scopedStyleResolverFor(const ContainerNode& scopingNode)
|
| {
|
| - if (!isShadowHost(&scopingNode)
|
| + if (!scopingNode.hasScopedHTMLStyleChild()
|
| + && !isShadowHost(&scopingNode)
|
| && !scopingNode.isDocumentNode()
|
| && !scopingNode.isShadowRoot())
|
| return 0;
|
| @@ -124,7 +125,7 @@
|
|
|
| // Adding scoped resolver for active shadow roots for shadow host styling.
|
| for (ShadowRoot* shadowRoot = shadow->youngestShadowRoot(); shadowRoot; shadowRoot = shadowRoot->olderShadowRoot()) {
|
| - if (shadowRoot->numberOfStyles() > 0) {
|
| + if (shadowRoot->hasScopedHTMLStyleChild()) {
|
| if (ScopedStyleResolver* resolver = scopedStyleResolverFor(*shadowRoot))
|
| resolvers.append(resolver);
|
| }
|
|
|