diff -r 000000000000 -r 4f2f89ce4247 WebCore/generated/JSValidityState.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/WebCore/generated/JSValidityState.cpp Fri Sep 17 09:02:29 2010 +0300 @@ -0,0 +1,195 @@ +/* + 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 "JSValidityState.h" + +#include "ValidityState.h" +#include + +using namespace JSC; + +namespace WebCore { + +ASSERT_CLASS_FITS_IN_CELL(JSValidityState); + +/* Hash table */ +#if ENABLE(JIT) +#define THUNK_GENERATOR(generator) , generator +#else +#define THUNK_GENERATOR(generator) +#endif + +static const HashTableValue JSValidityStateTableValues[10] = +{ + { "valueMissing", DontDelete | ReadOnly, (intptr_t)static_cast(jsValidityStateValueMissing), (intptr_t)0 THUNK_GENERATOR(0) }, + { "typeMismatch", DontDelete | ReadOnly, (intptr_t)static_cast(jsValidityStateTypeMismatch), (intptr_t)0 THUNK_GENERATOR(0) }, + { "patternMismatch", DontDelete | ReadOnly, (intptr_t)static_cast(jsValidityStatePatternMismatch), (intptr_t)0 THUNK_GENERATOR(0) }, + { "tooLong", DontDelete | ReadOnly, (intptr_t)static_cast(jsValidityStateTooLong), (intptr_t)0 THUNK_GENERATOR(0) }, + { "rangeUnderflow", DontDelete | ReadOnly, (intptr_t)static_cast(jsValidityStateRangeUnderflow), (intptr_t)0 THUNK_GENERATOR(0) }, + { "rangeOverflow", DontDelete | ReadOnly, (intptr_t)static_cast(jsValidityStateRangeOverflow), (intptr_t)0 THUNK_GENERATOR(0) }, + { "stepMismatch", DontDelete | ReadOnly, (intptr_t)static_cast(jsValidityStateStepMismatch), (intptr_t)0 THUNK_GENERATOR(0) }, + { "customError", DontDelete | ReadOnly, (intptr_t)static_cast(jsValidityStateCustomError), (intptr_t)0 THUNK_GENERATOR(0) }, + { "valid", DontDelete | ReadOnly, (intptr_t)static_cast(jsValidityStateValid), (intptr_t)0 THUNK_GENERATOR(0) }, + { 0, 0, 0, 0 THUNK_GENERATOR(0) } +}; + +#undef THUNK_GENERATOR +static JSC_CONST_HASHTABLE HashTable JSValidityStateTable = { 34, 31, JSValidityStateTableValues, 0 }; +/* Hash table for prototype */ +#if ENABLE(JIT) +#define THUNK_GENERATOR(generator) , generator +#else +#define THUNK_GENERATOR(generator) +#endif + +static const HashTableValue JSValidityStatePrototypeTableValues[1] = +{ + { 0, 0, 0, 0 THUNK_GENERATOR(0) } +}; + +#undef THUNK_GENERATOR +static JSC_CONST_HASHTABLE HashTable JSValidityStatePrototypeTable = { 1, 0, JSValidityStatePrototypeTableValues, 0 }; +const ClassInfo JSValidityStatePrototype::s_info = { "ValidityStatePrototype", 0, &JSValidityStatePrototypeTable, 0 }; + +JSObject* JSValidityStatePrototype::self(ExecState* exec, JSGlobalObject* globalObject) +{ + return getDOMPrototype(exec, globalObject); +} + +const ClassInfo JSValidityState::s_info = { "ValidityState", 0, &JSValidityStateTable, 0 }; + +JSValidityState::JSValidityState(NonNullPassRefPtr structure, JSDOMGlobalObject* globalObject, PassRefPtr impl) + : DOMObjectWithGlobalPointer(structure, globalObject) + , m_impl(impl) +{ +} + +JSValidityState::~JSValidityState() +{ + forgetDOMObject(this, impl()); +} + +JSObject* JSValidityState::createPrototype(ExecState* exec, JSGlobalObject* globalObject) +{ + return new (exec) JSValidityStatePrototype(globalObject, JSValidityStatePrototype::createStructure(globalObject->objectPrototype())); +} + +bool JSValidityState::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticValueSlot(exec, &JSValidityStateTable, this, propertyName, slot); +} + +bool JSValidityState::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + return getStaticValueDescriptor(exec, &JSValidityStateTable, this, propertyName, descriptor); +} + +JSValue jsValidityStateValueMissing(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSValidityState* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + ValidityState* imp = static_cast(castedThis->impl()); + JSValue result = jsBoolean(imp->valueMissing()); + return result; +} + +JSValue jsValidityStateTypeMismatch(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSValidityState* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + ValidityState* imp = static_cast(castedThis->impl()); + JSValue result = jsBoolean(imp->typeMismatch()); + return result; +} + +JSValue jsValidityStatePatternMismatch(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSValidityState* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + ValidityState* imp = static_cast(castedThis->impl()); + JSValue result = jsBoolean(imp->patternMismatch()); + return result; +} + +JSValue jsValidityStateTooLong(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSValidityState* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + ValidityState* imp = static_cast(castedThis->impl()); + JSValue result = jsBoolean(imp->tooLong()); + return result; +} + +JSValue jsValidityStateRangeUnderflow(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSValidityState* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + ValidityState* imp = static_cast(castedThis->impl()); + JSValue result = jsBoolean(imp->rangeUnderflow()); + return result; +} + +JSValue jsValidityStateRangeOverflow(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSValidityState* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + ValidityState* imp = static_cast(castedThis->impl()); + JSValue result = jsBoolean(imp->rangeOverflow()); + return result; +} + +JSValue jsValidityStateStepMismatch(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSValidityState* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + ValidityState* imp = static_cast(castedThis->impl()); + JSValue result = jsBoolean(imp->stepMismatch()); + return result; +} + +JSValue jsValidityStateCustomError(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSValidityState* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + ValidityState* imp = static_cast(castedThis->impl()); + JSValue result = jsBoolean(imp->customError()); + return result; +} + +JSValue jsValidityStateValid(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSValidityState* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + ValidityState* imp = static_cast(castedThis->impl()); + JSValue result = jsBoolean(imp->valid()); + return result; +} + +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, ValidityState* object) +{ + return getDOMObjectWrapper(exec, globalObject, object); +} +ValidityState* toValidityState(JSC::JSValue value) +{ + return value.inherits(&JSValidityState::s_info) ? static_cast(asObject(value))->impl() : 0; +} + +}