JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionGetEnclosureList(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); if (!thisValue.isObject(&JSSVGSVGElement::s_info)) return throwError(exec, TypeError); JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(asObject(thisValue)); SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); FloatRect rect = toSVGRect(args.at(0)); SVGElement* referenceElement = toSVGElement(args.at(1)); JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getEnclosureList(rect, referenceElement))); return result; }