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 #include "JSHTMLAnchorElement.h"
23
24 #include "ExceptionCode.h"
25 #include "HTMLAnchorElement.h"
26 #include "HTMLNames.h"
27 #include "JSDOMBinding.h"
28 #include "KURL.h"
29 #include <runtime/Error.h>
30 #include <runtime/JSString.h>
31 #include <wtf/GetPtr.h>
32
33 using namespace JSC;
34
35 namespace WebCore {
36
37 ASSERT_CLASS_FITS_IN_CELL(JSHTMLAnchorElement);
38
39 /* Hash table */
40 #if ENABLE(JIT)
41 #define THUNK_GENERATOR(generator) , generator
42 #else
43 #define THUNK_GENERATOR(generator)
44 #endif
45
46 static const HashTableValue JSHTMLAnchorElementTableValues[23] =
47 {
48 { "accessKey", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementAccessKey), (intptr_t)setJSHTMLAnchorElementAccessKey THUNK_GENERATOR(0) },
49 { "charset", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementCharset), (intptr_t)setJSHTMLAnchorElementCharset THUNK_GENERATOR(0) },
50 { "coords", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementCoords), (intptr_t)setJSHTMLAnchorElementCoords THUNK_GENERATOR(0) },
51 { "href", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementHref), (intptr_t)setJSHTMLAnchorElementHref THUNK_GENERATOR(0) },
52 { "hreflang", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementHreflang), (intptr_t)setJSHTMLAnchorElementHreflang THUNK_GENERATOR(0) },
53 { "name", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementName), (intptr_t)setJSHTMLAnchorElementName THUNK_GENERATOR(0) },
54 { "ping", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementPing), (intptr_t)setJSHTMLAnchorElementPing THUNK_GENERATOR(0) },
55 { "rel", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementRel), (intptr_t)setJSHTMLAnchorElementRel THUNK_GENERATOR(0) },
56 { "rev", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementRev), (intptr_t)setJSHTMLAnchorElementRev THUNK_GENERATOR(0) },
57 { "shape", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementShape), (intptr_t)setJSHTMLAnchorElementShape THUNK_GENERATOR(0) },
58 { "target", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementTarget), (intptr_t)setJSHTMLAnchorElementTarget THUNK_GENERATOR(0) },
59 { "type", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementType), (intptr_t)setJSHTMLAnchorElementType THUNK_GENERATOR(0) },
60 { "hash", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementHash), (intptr_t)setJSHTMLAnchorElementHash THUNK_GENERATOR(0) },
61 { "host", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementHost), (intptr_t)setJSHTMLAnchorElementHost THUNK_GENERATOR(0) },
62 { "hostname", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementHostname), (intptr_t)setJSHTMLAnchorElementHostname THUNK_GENERATOR(0) },
63 { "pathname", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementPathname), (intptr_t)setJSHTMLAnchorElementPathname THUNK_GENERATOR(0) },
64 { "port", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementPort), (intptr_t)setJSHTMLAnchorElementPort THUNK_GENERATOR(0) },
65 { "protocol", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementProtocol), (intptr_t)setJSHTMLAnchorElementProtocol THUNK_GENERATOR(0) },
66 { "search", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementSearch), (intptr_t)setJSHTMLAnchorElementSearch THUNK_GENERATOR(0) },
67 { "origin", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementOrigin), (intptr_t)0 THUNK_GENERATOR(0) },
68 { "text", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementText), (intptr_t)0 THUNK_GENERATOR(0) },
69 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAnchorElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) },
70 { 0, 0, 0, 0 THUNK_GENERATOR(0) }
71 };
72
73 #undef THUNK_GENERATOR
74 static JSC_CONST_HASHTABLE HashTable JSHTMLAnchorElementTable = { 68, 63, JSHTMLAnchorElementTableValues, 0 };
75 /* Hash table for constructor */
76 #if ENABLE(JIT)
77 #define THUNK_GENERATOR(generator) , generator
78 #else
79 #define THUNK_GENERATOR(generator)
80 #endif
81
82 static const HashTableValue JSHTMLAnchorElementConstructorTableValues[1] =
83 {
84 { 0, 0, 0, 0 THUNK_GENERATOR(0) }
85 };
86
87 #undef THUNK_GENERATOR
88 static JSC_CONST_HASHTABLE HashTable JSHTMLAnchorElementConstructorTable = { 1, 0, JSHTMLAnchorElementConstructorTableValues, 0 };
89 class JSHTMLAnchorElementConstructor : public DOMConstructorObject {
90 public:
91 JSHTMLAnchorElementConstructor(JSC::ExecState*, JSC::Structure*, JSDOMGlobalObject*);
92
93 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
94 virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
95 static const JSC::ClassInfo s_info;
createStructure(JSC::JSGlobalData & globalData,JSC::JSValue prototype)96 static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
97 {
98 return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
99 }
100 protected:
101 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
102 };
103
104 const ClassInfo JSHTMLAnchorElementConstructor::s_info = { "HTMLAnchorElementConstructor", &DOMConstructorObject::s_info, &JSHTMLAnchorElementConstructorTable, 0 };
105
JSHTMLAnchorElementConstructor(ExecState * exec,Structure * structure,JSDOMGlobalObject * globalObject)106 JSHTMLAnchorElementConstructor::JSHTMLAnchorElementConstructor(ExecState* exec, Structure* structure, JSDOMGlobalObject* globalObject)
107 : DOMConstructorObject(structure, globalObject)
108 {
109 ASSERT(inherits(&s_info));
110 putDirect(exec->globalData(), exec->propertyNames().prototype, JSHTMLAnchorElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
111 }
112
getOwnPropertySlot(ExecState * exec,const Identifier & propertyName,PropertySlot & slot)113 bool JSHTMLAnchorElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
114 {
115 return getStaticValueSlot<JSHTMLAnchorElementConstructor, JSDOMWrapper>(exec, &JSHTMLAnchorElementConstructorTable, this, propertyName, slot);
116 }
117
getOwnPropertyDescriptor(ExecState * exec,const Identifier & propertyName,PropertyDescriptor & descriptor)118 bool JSHTMLAnchorElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
119 {
120 return getStaticValueDescriptor<JSHTMLAnchorElementConstructor, JSDOMWrapper>(exec, &JSHTMLAnchorElementConstructorTable, this, propertyName, descriptor);
121 }
122
123 /* Hash table for prototype */
124 #if ENABLE(JIT)
125 #define THUNK_GENERATOR(generator) , generator
126 #else
127 #define THUNK_GENERATOR(generator)
128 #endif
129
130 static const HashTableValue JSHTMLAnchorElementPrototypeTableValues[3] =
131 {
132 { "getParameter", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsHTMLAnchorElementPrototypeFunctionGetParameter), (intptr_t)1 THUNK_GENERATOR(0) },
133 { "toString", DontDelete | DontEnum | Function, (intptr_t)static_cast<NativeFunction>(jsHTMLAnchorElementPrototypeFunctionToString), (intptr_t)0 THUNK_GENERATOR(0) },
134 { 0, 0, 0, 0 THUNK_GENERATOR(0) }
135 };
136
137 #undef THUNK_GENERATOR
138 static JSC_CONST_HASHTABLE HashTable JSHTMLAnchorElementPrototypeTable = { 5, 3, JSHTMLAnchorElementPrototypeTableValues, 0 };
139 const ClassInfo JSHTMLAnchorElementPrototype::s_info = { "HTMLAnchorElementPrototype", &JSC::JSObjectWithGlobalObject::s_info, &JSHTMLAnchorElementPrototypeTable, 0 };
140
self(ExecState * exec,JSGlobalObject * globalObject)141 JSObject* JSHTMLAnchorElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
142 {
143 return getDOMPrototype<JSHTMLAnchorElement>(exec, globalObject);
144 }
145
getOwnPropertySlot(ExecState * exec,const Identifier & propertyName,PropertySlot & slot)146 bool JSHTMLAnchorElementPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
147 {
148 return getStaticFunctionSlot<JSObject>(exec, &JSHTMLAnchorElementPrototypeTable, this, propertyName, slot);
149 }
150
getOwnPropertyDescriptor(ExecState * exec,const Identifier & propertyName,PropertyDescriptor & descriptor)151 bool JSHTMLAnchorElementPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
152 {
153 return getStaticFunctionDescriptor<JSObject>(exec, &JSHTMLAnchorElementPrototypeTable, this, propertyName, descriptor);
154 }
155
156 const ClassInfo JSHTMLAnchorElement::s_info = { "HTMLAnchorElement", &JSHTMLElement::s_info, &JSHTMLAnchorElementTable, 0 };
157
JSHTMLAnchorElement(Structure * structure,JSDOMGlobalObject * globalObject,PassRefPtr<HTMLAnchorElement> impl)158 JSHTMLAnchorElement::JSHTMLAnchorElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLAnchorElement> impl)
159 : JSHTMLElement(structure, globalObject, impl)
160 {
161 ASSERT(inherits(&s_info));
162 }
163
createPrototype(ExecState * exec,JSGlobalObject * globalObject)164 JSObject* JSHTMLAnchorElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
165 {
166 return new (exec) JSHTMLAnchorElementPrototype(exec->globalData(), globalObject, JSHTMLAnchorElementPrototype::createStructure(exec->globalData(), JSHTMLElementPrototype::self(exec, globalObject)));
167 }
168
getOwnPropertySlot(ExecState * exec,const Identifier & propertyName,PropertySlot & slot)169 bool JSHTMLAnchorElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
170 {
171 return getStaticValueSlot<JSHTMLAnchorElement, Base>(exec, &JSHTMLAnchorElementTable, this, propertyName, slot);
172 }
173
getOwnPropertyDescriptor(ExecState * exec,const Identifier & propertyName,PropertyDescriptor & descriptor)174 bool JSHTMLAnchorElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
175 {
176 return getStaticValueDescriptor<JSHTMLAnchorElement, Base>(exec, &JSHTMLAnchorElementTable, this, propertyName, descriptor);
177 }
178
jsHTMLAnchorElementAccessKey(ExecState * exec,JSValue slotBase,const Identifier &)179 JSValue jsHTMLAnchorElementAccessKey(ExecState* exec, JSValue slotBase, const Identifier&)
180 {
181 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slotBase));
182 UNUSED_PARAM(exec);
183 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
184 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::accesskeyAttr));
185 return result;
186 }
187
188
jsHTMLAnchorElementCharset(ExecState * exec,JSValue slotBase,const Identifier &)189 JSValue jsHTMLAnchorElementCharset(ExecState* exec, JSValue slotBase, const Identifier&)
190 {
191 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slotBase));
192 UNUSED_PARAM(exec);
193 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
194 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::charsetAttr));
195 return result;
196 }
197
198
jsHTMLAnchorElementCoords(ExecState * exec,JSValue slotBase,const Identifier &)199 JSValue jsHTMLAnchorElementCoords(ExecState* exec, JSValue slotBase, const Identifier&)
200 {
201 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slotBase));
202 UNUSED_PARAM(exec);
203 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
204 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::coordsAttr));
205 return result;
206 }
207
208
jsHTMLAnchorElementHref(ExecState * exec,JSValue slotBase,const Identifier &)209 JSValue jsHTMLAnchorElementHref(ExecState* exec, JSValue slotBase, const Identifier&)
210 {
211 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slotBase));
212 UNUSED_PARAM(exec);
213 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
214 JSValue result = jsString(exec, imp->getURLAttribute(WebCore::HTMLNames::hrefAttr));
215 return result;
216 }
217
218
jsHTMLAnchorElementHreflang(ExecState * exec,JSValue slotBase,const Identifier &)219 JSValue jsHTMLAnchorElementHreflang(ExecState* exec, JSValue slotBase, const Identifier&)
220 {
221 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slotBase));
222 UNUSED_PARAM(exec);
223 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
224 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::hreflangAttr));
225 return result;
226 }
227
228
jsHTMLAnchorElementName(ExecState * exec,JSValue slotBase,const Identifier &)229 JSValue jsHTMLAnchorElementName(ExecState* exec, JSValue slotBase, const Identifier&)
230 {
231 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slotBase));
232 UNUSED_PARAM(exec);
233 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
234 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::nameAttr));
235 return result;
236 }
237
238
jsHTMLAnchorElementPing(ExecState * exec,JSValue slotBase,const Identifier &)239 JSValue jsHTMLAnchorElementPing(ExecState* exec, JSValue slotBase, const Identifier&)
240 {
241 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slotBase));
242 UNUSED_PARAM(exec);
243 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
244 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::pingAttr));
245 return result;
246 }
247
248
jsHTMLAnchorElementRel(ExecState * exec,JSValue slotBase,const Identifier &)249 JSValue jsHTMLAnchorElementRel(ExecState* exec, JSValue slotBase, const Identifier&)
250 {
251 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slotBase));
252 UNUSED_PARAM(exec);
253 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
254 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::relAttr));
255 return result;
256 }
257
258
jsHTMLAnchorElementRev(ExecState * exec,JSValue slotBase,const Identifier &)259 JSValue jsHTMLAnchorElementRev(ExecState* exec, JSValue slotBase, const Identifier&)
260 {
261 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slotBase));
262 UNUSED_PARAM(exec);
263 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
264 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::revAttr));
265 return result;
266 }
267
268
jsHTMLAnchorElementShape(ExecState * exec,JSValue slotBase,const Identifier &)269 JSValue jsHTMLAnchorElementShape(ExecState* exec, JSValue slotBase, const Identifier&)
270 {
271 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slotBase));
272 UNUSED_PARAM(exec);
273 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
274 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::shapeAttr));
275 return result;
276 }
277
278
jsHTMLAnchorElementTarget(ExecState * exec,JSValue slotBase,const Identifier &)279 JSValue jsHTMLAnchorElementTarget(ExecState* exec, JSValue slotBase, const Identifier&)
280 {
281 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slotBase));
282 UNUSED_PARAM(exec);
283 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
284 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::targetAttr));
285 return result;
286 }
287
288
jsHTMLAnchorElementType(ExecState * exec,JSValue slotBase,const Identifier &)289 JSValue jsHTMLAnchorElementType(ExecState* exec, JSValue slotBase, const Identifier&)
290 {
291 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slotBase));
292 UNUSED_PARAM(exec);
293 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
294 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::typeAttr));
295 return result;
296 }
297
298
jsHTMLAnchorElementHash(ExecState * exec,JSValue slotBase,const Identifier &)299 JSValue jsHTMLAnchorElementHash(ExecState* exec, JSValue slotBase, const Identifier&)
300 {
301 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slotBase));
302 UNUSED_PARAM(exec);
303 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
304 JSValue result = jsString(exec, imp->hash());
305 return result;
306 }
307
308
jsHTMLAnchorElementHost(ExecState * exec,JSValue slotBase,const Identifier &)309 JSValue jsHTMLAnchorElementHost(ExecState* exec, JSValue slotBase, const Identifier&)
310 {
311 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slotBase));
312 UNUSED_PARAM(exec);
313 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
314 JSValue result = jsString(exec, imp->host());
315 return result;
316 }
317
318
jsHTMLAnchorElementHostname(ExecState * exec,JSValue slotBase,const Identifier &)319 JSValue jsHTMLAnchorElementHostname(ExecState* exec, JSValue slotBase, const Identifier&)
320 {
321 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slotBase));
322 UNUSED_PARAM(exec);
323 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
324 JSValue result = jsString(exec, imp->hostname());
325 return result;
326 }
327
328
jsHTMLAnchorElementPathname(ExecState * exec,JSValue slotBase,const Identifier &)329 JSValue jsHTMLAnchorElementPathname(ExecState* exec, JSValue slotBase, const Identifier&)
330 {
331 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slotBase));
332 UNUSED_PARAM(exec);
333 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
334 JSValue result = jsString(exec, imp->pathname());
335 return result;
336 }
337
338
jsHTMLAnchorElementPort(ExecState * exec,JSValue slotBase,const Identifier &)339 JSValue jsHTMLAnchorElementPort(ExecState* exec, JSValue slotBase, const Identifier&)
340 {
341 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slotBase));
342 UNUSED_PARAM(exec);
343 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
344 JSValue result = jsString(exec, imp->port());
345 return result;
346 }
347
348
jsHTMLAnchorElementProtocol(ExecState * exec,JSValue slotBase,const Identifier &)349 JSValue jsHTMLAnchorElementProtocol(ExecState* exec, JSValue slotBase, const Identifier&)
350 {
351 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slotBase));
352 UNUSED_PARAM(exec);
353 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
354 JSValue result = jsString(exec, imp->protocol());
355 return result;
356 }
357
358
jsHTMLAnchorElementSearch(ExecState * exec,JSValue slotBase,const Identifier &)359 JSValue jsHTMLAnchorElementSearch(ExecState* exec, JSValue slotBase, const Identifier&)
360 {
361 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slotBase));
362 UNUSED_PARAM(exec);
363 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
364 JSValue result = jsString(exec, imp->search());
365 return result;
366 }
367
368
jsHTMLAnchorElementOrigin(ExecState * exec,JSValue slotBase,const Identifier &)369 JSValue jsHTMLAnchorElementOrigin(ExecState* exec, JSValue slotBase, const Identifier&)
370 {
371 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slotBase));
372 UNUSED_PARAM(exec);
373 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
374 JSValue result = jsString(exec, imp->origin());
375 return result;
376 }
377
378
jsHTMLAnchorElementText(ExecState * exec,JSValue slotBase,const Identifier &)379 JSValue jsHTMLAnchorElementText(ExecState* exec, JSValue slotBase, const Identifier&)
380 {
381 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slotBase));
382 UNUSED_PARAM(exec);
383 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
384 JSValue result = jsString(exec, imp->text());
385 return result;
386 }
387
388
jsHTMLAnchorElementConstructor(ExecState * exec,JSValue slotBase,const Identifier &)389 JSValue jsHTMLAnchorElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
390 {
391 JSHTMLAnchorElement* domObject = static_cast<JSHTMLAnchorElement*>(asObject(slotBase));
392 return JSHTMLAnchorElement::getConstructor(exec, domObject->globalObject());
393 }
394
put(ExecState * exec,const Identifier & propertyName,JSValue value,PutPropertySlot & slot)395 void JSHTMLAnchorElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
396 {
397 lookupPut<JSHTMLAnchorElement, Base>(exec, propertyName, value, &JSHTMLAnchorElementTable, this, slot);
398 }
399
setJSHTMLAnchorElementAccessKey(ExecState * exec,JSObject * thisObject,JSValue value)400 void setJSHTMLAnchorElementAccessKey(ExecState* exec, JSObject* thisObject, JSValue value)
401 {
402 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(thisObject);
403 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
404 imp->setAttribute(WebCore::HTMLNames::accesskeyAttr, valueToStringWithNullCheck(exec, value));
405 }
406
407
setJSHTMLAnchorElementCharset(ExecState * exec,JSObject * thisObject,JSValue value)408 void setJSHTMLAnchorElementCharset(ExecState* exec, JSObject* thisObject, JSValue value)
409 {
410 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(thisObject);
411 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
412 imp->setAttribute(WebCore::HTMLNames::charsetAttr, valueToStringWithNullCheck(exec, value));
413 }
414
415
setJSHTMLAnchorElementCoords(ExecState * exec,JSObject * thisObject,JSValue value)416 void setJSHTMLAnchorElementCoords(ExecState* exec, JSObject* thisObject, JSValue value)
417 {
418 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(thisObject);
419 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
420 imp->setAttribute(WebCore::HTMLNames::coordsAttr, valueToStringWithNullCheck(exec, value));
421 }
422
423
setJSHTMLAnchorElementHref(ExecState * exec,JSObject * thisObject,JSValue value)424 void setJSHTMLAnchorElementHref(ExecState* exec, JSObject* thisObject, JSValue value)
425 {
426 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(thisObject);
427 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
428 imp->setAttribute(WebCore::HTMLNames::hrefAttr, valueToStringWithNullCheck(exec, value));
429 }
430
431
setJSHTMLAnchorElementHreflang(ExecState * exec,JSObject * thisObject,JSValue value)432 void setJSHTMLAnchorElementHreflang(ExecState* exec, JSObject* thisObject, JSValue value)
433 {
434 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(thisObject);
435 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
436 imp->setAttribute(WebCore::HTMLNames::hreflangAttr, valueToStringWithNullCheck(exec, value));
437 }
438
439
setJSHTMLAnchorElementName(ExecState * exec,JSObject * thisObject,JSValue value)440 void setJSHTMLAnchorElementName(ExecState* exec, JSObject* thisObject, JSValue value)
441 {
442 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(thisObject);
443 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
444 imp->setAttribute(WebCore::HTMLNames::nameAttr, valueToStringWithNullCheck(exec, value));
445 }
446
447
setJSHTMLAnchorElementPing(ExecState * exec,JSObject * thisObject,JSValue value)448 void setJSHTMLAnchorElementPing(ExecState* exec, JSObject* thisObject, JSValue value)
449 {
450 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(thisObject);
451 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
452 imp->setAttribute(WebCore::HTMLNames::pingAttr, valueToStringWithNullCheck(exec, value));
453 }
454
455
setJSHTMLAnchorElementRel(ExecState * exec,JSObject * thisObject,JSValue value)456 void setJSHTMLAnchorElementRel(ExecState* exec, JSObject* thisObject, JSValue value)
457 {
458 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(thisObject);
459 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
460 imp->setAttribute(WebCore::HTMLNames::relAttr, valueToStringWithNullCheck(exec, value));
461 }
462
463
setJSHTMLAnchorElementRev(ExecState * exec,JSObject * thisObject,JSValue value)464 void setJSHTMLAnchorElementRev(ExecState* exec, JSObject* thisObject, JSValue value)
465 {
466 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(thisObject);
467 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
468 imp->setAttribute(WebCore::HTMLNames::revAttr, valueToStringWithNullCheck(exec, value));
469 }
470
471
setJSHTMLAnchorElementShape(ExecState * exec,JSObject * thisObject,JSValue value)472 void setJSHTMLAnchorElementShape(ExecState* exec, JSObject* thisObject, JSValue value)
473 {
474 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(thisObject);
475 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
476 imp->setAttribute(WebCore::HTMLNames::shapeAttr, valueToStringWithNullCheck(exec, value));
477 }
478
479
setJSHTMLAnchorElementTarget(ExecState * exec,JSObject * thisObject,JSValue value)480 void setJSHTMLAnchorElementTarget(ExecState* exec, JSObject* thisObject, JSValue value)
481 {
482 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(thisObject);
483 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
484 imp->setAttribute(WebCore::HTMLNames::targetAttr, valueToStringWithNullCheck(exec, value));
485 }
486
487
setJSHTMLAnchorElementType(ExecState * exec,JSObject * thisObject,JSValue value)488 void setJSHTMLAnchorElementType(ExecState* exec, JSObject* thisObject, JSValue value)
489 {
490 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(thisObject);
491 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
492 imp->setAttribute(WebCore::HTMLNames::typeAttr, valueToStringWithNullCheck(exec, value));
493 }
494
495
setJSHTMLAnchorElementHash(ExecState * exec,JSObject * thisObject,JSValue value)496 void setJSHTMLAnchorElementHash(ExecState* exec, JSObject* thisObject, JSValue value)
497 {
498 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(thisObject);
499 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
500 imp->setHash(valueToStringWithNullCheck(exec, value));
501 }
502
503
setJSHTMLAnchorElementHost(ExecState * exec,JSObject * thisObject,JSValue value)504 void setJSHTMLAnchorElementHost(ExecState* exec, JSObject* thisObject, JSValue value)
505 {
506 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(thisObject);
507 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
508 imp->setHost(valueToStringWithNullCheck(exec, value));
509 }
510
511
setJSHTMLAnchorElementHostname(ExecState * exec,JSObject * thisObject,JSValue value)512 void setJSHTMLAnchorElementHostname(ExecState* exec, JSObject* thisObject, JSValue value)
513 {
514 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(thisObject);
515 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
516 imp->setHostname(valueToStringWithNullCheck(exec, value));
517 }
518
519
setJSHTMLAnchorElementPathname(ExecState * exec,JSObject * thisObject,JSValue value)520 void setJSHTMLAnchorElementPathname(ExecState* exec, JSObject* thisObject, JSValue value)
521 {
522 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(thisObject);
523 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
524 imp->setPathname(valueToStringWithNullCheck(exec, value));
525 }
526
527
setJSHTMLAnchorElementPort(ExecState * exec,JSObject * thisObject,JSValue value)528 void setJSHTMLAnchorElementPort(ExecState* exec, JSObject* thisObject, JSValue value)
529 {
530 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(thisObject);
531 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
532 imp->setPort(valueToStringWithNullCheck(exec, value));
533 }
534
535
setJSHTMLAnchorElementProtocol(ExecState * exec,JSObject * thisObject,JSValue value)536 void setJSHTMLAnchorElementProtocol(ExecState* exec, JSObject* thisObject, JSValue value)
537 {
538 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(thisObject);
539 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
540 imp->setProtocol(valueToStringWithNullCheck(exec, value));
541 }
542
543
setJSHTMLAnchorElementSearch(ExecState * exec,JSObject * thisObject,JSValue value)544 void setJSHTMLAnchorElementSearch(ExecState* exec, JSObject* thisObject, JSValue value)
545 {
546 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(thisObject);
547 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
548 imp->setSearch(valueToStringWithNullCheck(exec, value));
549 }
550
551
getConstructor(ExecState * exec,JSGlobalObject * globalObject)552 JSValue JSHTMLAnchorElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
553 {
554 return getDOMConstructor<JSHTMLAnchorElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
555 }
556
jsHTMLAnchorElementPrototypeFunctionGetParameter(ExecState * exec)557 EncodedJSValue JSC_HOST_CALL jsHTMLAnchorElementPrototypeFunctionGetParameter(ExecState* exec)
558 {
559 JSValue thisValue = exec->hostThisValue();
560 if (!thisValue.inherits(&JSHTMLAnchorElement::s_info))
561 return throwVMTypeError(exec);
562 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(thisValue));
563 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
564 const String& name(ustringToString(exec->argument(0).toString(exec)));
565 if (exec->hadException())
566 return JSValue::encode(jsUndefined());
567
568
569 JSC::JSValue result = jsString(exec, imp->getParameter(name));
570 return JSValue::encode(result);
571 }
572
jsHTMLAnchorElementPrototypeFunctionToString(ExecState * exec)573 EncodedJSValue JSC_HOST_CALL jsHTMLAnchorElementPrototypeFunctionToString(ExecState* exec)
574 {
575 JSValue thisValue = exec->hostThisValue();
576 if (!thisValue.inherits(&JSHTMLAnchorElement::s_info))
577 return throwVMTypeError(exec);
578 JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(thisValue));
579 HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl());
580
581
582 JSC::JSValue result = jsString(exec, imp->toString());
583 return JSValue::encode(result);
584 }
585
586
587 }
588