Index: third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp |
diff --git a/third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp b/third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp |
index aa11696e48e513f271c11440900cbd4e7b20a427..b4e93ba31e21a2d560841d0c6c4d0367a5f4cac1 100644 |
--- a/third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp |
+++ b/third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp |
@@ -149,17 +149,9 @@ ShadowRoot& ElementShadow::addShadowRoot(Element& shadowHost, ShadowRootType typ |
EventDispatchForbiddenScope assertNoEventDispatch; |
ScriptForbiddenScope forbidScript; |
- if (type == ShadowRootType::V0) { |
- if (m_shadowRoots.isEmpty()) { |
- shadowHost.willAddFirstAuthorShadowRoot(); |
- } else if (m_shadowRoots.head()->type() == ShadowRootType::UserAgent) { |
- shadowHost.willAddFirstAuthorShadowRoot(); |
- Deprecation::countDeprecation(shadowHost.document(), UseCounter::ElementCreateShadowRootMultipleWithUserAgentShadowRoot); |
- } else { |
- Deprecation::countDeprecation(shadowHost.document(), UseCounter::ElementCreateShadowRootMultiple); |
- } |
- } else if (type == ShadowRootType::Open || type == ShadowRootType::Closed) { |
- shadowHost.willAddFirstAuthorShadowRoot(); |
+ if (type == ShadowRootType::V0 && !m_shadowRoots.isEmpty()) { |
+ DCHECK_NE(ShadowRootType::UserAgent, m_shadowRoots.head()->type()); |
+ Deprecation::countDeprecation(shadowHost.document(), UseCounter::ElementCreateShadowRootMultiple); |
} |
for (ShadowRoot* root = m_shadowRoots.head(); root; root = root->olderShadowRoot()) |