Index: third_party/WebKit/Source/core/dom/Document.cpp |
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp |
index 8c1c043632fe2f3c0c3b70dba4d5747165f0aaf8..7fd71c2799b43df89f11f6c18eb1d1bfb9c6dbee 100644 |
--- a/third_party/WebKit/Source/core/dom/Document.cpp |
+++ b/third_party/WebKit/Source/core/dom/Document.cpp |
@@ -107,6 +107,7 @@ |
#include "core/dom/VisitedLinkState.h" |
#include "core/dom/XMLDocument.h" |
#include "core/dom/custom/CustomElement.h" |
+#include "core/dom/custom/CustomElementsRegistry.h" |
#include "core/dom/custom/V0CustomElementMicrotaskRunQueue.h" |
#include "core/dom/custom/V0CustomElementRegistrationContext.h" |
#include "core/dom/shadow/ElementShadow.h" |
@@ -461,6 +462,12 @@ Document::Document(const DocumentInit& initializer, DocumentClassFlags documentC |
m_fetcher = m_frame->loader().documentLoader()->fetcher(); |
FrameFetchContext::provideDocumentToContext(m_fetcher->context(), this); |
+ |
+ CustomElementsRegistry* registry = m_frame->localDOMWindow() |
+ ? m_frame->localDOMWindow()->maybeCustomElements() |
+ : nullptr; |
+ if (registry && m_registrationContext) |
+ registry->entangle(m_registrationContext); |
} else if (m_importsController) { |
m_fetcher = FrameFetchContext::createContextAndFetcher(nullptr, this); |
} else { |