| Index: sky/engine/bindings/core/v8/CustomElementConstructorBuilder.cpp
|
| diff --git a/sky/engine/bindings/core/v8/CustomElementConstructorBuilder.cpp b/sky/engine/bindings/core/v8/CustomElementConstructorBuilder.cpp
|
| index 618d570ab1ecfca46e5be9edc26834c5ff4fa6a4..a5aabc2aa7b1dd068c4df3b165a705abf78c3640 100644
|
| --- a/sky/engine/bindings/core/v8/CustomElementConstructorBuilder.cpp
|
| +++ b/sky/engine/bindings/core/v8/CustomElementConstructorBuilder.cpp
|
| @@ -171,31 +171,25 @@ bool CustomElementConstructorBuilder::createConstructor(Document* document, Cust
|
|
|
| v8::Isolate* isolate = m_scriptState->isolate();
|
|
|
| - if (!prototypeIsValid(definition->descriptor().type(), exceptionState))
|
| + if (!prototypeIsValid(definition->descriptor().localName(), exceptionState))
|
| return false;
|
|
|
| v8::Local<v8::FunctionTemplate> constructorTemplate = v8::FunctionTemplate::New(isolate);
|
| constructorTemplate->SetCallHandler(constructCustomElement);
|
| m_constructor = constructorTemplate->GetFunction();
|
| if (m_constructor.IsEmpty()) {
|
| - CustomElementException::throwException(CustomElementException::ContextDestroyedRegisteringDefinition, definition->descriptor().type(), exceptionState);
|
| + CustomElementException::throwException(CustomElementException::ContextDestroyedRegisteringDefinition, definition->descriptor().localName(), exceptionState);
|
| return false;
|
| }
|
|
|
| const CustomElementDescriptor& descriptor = definition->descriptor();
|
|
|
| v8::Handle<v8::String> v8TagName = v8String(isolate, descriptor.localName());
|
| - v8::Handle<v8::Value> v8Type;
|
| - if (descriptor.isTypeExtension())
|
| - v8Type = v8String(isolate, descriptor.type());
|
| - else
|
| - v8Type = v8::Null(isolate);
|
|
|
| - m_constructor->SetName(v8Type->IsNull() ? v8TagName : v8Type.As<v8::String>());
|
| + m_constructor->SetName(v8TagName);
|
|
|
| V8HiddenValue::setHiddenValue(isolate, m_constructor, V8HiddenValue::customElementDocument(isolate), toV8(document, m_scriptState->context()->Global(), isolate));
|
| V8HiddenValue::setHiddenValue(isolate, m_constructor, V8HiddenValue::customElementTagName(isolate), v8TagName);
|
| - V8HiddenValue::setHiddenValue(isolate, m_constructor, V8HiddenValue::customElementType(isolate), v8Type);
|
|
|
| v8::Handle<v8::String> prototypeKey = v8String(isolate, "prototype");
|
| v8::Handle<v8::String> constructorKey = v8String(isolate, "constructor");
|
| @@ -277,12 +271,10 @@ static void constructCustomElement(const v8::FunctionCallbackInfo<v8::Value>& in
|
|
|
| Document* document = V8Document::toNative(V8HiddenValue::getHiddenValue(info.GetIsolate(), info.Callee(), V8HiddenValue::customElementDocument(isolate)).As<v8::Object>());
|
| TOSTRING_VOID(V8StringResource<>, tagName, V8HiddenValue::getHiddenValue(isolate, info.Callee(), V8HiddenValue::customElementTagName(isolate)));
|
| - v8::Handle<v8::Value> maybeType = V8HiddenValue::getHiddenValue(info.GetIsolate(), info.Callee(), V8HiddenValue::customElementType(isolate));
|
| - TOSTRING_VOID(V8StringResource<>, type, maybeType);
|
|
|
| ExceptionState exceptionState(ExceptionState::ConstructionContext, "CustomElement", info.Holder(), info.GetIsolate());
|
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope;
|
| - RefPtr<Element> element = document->createElement(tagName, maybeType->IsNull() ? nullAtom : type, exceptionState);
|
| + RefPtr<Element> element = document->createElement(tagName, exceptionState);
|
| if (exceptionState.throwIfNeeded())
|
| return;
|
| v8SetReturnValueFast(info, element.release(), document);
|
|
|