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

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

Issue 16708002: Simplify Custom Element constructors to be functions, not wrappers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix callback functions as parameters Created 7 years, 6 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: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 063c4fd4ee7d7fc872fb604b541e39a950be54e9..1df0a473f1ad3efe3e8244c9b899fbcf77933b1c 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -66,7 +66,6 @@
#include "core/dom/CDATASection.h"
#include "core/dom/Comment.h"
#include "core/dom/ContextFeatures.h"
-#include "core/dom/CustomElementConstructor.h"
#include "core/dom/CustomElementRegistry.h"
#include "core/dom/DOMImplementation.h"
#include "core/dom/DOMNamedFlowCollection.h"
@@ -828,16 +827,16 @@ PassRefPtr<Element> Document::createElementNS(const AtomicString& namespaceURI,
return element;
}
-PassRefPtr<CustomElementConstructor> Document::registerElement(WebCore::ScriptState* state, const AtomicString& name, ExceptionCode& ec)
+ScriptValue Document::registerElement(WebCore::ScriptState* state, const AtomicString& name, ExceptionCode& ec)
{
return registerElement(state, name, Dictionary(), ec);
}
-PassRefPtr<CustomElementConstructor> Document::registerElement(WebCore::ScriptState* state, const AtomicString& name, const Dictionary& options, ExceptionCode& ec)
+ScriptValue Document::registerElement(WebCore::ScriptState* state, const AtomicString& name, const Dictionary& options, ExceptionCode& ec)
{
if (!isHTMLDocument() && !isXHTMLDocument()) {
ec = NOT_SUPPORTED_ERR;
- return 0;
+ return ScriptValue();
}
return ensureCustomElementRegistry()->registerElement(state, name, options, ec);

Powered by Google App Engine
This is Rietveld 408576698