2 This file is part of the WebKit open source project.
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY!
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.
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.
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.
22 #include "JSHTMLLinkElement.h"
24 #include "HTMLLinkElement.h"
25 #include "HTMLNames.h"
26 #include "JSStyleSheet.h"
28 #include "StyleSheet.h"
29 #include <runtime/JSString.h>
30 #include <wtf/GetPtr.h>
36 ASSERT_CLASS_FITS_IN_CELL(JSHTMLLinkElement);
40 #define THUNK_GENERATOR(generator) , generator
42 #define THUNK_GENERATOR(generator)
45 #define INTRINSIC(intrinsic) , intrinsic
47 #define INTRINSIC(intrinsic)
50 static const HashTableValue JSHTMLLinkElementTableValues[] =
52 { "disabled", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLinkElementDisabled), (intptr_t)setJSHTMLLinkElementDisabled THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
53 { "charset", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLinkElementCharset), (intptr_t)setJSHTMLLinkElementCharset THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
54 { "href", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLinkElementHref), (intptr_t)setJSHTMLLinkElementHref THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
55 { "hreflang", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLinkElementHreflang), (intptr_t)setJSHTMLLinkElementHreflang THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
56 { "media", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLinkElementMedia), (intptr_t)setJSHTMLLinkElementMedia THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
57 { "rel", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLinkElementRel), (intptr_t)setJSHTMLLinkElementRel THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
58 { "rev", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLinkElementRev), (intptr_t)setJSHTMLLinkElementRev THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
59 { "sizes", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLinkElementSizes), (intptr_t)setJSHTMLLinkElementSizes THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
60 { "target", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLinkElementTarget), (intptr_t)setJSHTMLLinkElementTarget THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
61 { "type", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLinkElementType), (intptr_t)setJSHTMLLinkElementType THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
62 { "sheet", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLinkElementSheet), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
63 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLLinkElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
64 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
67 #undef THUNK_GENERATOR
68 static const HashTable JSHTMLLinkElementTable = { 33, 31, JSHTMLLinkElementTableValues, 0 };
69 /* Hash table for constructor */
71 #define THUNK_GENERATOR(generator) , generator
73 #define THUNK_GENERATOR(generator)
76 #define INTRINSIC(intrinsic) , intrinsic
78 #define INTRINSIC(intrinsic)
81 static const HashTableValue JSHTMLLinkElementConstructorTableValues[] =
83 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
86 #undef THUNK_GENERATOR
87 static const HashTable JSHTMLLinkElementConstructorTable = { 1, 0, JSHTMLLinkElementConstructorTableValues, 0 };
88 const ClassInfo JSHTMLLinkElementConstructor::s_info = { "HTMLLinkElementConstructor", &DOMConstructorObject::s_info, &JSHTMLLinkElementConstructorTable, 0, CREATE_METHOD_TABLE(JSHTMLLinkElementConstructor) };
90 JSHTMLLinkElementConstructor::JSHTMLLinkElementConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
91 : DOMConstructorObject(structure, globalObject)
95 void JSHTMLLinkElementConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
97 Base::finishCreation(exec->globalData());
98 ASSERT(inherits(&s_info));
99 putDirect(exec->globalData(), exec->propertyNames().prototype, JSHTMLLinkElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
102 bool JSHTMLLinkElementConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
104 return getStaticValueSlot<JSHTMLLinkElementConstructor, JSDOMWrapper>(exec, &JSHTMLLinkElementConstructorTable, static_cast<JSHTMLLinkElementConstructor*>(cell), propertyName, slot);
107 bool JSHTMLLinkElementConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
109 return getStaticValueDescriptor<JSHTMLLinkElementConstructor, JSDOMWrapper>(exec, &JSHTMLLinkElementConstructorTable, static_cast<JSHTMLLinkElementConstructor*>(object), propertyName, descriptor);
112 /* Hash table for prototype */
114 #define THUNK_GENERATOR(generator) , generator
116 #define THUNK_GENERATOR(generator)
119 #define INTRINSIC(intrinsic) , intrinsic
121 #define INTRINSIC(intrinsic)
124 static const HashTableValue JSHTMLLinkElementPrototypeTableValues[] =
126 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
129 #undef THUNK_GENERATOR
130 static const HashTable JSHTMLLinkElementPrototypeTable = { 1, 0, JSHTMLLinkElementPrototypeTableValues, 0 };
131 const ClassInfo JSHTMLLinkElementPrototype::s_info = { "HTMLLinkElementPrototype", &JSC::JSNonFinalObject::s_info, &JSHTMLLinkElementPrototypeTable, 0, CREATE_METHOD_TABLE(JSHTMLLinkElementPrototype) };
133 JSObject* JSHTMLLinkElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
135 return getDOMPrototype<JSHTMLLinkElement>(exec, globalObject);
138 const ClassInfo JSHTMLLinkElement::s_info = { "HTMLLinkElement", &JSHTMLElement::s_info, &JSHTMLLinkElementTable, 0 , CREATE_METHOD_TABLE(JSHTMLLinkElement) };
140 JSHTMLLinkElement::JSHTMLLinkElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLLinkElement> impl)
141 : JSHTMLElement(structure, globalObject, impl)
145 void JSHTMLLinkElement::finishCreation(JSGlobalData& globalData)
147 Base::finishCreation(globalData);
148 ASSERT(inherits(&s_info));
151 JSObject* JSHTMLLinkElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
153 return JSHTMLLinkElementPrototype::create(exec->globalData(), globalObject, JSHTMLLinkElementPrototype::createStructure(exec->globalData(), globalObject, JSHTMLElementPrototype::self(exec, globalObject)));
156 bool JSHTMLLinkElement::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
158 JSHTMLLinkElement* thisObject = jsCast<JSHTMLLinkElement*>(cell);
159 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
160 return getStaticValueSlot<JSHTMLLinkElement, Base>(exec, &JSHTMLLinkElementTable, thisObject, propertyName, slot);
163 bool JSHTMLLinkElement::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
165 JSHTMLLinkElement* thisObject = jsCast<JSHTMLLinkElement*>(object);
166 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
167 return getStaticValueDescriptor<JSHTMLLinkElement, Base>(exec, &JSHTMLLinkElementTable, thisObject, propertyName, descriptor);
170 JSValue jsHTMLLinkElementDisabled(ExecState* exec, JSValue slotBase, const Identifier&)
172 JSHTMLLinkElement* castedThis = static_cast<JSHTMLLinkElement*>(asObject(slotBase));
174 HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(castedThis->impl());
175 JSValue result = jsBoolean(imp->hasAttribute(WebCore::HTMLNames::disabledAttr));
180 JSValue jsHTMLLinkElementCharset(ExecState* exec, JSValue slotBase, const Identifier&)
182 JSHTMLLinkElement* castedThis = static_cast<JSHTMLLinkElement*>(asObject(slotBase));
184 HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(castedThis->impl());
185 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::charsetAttr));
190 JSValue jsHTMLLinkElementHref(ExecState* exec, JSValue slotBase, const Identifier&)
192 JSHTMLLinkElement* castedThis = static_cast<JSHTMLLinkElement*>(asObject(slotBase));
194 HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(castedThis->impl());
195 JSValue result = jsString(exec, imp->getURLAttribute(WebCore::HTMLNames::hrefAttr));
200 JSValue jsHTMLLinkElementHreflang(ExecState* exec, JSValue slotBase, const Identifier&)
202 JSHTMLLinkElement* castedThis = static_cast<JSHTMLLinkElement*>(asObject(slotBase));
204 HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(castedThis->impl());
205 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::hreflangAttr));
210 JSValue jsHTMLLinkElementMedia(ExecState* exec, JSValue slotBase, const Identifier&)
212 JSHTMLLinkElement* castedThis = static_cast<JSHTMLLinkElement*>(asObject(slotBase));
214 HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(castedThis->impl());
215 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::mediaAttr));
220 JSValue jsHTMLLinkElementRel(ExecState* exec, JSValue slotBase, const Identifier&)
222 JSHTMLLinkElement* castedThis = static_cast<JSHTMLLinkElement*>(asObject(slotBase));
224 HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(castedThis->impl());
225 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::relAttr));
230 JSValue jsHTMLLinkElementRev(ExecState* exec, JSValue slotBase, const Identifier&)
232 JSHTMLLinkElement* castedThis = static_cast<JSHTMLLinkElement*>(asObject(slotBase));
234 HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(castedThis->impl());
235 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::revAttr));
240 JSValue jsHTMLLinkElementSizes(ExecState* exec, JSValue slotBase, const Identifier&)
242 JSHTMLLinkElement* castedThis = static_cast<JSHTMLLinkElement*>(asObject(slotBase));
243 return castedThis->sizes(exec);
247 JSValue jsHTMLLinkElementTarget(ExecState* exec, JSValue slotBase, const Identifier&)
249 JSHTMLLinkElement* castedThis = static_cast<JSHTMLLinkElement*>(asObject(slotBase));
251 HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(castedThis->impl());
252 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::targetAttr));
257 JSValue jsHTMLLinkElementType(ExecState* exec, JSValue slotBase, const Identifier&)
259 JSHTMLLinkElement* castedThis = static_cast<JSHTMLLinkElement*>(asObject(slotBase));
261 HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(castedThis->impl());
262 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::typeAttr));
267 JSValue jsHTMLLinkElementSheet(ExecState* exec, JSValue slotBase, const Identifier&)
269 JSHTMLLinkElement* castedThis = static_cast<JSHTMLLinkElement*>(asObject(slotBase));
271 HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(castedThis->impl());
272 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->sheet()));
277 JSValue jsHTMLLinkElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
279 JSHTMLLinkElement* domObject = static_cast<JSHTMLLinkElement*>(asObject(slotBase));
280 return JSHTMLLinkElement::getConstructor(exec, domObject->globalObject());
283 void JSHTMLLinkElement::put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
285 JSHTMLLinkElement* thisObject = jsCast<JSHTMLLinkElement*>(cell);
286 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
287 lookupPut<JSHTMLLinkElement, Base>(exec, propertyName, value, &JSHTMLLinkElementTable, thisObject, slot);
290 void setJSHTMLLinkElementDisabled(ExecState* exec, JSObject* thisObject, JSValue value)
292 JSHTMLLinkElement* castedThis = static_cast<JSHTMLLinkElement*>(thisObject);
293 HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(castedThis->impl());
294 imp->setBooleanAttribute(WebCore::HTMLNames::disabledAttr, value.toBoolean(exec));
298 void setJSHTMLLinkElementCharset(ExecState* exec, JSObject* thisObject, JSValue value)
300 JSHTMLLinkElement* castedThis = static_cast<JSHTMLLinkElement*>(thisObject);
301 HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(castedThis->impl());
302 imp->setAttribute(WebCore::HTMLNames::charsetAttr, valueToStringWithNullCheck(exec, value));
306 void setJSHTMLLinkElementHref(ExecState* exec, JSObject* thisObject, JSValue value)
308 JSHTMLLinkElement* castedThis = static_cast<JSHTMLLinkElement*>(thisObject);
309 HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(castedThis->impl());
310 imp->setAttribute(WebCore::HTMLNames::hrefAttr, valueToStringWithNullCheck(exec, value));
314 void setJSHTMLLinkElementHreflang(ExecState* exec, JSObject* thisObject, JSValue value)
316 JSHTMLLinkElement* castedThis = static_cast<JSHTMLLinkElement*>(thisObject);
317 HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(castedThis->impl());
318 imp->setAttribute(WebCore::HTMLNames::hreflangAttr, valueToStringWithNullCheck(exec, value));
322 void setJSHTMLLinkElementMedia(ExecState* exec, JSObject* thisObject, JSValue value)
324 JSHTMLLinkElement* castedThis = static_cast<JSHTMLLinkElement*>(thisObject);
325 HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(castedThis->impl());
326 imp->setAttribute(WebCore::HTMLNames::mediaAttr, valueToStringWithNullCheck(exec, value));
330 void setJSHTMLLinkElementRel(ExecState* exec, JSObject* thisObject, JSValue value)
332 JSHTMLLinkElement* castedThis = static_cast<JSHTMLLinkElement*>(thisObject);
333 HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(castedThis->impl());
334 imp->setAttribute(WebCore::HTMLNames::relAttr, valueToStringWithNullCheck(exec, value));
338 void setJSHTMLLinkElementRev(ExecState* exec, JSObject* thisObject, JSValue value)
340 JSHTMLLinkElement* castedThis = static_cast<JSHTMLLinkElement*>(thisObject);
341 HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(castedThis->impl());
342 imp->setAttribute(WebCore::HTMLNames::revAttr, valueToStringWithNullCheck(exec, value));
346 void setJSHTMLLinkElementSizes(ExecState* exec, JSObject* thisObject, JSValue value)
348 static_cast<JSHTMLLinkElement*>(thisObject)->setSizes(exec, value);
352 void setJSHTMLLinkElementTarget(ExecState* exec, JSObject* thisObject, JSValue value)
354 JSHTMLLinkElement* castedThis = static_cast<JSHTMLLinkElement*>(thisObject);
355 HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(castedThis->impl());
356 imp->setAttribute(WebCore::HTMLNames::targetAttr, valueToStringWithNullCheck(exec, value));
360 void setJSHTMLLinkElementType(ExecState* exec, JSObject* thisObject, JSValue value)
362 JSHTMLLinkElement* castedThis = static_cast<JSHTMLLinkElement*>(thisObject);
363 HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(castedThis->impl());
364 imp->setAttribute(WebCore::HTMLNames::typeAttr, valueToStringWithNullCheck(exec, value));
368 JSValue JSHTMLLinkElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
370 return getDOMConstructor<JSHTMLLinkElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));