| /* |
| 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 "JSHTMLMarqueeElement.h" |
| |
| #include "ExceptionCode.h" |
| #include "HTMLNames.h" |
| #include "JSDOMBinding.h" |
| #include "JSDOMConstructor.h" |
| #include "JSDOMConvert.h" |
| #include "URL.h" |
| #include <runtime/Error.h> |
| #include <runtime/JSString.h> |
| #include <wtf/GetPtr.h> |
| |
| using namespace JSC; |
| |
| namespace WebCore { |
| |
| // Functions |
| |
| JSC::EncodedJSValue JSC_HOST_CALL jsHTMLMarqueeElementPrototypeFunctionStart(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsHTMLMarqueeElementPrototypeFunctionStop(JSC::ExecState*); |
| |
| // Attributes |
| |
| JSC::EncodedJSValue jsHTMLMarqueeElementBehavior(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSHTMLMarqueeElementBehavior(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsHTMLMarqueeElementBgColor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSHTMLMarqueeElementBgColor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsHTMLMarqueeElementDirection(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSHTMLMarqueeElementDirection(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsHTMLMarqueeElementHeight(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSHTMLMarqueeElementHeight(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsHTMLMarqueeElementHspace(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSHTMLMarqueeElementHspace(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsHTMLMarqueeElementLoop(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSHTMLMarqueeElementLoop(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsHTMLMarqueeElementScrollAmount(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSHTMLMarqueeElementScrollAmount(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsHTMLMarqueeElementScrollDelay(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSHTMLMarqueeElementScrollDelay(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsHTMLMarqueeElementTrueSpeed(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSHTMLMarqueeElementTrueSpeed(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsHTMLMarqueeElementVspace(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSHTMLMarqueeElementVspace(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsHTMLMarqueeElementWidth(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSHTMLMarqueeElementWidth(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsHTMLMarqueeElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSHTMLMarqueeElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| |
| class JSHTMLMarqueeElementPrototype : public JSC::JSNonFinalObject { |
| public: |
| typedef JSC::JSNonFinalObject Base; |
| static JSHTMLMarqueeElementPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) |
| { |
| JSHTMLMarqueeElementPrototype* ptr = new (NotNull, JSC::allocateCell<JSHTMLMarqueeElementPrototype>(vm.heap)) JSHTMLMarqueeElementPrototype(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: |
| JSHTMLMarqueeElementPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) |
| : JSC::JSNonFinalObject(vm, structure) |
| { |
| } |
| |
| void finishCreation(JSC::VM&); |
| }; |
| |
| typedef JSDOMConstructorNotConstructable<JSHTMLMarqueeElement> JSHTMLMarqueeElementConstructor; |
| |
| template<> JSValue JSHTMLMarqueeElementConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject) |
| { |
| return JSHTMLElement::getConstructor(vm, &globalObject); |
| } |
| |
| template<> void JSHTMLMarqueeElementConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) |
| { |
| putDirect(vm, vm.propertyNames->prototype, JSHTMLMarqueeElement::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum); |
| putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("HTMLMarqueeElement"))), ReadOnly | DontEnum); |
| putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); |
| } |
| |
| template<> const ClassInfo JSHTMLMarqueeElementConstructor::s_info = { "HTMLMarqueeElement", &Base::s_info, 0, CREATE_METHOD_TABLE(JSHTMLMarqueeElementConstructor) }; |
| |
| /* Hash table for prototype */ |
| |
| static const HashTableValue JSHTMLMarqueeElementPrototypeTableValues[] = |
| { |
| { "constructor", DontEnum, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLMarqueeElementConstructor) } }, |
| { "behavior", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementBehavior), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLMarqueeElementBehavior) } }, |
| { "bgColor", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementBgColor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLMarqueeElementBgColor) } }, |
| { "direction", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementDirection), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLMarqueeElementDirection) } }, |
| { "height", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementHeight), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLMarqueeElementHeight) } }, |
| { "hspace", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementHspace), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLMarqueeElementHspace) } }, |
| { "loop", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementLoop), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLMarqueeElementLoop) } }, |
| { "scrollAmount", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementScrollAmount), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLMarqueeElementScrollAmount) } }, |
| { "scrollDelay", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementScrollDelay), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLMarqueeElementScrollDelay) } }, |
| { "trueSpeed", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementTrueSpeed), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLMarqueeElementTrueSpeed) } }, |
| { "vspace", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementVspace), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLMarqueeElementVspace) } }, |
| { "width", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementWidth), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLMarqueeElementWidth) } }, |
| { "start", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsHTMLMarqueeElementPrototypeFunctionStart), (intptr_t) (0) } }, |
| { "stop", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsHTMLMarqueeElementPrototypeFunctionStop), (intptr_t) (0) } }, |
| }; |
| |
| const ClassInfo JSHTMLMarqueeElementPrototype::s_info = { "HTMLMarqueeElementPrototype", &Base::s_info, 0, CREATE_METHOD_TABLE(JSHTMLMarqueeElementPrototype) }; |
| |
| void JSHTMLMarqueeElementPrototype::finishCreation(VM& vm) |
| { |
| Base::finishCreation(vm); |
| reifyStaticProperties(vm, JSHTMLMarqueeElementPrototypeTableValues, *this); |
| } |
| |
| const ClassInfo JSHTMLMarqueeElement::s_info = { "HTMLMarqueeElement", &Base::s_info, 0, CREATE_METHOD_TABLE(JSHTMLMarqueeElement) }; |
| |
| JSHTMLMarqueeElement::JSHTMLMarqueeElement(Structure* structure, JSDOMGlobalObject& globalObject, Ref<HTMLMarqueeElement>&& impl) |
| : JSHTMLElement(structure, globalObject, WTFMove(impl)) |
| { |
| } |
| |
| JSObject* JSHTMLMarqueeElement::createPrototype(VM& vm, JSGlobalObject* globalObject) |
| { |
| return JSHTMLMarqueeElementPrototype::create(vm, globalObject, JSHTMLMarqueeElementPrototype::createStructure(vm, globalObject, JSHTMLElement::prototype(vm, globalObject))); |
| } |
| |
| JSObject* JSHTMLMarqueeElement::prototype(VM& vm, JSGlobalObject* globalObject) |
| { |
| return getDOMPrototype<JSHTMLMarqueeElement>(vm, globalObject); |
| } |
| |
| EncodedJSValue jsHTMLMarqueeElementBehavior(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<JSHTMLMarqueeElement*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "HTMLMarqueeElement", "behavior"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::behaviorAttr)); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsHTMLMarqueeElementBgColor(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<JSHTMLMarqueeElement*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "HTMLMarqueeElement", "bgColor"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::bgcolorAttr)); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsHTMLMarqueeElementDirection(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<JSHTMLMarqueeElement*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "HTMLMarqueeElement", "direction"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::directionAttr)); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsHTMLMarqueeElementHeight(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<JSHTMLMarqueeElement*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "HTMLMarqueeElement", "height"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::heightAttr)); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsHTMLMarqueeElementHspace(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<JSHTMLMarqueeElement*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "HTMLMarqueeElement", "hspace"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsNumber(std::max(0, impl.getIntegralAttribute(WebCore::HTMLNames::hspaceAttr))); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsHTMLMarqueeElementLoop(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<JSHTMLMarqueeElement*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "HTMLMarqueeElement", "loop"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsNumber(impl.loop()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsHTMLMarqueeElementScrollAmount(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<JSHTMLMarqueeElement*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "HTMLMarqueeElement", "scrollAmount"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsNumber(impl.scrollAmount()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsHTMLMarqueeElementScrollDelay(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<JSHTMLMarqueeElement*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "HTMLMarqueeElement", "scrollDelay"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsNumber(impl.scrollDelay()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsHTMLMarqueeElementTrueSpeed(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<JSHTMLMarqueeElement*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "HTMLMarqueeElement", "trueSpeed"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsBoolean(impl.hasAttributeWithoutSynchronization(WebCore::HTMLNames::truespeedAttr)); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsHTMLMarqueeElementVspace(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<JSHTMLMarqueeElement*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "HTMLMarqueeElement", "vspace"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsNumber(std::max(0, impl.getIntegralAttribute(WebCore::HTMLNames::vspaceAttr))); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsHTMLMarqueeElementWidth(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<JSHTMLMarqueeElement*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "HTMLMarqueeElement", "width"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::widthAttr)); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsHTMLMarqueeElementConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| JSHTMLMarqueeElementPrototype* domObject = jsDynamicCast<JSHTMLMarqueeElementPrototype*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!domObject)) |
| return throwVMTypeError(state, throwScope); |
| return JSValue::encode(JSHTMLMarqueeElement::getConstructor(state->vm(), domObject->globalObject())); |
| } |
| |
| bool setJSHTMLMarqueeElementConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| JSValue value = JSValue::decode(encodedValue); |
| JSHTMLMarqueeElementPrototype* domObject = jsDynamicCast<JSHTMLMarqueeElementPrototype*>(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 setJSHTMLMarqueeElementBehavior(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); |
| JSHTMLMarqueeElement* castedThis = jsDynamicCast<JSHTMLMarqueeElement*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "HTMLMarqueeElement", "behavior"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = value.toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::behaviorAttr, WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool setJSHTMLMarqueeElementBgColor(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); |
| JSHTMLMarqueeElement* castedThis = jsDynamicCast<JSHTMLMarqueeElement*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "HTMLMarqueeElement", "bgColor"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = value.toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::bgcolorAttr, WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool setJSHTMLMarqueeElementDirection(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); |
| JSHTMLMarqueeElement* castedThis = jsDynamicCast<JSHTMLMarqueeElement*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "HTMLMarqueeElement", "direction"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = value.toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::directionAttr, WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool setJSHTMLMarqueeElementHeight(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); |
| JSHTMLMarqueeElement* castedThis = jsDynamicCast<JSHTMLMarqueeElement*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "HTMLMarqueeElement", "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 setJSHTMLMarqueeElementHspace(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); |
| JSHTMLMarqueeElement* castedThis = jsDynamicCast<JSHTMLMarqueeElement*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "HTMLMarqueeElement", "hspace"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = convert<uint32_t>(*state, value, NormalConversion); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setUnsignedIntegralAttribute(WebCore::HTMLNames::hspaceAttr, WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool setJSHTMLMarqueeElementLoop(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); |
| JSHTMLMarqueeElement* castedThis = jsDynamicCast<JSHTMLMarqueeElement*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "HTMLMarqueeElement", "loop"); |
| } |
| auto& impl = castedThis->wrapped(); |
| ExceptionCode ec = 0; |
| auto nativeValue = convert<int32_t>(*state, value, NormalConversion); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setLoop(WTFMove(nativeValue), ec); |
| setDOMException(state, throwScope, ec); |
| return true; |
| } |
| |
| |
| bool setJSHTMLMarqueeElementScrollAmount(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); |
| JSHTMLMarqueeElement* castedThis = jsDynamicCast<JSHTMLMarqueeElement*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "HTMLMarqueeElement", "scrollAmount"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = convert<uint32_t>(*state, value, NormalConversion); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setScrollAmount(WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool setJSHTMLMarqueeElementScrollDelay(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); |
| JSHTMLMarqueeElement* castedThis = jsDynamicCast<JSHTMLMarqueeElement*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "HTMLMarqueeElement", "scrollDelay"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = convert<uint32_t>(*state, value, NormalConversion); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setScrollDelay(WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool setJSHTMLMarqueeElementTrueSpeed(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); |
| JSHTMLMarqueeElement* castedThis = jsDynamicCast<JSHTMLMarqueeElement*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "HTMLMarqueeElement", "trueSpeed"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = value.toBoolean(state); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setBooleanAttribute(WebCore::HTMLNames::truespeedAttr, WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool setJSHTMLMarqueeElementVspace(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); |
| JSHTMLMarqueeElement* castedThis = jsDynamicCast<JSHTMLMarqueeElement*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "HTMLMarqueeElement", "vspace"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = convert<uint32_t>(*state, value, NormalConversion); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setUnsignedIntegralAttribute(WebCore::HTMLNames::vspaceAttr, WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool setJSHTMLMarqueeElementWidth(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); |
| JSHTMLMarqueeElement* castedThis = jsDynamicCast<JSHTMLMarqueeElement*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "HTMLMarqueeElement", "width"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = value.toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::widthAttr, WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| JSValue JSHTMLMarqueeElement::getConstructor(VM& vm, const JSGlobalObject* globalObject) |
| { |
| return getDOMConstructor<JSHTMLMarqueeElementConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject)); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsHTMLMarqueeElementPrototypeFunctionStart(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDynamicCast<JSHTMLMarqueeElement*>(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "HTMLMarqueeElement", "start"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSHTMLMarqueeElement::info()); |
| auto& impl = castedThis->wrapped(); |
| impl.start(); |
| return JSValue::encode(jsUndefined()); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsHTMLMarqueeElementPrototypeFunctionStop(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDynamicCast<JSHTMLMarqueeElement*>(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "HTMLMarqueeElement", "stop"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSHTMLMarqueeElement::info()); |
| auto& impl = castedThis->wrapped(); |
| impl.stop(); |
| return JSValue::encode(jsUndefined()); |
| } |
| |
| void JSHTMLMarqueeElement::visitChildren(JSCell* cell, SlotVisitor& visitor) |
| { |
| auto* thisObject = jsCast<JSHTMLMarqueeElement*>(cell); |
| ASSERT_GC_OBJECT_INHERITS(thisObject, info()); |
| Base::visitChildren(thisObject, visitor); |
| thisObject->wrapped().visitJSEventListeners(visitor); |
| } |
| |
| |
| } |