static v8::Handle<v8::Value> hasExtensionCallback(const v8::Arguments& args) { INC_STATS("DOM.SVGCursorElement.hasExtension"); SVGCursorElement* imp = V8SVGCursorElement::toNative(args.Holder()); STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, extension, MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)); return v8Boolean(imp->hasExtension(extension)); }
JSValue jsSVGCursorElementSystemLanguage(ExecState* exec, JSValue slotBase, const Identifier&) { JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(slotBase)); UNUSED_PARAM(exec); SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl()); JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->systemLanguage()), imp); return result; }
JSValue jsSVGCursorElementExternalResourcesRequired(ExecState* exec, JSValue slotBase, const Identifier&) { JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(slotBase)); UNUSED_PARAM(exec); SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); return result; }
void CSSCursorImageValue::cursorElementChanged(SVGCursorElement& cursorElement) { // FIXME: This will override hot spot specified in CSS, which is probably incorrect. SVGLengthContext lengthContext(nullptr); m_hasHotSpot = true; float x = std::round(cursorElement.x().value(lengthContext)); m_hotSpot.setX(static_cast<int>(x)); float y = std::round(cursorElement.y().value(lengthContext)); m_hotSpot.setY(static_cast<int>(y)); }
JSValue* jsSVGCursorElementPrototypeFunctionHasExtension(ExecState* exec, JSObject*, JSValue* thisValue, const ArgList& args) { if (!thisValue->isObject(&JSSVGCursorElement::s_info)) return throwError(exec, TypeError); JSSVGCursorElement* castedThisObj = static_cast<JSSVGCursorElement*>(thisValue); SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThisObj->impl()); const UString& extension = args.at(exec, 0)->toString(exec); JSC::JSValue* result = jsBoolean(imp->hasExtension(extension)); return result; }
JSValue JSC_HOST_CALL jsSVGCursorElementPrototypeFunctionHasExtension(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); if (!thisValue.inherits(&JSSVGCursorElement::s_info)) return throwError(exec, TypeError); JSSVGCursorElement* castedThisObj = static_cast<JSSVGCursorElement*>(asObject(thisValue)); SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThisObj->impl()); const UString& extension = args.at(0).toString(exec); JSC::JSValue result = jsBoolean(imp->hasExtension(extension)); return result; }
JSValue* JSSVGCursorElement::getValueProperty(ExecState* exec, int token) const { switch (token) { case XAttrNum: { SVGCursorElement* imp = static_cast<SVGCursorElement*>(impl()); RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); return toJS(exec, obj.get(), imp); } case YAttrNum: { SVGCursorElement* imp = static_cast<SVGCursorElement*>(impl()); RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); return toJS(exec, obj.get(), imp); } case HrefAttrNum: { SVGCursorElement* imp = static_cast<SVGCursorElement*>(impl()); RefPtr<SVGAnimatedString> obj = imp->hrefAnimated(); return toJS(exec, obj.get(), imp); } case RequiredFeaturesAttrNum: { SVGCursorElement* imp = static_cast<SVGCursorElement*>(impl()); return toJS(exec, WTF::getPtr(imp->requiredFeatures()), imp); } case RequiredExtensionsAttrNum: { SVGCursorElement* imp = static_cast<SVGCursorElement*>(impl()); return toJS(exec, WTF::getPtr(imp->requiredExtensions()), imp); } case SystemLanguageAttrNum: { SVGCursorElement* imp = static_cast<SVGCursorElement*>(impl()); return toJS(exec, WTF::getPtr(imp->systemLanguage()), imp); } case ExternalResourcesRequiredAttrNum: { SVGCursorElement* imp = static_cast<SVGCursorElement*>(impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); return toJS(exec, obj.get(), imp); } } return 0; }
static v8::Handle<v8::Value> externalResourcesRequiredAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) { INC_STATS("DOM.SVGCursorElement.externalResourcesRequired._get"); SVGCursorElement* imp = V8SVGCursorElement::toNative(info.Holder()); return toV8(imp->externalResourcesRequiredAnimated()); }
static v8::Handle<v8::Value> systemLanguageAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) { INC_STATS("DOM.SVGCursorElement.systemLanguage._get"); SVGCursorElement* imp = V8SVGCursorElement::toNative(info.Holder()); return toV8(WTF::getPtr(SVGStaticListPropertyTearOff<SVGStringList>::create(imp, imp->systemLanguage()))); }