Index: third_party/WebKit/Source/core/dom/custom/CustomElement.cpp |
diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp b/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp |
index 4baaeb9fa98f9ce2d5a3a9a18e48369e42cb2d92..12f220e68a603f372f802a8650c12b72121f9725 100644 |
--- a/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp |
+++ b/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp |
@@ -5,16 +5,23 @@ |
#include "core/dom/custom/CustomElement.h" |
#include "core/dom/Document.h" |
-#include "core/dom/Element.h" |
#include "core/dom/QualifiedName.h" |
#include "core/dom/custom/V0CustomElement.h" |
#include "core/dom/custom/V0CustomElementRegistrationContext.h" |
+#include "core/frame/LocalDOMWindow.h" |
#include "core/html/HTMLElement.h" |
#include "platform/text/Character.h" |
#include "wtf/text/AtomicStringHash.h" |
namespace blink { |
+CustomElementsRegistry* CustomElement::registry(const Element& element) |
+{ |
+ if (LocalDOMWindow* window = element.document().domWindow()) |
+ return window->customElements(); |
+ return nullptr; |
+} |
+ |
bool CustomElement::isValidName(const AtomicString& name) |
{ |
if (!name.length() || name[0] < 'a' || name[0] > 'z') |