static v8::Handle<v8::Value> hasExtensionCallback(const v8::Arguments& args)
{
    INC_STATS("DOM.SVGTests.hasExtension");
    SVGTests* imp = V8SVGTests::toNative(args.Holder());
    STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, extension, args[0]);
    return v8Boolean(imp->hasExtension(extension));
}
static v8::Handle<v8::Value> systemLanguageAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
    INC_STATS("DOM.SVGTests.systemLanguage._get");
    SVGTests* imp = V8SVGTests::toNative(info.Holder());
    SVGElement* context = V8Proxy::svgContext(imp);
    PassRefPtr<SVGStringList> resultAsPassRefPtr = V8Proxy::withSVGContext(imp->systemLanguage(), context);
    return toV8(resultAsPassRefPtr);
}
Beispiel #3
0
JSValue* jsSVGTestsPrototypeFunctionHasExtension(ExecState* exec, JSObject*, JSValue* thisValue, const ArgList& args)
{
    if (!thisValue->isObject(&JSSVGTests::s_info))
        return throwError(exec, TypeError);
    JSSVGTests* castedThisObj = static_cast<JSSVGTests*>(thisValue);
    SVGTests* imp = static_cast<SVGTests*>(castedThisObj->impl());
    const UString& extension = args.at(exec, 0)->toString(exec);


    JSC::JSValue* result = jsBoolean(imp->hasExtension(extension));
    return result;
}
Beispiel #4
0
JSValue* JSSVGTests::getValueProperty(ExecState* exec, int token) const
{
    switch (token) {
    case RequiredFeaturesAttrNum: {
        SVGTests* imp = static_cast<SVGTests*>(impl());
        return toJS(exec, WTF::getPtr(imp->requiredFeatures()), context());
    }
    case RequiredExtensionsAttrNum: {
        SVGTests* imp = static_cast<SVGTests*>(impl());
        return toJS(exec, WTF::getPtr(imp->requiredExtensions()), context());
    }
    case SystemLanguageAttrNum: {
        SVGTests* imp = static_cast<SVGTests*>(impl());
        return toJS(exec, WTF::getPtr(imp->systemLanguage()), context());
    }
    }
    return 0;
}