blob: 1ecd8350b0afa7824e363b735d3026e8e902e8d8 [file] [log] [blame]
/*
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 "JSHTMLTableCellElement.h"
#include "HTMLNames.h"
#include "JSDOMBinding.h"
#include "JSDOMConstructor.h"
#include "JSDOMConvert.h"
#include "URL.h"
#include <runtime/JSString.h>
#include <wtf/GetPtr.h>
using namespace JSC;
namespace WebCore {
// Attributes
JSC::EncodedJSValue jsHTMLTableCellElementCellIndex(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsHTMLTableCellElementAlign(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLTableCellElementAlign(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLTableCellElementAxis(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLTableCellElementAxis(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLTableCellElementBgColor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLTableCellElementBgColor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLTableCellElementCh(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLTableCellElementCh(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLTableCellElementChOff(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLTableCellElementChOff(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLTableCellElementColSpan(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLTableCellElementColSpan(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLTableCellElementRowSpan(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLTableCellElementRowSpan(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLTableCellElementHeaders(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLTableCellElementHeaders(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLTableCellElementHeight(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLTableCellElementHeight(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLTableCellElementNoWrap(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLTableCellElementNoWrap(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLTableCellElementVAlign(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLTableCellElementVAlign(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLTableCellElementWidth(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLTableCellElementWidth(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLTableCellElementAbbr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLTableCellElementAbbr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLTableCellElementScope(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLTableCellElementScope(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsHTMLTableCellElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSHTMLTableCellElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
class JSHTMLTableCellElementPrototype : public JSC::JSNonFinalObject {
public:
typedef JSC::JSNonFinalObject Base;
static JSHTMLTableCellElementPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
{
JSHTMLTableCellElementPrototype* ptr = new (NotNull, JSC::allocateCell<JSHTMLTableCellElementPrototype>(vm.heap)) JSHTMLTableCellElementPrototype(vm, globalObject, structure);
ptr->finishCreation(vm);
return ptr;
}
DECLARE_INFO;
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
{
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
}
private:
JSHTMLTableCellElementPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
: JSC::JSNonFinalObject(vm, structure)
{
}
void finishCreation(JSC::VM&);
};
typedef JSDOMConstructorNotConstructable<JSHTMLTableCellElement> JSHTMLTableCellElementConstructor;
template<> JSValue JSHTMLTableCellElementConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
{
return JSHTMLElement::getConstructor(vm, &globalObject);
}
template<> void JSHTMLTableCellElementConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
{
putDirect(vm, vm.propertyNames->prototype, JSHTMLTableCellElement::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);
putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("HTMLTableCellElement"))), ReadOnly | DontEnum);
putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
}
template<> const ClassInfo JSHTMLTableCellElementConstructor::s_info = { "HTMLTableCellElement", &Base::s_info, 0, CREATE_METHOD_TABLE(JSHTMLTableCellElementConstructor) };
/* Hash table for prototype */
static const HashTableValue JSHTMLTableCellElementPrototypeTableValues[] =
{
{ "constructor", DontEnum, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableCellElementConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTableCellElementConstructor) } },
{ "cellIndex", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableCellElementCellIndex), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
{ "align", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableCellElementAlign), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTableCellElementAlign) } },
{ "axis", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableCellElementAxis), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTableCellElementAxis) } },
{ "bgColor", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableCellElementBgColor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTableCellElementBgColor) } },
{ "ch", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableCellElementCh), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTableCellElementCh) } },
{ "chOff", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableCellElementChOff), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTableCellElementChOff) } },
{ "colSpan", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableCellElementColSpan), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTableCellElementColSpan) } },
{ "rowSpan", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableCellElementRowSpan), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTableCellElementRowSpan) } },
{ "headers", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableCellElementHeaders), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTableCellElementHeaders) } },
{ "height", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableCellElementHeight), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTableCellElementHeight) } },
{ "noWrap", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableCellElementNoWrap), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTableCellElementNoWrap) } },
{ "vAlign", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableCellElementVAlign), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTableCellElementVAlign) } },
{ "width", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableCellElementWidth), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTableCellElementWidth) } },
{ "abbr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableCellElementAbbr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTableCellElementAbbr) } },
{ "scope", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTableCellElementScope), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTableCellElementScope) } },
};
const ClassInfo JSHTMLTableCellElementPrototype::s_info = { "HTMLTableCellElementPrototype", &Base::s_info, 0, CREATE_METHOD_TABLE(JSHTMLTableCellElementPrototype) };
void JSHTMLTableCellElementPrototype::finishCreation(VM& vm)
{
Base::finishCreation(vm);
reifyStaticProperties(vm, JSHTMLTableCellElementPrototypeTableValues, *this);
}
const ClassInfo JSHTMLTableCellElement::s_info = { "HTMLTableCellElement", &Base::s_info, 0, CREATE_METHOD_TABLE(JSHTMLTableCellElement) };
JSHTMLTableCellElement::JSHTMLTableCellElement(Structure* structure, JSDOMGlobalObject& globalObject, Ref<HTMLTableCellElement>&& impl)
: JSHTMLElement(structure, globalObject, WTFMove(impl))
{
}
JSObject* JSHTMLTableCellElement::createPrototype(VM& vm, JSGlobalObject* globalObject)
{
return JSHTMLTableCellElementPrototype::create(vm, globalObject, JSHTMLTableCellElementPrototype::createStructure(vm, globalObject, JSHTMLElement::prototype(vm, globalObject)));
}
JSObject* JSHTMLTableCellElement::prototype(VM& vm, JSGlobalObject* globalObject)
{
return getDOMPrototype<JSHTMLTableCellElement>(vm, globalObject);
}
EncodedJSValue jsHTMLTableCellElementCellIndex(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLTableCellElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLTableCellElement", "cellIndex");
}
auto& impl = castedThis->wrapped();
JSValue result = jsNumber(impl.cellIndex());
return JSValue::encode(result);
}
EncodedJSValue jsHTMLTableCellElementAlign(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLTableCellElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLTableCellElement", "align");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::alignAttr));
return JSValue::encode(result);
}
EncodedJSValue jsHTMLTableCellElementAxis(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLTableCellElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLTableCellElement", "axis");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::axisAttr));
return JSValue::encode(result);
}
EncodedJSValue jsHTMLTableCellElementBgColor(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLTableCellElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLTableCellElement", "bgColor");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::bgcolorAttr));
return JSValue::encode(result);
}
EncodedJSValue jsHTMLTableCellElementCh(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLTableCellElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLTableCellElement", "ch");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::charAttr));
return JSValue::encode(result);
}
EncodedJSValue jsHTMLTableCellElementChOff(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLTableCellElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLTableCellElement", "chOff");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::charoffAttr));
return JSValue::encode(result);
}
EncodedJSValue jsHTMLTableCellElementColSpan(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLTableCellElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLTableCellElement", "colSpan");
}
auto& impl = castedThis->wrapped();
JSValue result = jsNumber(impl.colSpanForBindings());
return JSValue::encode(result);
}
EncodedJSValue jsHTMLTableCellElementRowSpan(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLTableCellElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLTableCellElement", "rowSpan");
}
auto& impl = castedThis->wrapped();
JSValue result = jsNumber(impl.rowSpanForBindings());
return JSValue::encode(result);
}
EncodedJSValue jsHTMLTableCellElementHeaders(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLTableCellElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLTableCellElement", "headers");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::headersAttr));
return JSValue::encode(result);
}
EncodedJSValue jsHTMLTableCellElementHeight(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLTableCellElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLTableCellElement", "height");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::heightAttr));
return JSValue::encode(result);
}
EncodedJSValue jsHTMLTableCellElementNoWrap(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLTableCellElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLTableCellElement", "noWrap");
}
auto& impl = castedThis->wrapped();
JSValue result = jsBoolean(impl.hasAttributeWithoutSynchronization(WebCore::HTMLNames::nowrapAttr));
return JSValue::encode(result);
}
EncodedJSValue jsHTMLTableCellElementVAlign(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLTableCellElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLTableCellElement", "vAlign");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::valignAttr));
return JSValue::encode(result);
}
EncodedJSValue jsHTMLTableCellElementWidth(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLTableCellElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLTableCellElement", "width");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::widthAttr));
return JSValue::encode(result);
}
EncodedJSValue jsHTMLTableCellElementAbbr(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLTableCellElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLTableCellElement", "abbr");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::abbrAttr));
return JSValue::encode(result);
}
EncodedJSValue jsHTMLTableCellElementScope(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
UNUSED_PARAM(thisValue);
JSValue decodedThisValue = JSValue::decode(thisValue);
auto* castedThis = jsDynamicCast<JSHTMLTableCellElement*>(decodedThisValue);
if (UNLIKELY(!castedThis)) {
return throwGetterTypeError(*state, throwScope, "HTMLTableCellElement", "scope");
}
auto& impl = castedThis->wrapped();
JSValue result = jsStringWithCache(state, impl.scope());
return JSValue::encode(result);
}
EncodedJSValue jsHTMLTableCellElementConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
JSHTMLTableCellElementPrototype* domObject = jsDynamicCast<JSHTMLTableCellElementPrototype*>(JSValue::decode(thisValue));
if (UNLIKELY(!domObject))
return throwVMTypeError(state, throwScope);
return JSValue::encode(JSHTMLTableCellElement::getConstructor(state->vm(), domObject->globalObject()));
}
bool setJSHTMLTableCellElementConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
JSValue value = JSValue::decode(encodedValue);
JSHTMLTableCellElementPrototype* domObject = jsDynamicCast<JSHTMLTableCellElementPrototype*>(JSValue::decode(thisValue));
if (UNLIKELY(!domObject)) {
throwVMTypeError(state, throwScope);
return false;
}
// Shadowing a built-in constructor
return domObject->putDirect(state->vm(), state->propertyNames().constructor, value);
}
bool setJSHTMLTableCellElementAlign(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLTableCellElement* castedThis = jsDynamicCast<JSHTMLTableCellElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLTableCellElement", "align");
}
auto& impl = castedThis->wrapped();
auto nativeValue = value.toWTFString(state);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::alignAttr, WTFMove(nativeValue));
return true;
}
bool setJSHTMLTableCellElementAxis(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLTableCellElement* castedThis = jsDynamicCast<JSHTMLTableCellElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLTableCellElement", "axis");
}
auto& impl = castedThis->wrapped();
auto nativeValue = value.toWTFString(state);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::axisAttr, WTFMove(nativeValue));
return true;
}
bool setJSHTMLTableCellElementBgColor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLTableCellElement* castedThis = jsDynamicCast<JSHTMLTableCellElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLTableCellElement", "bgColor");
}
auto& impl = castedThis->wrapped();
auto nativeValue = valueToStringTreatingNullAsEmptyString(state, value);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::bgcolorAttr, WTFMove(nativeValue));
return true;
}
bool setJSHTMLTableCellElementCh(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLTableCellElement* castedThis = jsDynamicCast<JSHTMLTableCellElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLTableCellElement", "ch");
}
auto& impl = castedThis->wrapped();
auto nativeValue = value.toWTFString(state);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::charAttr, WTFMove(nativeValue));
return true;
}
bool setJSHTMLTableCellElementChOff(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLTableCellElement* castedThis = jsDynamicCast<JSHTMLTableCellElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLTableCellElement", "chOff");
}
auto& impl = castedThis->wrapped();
auto nativeValue = value.toWTFString(state);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::charoffAttr, WTFMove(nativeValue));
return true;
}
bool setJSHTMLTableCellElementColSpan(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLTableCellElement* castedThis = jsDynamicCast<JSHTMLTableCellElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLTableCellElement", "colSpan");
}
auto& impl = castedThis->wrapped();
auto nativeValue = convert<uint32_t>(*state, value, NormalConversion);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setColSpanForBindings(WTFMove(nativeValue));
return true;
}
bool setJSHTMLTableCellElementRowSpan(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLTableCellElement* castedThis = jsDynamicCast<JSHTMLTableCellElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLTableCellElement", "rowSpan");
}
auto& impl = castedThis->wrapped();
auto nativeValue = convert<uint32_t>(*state, value, NormalConversion);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setRowSpanForBindings(WTFMove(nativeValue));
return true;
}
bool setJSHTMLTableCellElementHeaders(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLTableCellElement* castedThis = jsDynamicCast<JSHTMLTableCellElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLTableCellElement", "headers");
}
auto& impl = castedThis->wrapped();
auto nativeValue = value.toWTFString(state);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::headersAttr, WTFMove(nativeValue));
return true;
}
bool setJSHTMLTableCellElementHeight(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLTableCellElement* castedThis = jsDynamicCast<JSHTMLTableCellElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLTableCellElement", "height");
}
auto& impl = castedThis->wrapped();
auto nativeValue = value.toWTFString(state);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::heightAttr, WTFMove(nativeValue));
return true;
}
bool setJSHTMLTableCellElementNoWrap(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLTableCellElement* castedThis = jsDynamicCast<JSHTMLTableCellElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLTableCellElement", "noWrap");
}
auto& impl = castedThis->wrapped();
auto nativeValue = value.toBoolean(state);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setBooleanAttribute(WebCore::HTMLNames::nowrapAttr, WTFMove(nativeValue));
return true;
}
bool setJSHTMLTableCellElementVAlign(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLTableCellElement* castedThis = jsDynamicCast<JSHTMLTableCellElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLTableCellElement", "vAlign");
}
auto& impl = castedThis->wrapped();
auto nativeValue = value.toWTFString(state);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::valignAttr, WTFMove(nativeValue));
return true;
}
bool setJSHTMLTableCellElementWidth(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLTableCellElement* castedThis = jsDynamicCast<JSHTMLTableCellElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLTableCellElement", "width");
}
auto& impl = castedThis->wrapped();
auto nativeValue = value.toWTFString(state);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::widthAttr, WTFMove(nativeValue));
return true;
}
bool setJSHTMLTableCellElementAbbr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLTableCellElement* castedThis = jsDynamicCast<JSHTMLTableCellElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLTableCellElement", "abbr");
}
auto& impl = castedThis->wrapped();
auto nativeValue = value.toWTFString(state);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::abbrAttr, WTFMove(nativeValue));
return true;
}
bool setJSHTMLTableCellElementScope(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
VM& vm = state->vm();
auto throwScope = DECLARE_THROW_SCOPE(vm);
UNUSED_PARAM(throwScope);
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(thisValue);
JSHTMLTableCellElement* castedThis = jsDynamicCast<JSHTMLTableCellElement*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
return throwSetterTypeError(*state, throwScope, "HTMLTableCellElement", "scope");
}
auto& impl = castedThis->wrapped();
auto nativeValue = value.toWTFString(state);
RETURN_IF_EXCEPTION(throwScope, false);
impl.setScope(WTFMove(nativeValue));
return true;
}
JSValue JSHTMLTableCellElement::getConstructor(VM& vm, const JSGlobalObject* globalObject)
{
return getDOMConstructor<JSHTMLTableCellElementConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject));
}
void JSHTMLTableCellElement::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
auto* thisObject = jsCast<JSHTMLTableCellElement*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, info());
Base::visitChildren(thisObject, visitor);
thisObject->wrapped().visitJSEventListeners(visitor);
}
}