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

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

Issue 2173623003: Add "Failed" custom element state (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Avoid multiple toElement Created 4 years, 5 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/ScriptCustomElementDefinition.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp
index 342dff7dd84a2ae37a3408aa7e3997b9d989dd25..32dc346ea99baab57c6066e6f681d9a44a86826b 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp
@@ -13,8 +13,8 @@
#include "bindings/core/v8/V8ScriptRunner.h"
#include "bindings/core/v8/V8ThrowException.h"
#include "core/dom/ExceptionCode.h"
+#include "core/dom/custom/CustomElement.h"
#include "core/html/HTMLElement.h"
-#include "core/html/HTMLUnknownElement.h"
#include "v8.h"
#include "wtf/Allocator.h"
@@ -205,12 +205,7 @@ HTMLElement* ScriptCustomElementDefinition::createElementSync(
exceptionState.throwIfNeeded();
}
- // ...and let element be instead a new element that implements
- // HTMLUnknownElement, with no attributes, namespace set to given
- // namespace, namespace prefix set to null, custom element state
- // "undefined", and node document set to document.
- element = HTMLUnknownElement::create(tagName, document);
- element->setCustomElementState(CustomElementState::Undefined);
+ return CustomElement::createFailedElement(document, tagName);
}
return element;
}

Powered by Google App Engine
This is Rietveld 408576698