/src/3rdparty/webkit/Source/WebCore/generated/JSHTMLBlockquoteElement.cpp

https://bitbucket.org/ultra_iter/qt-vtl · C++ · 179 lines · 124 code · 33 blank · 22 comment · 0 complexity · fb67256b57e59a38ece0ea8d6417d444 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 "JSHTMLBlockquoteElement.h"
  19. #include "HTMLBlockquoteElement.h"
  20. #include "HTMLNames.h"
  21. #include "KURL.h"
  22. #include <runtime/JSString.h>
  23. #include <wtf/GetPtr.h>
  24. using namespace JSC;
  25. namespace WebCore {
  26. ASSERT_CLASS_FITS_IN_CELL(JSHTMLBlockquoteElement);
  27. /* Hash table */
  28. #if ENABLE(JIT)
  29. #define THUNK_GENERATOR(generator) , generator
  30. #else
  31. #define THUNK_GENERATOR(generator)
  32. #endif
  33. static const HashTableValue JSHTMLBlockquoteElementTableValues[3] =
  34. {
  35. { "cite", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBlockquoteElementCite), (intptr_t)setJSHTMLBlockquoteElementCite THUNK_GENERATOR(0) },
  36. { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLBlockquoteElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) },
  37. { 0, 0, 0, 0 THUNK_GENERATOR(0) }
  38. };
  39. #undef THUNK_GENERATOR
  40. static JSC_CONST_HASHTABLE HashTable JSHTMLBlockquoteElementTable = { 5, 3, JSHTMLBlockquoteElementTableValues, 0 };
  41. /* Hash table for constructor */
  42. #if ENABLE(JIT)
  43. #define THUNK_GENERATOR(generator) , generator
  44. #else
  45. #define THUNK_GENERATOR(generator)
  46. #endif
  47. static const HashTableValue JSHTMLBlockquoteElementConstructorTableValues[1] =
  48. {
  49. { 0, 0, 0, 0 THUNK_GENERATOR(0) }
  50. };
  51. #undef THUNK_GENERATOR
  52. static JSC_CONST_HASHTABLE HashTable JSHTMLBlockquoteElementConstructorTable = { 1, 0, JSHTMLBlockquoteElementConstructorTableValues, 0 };
  53. class JSHTMLBlockquoteElementConstructor : public DOMConstructorObject {
  54. public:
  55. JSHTMLBlockquoteElementConstructor(JSC::ExecState*, JSC::Structure*, JSDOMGlobalObject*);
  56. virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
  57. virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
  58. static const JSC::ClassInfo s_info;
  59. static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
  60. {
  61. return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
  62. }
  63. protected:
  64. static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
  65. };
  66. const ClassInfo JSHTMLBlockquoteElementConstructor::s_info = { "HTMLBlockquoteElementConstructor", &DOMConstructorObject::s_info, &JSHTMLBlockquoteElementConstructorTable, 0 };
  67. JSHTMLBlockquoteElementConstructor::JSHTMLBlockquoteElementConstructor(ExecState* exec, Structure* structure, JSDOMGlobalObject* globalObject)
  68. : DOMConstructorObject(structure, globalObject)
  69. {
  70. ASSERT(inherits(&s_info));
  71. putDirect(exec->globalData(), exec->propertyNames().prototype, JSHTMLBlockquoteElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
  72. }
  73. bool JSHTMLBlockquoteElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
  74. {
  75. return getStaticValueSlot<JSHTMLBlockquoteElementConstructor, JSDOMWrapper>(exec, &JSHTMLBlockquoteElementConstructorTable, this, propertyName, slot);
  76. }
  77. bool JSHTMLBlockquoteElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
  78. {
  79. return getStaticValueDescriptor<JSHTMLBlockquoteElementConstructor, JSDOMWrapper>(exec, &JSHTMLBlockquoteElementConstructorTable, this, propertyName, descriptor);
  80. }
  81. /* Hash table for prototype */
  82. #if ENABLE(JIT)
  83. #define THUNK_GENERATOR(generator) , generator
  84. #else
  85. #define THUNK_GENERATOR(generator)
  86. #endif
  87. static const HashTableValue JSHTMLBlockquoteElementPrototypeTableValues[1] =
  88. {
  89. { 0, 0, 0, 0 THUNK_GENERATOR(0) }
  90. };
  91. #undef THUNK_GENERATOR
  92. static JSC_CONST_HASHTABLE HashTable JSHTMLBlockquoteElementPrototypeTable = { 1, 0, JSHTMLBlockquoteElementPrototypeTableValues, 0 };
  93. const ClassInfo JSHTMLBlockquoteElementPrototype::s_info = { "HTMLBlockquoteElementPrototype", &JSC::JSObjectWithGlobalObject::s_info, &JSHTMLBlockquoteElementPrototypeTable, 0 };
  94. JSObject* JSHTMLBlockquoteElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
  95. {
  96. return getDOMPrototype<JSHTMLBlockquoteElement>(exec, globalObject);
  97. }
  98. const ClassInfo JSHTMLBlockquoteElement::s_info = { "HTMLBlockquoteElement", &JSHTMLElement::s_info, &JSHTMLBlockquoteElementTable, 0 };
  99. JSHTMLBlockquoteElement::JSHTMLBlockquoteElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLBlockquoteElement> impl)
  100. : JSHTMLElement(structure, globalObject, impl)
  101. {
  102. ASSERT(inherits(&s_info));
  103. }
  104. JSObject* JSHTMLBlockquoteElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
  105. {
  106. return new (exec) JSHTMLBlockquoteElementPrototype(exec->globalData(), globalObject, JSHTMLBlockquoteElementPrototype::createStructure(exec->globalData(), JSHTMLElementPrototype::self(exec, globalObject)));
  107. }
  108. bool JSHTMLBlockquoteElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
  109. {
  110. return getStaticValueSlot<JSHTMLBlockquoteElement, Base>(exec, &JSHTMLBlockquoteElementTable, this, propertyName, slot);
  111. }
  112. bool JSHTMLBlockquoteElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
  113. {
  114. return getStaticValueDescriptor<JSHTMLBlockquoteElement, Base>(exec, &JSHTMLBlockquoteElementTable, this, propertyName, descriptor);
  115. }
  116. JSValue jsHTMLBlockquoteElementCite(ExecState* exec, JSValue slotBase, const Identifier&)
  117. {
  118. JSHTMLBlockquoteElement* castedThis = static_cast<JSHTMLBlockquoteElement*>(asObject(slotBase));
  119. UNUSED_PARAM(exec);
  120. HTMLBlockquoteElement* imp = static_cast<HTMLBlockquoteElement*>(castedThis->impl());
  121. JSValue result = jsString(exec, imp->getURLAttribute(WebCore::HTMLNames::citeAttr));
  122. return result;
  123. }
  124. JSValue jsHTMLBlockquoteElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
  125. {
  126. JSHTMLBlockquoteElement* domObject = static_cast<JSHTMLBlockquoteElement*>(asObject(slotBase));
  127. return JSHTMLBlockquoteElement::getConstructor(exec, domObject->globalObject());
  128. }
  129. void JSHTMLBlockquoteElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
  130. {
  131. lookupPut<JSHTMLBlockquoteElement, Base>(exec, propertyName, value, &JSHTMLBlockquoteElementTable, this, slot);
  132. }
  133. void setJSHTMLBlockquoteElementCite(ExecState* exec, JSObject* thisObject, JSValue value)
  134. {
  135. JSHTMLBlockquoteElement* castedThis = static_cast<JSHTMLBlockquoteElement*>(thisObject);
  136. HTMLBlockquoteElement* imp = static_cast<HTMLBlockquoteElement*>(castedThis->impl());
  137. imp->setAttribute(WebCore::HTMLNames::citeAttr, valueToStringWithNullCheck(exec, value));
  138. }
  139. JSValue JSHTMLBlockquoteElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
  140. {
  141. return getDOMConstructor<JSHTMLBlockquoteElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
  142. }
  143. }