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

Unified Diff: third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp

Issue 2472613004: Remove ShadowRoot::numberOfStyles(). (Closed)
Patch Set: Rebased Created 4 years, 1 month 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/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);
« no previous file with comments | « third_party/WebKit/LayoutTests/shadow-dom/host-link-style.html ('k') | third_party/WebKit/Source/core/dom/StyleElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698