| Index: third_party/WebKit/Source/core/dom/Element.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
|
| index 68af23e2104623ab7161b1d3d3d92e123197ecf8..210306d7686e42846e3dcf10033eee127f2baccd 100644
|
| --- a/third_party/WebKit/Source/core/dom/Element.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/Element.cpp
|
| @@ -1918,12 +1918,11 @@ PassRefPtrWillBeRawPtr<ShadowRoot> Element::createShadowRoot(const ScriptState*
|
| return createShadowRootInternal(ShadowRootType::OpenByDefault, exceptionState);
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<ShadowRoot> Element::createShadowRoot(const ScriptState* scriptState, const ShadowRootInit& shadowRootInitDict, ExceptionState& exceptionState)
|
| +PassRefPtrWillBeRawPtr<ShadowRoot> Element::attachShadow(const ScriptState* scriptState, const ShadowRootInit& shadowRootInitDict, ExceptionState& exceptionState)
|
| {
|
| ASSERT(RuntimeEnabledFeatures::shadowDOMV1Enabled());
|
| - UseCounter::count(document(), UseCounter::ElementCreateShadowRootWithParameter);
|
|
|
| - OriginsUsingFeatures::countMainWorldOnly(scriptState, document(), OriginsUsingFeatures::Feature::ElementCreateShadowRoot);
|
| + OriginsUsingFeatures::countMainWorldOnly(scriptState, document(), OriginsUsingFeatures::Feature::ElementAttachShadow);
|
|
|
| if (shadowRootInitDict.hasMode() && shadowRoot()) {
|
| exceptionState.throwDOMException(InvalidStateError, "Shadow root cannot be created on a host which already hosts a shadow tree.");
|
| @@ -1939,9 +1938,9 @@ PassRefPtrWillBeRawPtr<ShadowRoot> Element::createShadowRoot(const ScriptState*
|
| exceptionState.throwDOMException(NotSupportedError, "Closed shadow root is not supported yet.");
|
| return nullptr;
|
| }
|
| - UseCounter::count(document(), UseCounter::ElementCreateShadowRootClosed);
|
| + UseCounter::count(document(), UseCounter::ElementAttachShadowClosed);
|
| } else if (type == ShadowRootType::Open) {
|
| - UseCounter::count(document(), UseCounter::ElementCreateShadowRootOpen);
|
| + UseCounter::count(document(), UseCounter::ElementAttachShadowOpen);
|
| }
|
|
|
| RefPtrWillBeRawPtr<ShadowRoot> shadowRoot = createShadowRootInternal(type, exceptionState);
|
|
|