/WebCore/DerivedSources/JSHTMLMarqueeElement.cpp

https://bitbucket.org/csanchez100/webkit-ios · C++ · 419 lines · 318 code · 79 blank · 22 comment · 2 complexity · 3140cbae27b554751fabebbea2912882 MD5 · raw file

  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. This library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Library General Public
  6. License as published by the Free Software Foundation; either
  7. version 2 of the License, or (at your option) any later version.
  8. This library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Library General Public License for more details.
  12. You should have received a copy of the GNU Library General Public License
  13. along with this library; see the file COPYING.LIB. If not, write to
  14. the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  15. Boston, MA 02110-1301, USA.
  16. */
  17. #include "config.h"
  18. #include "JSHTMLMarqueeElement.h"
  19. #include "ExceptionCode.h"
  20. #include "HTMLMarqueeElement.h"
  21. #include "HTMLNames.h"
  22. #include "JSDOMBinding.h"
  23. #include "KURL.h"
  24. #include <runtime/Error.h>
  25. #include <runtime/JSString.h>
  26. #include <wtf/GetPtr.h>
  27. using namespace JSC;
  28. namespace WebCore {
  29. ASSERT_CLASS_FITS_IN_CELL(JSHTMLMarqueeElement);
  30. /* Hash table */
  31. #if ENABLE(JIT)
  32. #define THUNK_GENERATOR(generator) , generator
  33. #else
  34. #define THUNK_GENERATOR(generator)
  35. #endif
  36. static const HashTableValue JSHTMLMarqueeElementTableValues[13] =
  37. {
  38. { "behavior", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementBehavior), (intptr_t)setJSHTMLMarqueeElementBehavior THUNK_GENERATOR(0) },
  39. { "bgColor", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementBgColor), (intptr_t)setJSHTMLMarqueeElementBgColor THUNK_GENERATOR(0) },
  40. { "direction", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementDirection), (intptr_t)setJSHTMLMarqueeElementDirection THUNK_GENERATOR(0) },
  41. { "height", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementHeight), (intptr_t)setJSHTMLMarqueeElementHeight THUNK_GENERATOR(0) },
  42. { "hspace", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementHspace), (intptr_t)setJSHTMLMarqueeElementHspace THUNK_GENERATOR(0) },
  43. { "loop", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementLoop), (intptr_t)setJSHTMLMarqueeElementLoop THUNK_GENERATOR(0) },
  44. { "scrollAmount", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementScrollAmount), (intptr_t)setJSHTMLMarqueeElementScrollAmount THUNK_GENERATOR(0) },
  45. { "scrollDelay", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementScrollDelay), (intptr_t)setJSHTMLMarqueeElementScrollDelay THUNK_GENERATOR(0) },
  46. { "trueSpeed", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementTrueSpeed), (intptr_t)setJSHTMLMarqueeElementTrueSpeed THUNK_GENERATOR(0) },
  47. { "vspace", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementVspace), (intptr_t)setJSHTMLMarqueeElementVspace THUNK_GENERATOR(0) },
  48. { "width", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementWidth), (intptr_t)setJSHTMLMarqueeElementWidth THUNK_GENERATOR(0) },
  49. { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLMarqueeElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) },
  50. { 0, 0, 0, 0 THUNK_GENERATOR(0) }
  51. };
  52. #undef THUNK_GENERATOR
  53. static JSC_CONST_HASHTABLE HashTable JSHTMLMarqueeElementTable = { 36, 31, JSHTMLMarqueeElementTableValues, 0 };
  54. /* Hash table for constructor */
  55. #if ENABLE(JIT)
  56. #define THUNK_GENERATOR(generator) , generator
  57. #else
  58. #define THUNK_GENERATOR(generator)
  59. #endif
  60. static const HashTableValue JSHTMLMarqueeElementConstructorTableValues[1] =
  61. {
  62. { 0, 0, 0, 0 THUNK_GENERATOR(0) }
  63. };
  64. #undef THUNK_GENERATOR
  65. static JSC_CONST_HASHTABLE HashTable JSHTMLMarqueeElementConstructorTable = { 1, 0, JSHTMLMarqueeElementConstructorTableValues, 0 };
  66. class JSHTMLMarqueeElementConstructor : public DOMConstructorObject {
  67. public:
  68. JSHTMLMarqueeElementConstructor(JSC::ExecState*, JSC::Structure*, JSDOMGlobalObject*);
  69. virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
  70. virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
  71. static const JSC::ClassInfo s_info;
  72. static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
  73. {
  74. return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
  75. }
  76. protected:
  77. static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
  78. };
  79. const ClassInfo JSHTMLMarqueeElementConstructor::s_info = { "HTMLMarqueeElementConstructor", &DOMConstructorObject::s_info, &JSHTMLMarqueeElementConstructorTable, 0 };
  80. JSHTMLMarqueeElementConstructor::JSHTMLMarqueeElementConstructor(ExecState* exec, Structure* structure, JSDOMGlobalObject* globalObject)
  81. : DOMConstructorObject(structure, globalObject)
  82. {
  83. ASSERT(inherits(&s_info));
  84. putDirect(exec->globalData(), exec->propertyNames().prototype, JSHTMLMarqueeElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
  85. }
  86. bool JSHTMLMarqueeElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
  87. {
  88. return getStaticValueSlot<JSHTMLMarqueeElementConstructor, JSDOMWrapper>(exec, &JSHTMLMarqueeElementConstructorTable, this, propertyName, slot);
  89. }
  90. bool JSHTMLMarqueeElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
  91. {
  92. return getStaticValueDescriptor<JSHTMLMarqueeElementConstructor, JSDOMWrapper>(exec, &JSHTMLMarqueeElementConstructorTable, this, propertyName, descriptor);
  93. }
  94. /* Hash table for prototype */
  95. #if ENABLE(JIT)
  96. #define THUNK_GENERATOR(generator) , generator
  97. #else
  98. #define THUNK_GENERATOR(generator)
  99. #endif
  100. static const HashTableValue JSHTMLMarqueeElementPrototypeTableValues[3] =
  101. {
  102. { "start", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsHTMLMarqueeElementPrototypeFunctionStart), (intptr_t)0 THUNK_GENERATOR(0) },
  103. { "stop", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsHTMLMarqueeElementPrototypeFunctionStop), (intptr_t)0 THUNK_GENERATOR(0) },
  104. { 0, 0, 0, 0 THUNK_GENERATOR(0) }
  105. };
  106. #undef THUNK_GENERATOR
  107. static JSC_CONST_HASHTABLE HashTable JSHTMLMarqueeElementPrototypeTable = { 5, 3, JSHTMLMarqueeElementPrototypeTableValues, 0 };
  108. const ClassInfo JSHTMLMarqueeElementPrototype::s_info = { "HTMLMarqueeElementPrototype", &JSC::JSObjectWithGlobalObject::s_info, &JSHTMLMarqueeElementPrototypeTable, 0 };
  109. JSObject* JSHTMLMarqueeElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
  110. {
  111. return getDOMPrototype<JSHTMLMarqueeElement>(exec, globalObject);
  112. }
  113. bool JSHTMLMarqueeElementPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
  114. {
  115. return getStaticFunctionSlot<JSObject>(exec, &JSHTMLMarqueeElementPrototypeTable, this, propertyName, slot);
  116. }
  117. bool JSHTMLMarqueeElementPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
  118. {
  119. return getStaticFunctionDescriptor<JSObject>(exec, &JSHTMLMarqueeElementPrototypeTable, this, propertyName, descriptor);
  120. }
  121. const ClassInfo JSHTMLMarqueeElement::s_info = { "HTMLMarqueeElement", &JSHTMLElement::s_info, &JSHTMLMarqueeElementTable, 0 };
  122. JSHTMLMarqueeElement::JSHTMLMarqueeElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLMarqueeElement> impl)
  123. : JSHTMLElement(structure, globalObject, impl)
  124. {
  125. ASSERT(inherits(&s_info));
  126. }
  127. JSObject* JSHTMLMarqueeElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
  128. {
  129. return new (exec) JSHTMLMarqueeElementPrototype(exec->globalData(), globalObject, JSHTMLMarqueeElementPrototype::createStructure(exec->globalData(), JSHTMLElementPrototype::self(exec, globalObject)));
  130. }
  131. bool JSHTMLMarqueeElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
  132. {
  133. ASSERT_GC_OBJECT_INHERITS(this, &s_info);
  134. return getStaticValueSlot<JSHTMLMarqueeElement, Base>(exec, &JSHTMLMarqueeElementTable, this, propertyName, slot);
  135. }
  136. bool JSHTMLMarqueeElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
  137. {
  138. ASSERT_GC_OBJECT_INHERITS(this, &s_info);
  139. return getStaticValueDescriptor<JSHTMLMarqueeElement, Base>(exec, &JSHTMLMarqueeElementTable, this, propertyName, descriptor);
  140. }
  141. JSValue jsHTMLMarqueeElementBehavior(ExecState* exec, JSValue slotBase, const Identifier&)
  142. {
  143. JSHTMLMarqueeElement* castedThis = static_cast<JSHTMLMarqueeElement*>(asObject(slotBase));
  144. UNUSED_PARAM(exec);
  145. HTMLMarqueeElement* imp = static_cast<HTMLMarqueeElement*>(castedThis->impl());
  146. JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::behaviorAttr));
  147. return result;
  148. }
  149. JSValue jsHTMLMarqueeElementBgColor(ExecState* exec, JSValue slotBase, const Identifier&)
  150. {
  151. JSHTMLMarqueeElement* castedThis = static_cast<JSHTMLMarqueeElement*>(asObject(slotBase));
  152. UNUSED_PARAM(exec);
  153. HTMLMarqueeElement* imp = static_cast<HTMLMarqueeElement*>(castedThis->impl());
  154. JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::bgcolorAttr));
  155. return result;
  156. }
  157. JSValue jsHTMLMarqueeElementDirection(ExecState* exec, JSValue slotBase, const Identifier&)
  158. {
  159. JSHTMLMarqueeElement* castedThis = static_cast<JSHTMLMarqueeElement*>(asObject(slotBase));
  160. UNUSED_PARAM(exec);
  161. HTMLMarqueeElement* imp = static_cast<HTMLMarqueeElement*>(castedThis->impl());
  162. JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::directionAttr));
  163. return result;
  164. }
  165. JSValue jsHTMLMarqueeElementHeight(ExecState* exec, JSValue slotBase, const Identifier&)
  166. {
  167. JSHTMLMarqueeElement* castedThis = static_cast<JSHTMLMarqueeElement*>(asObject(slotBase));
  168. UNUSED_PARAM(exec);
  169. HTMLMarqueeElement* imp = static_cast<HTMLMarqueeElement*>(castedThis->impl());
  170. JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::heightAttr));
  171. return result;
  172. }
  173. JSValue jsHTMLMarqueeElementHspace(ExecState* exec, JSValue slotBase, const Identifier&)
  174. {
  175. JSHTMLMarqueeElement* castedThis = static_cast<JSHTMLMarqueeElement*>(asObject(slotBase));
  176. UNUSED_PARAM(exec);
  177. HTMLMarqueeElement* imp = static_cast<HTMLMarqueeElement*>(castedThis->impl());
  178. JSValue result = jsNumber(std::max(0, imp->getIntegralAttribute(WebCore::HTMLNames::hspaceAttr)));
  179. return result;
  180. }
  181. JSValue jsHTMLMarqueeElementLoop(ExecState* exec, JSValue slotBase, const Identifier&)
  182. {
  183. JSHTMLMarqueeElement* castedThis = static_cast<JSHTMLMarqueeElement*>(asObject(slotBase));
  184. UNUSED_PARAM(exec);
  185. HTMLMarqueeElement* imp = static_cast<HTMLMarqueeElement*>(castedThis->impl());
  186. JSValue result = jsNumber(imp->loop());
  187. return result;
  188. }
  189. JSValue jsHTMLMarqueeElementScrollAmount(ExecState* exec, JSValue slotBase, const Identifier&)
  190. {
  191. JSHTMLMarqueeElement* castedThis = static_cast<JSHTMLMarqueeElement*>(asObject(slotBase));
  192. UNUSED_PARAM(exec);
  193. HTMLMarqueeElement* imp = static_cast<HTMLMarqueeElement*>(castedThis->impl());
  194. JSValue result = jsNumber(imp->scrollAmount());
  195. return result;
  196. }
  197. JSValue jsHTMLMarqueeElementScrollDelay(ExecState* exec, JSValue slotBase, const Identifier&)
  198. {
  199. JSHTMLMarqueeElement* castedThis = static_cast<JSHTMLMarqueeElement*>(asObject(slotBase));
  200. UNUSED_PARAM(exec);
  201. HTMLMarqueeElement* imp = static_cast<HTMLMarqueeElement*>(castedThis->impl());
  202. JSValue result = jsNumber(imp->scrollDelay());
  203. return result;
  204. }
  205. JSValue jsHTMLMarqueeElementTrueSpeed(ExecState* exec, JSValue slotBase, const Identifier&)
  206. {
  207. JSHTMLMarqueeElement* castedThis = static_cast<JSHTMLMarqueeElement*>(asObject(slotBase));
  208. UNUSED_PARAM(exec);
  209. HTMLMarqueeElement* imp = static_cast<HTMLMarqueeElement*>(castedThis->impl());
  210. JSValue result = jsBoolean(imp->hasAttribute(WebCore::HTMLNames::truespeedAttr));
  211. return result;
  212. }
  213. JSValue jsHTMLMarqueeElementVspace(ExecState* exec, JSValue slotBase, const Identifier&)
  214. {
  215. JSHTMLMarqueeElement* castedThis = static_cast<JSHTMLMarqueeElement*>(asObject(slotBase));
  216. UNUSED_PARAM(exec);
  217. HTMLMarqueeElement* imp = static_cast<HTMLMarqueeElement*>(castedThis->impl());
  218. JSValue result = jsNumber(std::max(0, imp->getIntegralAttribute(WebCore::HTMLNames::vspaceAttr)));
  219. return result;
  220. }
  221. JSValue jsHTMLMarqueeElementWidth(ExecState* exec, JSValue slotBase, const Identifier&)
  222. {
  223. JSHTMLMarqueeElement* castedThis = static_cast<JSHTMLMarqueeElement*>(asObject(slotBase));
  224. UNUSED_PARAM(exec);
  225. HTMLMarqueeElement* imp = static_cast<HTMLMarqueeElement*>(castedThis->impl());
  226. JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::widthAttr));
  227. return result;
  228. }
  229. JSValue jsHTMLMarqueeElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
  230. {
  231. JSHTMLMarqueeElement* domObject = static_cast<JSHTMLMarqueeElement*>(asObject(slotBase));
  232. return JSHTMLMarqueeElement::getConstructor(exec, domObject->globalObject());
  233. }
  234. void JSHTMLMarqueeElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
  235. {
  236. ASSERT_GC_OBJECT_INHERITS(this, &s_info);
  237. lookupPut<JSHTMLMarqueeElement, Base>(exec, propertyName, value, &JSHTMLMarqueeElementTable, this, slot);
  238. }
  239. void setJSHTMLMarqueeElementBehavior(ExecState* exec, JSObject* thisObject, JSValue value)
  240. {
  241. JSHTMLMarqueeElement* castedThis = static_cast<JSHTMLMarqueeElement*>(thisObject);
  242. HTMLMarqueeElement* imp = static_cast<HTMLMarqueeElement*>(castedThis->impl());
  243. imp->setAttribute(WebCore::HTMLNames::behaviorAttr, valueToStringWithNullCheck(exec, value));
  244. }
  245. void setJSHTMLMarqueeElementBgColor(ExecState* exec, JSObject* thisObject, JSValue value)
  246. {
  247. JSHTMLMarqueeElement* castedThis = static_cast<JSHTMLMarqueeElement*>(thisObject);
  248. HTMLMarqueeElement* imp = static_cast<HTMLMarqueeElement*>(castedThis->impl());
  249. imp->setAttribute(WebCore::HTMLNames::bgcolorAttr, valueToStringWithNullCheck(exec, value));
  250. }
  251. void setJSHTMLMarqueeElementDirection(ExecState* exec, JSObject* thisObject, JSValue value)
  252. {
  253. JSHTMLMarqueeElement* castedThis = static_cast<JSHTMLMarqueeElement*>(thisObject);
  254. HTMLMarqueeElement* imp = static_cast<HTMLMarqueeElement*>(castedThis->impl());
  255. imp->setAttribute(WebCore::HTMLNames::directionAttr, valueToStringWithNullCheck(exec, value));
  256. }
  257. void setJSHTMLMarqueeElementHeight(ExecState* exec, JSObject* thisObject, JSValue value)
  258. {
  259. JSHTMLMarqueeElement* castedThis = static_cast<JSHTMLMarqueeElement*>(thisObject);
  260. HTMLMarqueeElement* imp = static_cast<HTMLMarqueeElement*>(castedThis->impl());
  261. imp->setAttribute(WebCore::HTMLNames::heightAttr, valueToStringWithNullCheck(exec, value));
  262. }
  263. void setJSHTMLMarqueeElementHspace(ExecState* exec, JSObject* thisObject, JSValue value)
  264. {
  265. JSHTMLMarqueeElement* castedThis = static_cast<JSHTMLMarqueeElement*>(thisObject);
  266. HTMLMarqueeElement* imp = static_cast<HTMLMarqueeElement*>(castedThis->impl());
  267. imp->setUnsignedIntegralAttribute(WebCore::HTMLNames::hspaceAttr, value.toUInt32(exec));
  268. }
  269. void setJSHTMLMarqueeElementLoop(ExecState* exec, JSObject* thisObject, JSValue value)
  270. {
  271. JSHTMLMarqueeElement* castedThis = static_cast<JSHTMLMarqueeElement*>(thisObject);
  272. HTMLMarqueeElement* imp = static_cast<HTMLMarqueeElement*>(castedThis->impl());
  273. ExceptionCode ec = 0;
  274. imp->setLoop(value.toInt32(exec), ec);
  275. setDOMException(exec, ec);
  276. }
  277. void setJSHTMLMarqueeElementScrollAmount(ExecState* exec, JSObject* thisObject, JSValue value)
  278. {
  279. JSHTMLMarqueeElement* castedThis = static_cast<JSHTMLMarqueeElement*>(thisObject);
  280. HTMLMarqueeElement* imp = static_cast<HTMLMarqueeElement*>(castedThis->impl());
  281. ExceptionCode ec = 0;
  282. imp->setScrollAmount(value.toInt32(exec), ec);
  283. setDOMException(exec, ec);
  284. }
  285. void setJSHTMLMarqueeElementScrollDelay(ExecState* exec, JSObject* thisObject, JSValue value)
  286. {
  287. JSHTMLMarqueeElement* castedThis = static_cast<JSHTMLMarqueeElement*>(thisObject);
  288. HTMLMarqueeElement* imp = static_cast<HTMLMarqueeElement*>(castedThis->impl());
  289. ExceptionCode ec = 0;
  290. imp->setScrollDelay(value.toInt32(exec), ec);
  291. setDOMException(exec, ec);
  292. }
  293. void setJSHTMLMarqueeElementTrueSpeed(ExecState* exec, JSObject* thisObject, JSValue value)
  294. {
  295. JSHTMLMarqueeElement* castedThis = static_cast<JSHTMLMarqueeElement*>(thisObject);
  296. HTMLMarqueeElement* imp = static_cast<HTMLMarqueeElement*>(castedThis->impl());
  297. imp->setBooleanAttribute(WebCore::HTMLNames::truespeedAttr, value.toBoolean(exec));
  298. }
  299. void setJSHTMLMarqueeElementVspace(ExecState* exec, JSObject* thisObject, JSValue value)
  300. {
  301. JSHTMLMarqueeElement* castedThis = static_cast<JSHTMLMarqueeElement*>(thisObject);
  302. HTMLMarqueeElement* imp = static_cast<HTMLMarqueeElement*>(castedThis->impl());
  303. imp->setUnsignedIntegralAttribute(WebCore::HTMLNames::vspaceAttr, value.toUInt32(exec));
  304. }
  305. void setJSHTMLMarqueeElementWidth(ExecState* exec, JSObject* thisObject, JSValue value)
  306. {
  307. JSHTMLMarqueeElement* castedThis = static_cast<JSHTMLMarqueeElement*>(thisObject);
  308. HTMLMarqueeElement* imp = static_cast<HTMLMarqueeElement*>(castedThis->impl());
  309. imp->setAttribute(WebCore::HTMLNames::widthAttr, valueToStringWithNullCheck(exec, value));
  310. }
  311. JSValue JSHTMLMarqueeElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
  312. {
  313. return getDOMConstructor<JSHTMLMarqueeElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
  314. }
  315. EncodedJSValue JSC_HOST_CALL jsHTMLMarqueeElementPrototypeFunctionStart(ExecState* exec)
  316. {
  317. JSValue thisValue = exec->hostThisValue();
  318. if (!thisValue.inherits(&JSHTMLMarqueeElement::s_info))
  319. return throwVMTypeError(exec);
  320. JSHTMLMarqueeElement* castedThis = static_cast<JSHTMLMarqueeElement*>(asObject(thisValue));
  321. ASSERT_GC_OBJECT_INHERITS(castedThis, &JSHTMLMarqueeElement::s_info);
  322. HTMLMarqueeElement* imp = static_cast<HTMLMarqueeElement*>(castedThis->impl());
  323. imp->start();
  324. return JSValue::encode(jsUndefined());
  325. }
  326. EncodedJSValue JSC_HOST_CALL jsHTMLMarqueeElementPrototypeFunctionStop(ExecState* exec)
  327. {
  328. JSValue thisValue = exec->hostThisValue();
  329. if (!thisValue.inherits(&JSHTMLMarqueeElement::s_info))
  330. return throwVMTypeError(exec);
  331. JSHTMLMarqueeElement* castedThis = static_cast<JSHTMLMarqueeElement*>(asObject(thisValue));
  332. ASSERT_GC_OBJECT_INHERITS(castedThis, &JSHTMLMarqueeElement::s_info);
  333. HTMLMarqueeElement* imp = static_cast<HTMLMarqueeElement*>(castedThis->impl());
  334. imp->stop();
  335. return JSValue::encode(jsUndefined());
  336. }
  337. }