Index: third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp |
diff --git a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp |
index f178a4be125a963cdf7ec107985b8652be38d5e2..ff6ada9618cc8b25febee8d7d9f5feebceb3d3d0 100644 |
--- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp |
+++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp |
@@ -39,6 +39,7 @@ |
#include "core/dom/ExecutionContextTask.h" |
#include "core/dom/FrameRequestCallback.h" |
#include "core/dom/SandboxFlags.h" |
+#include "core/dom/custom/CustomElementsRegistry.h" |
#include "core/editing/Editor.h" |
#include "core/events/DOMWindowEventQueue.h" |
#include "core/events/HashChangeEvent.h" |
@@ -552,6 +553,7 @@ void LocalDOMWindow::reset() |
m_console = nullptr; |
m_navigator = nullptr; |
m_media = nullptr; |
+ m_customElements = nullptr; |
m_applicationCache = nullptr; |
#if ENABLE(ASSERT) |
m_hasBeenReset = true; |
@@ -1308,6 +1310,13 @@ void LocalDOMWindow::cancelIdleCallback(int id) |
document->cancelIdleCallback(id); |
} |
+CustomElementsRegistry* LocalDOMWindow::customElements() const |
+{ |
+ if (!m_customElements) |
+ m_customElements = CustomElementsRegistry::create(); |
+ return m_customElements.get(); |
+} |
+ |
bool LocalDOMWindow::addEventListenerInternal(const AtomicString& eventType, EventListener* listener, const EventListenerOptions& options) |
{ |
if (!EventTarget::addEventListenerInternal(eventType, listener, options)) |
@@ -1504,6 +1513,7 @@ DEFINE_TRACE(LocalDOMWindow) |
visitor->trace(m_console); |
visitor->trace(m_navigator); |
visitor->trace(m_media); |
+ visitor->trace(m_customElements); |
visitor->trace(m_applicationCache); |
visitor->trace(m_eventQueue); |
visitor->trace(m_postMessageTimers); |