/* | |
This file is part of the WebKit open source project. | |
This file has been generated by generate-bindings.pl. DO NOT MODIFY! | |
This library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Library General Public | |
License as published by the Free Software Foundation; either | |
version 2 of the License, or (at your option) any later version. | |
This library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
Library General Public License for more details. | |
You should have received a copy of the GNU Library General Public License | |
along with this library; see the file COPYING.LIB. If not, write to | |
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |
Boston, MA 02110-1301, USA. | |
*/ | |
#include "config.h" | |
#if ENABLE(SVG) | |
#include "JSSVGSVGElement.h" | |
#include "CSSMutableStyleDeclaration.h" | |
#include "CSSStyleDeclaration.h" | |
#include "CSSValue.h" | |
#include "FloatRect.h" | |
#include "JSCSSStyleDeclaration.h" | |
#include "JSCSSValue.h" | |
#include "JSNodeList.h" | |
#include "JSSVGAngle.h" | |
#include "JSSVGAnimatedBoolean.h" | |
#include "JSSVGAnimatedLength.h" | |
#include "JSSVGAnimatedPreserveAspectRatio.h" | |
#include "JSSVGAnimatedRect.h" | |
#include "JSSVGAnimatedString.h" | |
#include "JSSVGElement.h" | |
#include "JSSVGLength.h" | |
#include "JSSVGMatrix.h" | |
#include "JSSVGNumber.h" | |
#include "JSSVGPoint.h" | |
#include "JSSVGRect.h" | |
#include "JSSVGStringList.h" | |
#include "JSSVGTransform.h" | |
#include "KURL.h" | |
#include "NameNodeList.h" | |
#include "NodeList.h" | |
#include "SVGAngle.h" | |
#include "SVGElement.h" | |
#include "SVGLength.h" | |
#include "SVGSVGElement.h" | |
#include "SVGStringList.h" | |
#include "SVGTransform.h" | |
#include <runtime/Error.h> | |
#include <runtime/JSNumberCell.h> | |
#include <runtime/JSString.h> | |
#include <wtf/GetPtr.h> | |
using namespace JSC; | |
namespace WebCore { | |
ASSERT_CLASS_FITS_IN_CELL(JSSVGSVGElement); | |
/* Hash table */ | |
static const HashTableValue JSSVGSVGElementTableValues[29] = | |
{ | |
{ "x", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementX), (intptr_t)0 }, | |
{ "y", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementY), (intptr_t)0 }, | |
{ "width", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementWidth), (intptr_t)0 }, | |
{ "height", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementHeight), (intptr_t)0 }, | |
{ "contentScriptType", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementContentScriptType), (intptr_t)setJSSVGSVGElementContentScriptType }, | |
{ "contentStyleType", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementContentStyleType), (intptr_t)setJSSVGSVGElementContentStyleType }, | |
{ "viewport", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementViewport), (intptr_t)0 }, | |
{ "pixelUnitToMillimeterX", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementPixelUnitToMillimeterX), (intptr_t)0 }, | |
{ "pixelUnitToMillimeterY", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementPixelUnitToMillimeterY), (intptr_t)0 }, | |
{ "screenPixelToMillimeterX", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementScreenPixelToMillimeterX), (intptr_t)0 }, | |
{ "screenPixelToMillimeterY", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementScreenPixelToMillimeterY), (intptr_t)0 }, | |
{ "useCurrentView", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementUseCurrentView), (intptr_t)setJSSVGSVGElementUseCurrentView }, | |
{ "currentScale", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementCurrentScale), (intptr_t)setJSSVGSVGElementCurrentScale }, | |
{ "currentTranslate", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementCurrentTranslate), (intptr_t)0 }, | |
{ "requiredFeatures", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementRequiredFeatures), (intptr_t)0 }, | |
{ "requiredExtensions", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementRequiredExtensions), (intptr_t)0 }, | |
{ "systemLanguage", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementSystemLanguage), (intptr_t)0 }, | |
{ "xmllang", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementXmllang), (intptr_t)setJSSVGSVGElementXmllang }, | |
{ "xmlspace", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementXmlspace), (intptr_t)setJSSVGSVGElementXmlspace }, | |
{ "externalResourcesRequired", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementExternalResourcesRequired), (intptr_t)0 }, | |
{ "className", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementClassName), (intptr_t)0 }, | |
{ "style", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementStyle), (intptr_t)0 }, | |
{ "nearestViewportElement", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementNearestViewportElement), (intptr_t)0 }, | |
{ "farthestViewportElement", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementFarthestViewportElement), (intptr_t)0 }, | |
{ "viewBox", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementViewBox), (intptr_t)0 }, | |
{ "preserveAspectRatio", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementPreserveAspectRatio), (intptr_t)0 }, | |
{ "zoomAndPan", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementZoomAndPan), (intptr_t)setJSSVGSVGElementZoomAndPan }, | |
{ "constructor", DontEnum|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementConstructor), (intptr_t)0 }, | |
{ 0, 0, 0, 0 } | |
}; | |
static JSC_CONST_HASHTABLE HashTable JSSVGSVGElementTable = | |
#if ENABLE(PERFECT_HASH_SIZE) | |
{ 1023, JSSVGSVGElementTableValues, 0 }; | |
#else | |
{ 70, 63, JSSVGSVGElementTableValues, 0 }; | |
#endif | |
/* Hash table for constructor */ | |
static const HashTableValue JSSVGSVGElementConstructorTableValues[4] = | |
{ | |
{ "SVG_ZOOMANDPAN_UNKNOWN", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementSVG_ZOOMANDPAN_UNKNOWN), (intptr_t)0 }, | |
{ "SVG_ZOOMANDPAN_DISABLE", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementSVG_ZOOMANDPAN_DISABLE), (intptr_t)0 }, | |
{ "SVG_ZOOMANDPAN_MAGNIFY", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementSVG_ZOOMANDPAN_MAGNIFY), (intptr_t)0 }, | |
{ 0, 0, 0, 0 } | |
}; | |
static JSC_CONST_HASHTABLE HashTable JSSVGSVGElementConstructorTable = | |
#if ENABLE(PERFECT_HASH_SIZE) | |
{ 31, JSSVGSVGElementConstructorTableValues, 0 }; | |
#else | |
{ 9, 7, JSSVGSVGElementConstructorTableValues, 0 }; | |
#endif | |
class JSSVGSVGElementConstructor : public DOMConstructorObject { | |
public: | |
JSSVGSVGElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) | |
: DOMConstructorObject(JSSVGSVGElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) | |
{ | |
putDirect(exec->propertyNames().prototype, JSSVGSVGElementPrototype::self(exec, globalObject), None); | |
} | |
virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); | |
virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&); | |
virtual const ClassInfo* classInfo() const { return &s_info; } | |
static const ClassInfo s_info; | |
static PassRefPtr<Structure> createStructure(JSValue proto) | |
{ | |
return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); | |
} | |
protected: | |
static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | DOMConstructorObject::StructureFlags; | |
}; | |
const ClassInfo JSSVGSVGElementConstructor::s_info = { "SVGSVGElementConstructor", 0, &JSSVGSVGElementConstructorTable, 0 }; | |
bool JSSVGSVGElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) | |
{ | |
return getStaticValueSlot<JSSVGSVGElementConstructor, DOMObject>(exec, &JSSVGSVGElementConstructorTable, this, propertyName, slot); | |
} | |
bool JSSVGSVGElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) | |
{ | |
return getStaticValueDescriptor<JSSVGSVGElementConstructor, DOMObject>(exec, &JSSVGSVGElementConstructorTable, this, propertyName, descriptor); | |
} | |
/* Hash table for prototype */ | |
static const HashTableValue JSSVGSVGElementPrototypeTableValues[32] = | |
{ | |
{ "SVG_ZOOMANDPAN_UNKNOWN", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementSVG_ZOOMANDPAN_UNKNOWN), (intptr_t)0 }, | |
{ "SVG_ZOOMANDPAN_DISABLE", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementSVG_ZOOMANDPAN_DISABLE), (intptr_t)0 }, | |
{ "SVG_ZOOMANDPAN_MAGNIFY", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGSVGElementSVG_ZOOMANDPAN_MAGNIFY), (intptr_t)0 }, | |
{ "suspendRedraw", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsSVGSVGElementPrototypeFunctionSuspendRedraw), (intptr_t)1 }, | |
{ "unsuspendRedraw", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsSVGSVGElementPrototypeFunctionUnsuspendRedraw), (intptr_t)1 }, | |
{ "unsuspendRedrawAll", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsSVGSVGElementPrototypeFunctionUnsuspendRedrawAll), (intptr_t)0 }, | |
{ "forceRedraw", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsSVGSVGElementPrototypeFunctionForceRedraw), (intptr_t)0 }, | |
{ "pauseAnimations", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsSVGSVGElementPrototypeFunctionPauseAnimations), (intptr_t)0 }, | |
{ "unpauseAnimations", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsSVGSVGElementPrototypeFunctionUnpauseAnimations), (intptr_t)0 }, | |
{ "animationsPaused", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsSVGSVGElementPrototypeFunctionAnimationsPaused), (intptr_t)0 }, | |
{ "getCurrentTime", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsSVGSVGElementPrototypeFunctionGetCurrentTime), (intptr_t)0 }, | |
{ "setCurrentTime", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsSVGSVGElementPrototypeFunctionSetCurrentTime), (intptr_t)1 }, | |
{ "getIntersectionList", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsSVGSVGElementPrototypeFunctionGetIntersectionList), (intptr_t)2 }, | |
{ "getEnclosureList", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsSVGSVGElementPrototypeFunctionGetEnclosureList), (intptr_t)2 }, | |
{ "checkIntersection", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsSVGSVGElementPrototypeFunctionCheckIntersection), (intptr_t)2 }, | |
{ "checkEnclosure", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsSVGSVGElementPrototypeFunctionCheckEnclosure), (intptr_t)2 }, | |
{ "deselectAll", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsSVGSVGElementPrototypeFunctionDeselectAll), (intptr_t)0 }, | |
{ "createSVGNumber", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsSVGSVGElementPrototypeFunctionCreateSVGNumber), (intptr_t)0 }, | |
{ "createSVGLength", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsSVGSVGElementPrototypeFunctionCreateSVGLength), (intptr_t)0 }, | |
{ "createSVGAngle", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsSVGSVGElementPrototypeFunctionCreateSVGAngle), (intptr_t)0 }, | |
{ "createSVGPoint", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsSVGSVGElementPrototypeFunctionCreateSVGPoint), (intptr_t)0 }, | |
{ "createSVGMatrix", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsSVGSVGElementPrototypeFunctionCreateSVGMatrix), (intptr_t)0 }, | |
{ "createSVGRect", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsSVGSVGElementPrototypeFunctionCreateSVGRect), (intptr_t)0 }, | |
{ "createSVGTransform", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsSVGSVGElementPrototypeFunctionCreateSVGTransform), (intptr_t)0 }, | |
{ "createSVGTransformFromMatrix", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsSVGSVGElementPrototypeFunctionCreateSVGTransformFromMatrix), (intptr_t)1 }, | |
{ "hasExtension", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsSVGSVGElementPrototypeFunctionHasExtension), (intptr_t)1 }, | |
{ "getPresentationAttribute", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsSVGSVGElementPrototypeFunctionGetPresentationAttribute), (intptr_t)1 }, | |
{ "getBBox", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsSVGSVGElementPrototypeFunctionGetBBox), (intptr_t)0 }, | |
{ "getCTM", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsSVGSVGElementPrototypeFunctionGetCTM), (intptr_t)0 }, | |
{ "getScreenCTM", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsSVGSVGElementPrototypeFunctionGetScreenCTM), (intptr_t)0 }, | |
{ "getTransformToElement", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsSVGSVGElementPrototypeFunctionGetTransformToElement), (intptr_t)1 }, | |
{ 0, 0, 0, 0 } | |
}; | |
static JSC_CONST_HASHTABLE HashTable JSSVGSVGElementPrototypeTable = | |
#if ENABLE(PERFECT_HASH_SIZE) | |
{ 2047, JSSVGSVGElementPrototypeTableValues, 0 }; | |
#else | |
{ 71, 63, JSSVGSVGElementPrototypeTableValues, 0 }; | |
#endif | |
const ClassInfo JSSVGSVGElementPrototype::s_info = { "SVGSVGElementPrototype", 0, &JSSVGSVGElementPrototypeTable, 0 }; | |
JSObject* JSSVGSVGElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject) | |
{ | |
return getDOMPrototype<JSSVGSVGElement>(exec, globalObject); | |
} | |
bool JSSVGSVGElementPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) | |
{ | |
return getStaticPropertySlot<JSSVGSVGElementPrototype, JSObject>(exec, &JSSVGSVGElementPrototypeTable, this, propertyName, slot); | |
} | |
bool JSSVGSVGElementPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) | |
{ | |
return getStaticPropertyDescriptor<JSSVGSVGElementPrototype, JSObject>(exec, &JSSVGSVGElementPrototypeTable, this, propertyName, descriptor); | |
} | |
const ClassInfo JSSVGSVGElement::s_info = { "SVGSVGElement", &JSSVGElement::s_info, &JSSVGSVGElementTable, 0 }; | |
JSSVGSVGElement::JSSVGSVGElement(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGSVGElement> impl) | |
: JSSVGElement(structure, globalObject, impl) | |
{ | |
} | |
JSObject* JSSVGSVGElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject) | |
{ | |
return new (exec) JSSVGSVGElementPrototype(JSSVGSVGElementPrototype::createStructure(JSSVGElementPrototype::self(exec, globalObject))); | |
} | |
bool JSSVGSVGElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) | |
{ | |
return getStaticValueSlot<JSSVGSVGElement, Base>(exec, &JSSVGSVGElementTable, this, propertyName, slot); | |
} | |
bool JSSVGSVGElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) | |
{ | |
return getStaticValueDescriptor<JSSVGSVGElement, Base>(exec, &JSSVGSVGElementTable, this, propertyName, descriptor); | |
} | |
JSValue jsSVGSVGElementX(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); | |
RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); | |
JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); | |
return result; | |
} | |
JSValue jsSVGSVGElementY(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); | |
RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); | |
JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); | |
return result; | |
} | |
JSValue jsSVGSVGElementWidth(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); | |
RefPtr<SVGAnimatedLength> obj = imp->widthAnimated(); | |
JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); | |
return result; | |
} | |
JSValue jsSVGSVGElementHeight(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); | |
RefPtr<SVGAnimatedLength> obj = imp->heightAnimated(); | |
JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); | |
return result; | |
} | |
JSValue jsSVGSVGElementContentScriptType(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); | |
JSValue result = jsString(exec, imp->contentScriptType()); | |
return result; | |
} | |
JSValue jsSVGSVGElementContentStyleType(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); | |
JSValue result = jsString(exec, imp->contentStyleType()); | |
return result; | |
} | |
JSValue jsSVGSVGElementViewport(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); | |
JSValue result = toJS(exec, castedThis->globalObject(), JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->viewport()).get(), 0 /* no context on purpose */); | |
return result; | |
} | |
JSValue jsSVGSVGElementPixelUnitToMillimeterX(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); | |
JSValue result = jsNumber(exec, imp->pixelUnitToMillimeterX()); | |
return result; | |
} | |
JSValue jsSVGSVGElementPixelUnitToMillimeterY(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); | |
JSValue result = jsNumber(exec, imp->pixelUnitToMillimeterY()); | |
return result; | |
} | |
JSValue jsSVGSVGElementScreenPixelToMillimeterX(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); | |
JSValue result = jsNumber(exec, imp->screenPixelToMillimeterX()); | |
return result; | |
} | |
JSValue jsSVGSVGElementScreenPixelToMillimeterY(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); | |
JSValue result = jsNumber(exec, imp->screenPixelToMillimeterY()); | |
return result; | |
} | |
JSValue jsSVGSVGElementUseCurrentView(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); | |
JSValue result = jsBoolean(imp->useCurrentView()); | |
return result; | |
} | |
JSValue jsSVGSVGElementCurrentScale(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); | |
JSValue result = jsNumber(exec, imp->currentScale()); | |
return result; | |
} | |
JSValue jsSVGSVGElementCurrentTranslate(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); | |
JSValue result = toJS(exec, castedThis->globalObject(), JSSVGStaticPODTypeWrapperWithParent<FloatPoint, SVGSVGElement>::create(imp, &SVGSVGElement::currentTranslate, &SVGSVGElement::setCurrentTranslate).get(), imp); | |
return result; | |
} | |
JSValue jsSVGSVGElementRequiredFeatures(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); | |
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredFeatures()), imp); | |
return result; | |
} | |
JSValue jsSVGSVGElementRequiredExtensions(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); | |
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredExtensions()), imp); | |
return result; | |
} | |
JSValue jsSVGSVGElementSystemLanguage(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); | |
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->systemLanguage()), imp); | |
return result; | |
} | |
JSValue jsSVGSVGElementXmllang(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); | |
JSValue result = jsString(exec, imp->xmllang()); | |
return result; | |
} | |
JSValue jsSVGSVGElementXmlspace(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); | |
JSValue result = jsString(exec, imp->xmlspace()); | |
return result; | |
} | |
JSValue jsSVGSVGElementExternalResourcesRequired(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); | |
RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); | |
JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); | |
return result; | |
} | |
JSValue jsSVGSVGElementClassName(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); | |
RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); | |
JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); | |
return result; | |
} | |
JSValue jsSVGSVGElementStyle(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); | |
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); | |
return result; | |
} | |
JSValue jsSVGSVGElementNearestViewportElement(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); | |
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nearestViewportElement())); | |
return result; | |
} | |
JSValue jsSVGSVGElementFarthestViewportElement(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); | |
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->farthestViewportElement())); | |
return result; | |
} | |
JSValue jsSVGSVGElementViewBox(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); | |
RefPtr<SVGAnimatedRect> obj = imp->viewBoxAnimated(); | |
JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); | |
return result; | |
} | |
JSValue jsSVGSVGElementPreserveAspectRatio(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); | |
RefPtr<SVGAnimatedPreserveAspectRatio> obj = imp->preserveAspectRatioAnimated(); | |
JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); | |
return result; | |
} | |
JSValue jsSVGSVGElementZoomAndPan(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slotBase)); | |
UNUSED_PARAM(exec); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); | |
JSValue result = jsNumber(exec, imp->zoomAndPan()); | |
return result; | |
} | |
JSValue jsSVGSVGElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&) | |
{ | |
JSSVGSVGElement* domObject = static_cast<JSSVGSVGElement*>(asObject(slotBase)); | |
return JSSVGSVGElement::getConstructor(exec, domObject->globalObject()); | |
} | |
void JSSVGSVGElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) | |
{ | |
lookupPut<JSSVGSVGElement, Base>(exec, propertyName, value, &JSSVGSVGElementTable, this, slot); | |
} | |
void setJSSVGSVGElementContentScriptType(ExecState* exec, JSObject* thisObject, JSValue value) | |
{ | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(thisObject); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
imp->setContentScriptType(value.toString(exec)); | |
} | |
void setJSSVGSVGElementContentStyleType(ExecState* exec, JSObject* thisObject, JSValue value) | |
{ | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(thisObject); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
imp->setContentStyleType(value.toString(exec)); | |
} | |
void setJSSVGSVGElementUseCurrentView(ExecState* exec, JSObject* thisObject, JSValue value) | |
{ | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(thisObject); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
imp->setUseCurrentView(value.toBoolean(exec)); | |
} | |
void setJSSVGSVGElementCurrentScale(ExecState* exec, JSObject* thisObject, JSValue value) | |
{ | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(thisObject); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
imp->setCurrentScale(value.toFloat(exec)); | |
} | |
void setJSSVGSVGElementXmllang(ExecState* exec, JSObject* thisObject, JSValue value) | |
{ | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(thisObject); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
imp->setXmllang(value.toString(exec)); | |
} | |
void setJSSVGSVGElementXmlspace(ExecState* exec, JSObject* thisObject, JSValue value) | |
{ | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(thisObject); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
imp->setXmlspace(value.toString(exec)); | |
} | |
void setJSSVGSVGElementZoomAndPan(ExecState* exec, JSObject* thisObject, JSValue value) | |
{ | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(thisObject); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
imp->setZoomAndPan(value.toInt32(exec)); | |
} | |
JSValue JSSVGSVGElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) | |
{ | |
return getDOMConstructor<JSSVGSVGElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); | |
} | |
JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionSuspendRedraw(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) | |
{ | |
UNUSED_PARAM(args); | |
if (!thisValue.inherits(&JSSVGSVGElement::s_info)) | |
return throwError(exec, TypeError); | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(asObject(thisValue)); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
unsigned maxWaitMilliseconds = args.at(0).toInt32(exec); | |
JSC::JSValue result = jsNumber(exec, imp->suspendRedraw(maxWaitMilliseconds)); | |
return result; | |
} | |
JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionUnsuspendRedraw(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) | |
{ | |
UNUSED_PARAM(args); | |
if (!thisValue.inherits(&JSSVGSVGElement::s_info)) | |
return throwError(exec, TypeError); | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(asObject(thisValue)); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
unsigned suspendHandleId = args.at(0).toInt32(exec); | |
imp->unsuspendRedraw(suspendHandleId); | |
return jsUndefined(); | |
} | |
JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionUnsuspendRedrawAll(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) | |
{ | |
UNUSED_PARAM(args); | |
if (!thisValue.inherits(&JSSVGSVGElement::s_info)) | |
return throwError(exec, TypeError); | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(asObject(thisValue)); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
imp->unsuspendRedrawAll(); | |
return jsUndefined(); | |
} | |
JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionForceRedraw(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) | |
{ | |
UNUSED_PARAM(args); | |
if (!thisValue.inherits(&JSSVGSVGElement::s_info)) | |
return throwError(exec, TypeError); | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(asObject(thisValue)); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
imp->forceRedraw(); | |
return jsUndefined(); | |
} | |
JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionPauseAnimations(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) | |
{ | |
UNUSED_PARAM(args); | |
if (!thisValue.inherits(&JSSVGSVGElement::s_info)) | |
return throwError(exec, TypeError); | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(asObject(thisValue)); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
imp->pauseAnimations(); | |
return jsUndefined(); | |
} | |
JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionUnpauseAnimations(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) | |
{ | |
UNUSED_PARAM(args); | |
if (!thisValue.inherits(&JSSVGSVGElement::s_info)) | |
return throwError(exec, TypeError); | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(asObject(thisValue)); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
imp->unpauseAnimations(); | |
return jsUndefined(); | |
} | |
JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionAnimationsPaused(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) | |
{ | |
UNUSED_PARAM(args); | |
if (!thisValue.inherits(&JSSVGSVGElement::s_info)) | |
return throwError(exec, TypeError); | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(asObject(thisValue)); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
JSC::JSValue result = jsBoolean(imp->animationsPaused()); | |
return result; | |
} | |
JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionGetCurrentTime(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) | |
{ | |
UNUSED_PARAM(args); | |
if (!thisValue.inherits(&JSSVGSVGElement::s_info)) | |
return throwError(exec, TypeError); | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(asObject(thisValue)); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
JSC::JSValue result = jsNumber(exec, imp->getCurrentTime()); | |
return result; | |
} | |
JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionSetCurrentTime(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) | |
{ | |
UNUSED_PARAM(args); | |
if (!thisValue.inherits(&JSSVGSVGElement::s_info)) | |
return throwError(exec, TypeError); | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(asObject(thisValue)); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
float seconds = args.at(0).toFloat(exec); | |
imp->setCurrentTime(seconds); | |
return jsUndefined(); | |
} | |
JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionGetIntersectionList(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) | |
{ | |
UNUSED_PARAM(args); | |
if (!thisValue.inherits(&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, castedThisObj->globalObject(), WTF::getPtr(imp->getIntersectionList(rect, referenceElement))); | |
return result; | |
} | |
JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionGetEnclosureList(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) | |
{ | |
UNUSED_PARAM(args); | |
if (!thisValue.inherits(&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, castedThisObj->globalObject(), WTF::getPtr(imp->getEnclosureList(rect, referenceElement))); | |
return result; | |
} | |
JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCheckIntersection(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) | |
{ | |
UNUSED_PARAM(args); | |
if (!thisValue.inherits(&JSSVGSVGElement::s_info)) | |
return throwError(exec, TypeError); | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(asObject(thisValue)); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
SVGElement* element = toSVGElement(args.at(0)); | |
FloatRect rect = toSVGRect(args.at(1)); | |
JSC::JSValue result = jsBoolean(imp->checkIntersection(element, rect)); | |
return result; | |
} | |
JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCheckEnclosure(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) | |
{ | |
UNUSED_PARAM(args); | |
if (!thisValue.inherits(&JSSVGSVGElement::s_info)) | |
return throwError(exec, TypeError); | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(asObject(thisValue)); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
SVGElement* element = toSVGElement(args.at(0)); | |
FloatRect rect = toSVGRect(args.at(1)); | |
JSC::JSValue result = jsBoolean(imp->checkEnclosure(element, rect)); | |
return result; | |
} | |
JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionDeselectAll(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) | |
{ | |
UNUSED_PARAM(args); | |
if (!thisValue.inherits(&JSSVGSVGElement::s_info)) | |
return throwError(exec, TypeError); | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(asObject(thisValue)); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
imp->deselectAll(); | |
return jsUndefined(); | |
} | |
JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGNumber(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) | |
{ | |
UNUSED_PARAM(args); | |
if (!thisValue.inherits(&JSSVGSVGElement::s_info)) | |
return throwError(exec, TypeError); | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(asObject(thisValue)); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<float>::create(imp->createSVGNumber()).get(), 0 /* no context on purpose */); | |
return result; | |
} | |
JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGLength(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) | |
{ | |
UNUSED_PARAM(args); | |
if (!thisValue.inherits(&JSSVGSVGElement::s_info)) | |
return throwError(exec, TypeError); | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(asObject(thisValue)); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<SVGLength>::create(imp->createSVGLength()).get(), 0 /* no context on purpose */); | |
return result; | |
} | |
JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGAngle(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) | |
{ | |
UNUSED_PARAM(args); | |
if (!thisValue.inherits(&JSSVGSVGElement::s_info)) | |
return throwError(exec, TypeError); | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(asObject(thisValue)); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<SVGAngle>::create(imp->createSVGAngle()).get(), 0 /* no context on purpose */); | |
return result; | |
} | |
JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGPoint(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) | |
{ | |
UNUSED_PARAM(args); | |
if (!thisValue.inherits(&JSSVGSVGElement::s_info)) | |
return throwError(exec, TypeError); | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(asObject(thisValue)); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<FloatPoint>::create(imp->createSVGPoint()).get(), 0 /* no context on purpose */); | |
return result; | |
} | |
JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGMatrix(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) | |
{ | |
UNUSED_PARAM(args); | |
if (!thisValue.inherits(&JSSVGSVGElement::s_info)) | |
return throwError(exec, TypeError); | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(asObject(thisValue)); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<AffineTransform>::create(imp->createSVGMatrix()).get(), 0 /* no context on purpose */); | |
return result; | |
} | |
JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGRect(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) | |
{ | |
UNUSED_PARAM(args); | |
if (!thisValue.inherits(&JSSVGSVGElement::s_info)) | |
return throwError(exec, TypeError); | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(asObject(thisValue)); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->createSVGRect()).get(), 0 /* no context on purpose */); | |
return result; | |
} | |
JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGTransform(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) | |
{ | |
UNUSED_PARAM(args); | |
if (!thisValue.inherits(&JSSVGSVGElement::s_info)) | |
return throwError(exec, TypeError); | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(asObject(thisValue)); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<SVGTransform>::create(imp->createSVGTransform()).get(), 0 /* no context on purpose */); | |
return result; | |
} | |
JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGTransformFromMatrix(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) | |
{ | |
UNUSED_PARAM(args); | |
if (!thisValue.inherits(&JSSVGSVGElement::s_info)) | |
return throwError(exec, TypeError); | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(asObject(thisValue)); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
AffineTransform matrix = toSVGMatrix(args.at(0)); | |
JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<SVGTransform>::create(imp->createSVGTransformFromMatrix(matrix)).get(), 0 /* no context on purpose */); | |
return result; | |
} | |
JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionHasExtension(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) | |
{ | |
UNUSED_PARAM(args); | |
if (!thisValue.inherits(&JSSVGSVGElement::s_info)) | |
return throwError(exec, TypeError); | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(asObject(thisValue)); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
const UString& extension = args.at(0).toString(exec); | |
JSC::JSValue result = jsBoolean(imp->hasExtension(extension)); | |
return result; | |
} | |
JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionGetPresentationAttribute(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) | |
{ | |
UNUSED_PARAM(args); | |
if (!thisValue.inherits(&JSSVGSVGElement::s_info)) | |
return throwError(exec, TypeError); | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(asObject(thisValue)); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
const UString& name = args.at(0).toString(exec); | |
JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); | |
return result; | |
} | |
JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionGetBBox(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) | |
{ | |
UNUSED_PARAM(args); | |
if (!thisValue.inherits(&JSSVGSVGElement::s_info)) | |
return throwError(exec, TypeError); | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(asObject(thisValue)); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), 0 /* no context on purpose */); | |
return result; | |
} | |
JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionGetCTM(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) | |
{ | |
UNUSED_PARAM(args); | |
if (!thisValue.inherits(&JSSVGSVGElement::s_info)) | |
return throwError(exec, TypeError); | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(asObject(thisValue)); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<AffineTransform>::create(imp->getCTM()).get(), 0 /* no context on purpose */); | |
return result; | |
} | |
JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionGetScreenCTM(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) | |
{ | |
UNUSED_PARAM(args); | |
if (!thisValue.inherits(&JSSVGSVGElement::s_info)) | |
return throwError(exec, TypeError); | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(asObject(thisValue)); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<AffineTransform>::create(imp->getScreenCTM()).get(), 0 /* no context on purpose */); | |
return result; | |
} | |
JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionGetTransformToElement(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) | |
{ | |
UNUSED_PARAM(args); | |
if (!thisValue.inherits(&JSSVGSVGElement::s_info)) | |
return throwError(exec, TypeError); | |
JSSVGSVGElement* castedThisObj = static_cast<JSSVGSVGElement*>(asObject(thisValue)); | |
SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); | |
ExceptionCode ec = 0; | |
SVGElement* element = toSVGElement(args.at(0)); | |
JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<AffineTransform>::create(imp->getTransformToElement(element, ec)).get(), 0 /* no context on purpose */); | |
setDOMException(exec, ec); | |
return result; | |
} | |
// Constant getters | |
JSValue jsSVGSVGElementSVG_ZOOMANDPAN_UNKNOWN(ExecState* exec, JSValue, const Identifier&) | |
{ | |
return jsNumber(exec, static_cast<int>(0)); | |
} | |
JSValue jsSVGSVGElementSVG_ZOOMANDPAN_DISABLE(ExecState* exec, JSValue, const Identifier&) | |
{ | |
return jsNumber(exec, static_cast<int>(1)); | |
} | |
JSValue jsSVGSVGElementSVG_ZOOMANDPAN_MAGNIFY(ExecState* exec, JSValue, const Identifier&) | |
{ | |
return jsNumber(exec, static_cast<int>(2)); | |
} | |
} | |
#endif // ENABLE(SVG) |