Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2200613002: The HTML parser synchronously creates custom elements (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Eliminate redundant TODOs. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 {
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698