| Index: Source/core/dom/shadow/ElementShadow.cpp
|
| diff --git a/Source/core/dom/shadow/ElementShadow.cpp b/Source/core/dom/shadow/ElementShadow.cpp
|
| index 9276974aa453970fc9e0959331060577a6012e98..a11b94627e18f0af0578138171da152443bcc9fb 100644
|
| --- a/Source/core/dom/shadow/ElementShadow.cpp
|
| +++ b/Source/core/dom/shadow/ElementShadow.cpp
|
| @@ -149,10 +149,14 @@ ShadowRoot& ElementShadow::addShadowRoot(Element& shadowHost, ShadowRoot::Shadow
|
| ScriptForbiddenScope forbidScript;
|
|
|
| if (type == ShadowRoot::OpenShadowRoot) {
|
| - if (!youngestShadowRoot() || youngestShadowRoot()->type() == ShadowRoot::UserAgentShadowRoot)
|
| + if (!youngestShadowRoot()) {
|
| shadowHost.willAddFirstOpenShadowRoot();
|
| - else
|
| - UseCounter::count(shadowHost.document(), UseCounter::ElementCreateShadowRootMultiple);
|
| + } else if (youngestShadowRoot()->type() == ShadowRoot::UserAgentShadowRoot) {
|
| + shadowHost.willAddFirstOpenShadowRoot();
|
| + UseCounter::countDeprecation(shadowHost.document(), UseCounter::ElementCreateShadowRootMultipleWithUserAgentShadowRoot);
|
| + } else {
|
| + UseCounter::countDeprecation(shadowHost.document(), UseCounter::ElementCreateShadowRootMultiple);
|
| + }
|
| }
|
|
|
| for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadowRoot())
|
|
|