/* | |
This file is part of the WebKit open source project. | |
This file has been generated by generate-bindings.pl. DO NOT MODIFY! | |
This library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Library General Public | |
License as published by the Free Software Foundation; either | |
version 2 of the License, or (at your option) any later version. | |
This library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Library General Public License for more details. | |
You should have received a copy of the GNU Library General Public License | |
along with this library; see the file COPYING.LIB. If not, write to | |
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |
Boston, MA 02110-1301, USA. | |
*/ | |
#include "config.h" | |
#include "JSHTMLTitleElement.h" | |
#include "HTMLTitleElement.h" | |
#include "KURL.h" | |
#include <runtime/JSString.h> | |
#include <wtf/GetPtr.h> | |
using namespace JSC; | |
namespace WebCore { | |
ASSERT_CLASS_FITS_IN_CELL(JSHTMLTitleElement); | |
/* Hash table */ | |
static const HashTableValue JSHTMLTitleElementTableValues[3] = | |
{ | |
{ "text", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTitleElementText), (intptr_t)setJSHTMLTitleElementText }, | |
{ "constructor", DontEnum|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTitleElementConstructor), (intptr_t)0 }, | |
{ 0, 0, 0, 0 } | |
}; | |
static JSC_CONST_HASHTABLE HashTable JSHTMLTitleElementTable = | |
#if ENABLE(PERFECT_HASH_SIZE) | |
{ 1, JSHTMLTitleElementTableValues, 0 }; | |
#else | |
{ 4, 3, JSHTMLTitleElementTableValues, 0 }; | |
#endif | |
/* Hash table for constructor */ | |
static const HashTableValue JSHTMLTitleElementConstructorTableValues[1] = | |
{ | |
{ 0, 0, 0, 0 } | |
}; | |
static JSC_CONST_HASHTABLE HashTable JSHTMLTitleElementConstructorTable = | |
#if ENABLE(PERFECT_HASH_SIZE) | |
{ 0, JSHTMLTitleElementConstructorTableValues, 0 }; | |
#else | |
{ 1, 0, JSHTMLTitleElementConstructorTableValues, 0 }; | |
#endif | |
class JSHTMLTitleElementConstructor : public DOMConstructorObject { | |
public: | |
JSHTMLTitleElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) | |
: DOMConstructorObject(JSHTMLTitleElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) | |
{ | |
putDirect(exec->propertyNames().prototype, JSHTMLTitleElementPrototype::self(exec, globalObject), None); | |
} | |
virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); | |
virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&); | |
virtual const ClassInfo* classInfo() const { return &s_info; } | |
static const ClassInfo s_info; | |
static PassRefPtr<Structure> createStructure(JSValue proto) | |
{ | |
return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); | |
} | |
protected: | |
static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | DOMConstructorObject::StructureFlags; | |
}; | |
const ClassInfo JSHTMLTitleElementConstructor::s_info = { "HTMLTitleElementConstructor", 0, &JSHTMLTitleElementConstructorTable, 0 }; | |
bool JSHTMLTitleElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) | |
{ | |
return getStaticValueSlot<JSHTMLTitleElementConstructor, DOMObject>(exec, &JSHTMLTitleElementConstructorTable, this, propertyName, slot); | |
} | |
bool JSHTMLTitleElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) | |
{ | |
return getStaticValueDescriptor<JSHTMLTitleElementConstructor, DOMObject>(exec, &JSHTMLTitleElementConstructorTable, this, propertyName, descriptor); | |
} | |
/* Hash table for prototype */ | |
static const HashTableValue JSHTMLTitleElementPrototypeTableValues[1] = | |
{ | |
{ 0, 0, 0, 0 } | |
}; | |
static JSC_CONST_HASHTABLE HashTable JSHTMLTitleElementPrototypeTable = | |
#if ENABLE(PERFECT_HASH_SIZE) | |
{ 0, JSHTMLTitleElementPrototypeTableValues, 0 }; | |
#else | |
{ 1, 0, JSHTMLTitleElementPrototypeTableValues, 0 }; | |
#endif | |
const ClassInfo JSHTMLTitleElementPrototype::s_info = { "HTMLTitleElementPrototype", 0, &JSHTMLTitleElementPrototypeTable, 0 }; | |
JSObject* JSHTMLTitleElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject) | |
{ | |
return getDOMPrototype<JSHTMLTitleElement>(exec, globalObject); | |
} | |
const ClassInfo JSHTMLTitleElement::s_info = { "HTMLTitleElement", &JSHTMLElement::s_info, &JSHTMLTitleElementTable, 0 }; | |
JSHTMLTitleElement::JSHTMLTitleElement(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLTitleElement> impl) | |
: JSHTMLElement(structure, globalObject, impl) | |
{ | |
} | |
JSObject* JSHTMLTitleElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject) | |
{ | |
return new (exec) JSHTMLTitleElementPrototype(JSHTMLTitleElementPrototype::createStructure(JSHTMLElementPrototype::self(exec, globalObject))); | |
} | |
bool JSHTMLTitleElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) | |
{ | |
return getStaticValueSlot<JSHTMLTitleElement, Base>(exec, &JSHTMLTitleElementTable, this, propertyName, slot); | |
} | |
bool JSHTMLTitleElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) | |
{ | |
return getStaticValueDescriptor<JSHTMLTitleElement, Base>(exec, &JSHTMLTitleElementTable, this, propertyName, descriptor); | |
} | |
JSValue jsHTMLTitleElementText(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSHTMLTitleElement* castedThis = static_cast<JSHTMLTitleElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
HTMLTitleElement* imp = static_cast<HTMLTitleElement*>(castedThis->impl()); | |
JSValue result = jsString(exec, imp->text()); | |
return result; | |
} | |
JSValue jsHTMLTitleElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSHTMLTitleElement* domObject = static_cast<JSHTMLTitleElement*>(asObject(slotBase)); | |
return JSHTMLTitleElement::getConstructor(exec, domObject->globalObject()); | |
} | |
void JSHTMLTitleElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) | |
{ | |
lookupPut<JSHTMLTitleElement, Base>(exec, propertyName, value, &JSHTMLTitleElementTable, this, slot); | |
} | |
void setJSHTMLTitleElementText(ExecState* exec, JSObject* thisObject, JSValue value) | |
{ | |
JSHTMLTitleElement* castedThisObj = static_cast<JSHTMLTitleElement*>(thisObject); | |
HTMLTitleElement* imp = static_cast<HTMLTitleElement*>(castedThisObj->impl()); | |
imp->setText(valueToStringWithNullCheck(exec, value)); | |
} | |
JSValue JSHTMLTitleElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) | |
{ | |
return getDOMConstructor<JSHTMLTitleElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); | |
} | |
} |