Index: third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp |
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp |
index 701a69d21356084fa8e36e23d9a353dcd8aa1989..5eaef7f033daf7d9c6a400af46c1ca6f73934420 100644 |
--- a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp |
+++ b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp |
@@ -171,10 +171,8 @@ static void collectScopedResolversForHostedShadowTrees( |
// 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 (ScopedStyleResolver* resolver = shadowRoot->scopedStyleResolver()) |
- resolvers.append(resolver); |
- } |
+ if (ScopedStyleResolver* resolver = shadowRoot->scopedStyleResolver()) |
+ resolvers.append(resolver); |
} |
} |
@@ -321,8 +319,6 @@ static void matchHostRules(const Element& element, |
for (ShadowRoot* shadowRoot = &shadow->oldestShadowRoot(); shadowRoot; |
shadowRoot = shadowRoot->youngerShadowRoot()) { |
- if (!shadowRoot->numberOfStyles()) |
- continue; |
if (ScopedStyleResolver* resolver = shadowRoot->scopedStyleResolver()) { |
collector.clearMatchedRules(); |
resolver->collectMatchingShadowHostRules(collector); |