WebCore/generated/JSSVGImageElement.cpp
changeset 0 4f2f89ce4247
equal deleted inserted replaced
-1:000000000000 0:4f2f89ce4247
       
     1 /*
       
     2     This file is part of the WebKit open source project.
       
     3     This file has been generated by generate-bindings.pl. DO NOT MODIFY!
       
     4 
       
     5     This library is free software; you can redistribute it and/or
       
     6     modify it under the terms of the GNU Library General Public
       
     7     License as published by the Free Software Foundation; either
       
     8     version 2 of the License, or (at your option) any later version.
       
     9 
       
    10     This library is distributed in the hope that it will be useful,
       
    11     but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       
    13     Library General Public License for more details.
       
    14 
       
    15     You should have received a copy of the GNU Library General Public License
       
    16     along with this library; see the file COPYING.LIB.  If not, write to
       
    17     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
       
    18     Boston, MA 02110-1301, USA.
       
    19 */
       
    20 
       
    21 #include "config.h"
       
    22 
       
    23 #if ENABLE(SVG)
       
    24 
       
    25 #include "JSSVGImageElement.h"
       
    26 
       
    27 #include "CSSMutableStyleDeclaration.h"
       
    28 #include "CSSStyleDeclaration.h"
       
    29 #include "CSSValue.h"
       
    30 #include "JSCSSStyleDeclaration.h"
       
    31 #include "JSCSSValue.h"
       
    32 #include "JSSVGAnimatedBoolean.h"
       
    33 #include "JSSVGAnimatedLength.h"
       
    34 #include "JSSVGAnimatedPreserveAspectRatio.h"
       
    35 #include "JSSVGAnimatedString.h"
       
    36 #include "JSSVGAnimatedTransformList.h"
       
    37 #include "JSSVGElement.h"
       
    38 #include "JSSVGMatrix.h"
       
    39 #include "JSSVGRect.h"
       
    40 #include "JSSVGStringList.h"
       
    41 #include "KURL.h"
       
    42 #include "SVGElement.h"
       
    43 #include "SVGImageElement.h"
       
    44 #include "SVGStringList.h"
       
    45 #include <runtime/Error.h>
       
    46 #include <runtime/JSString.h>
       
    47 #include <wtf/GetPtr.h>
       
    48 
       
    49 using namespace JSC;
       
    50 
       
    51 namespace WebCore {
       
    52 
       
    53 ASSERT_CLASS_FITS_IN_CELL(JSSVGImageElement);
       
    54 
       
    55 /* Hash table */
       
    56 #if ENABLE(JIT)
       
    57 #define THUNK_GENERATOR(generator) , generator
       
    58 #else
       
    59 #define THUNK_GENERATOR(generator)
       
    60 #endif
       
    61 
       
    62 static const HashTableValue JSSVGImageElementTableValues[19] =
       
    63 {
       
    64     { "x", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGImageElementX), (intptr_t)0 THUNK_GENERATOR(0) },
       
    65     { "y", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGImageElementY), (intptr_t)0 THUNK_GENERATOR(0) },
       
    66     { "width", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGImageElementWidth), (intptr_t)0 THUNK_GENERATOR(0) },
       
    67     { "height", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGImageElementHeight), (intptr_t)0 THUNK_GENERATOR(0) },
       
    68     { "preserveAspectRatio", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGImageElementPreserveAspectRatio), (intptr_t)0 THUNK_GENERATOR(0) },
       
    69     { "href", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGImageElementHref), (intptr_t)0 THUNK_GENERATOR(0) },
       
    70     { "requiredFeatures", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGImageElementRequiredFeatures), (intptr_t)0 THUNK_GENERATOR(0) },
       
    71     { "requiredExtensions", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGImageElementRequiredExtensions), (intptr_t)0 THUNK_GENERATOR(0) },
       
    72     { "systemLanguage", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGImageElementSystemLanguage), (intptr_t)0 THUNK_GENERATOR(0) },
       
    73     { "xmllang", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGImageElementXmllang), (intptr_t)setJSSVGImageElementXmllang THUNK_GENERATOR(0) },
       
    74     { "xmlspace", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGImageElementXmlspace), (intptr_t)setJSSVGImageElementXmlspace THUNK_GENERATOR(0) },
       
    75     { "externalResourcesRequired", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGImageElementExternalResourcesRequired), (intptr_t)0 THUNK_GENERATOR(0) },
       
    76     { "className", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGImageElementClassName), (intptr_t)0 THUNK_GENERATOR(0) },
       
    77     { "style", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGImageElementStyle), (intptr_t)0 THUNK_GENERATOR(0) },
       
    78     { "transform", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGImageElementTransform), (intptr_t)0 THUNK_GENERATOR(0) },
       
    79     { "nearestViewportElement", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGImageElementNearestViewportElement), (intptr_t)0 THUNK_GENERATOR(0) },
       
    80     { "farthestViewportElement", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGImageElementFarthestViewportElement), (intptr_t)0 THUNK_GENERATOR(0) },
       
    81     { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGImageElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) },
       
    82     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    83 };
       
    84 
       
    85 #undef THUNK_GENERATOR
       
    86 static JSC_CONST_HASHTABLE HashTable JSSVGImageElementTable = { 68, 63, JSSVGImageElementTableValues, 0 };
       
    87 /* Hash table for constructor */
       
    88 #if ENABLE(JIT)
       
    89 #define THUNK_GENERATOR(generator) , generator
       
    90 #else
       
    91 #define THUNK_GENERATOR(generator)
       
    92 #endif
       
    93 
       
    94 static const HashTableValue JSSVGImageElementConstructorTableValues[1] =
       
    95 {
       
    96     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    97 };
       
    98 
       
    99 #undef THUNK_GENERATOR
       
   100 static JSC_CONST_HASHTABLE HashTable JSSVGImageElementConstructorTable = { 1, 0, JSSVGImageElementConstructorTableValues, 0 };
       
   101 class JSSVGImageElementConstructor : public DOMConstructorObject {
       
   102 public:
       
   103     JSSVGImageElementConstructor(JSC::ExecState*, JSDOMGlobalObject*);
       
   104 
       
   105     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
       
   106     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
       
   107     virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
       
   108     static const JSC::ClassInfo s_info;
       
   109     static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
       
   110     {
       
   111         return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
       
   112     }
       
   113 protected:
       
   114     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
       
   115 };
       
   116 
       
   117 const ClassInfo JSSVGImageElementConstructor::s_info = { "SVGImageElementConstructor", 0, &JSSVGImageElementConstructorTable, 0 };
       
   118 
       
   119 JSSVGImageElementConstructor::JSSVGImageElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
       
   120     : DOMConstructorObject(JSSVGImageElementConstructor::createStructure(globalObject->objectPrototype()), globalObject)
       
   121 {
       
   122     putDirect(exec->propertyNames().prototype, JSSVGImageElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
       
   123 }
       
   124 
       
   125 bool JSSVGImageElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
   126 {
       
   127     return getStaticValueSlot<JSSVGImageElementConstructor, DOMObject>(exec, &JSSVGImageElementConstructorTable, this, propertyName, slot);
       
   128 }
       
   129 
       
   130 bool JSSVGImageElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   131 {
       
   132     return getStaticValueDescriptor<JSSVGImageElementConstructor, DOMObject>(exec, &JSSVGImageElementConstructorTable, this, propertyName, descriptor);
       
   133 }
       
   134 
       
   135 /* Hash table for prototype */
       
   136 #if ENABLE(JIT)
       
   137 #define THUNK_GENERATOR(generator) , generator
       
   138 #else
       
   139 #define THUNK_GENERATOR(generator)
       
   140 #endif
       
   141 
       
   142 static const HashTableValue JSSVGImageElementPrototypeTableValues[7] =
       
   143 {
       
   144     { "hasExtension", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGImageElementPrototypeFunctionHasExtension), (intptr_t)1 THUNK_GENERATOR(0) },
       
   145     { "getPresentationAttribute", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGImageElementPrototypeFunctionGetPresentationAttribute), (intptr_t)1 THUNK_GENERATOR(0) },
       
   146     { "getBBox", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGImageElementPrototypeFunctionGetBBox), (intptr_t)0 THUNK_GENERATOR(0) },
       
   147     { "getCTM", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGImageElementPrototypeFunctionGetCTM), (intptr_t)0 THUNK_GENERATOR(0) },
       
   148     { "getScreenCTM", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGImageElementPrototypeFunctionGetScreenCTM), (intptr_t)0 THUNK_GENERATOR(0) },
       
   149     { "getTransformToElement", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGImageElementPrototypeFunctionGetTransformToElement), (intptr_t)1 THUNK_GENERATOR(0) },
       
   150     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
   151 };
       
   152 
       
   153 #undef THUNK_GENERATOR
       
   154 static JSC_CONST_HASHTABLE HashTable JSSVGImageElementPrototypeTable = { 17, 15, JSSVGImageElementPrototypeTableValues, 0 };
       
   155 const ClassInfo JSSVGImageElementPrototype::s_info = { "SVGImageElementPrototype", 0, &JSSVGImageElementPrototypeTable, 0 };
       
   156 
       
   157 JSObject* JSSVGImageElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
       
   158 {
       
   159     return getDOMPrototype<JSSVGImageElement>(exec, globalObject);
       
   160 }
       
   161 
       
   162 bool JSSVGImageElementPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
   163 {
       
   164     return getStaticFunctionSlot<JSObject>(exec, &JSSVGImageElementPrototypeTable, this, propertyName, slot);
       
   165 }
       
   166 
       
   167 bool JSSVGImageElementPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   168 {
       
   169     return getStaticFunctionDescriptor<JSObject>(exec, &JSSVGImageElementPrototypeTable, this, propertyName, descriptor);
       
   170 }
       
   171 
       
   172 const ClassInfo JSSVGImageElement::s_info = { "SVGImageElement", &JSSVGElement::s_info, &JSSVGImageElementTable, 0 };
       
   173 
       
   174 JSSVGImageElement::JSSVGImageElement(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGImageElement> impl)
       
   175     : JSSVGElement(structure, globalObject, impl)
       
   176 {
       
   177 }
       
   178 
       
   179 JSObject* JSSVGImageElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
       
   180 {
       
   181     return new (exec) JSSVGImageElementPrototype(globalObject, JSSVGImageElementPrototype::createStructure(JSSVGElementPrototype::self(exec, globalObject)));
       
   182 }
       
   183 
       
   184 bool JSSVGImageElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
   185 {
       
   186     return getStaticValueSlot<JSSVGImageElement, Base>(exec, &JSSVGImageElementTable, this, propertyName, slot);
       
   187 }
       
   188 
       
   189 bool JSSVGImageElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   190 {
       
   191     return getStaticValueDescriptor<JSSVGImageElement, Base>(exec, &JSSVGImageElementTable, this, propertyName, descriptor);
       
   192 }
       
   193 
       
   194 JSValue jsSVGImageElementX(ExecState* exec, JSValue slotBase, const Identifier&)
       
   195 {
       
   196     JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slotBase));
       
   197     UNUSED_PARAM(exec);
       
   198     SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl());
       
   199     RefPtr<SVGAnimatedLength> obj = imp->xAnimated();
       
   200     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get(), imp);
       
   201     return result;
       
   202 }
       
   203 
       
   204 JSValue jsSVGImageElementY(ExecState* exec, JSValue slotBase, const Identifier&)
       
   205 {
       
   206     JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slotBase));
       
   207     UNUSED_PARAM(exec);
       
   208     SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl());
       
   209     RefPtr<SVGAnimatedLength> obj = imp->yAnimated();
       
   210     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get(), imp);
       
   211     return result;
       
   212 }
       
   213 
       
   214 JSValue jsSVGImageElementWidth(ExecState* exec, JSValue slotBase, const Identifier&)
       
   215 {
       
   216     JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slotBase));
       
   217     UNUSED_PARAM(exec);
       
   218     SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl());
       
   219     RefPtr<SVGAnimatedLength> obj = imp->widthAnimated();
       
   220     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get(), imp);
       
   221     return result;
       
   222 }
       
   223 
       
   224 JSValue jsSVGImageElementHeight(ExecState* exec, JSValue slotBase, const Identifier&)
       
   225 {
       
   226     JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slotBase));
       
   227     UNUSED_PARAM(exec);
       
   228     SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl());
       
   229     RefPtr<SVGAnimatedLength> obj = imp->heightAnimated();
       
   230     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get(), imp);
       
   231     return result;
       
   232 }
       
   233 
       
   234 JSValue jsSVGImageElementPreserveAspectRatio(ExecState* exec, JSValue slotBase, const Identifier&)
       
   235 {
       
   236     JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slotBase));
       
   237     UNUSED_PARAM(exec);
       
   238     SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl());
       
   239     RefPtr<SVGAnimatedPreserveAspectRatio> obj = imp->preserveAspectRatioAnimated();
       
   240     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get(), imp);
       
   241     return result;
       
   242 }
       
   243 
       
   244 JSValue jsSVGImageElementHref(ExecState* exec, JSValue slotBase, const Identifier&)
       
   245 {
       
   246     JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slotBase));
       
   247     UNUSED_PARAM(exec);
       
   248     SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl());
       
   249     RefPtr<SVGAnimatedString> obj = imp->hrefAnimated();
       
   250     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get(), imp);
       
   251     return result;
       
   252 }
       
   253 
       
   254 JSValue jsSVGImageElementRequiredFeatures(ExecState* exec, JSValue slotBase, const Identifier&)
       
   255 {
       
   256     JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slotBase));
       
   257     UNUSED_PARAM(exec);
       
   258     SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl());
       
   259     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredFeatures()), imp);
       
   260     return result;
       
   261 }
       
   262 
       
   263 JSValue jsSVGImageElementRequiredExtensions(ExecState* exec, JSValue slotBase, const Identifier&)
       
   264 {
       
   265     JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slotBase));
       
   266     UNUSED_PARAM(exec);
       
   267     SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl());
       
   268     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredExtensions()), imp);
       
   269     return result;
       
   270 }
       
   271 
       
   272 JSValue jsSVGImageElementSystemLanguage(ExecState* exec, JSValue slotBase, const Identifier&)
       
   273 {
       
   274     JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slotBase));
       
   275     UNUSED_PARAM(exec);
       
   276     SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl());
       
   277     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->systemLanguage()), imp);
       
   278     return result;
       
   279 }
       
   280 
       
   281 JSValue jsSVGImageElementXmllang(ExecState* exec, JSValue slotBase, const Identifier&)
       
   282 {
       
   283     JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slotBase));
       
   284     UNUSED_PARAM(exec);
       
   285     SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl());
       
   286     JSValue result = jsString(exec, imp->xmllang());
       
   287     return result;
       
   288 }
       
   289 
       
   290 JSValue jsSVGImageElementXmlspace(ExecState* exec, JSValue slotBase, const Identifier&)
       
   291 {
       
   292     JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slotBase));
       
   293     UNUSED_PARAM(exec);
       
   294     SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl());
       
   295     JSValue result = jsString(exec, imp->xmlspace());
       
   296     return result;
       
   297 }
       
   298 
       
   299 JSValue jsSVGImageElementExternalResourcesRequired(ExecState* exec, JSValue slotBase, const Identifier&)
       
   300 {
       
   301     JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slotBase));
       
   302     UNUSED_PARAM(exec);
       
   303     SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl());
       
   304     RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated();
       
   305     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get(), imp);
       
   306     return result;
       
   307 }
       
   308 
       
   309 JSValue jsSVGImageElementClassName(ExecState* exec, JSValue slotBase, const Identifier&)
       
   310 {
       
   311     JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slotBase));
       
   312     UNUSED_PARAM(exec);
       
   313     SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl());
       
   314     RefPtr<SVGAnimatedString> obj = imp->classNameAnimated();
       
   315     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get(), imp);
       
   316     return result;
       
   317 }
       
   318 
       
   319 JSValue jsSVGImageElementStyle(ExecState* exec, JSValue slotBase, const Identifier&)
       
   320 {
       
   321     JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slotBase));
       
   322     UNUSED_PARAM(exec);
       
   323     SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl());
       
   324     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style()));
       
   325     return result;
       
   326 }
       
   327 
       
   328 JSValue jsSVGImageElementTransform(ExecState* exec, JSValue slotBase, const Identifier&)
       
   329 {
       
   330     JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slotBase));
       
   331     UNUSED_PARAM(exec);
       
   332     SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl());
       
   333     RefPtr<SVGAnimatedTransformList> obj = imp->transformAnimated();
       
   334     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get(), imp);
       
   335     return result;
       
   336 }
       
   337 
       
   338 JSValue jsSVGImageElementNearestViewportElement(ExecState* exec, JSValue slotBase, const Identifier&)
       
   339 {
       
   340     JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slotBase));
       
   341     UNUSED_PARAM(exec);
       
   342     SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl());
       
   343     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nearestViewportElement()));
       
   344     return result;
       
   345 }
       
   346 
       
   347 JSValue jsSVGImageElementFarthestViewportElement(ExecState* exec, JSValue slotBase, const Identifier&)
       
   348 {
       
   349     JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slotBase));
       
   350     UNUSED_PARAM(exec);
       
   351     SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl());
       
   352     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->farthestViewportElement()));
       
   353     return result;
       
   354 }
       
   355 
       
   356 JSValue jsSVGImageElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
       
   357 {
       
   358     JSSVGImageElement* domObject = static_cast<JSSVGImageElement*>(asObject(slotBase));
       
   359     return JSSVGImageElement::getConstructor(exec, domObject->globalObject());
       
   360 }
       
   361 void JSSVGImageElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
       
   362 {
       
   363     lookupPut<JSSVGImageElement, Base>(exec, propertyName, value, &JSSVGImageElementTable, this, slot);
       
   364 }
       
   365 
       
   366 void setJSSVGImageElementXmllang(ExecState* exec, JSObject* thisObject, JSValue value)
       
   367 {
       
   368     JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(thisObject);
       
   369     SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl());
       
   370     imp->setXmllang(ustringToString(value.toString(exec)));
       
   371 }
       
   372 
       
   373 void setJSSVGImageElementXmlspace(ExecState* exec, JSObject* thisObject, JSValue value)
       
   374 {
       
   375     JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(thisObject);
       
   376     SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl());
       
   377     imp->setXmlspace(ustringToString(value.toString(exec)));
       
   378 }
       
   379 
       
   380 JSValue JSSVGImageElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
       
   381 {
       
   382     return getDOMConstructor<JSSVGImageElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
       
   383 }
       
   384 
       
   385 EncodedJSValue JSC_HOST_CALL jsSVGImageElementPrototypeFunctionHasExtension(ExecState* exec)
       
   386 {
       
   387     JSValue thisValue = exec->hostThisValue();
       
   388     if (!thisValue.inherits(&JSSVGImageElement::s_info))
       
   389         return throwVMTypeError(exec);
       
   390     JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(thisValue));
       
   391     SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl());
       
   392     const String& extension = ustringToString(exec->argument(0).toString(exec));
       
   393 
       
   394 
       
   395     JSC::JSValue result = jsBoolean(imp->hasExtension(extension));
       
   396     return JSValue::encode(result);
       
   397 }
       
   398 
       
   399 EncodedJSValue JSC_HOST_CALL jsSVGImageElementPrototypeFunctionGetPresentationAttribute(ExecState* exec)
       
   400 {
       
   401     JSValue thisValue = exec->hostThisValue();
       
   402     if (!thisValue.inherits(&JSSVGImageElement::s_info))
       
   403         return throwVMTypeError(exec);
       
   404     JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(thisValue));
       
   405     SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl());
       
   406     const String& name = ustringToString(exec->argument(0).toString(exec));
       
   407 
       
   408 
       
   409     JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name)));
       
   410     return JSValue::encode(result);
       
   411 }
       
   412 
       
   413 EncodedJSValue JSC_HOST_CALL jsSVGImageElementPrototypeFunctionGetBBox(ExecState* exec)
       
   414 {
       
   415     JSValue thisValue = exec->hostThisValue();
       
   416     if (!thisValue.inherits(&JSSVGImageElement::s_info))
       
   417         return throwVMTypeError(exec);
       
   418     JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(thisValue));
       
   419     SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl());
       
   420 
       
   421 
       
   422     JSC::JSValue result = toJS(exec, castedThis->globalObject(), JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), 0 /* no context on purpose */);
       
   423     return JSValue::encode(result);
       
   424 }
       
   425 
       
   426 EncodedJSValue JSC_HOST_CALL jsSVGImageElementPrototypeFunctionGetCTM(ExecState* exec)
       
   427 {
       
   428     JSValue thisValue = exec->hostThisValue();
       
   429     if (!thisValue.inherits(&JSSVGImageElement::s_info))
       
   430         return throwVMTypeError(exec);
       
   431     JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(thisValue));
       
   432     SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl());
       
   433 
       
   434 
       
   435     JSC::JSValue result = toJS(exec, castedThis->globalObject(), JSSVGStaticPODTypeWrapper<AffineTransform>::create(imp->getCTM()).get(), 0 /* no context on purpose */);
       
   436     return JSValue::encode(result);
       
   437 }
       
   438 
       
   439 EncodedJSValue JSC_HOST_CALL jsSVGImageElementPrototypeFunctionGetScreenCTM(ExecState* exec)
       
   440 {
       
   441     JSValue thisValue = exec->hostThisValue();
       
   442     if (!thisValue.inherits(&JSSVGImageElement::s_info))
       
   443         return throwVMTypeError(exec);
       
   444     JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(thisValue));
       
   445     SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl());
       
   446 
       
   447 
       
   448     JSC::JSValue result = toJS(exec, castedThis->globalObject(), JSSVGStaticPODTypeWrapper<AffineTransform>::create(imp->getScreenCTM()).get(), 0 /* no context on purpose */);
       
   449     return JSValue::encode(result);
       
   450 }
       
   451 
       
   452 EncodedJSValue JSC_HOST_CALL jsSVGImageElementPrototypeFunctionGetTransformToElement(ExecState* exec)
       
   453 {
       
   454     JSValue thisValue = exec->hostThisValue();
       
   455     if (!thisValue.inherits(&JSSVGImageElement::s_info))
       
   456         return throwVMTypeError(exec);
       
   457     JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(thisValue));
       
   458     SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl());
       
   459     ExceptionCode ec = 0;
       
   460     SVGElement* element = toSVGElement(exec->argument(0));
       
   461 
       
   462 
       
   463     JSC::JSValue result = toJS(exec, castedThis->globalObject(), JSSVGStaticPODTypeWrapper<AffineTransform>::create(imp->getTransformToElement(element, ec)).get(), 0 /* no context on purpose */);
       
   464     setDOMException(exec, ec);
       
   465     return JSValue::encode(result);
       
   466 }
       
   467 
       
   468 
       
   469 }
       
   470 
       
   471 #endif // ENABLE(SVG)