示例#1
0
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();
}
示例#2
0
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;
}
示例#3
0
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()));
}
示例#4
0
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);
}
示例#5
0
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();
}
示例#6
0
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();
}
示例#7
0
JSValue jsSVGNumberConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSSVGNumber* domObject = static_cast<JSSVGNumber*>(asObject(slotBase));
    return JSSVGNumber::getConstructor(exec, domObject->globalObject());
}