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 8ba679ecc50d5a8f4404b8cad6ad0817ee2770d4..1236dcaa4269ca575db25921912673d31946b355 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" |
@@ -460,6 +461,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 { |