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

Unified Diff: Source/core/css/resolver/ScopedStyleTree.cpp

Issue 325663003: Remove scoped styles (retry) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix layout test (and expectation) Created 6 years, 6 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
« no previous file with comments | « Source/core/css/resolver/ScopedStyleResolver.cpp ('k') | Source/core/css/resolver/SharedStyleFinder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/ScopedStyleTree.cpp
diff --git a/Source/core/css/resolver/ScopedStyleTree.cpp b/Source/core/css/resolver/ScopedStyleTree.cpp
index 369a8e2450bd497e4514ca10b529281ba391b2a4..3b27951217e81ca846ab4b8b9ccfe951809e3798 100644
--- a/Source/core/css/resolver/ScopedStyleTree.cpp
+++ b/Source/core/css/resolver/ScopedStyleTree.cpp
@@ -47,8 +47,7 @@ ScopedStyleResolver* ScopedStyleTree::ensureScopedStyleResolver(ContainerNode& s
ScopedStyleResolver* ScopedStyleTree::scopedStyleResolverFor(const ContainerNode& scopingNode)
{
- if (!scopingNode.hasScopedHTMLStyleChild()
- && !isShadowHost(&scopingNode)
+ if (!isShadowHost(&scopingNode)
&& !scopingNode.isDocumentNode()
&& !scopingNode.isShadowRoot())
return 0;
@@ -125,7 +124,7 @@ void ScopedStyleTree::collectScopedResolversForHostedShadowTrees(const Element*
// Adding scoped resolver for active shadow roots for shadow host styling.
for (ShadowRoot* shadowRoot = shadow->youngestShadowRoot(); shadowRoot; shadowRoot = shadowRoot->olderShadowRoot()) {
- if (shadowRoot->hasScopedHTMLStyleChild()) {
+ if (shadowRoot->numberOfStyles() > 0) {
if (ScopedStyleResolver* resolver = scopedStyleResolverFor(*shadowRoot))
resolvers.append(resolver);
}
« no previous file with comments | « Source/core/css/resolver/ScopedStyleResolver.cpp ('k') | Source/core/css/resolver/SharedStyleFinder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698