void JSSVGNumberOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context) { JSSVGNumber* jsSVGNumber = jsCast<JSSVGNumber*>(handle.get().asCell()); DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context); uncacheWrapper(world, &jsSVGNumber->impl(), jsSVGNumber); jsSVGNumber->releaseImpl(); }
JSValue jsSVGNumberValue(ExecState* exec, JSValue slotBase, const Identifier&) { JSSVGNumber* castedThis = static_cast<JSSVGNumber*>(asObject(slotBase)); UNUSED_PARAM(exec); float& imp = castedThis->impl()->propertyReference(); JSValue result = jsNumber(imp); return result; }
EncodedJSValue jsSVGNumberConstructor(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue, PropertyName) { JSSVGNumber* domObject = jsDynamicCast<JSSVGNumber*>(JSValue::decode(thisValue)); if (!domObject) return throwVMTypeError(exec); if (!domObject) return throwVMTypeError(exec); return JSValue::encode(JSSVGNumber::getConstructor(exec->vm(), domObject->globalObject())); }
EncodedJSValue jsSVGNumberValue(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName) { JSSVGNumber* castedThis = jsDynamicCast<JSSVGNumber*>(JSValue::decode(thisValue)); UNUSED_PARAM(slotBase); if (!castedThis) return throwVMTypeError(exec); UNUSED_PARAM(exec); float& impl = castedThis->impl().propertyReference(); JSValue result = jsNumber(impl); return JSValue::encode(result); }
void setJSSVGNumberValue(ExecState* exec, JSObject* thisObject, JSValue value) { JSSVGNumber* castedThis = static_cast<JSSVGNumber*>(thisObject); SVGPropertyTearOff<float> * imp = static_cast<SVGPropertyTearOff<float> *>(castedThis->impl()); if (imp->role() == AnimValRole) { setDOMException(exec, NO_MODIFICATION_ALLOWED_ERR); return; } float& podImp = imp->propertyReference(); podImp = value.toFloat(exec); imp->commitChange(); }
void setJSSVGNumberValue(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) { JSValue value = JSValue::decode(encodedValue); UNUSED_PARAM(exec); JSSVGNumber* castedThis = jsDynamicCast<JSSVGNumber*>(JSValue::decode(thisValue)); if (!castedThis) { throwVMTypeError(exec); return; } SVGPropertyTearOff<float> & impl = castedThis->impl(); float nativeValue(value.toFloat(exec)); if (exec->hadException()) return; if (impl.isReadOnly()) { setDOMException(exec, NO_MODIFICATION_ALLOWED_ERR); return; } float& podImpl = impl.propertyReference(); podImpl = nativeValue; impl.commitChange(); }
JSValue jsSVGNumberConstructor(ExecState* exec, JSValue slotBase, const Identifier&) { JSSVGNumber* domObject = static_cast<JSSVGNumber*>(asObject(slotBase)); return JSSVGNumber::getConstructor(exec, domObject->globalObject()); }