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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLElementCustom.cpp

Issue 2274883005: Fix ScriptCustomElementDefinition::createElementSync to use the given document (Closed)
Patch Set: Remove #if DCHECK_IS_ON() due to failure on CrOS 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/bindings/core/v8/custom/V8HTMLElementCustom.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLElementCustom.cpp b/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLElementCustom.cpp
index 77e327f20115c9ae3ce0ec6993fa13938d6998ae..6ea7a2eb1bec26bd75affb03cf4edd032449f237 100644
--- a/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLElementCustom.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLElementCustom.cpp
@@ -56,15 +56,7 @@ void V8HTMLElement::constructorCustom(
Element* element;
if (definition->constructionStack().isEmpty()) {
// This is an element being created with 'new' from script
- // TODO(kojii): When HTMLElementFactory has an option not to queue
- // upgrade, call that instead of HTMLElement. HTMLElement is enough
- // for now, but type extension will require HTMLElementFactory.
- element = HTMLElement::create(
- QualifiedName(nullAtom, definition->descriptor().localName(), HTMLNames::xhtmlNamespaceURI),
- *window->document());
- // TODO(davaajav): write this as one call to setCustomElementState instead of two
- element->setCustomElementState(CustomElementState::Undefined);
- element->setCustomElementDefinition(definition);
+ element = definition->createElementForConstructor(*window->document());
} else {
element = definition->constructionStack().last();
if (element) {

Powered by Google App Engine
This is Rietveld 408576698