|
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 "JSHTMLIFrameElement.h" |
|
23 |
|
24 #include "DOMWindow.h" |
|
25 #include "Document.h" |
|
26 #include "HTMLIFrameElement.h" |
|
27 #include "HTMLNames.h" |
|
28 #include "JSDOMBinding.h" |
|
29 #include "JSDOMWindow.h" |
|
30 #include "JSDocument.h" |
|
31 #include "JSSVGDocument.h" |
|
32 #include "KURL.h" |
|
33 #include "SVGDocument.h" |
|
34 #include <runtime/Error.h> |
|
35 #include <runtime/JSString.h> |
|
36 #include <wtf/GetPtr.h> |
|
37 |
|
38 using namespace JSC; |
|
39 |
|
40 namespace WebCore { |
|
41 |
|
42 ASSERT_CLASS_FITS_IN_CELL(JSHTMLIFrameElement); |
|
43 |
|
44 /* Hash table */ |
|
45 #if ENABLE(JIT) |
|
46 #define THUNK_GENERATOR(generator) , generator |
|
47 #else |
|
48 #define THUNK_GENERATOR(generator) |
|
49 #endif |
|
50 |
|
51 static const HashTableValue JSHTMLIFrameElementTableValues[15] = |
|
52 { |
|
53 { "align", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementAlign), (intptr_t)setJSHTMLIFrameElementAlign THUNK_GENERATOR(0) }, |
|
54 { "frameBorder", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementFrameBorder), (intptr_t)setJSHTMLIFrameElementFrameBorder THUNK_GENERATOR(0) }, |
|
55 { "height", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementHeight), (intptr_t)setJSHTMLIFrameElementHeight THUNK_GENERATOR(0) }, |
|
56 { "longDesc", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementLongDesc), (intptr_t)setJSHTMLIFrameElementLongDesc THUNK_GENERATOR(0) }, |
|
57 { "marginHeight", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementMarginHeight), (intptr_t)setJSHTMLIFrameElementMarginHeight THUNK_GENERATOR(0) }, |
|
58 { "marginWidth", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementMarginWidth), (intptr_t)setJSHTMLIFrameElementMarginWidth THUNK_GENERATOR(0) }, |
|
59 { "name", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementName), (intptr_t)setJSHTMLIFrameElementName THUNK_GENERATOR(0) }, |
|
60 { "sandbox", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementSandbox), (intptr_t)setJSHTMLIFrameElementSandbox THUNK_GENERATOR(0) }, |
|
61 { "scrolling", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementScrolling), (intptr_t)setJSHTMLIFrameElementScrolling THUNK_GENERATOR(0) }, |
|
62 { "src", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementSrc), (intptr_t)setJSHTMLIFrameElementSrc THUNK_GENERATOR(0) }, |
|
63 { "width", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementWidth), (intptr_t)setJSHTMLIFrameElementWidth THUNK_GENERATOR(0) }, |
|
64 { "contentDocument", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementContentDocument), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
65 { "contentWindow", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementContentWindow), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
66 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
67 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
68 }; |
|
69 |
|
70 #undef THUNK_GENERATOR |
|
71 static JSC_CONST_HASHTABLE HashTable JSHTMLIFrameElementTable = { 36, 31, JSHTMLIFrameElementTableValues, 0 }; |
|
72 /* Hash table for constructor */ |
|
73 #if ENABLE(JIT) |
|
74 #define THUNK_GENERATOR(generator) , generator |
|
75 #else |
|
76 #define THUNK_GENERATOR(generator) |
|
77 #endif |
|
78 |
|
79 static const HashTableValue JSHTMLIFrameElementConstructorTableValues[1] = |
|
80 { |
|
81 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
82 }; |
|
83 |
|
84 #undef THUNK_GENERATOR |
|
85 static JSC_CONST_HASHTABLE HashTable JSHTMLIFrameElementConstructorTable = { 1, 0, JSHTMLIFrameElementConstructorTableValues, 0 }; |
|
86 class JSHTMLIFrameElementConstructor : public DOMConstructorObject { |
|
87 public: |
|
88 JSHTMLIFrameElementConstructor(JSC::ExecState*, JSDOMGlobalObject*); |
|
89 |
|
90 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); |
|
91 virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&); |
|
92 virtual const JSC::ClassInfo* classInfo() const { return &s_info; } |
|
93 static const JSC::ClassInfo s_info; |
|
94 static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) |
|
95 { |
|
96 return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); |
|
97 } |
|
98 protected: |
|
99 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags; |
|
100 }; |
|
101 |
|
102 const ClassInfo JSHTMLIFrameElementConstructor::s_info = { "HTMLIFrameElementConstructor", 0, &JSHTMLIFrameElementConstructorTable, 0 }; |
|
103 |
|
104 JSHTMLIFrameElementConstructor::JSHTMLIFrameElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) |
|
105 : DOMConstructorObject(JSHTMLIFrameElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) |
|
106 { |
|
107 putDirect(exec->propertyNames().prototype, JSHTMLIFrameElementPrototype::self(exec, globalObject), DontDelete | ReadOnly); |
|
108 } |
|
109 |
|
110 bool JSHTMLIFrameElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
111 { |
|
112 return getStaticValueSlot<JSHTMLIFrameElementConstructor, DOMObject>(exec, &JSHTMLIFrameElementConstructorTable, this, propertyName, slot); |
|
113 } |
|
114 |
|
115 bool JSHTMLIFrameElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
116 { |
|
117 return getStaticValueDescriptor<JSHTMLIFrameElementConstructor, DOMObject>(exec, &JSHTMLIFrameElementConstructorTable, this, propertyName, descriptor); |
|
118 } |
|
119 |
|
120 /* Hash table for prototype */ |
|
121 #if ENABLE(JIT) |
|
122 #define THUNK_GENERATOR(generator) , generator |
|
123 #else |
|
124 #define THUNK_GENERATOR(generator) |
|
125 #endif |
|
126 |
|
127 static const HashTableValue JSHTMLIFrameElementPrototypeTableValues[2] = |
|
128 { |
|
129 { "getSVGDocument", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsHTMLIFrameElementPrototypeFunctionGetSVGDocument), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
130 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
131 }; |
|
132 |
|
133 #undef THUNK_GENERATOR |
|
134 static JSC_CONST_HASHTABLE HashTable JSHTMLIFrameElementPrototypeTable = { 2, 1, JSHTMLIFrameElementPrototypeTableValues, 0 }; |
|
135 const ClassInfo JSHTMLIFrameElementPrototype::s_info = { "HTMLIFrameElementPrototype", 0, &JSHTMLIFrameElementPrototypeTable, 0 }; |
|
136 |
|
137 JSObject* JSHTMLIFrameElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject) |
|
138 { |
|
139 return getDOMPrototype<JSHTMLIFrameElement>(exec, globalObject); |
|
140 } |
|
141 |
|
142 bool JSHTMLIFrameElementPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
143 { |
|
144 return getStaticFunctionSlot<JSObject>(exec, &JSHTMLIFrameElementPrototypeTable, this, propertyName, slot); |
|
145 } |
|
146 |
|
147 bool JSHTMLIFrameElementPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
148 { |
|
149 return getStaticFunctionDescriptor<JSObject>(exec, &JSHTMLIFrameElementPrototypeTable, this, propertyName, descriptor); |
|
150 } |
|
151 |
|
152 const ClassInfo JSHTMLIFrameElement::s_info = { "HTMLIFrameElement", &JSHTMLElement::s_info, &JSHTMLIFrameElementTable, 0 }; |
|
153 |
|
154 JSHTMLIFrameElement::JSHTMLIFrameElement(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLIFrameElement> impl) |
|
155 : JSHTMLElement(structure, globalObject, impl) |
|
156 { |
|
157 } |
|
158 |
|
159 JSObject* JSHTMLIFrameElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject) |
|
160 { |
|
161 return new (exec) JSHTMLIFrameElementPrototype(globalObject, JSHTMLIFrameElementPrototype::createStructure(JSHTMLElementPrototype::self(exec, globalObject))); |
|
162 } |
|
163 |
|
164 bool JSHTMLIFrameElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
165 { |
|
166 return getStaticValueSlot<JSHTMLIFrameElement, Base>(exec, &JSHTMLIFrameElementTable, this, propertyName, slot); |
|
167 } |
|
168 |
|
169 bool JSHTMLIFrameElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
170 { |
|
171 return getStaticValueDescriptor<JSHTMLIFrameElement, Base>(exec, &JSHTMLIFrameElementTable, this, propertyName, descriptor); |
|
172 } |
|
173 |
|
174 JSValue jsHTMLIFrameElementAlign(ExecState* exec, JSValue slotBase, const Identifier&) |
|
175 { |
|
176 JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(asObject(slotBase)); |
|
177 UNUSED_PARAM(exec); |
|
178 HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); |
|
179 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::alignAttr)); |
|
180 return result; |
|
181 } |
|
182 |
|
183 JSValue jsHTMLIFrameElementFrameBorder(ExecState* exec, JSValue slotBase, const Identifier&) |
|
184 { |
|
185 JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(asObject(slotBase)); |
|
186 UNUSED_PARAM(exec); |
|
187 HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); |
|
188 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::frameborderAttr)); |
|
189 return result; |
|
190 } |
|
191 |
|
192 JSValue jsHTMLIFrameElementHeight(ExecState* exec, JSValue slotBase, const Identifier&) |
|
193 { |
|
194 JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(asObject(slotBase)); |
|
195 UNUSED_PARAM(exec); |
|
196 HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); |
|
197 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::heightAttr)); |
|
198 return result; |
|
199 } |
|
200 |
|
201 JSValue jsHTMLIFrameElementLongDesc(ExecState* exec, JSValue slotBase, const Identifier&) |
|
202 { |
|
203 JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(asObject(slotBase)); |
|
204 UNUSED_PARAM(exec); |
|
205 HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); |
|
206 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::longdescAttr)); |
|
207 return result; |
|
208 } |
|
209 |
|
210 JSValue jsHTMLIFrameElementMarginHeight(ExecState* exec, JSValue slotBase, const Identifier&) |
|
211 { |
|
212 JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(asObject(slotBase)); |
|
213 UNUSED_PARAM(exec); |
|
214 HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); |
|
215 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::marginheightAttr)); |
|
216 return result; |
|
217 } |
|
218 |
|
219 JSValue jsHTMLIFrameElementMarginWidth(ExecState* exec, JSValue slotBase, const Identifier&) |
|
220 { |
|
221 JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(asObject(slotBase)); |
|
222 UNUSED_PARAM(exec); |
|
223 HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); |
|
224 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::marginwidthAttr)); |
|
225 return result; |
|
226 } |
|
227 |
|
228 JSValue jsHTMLIFrameElementName(ExecState* exec, JSValue slotBase, const Identifier&) |
|
229 { |
|
230 JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(asObject(slotBase)); |
|
231 UNUSED_PARAM(exec); |
|
232 HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); |
|
233 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::nameAttr)); |
|
234 return result; |
|
235 } |
|
236 |
|
237 JSValue jsHTMLIFrameElementSandbox(ExecState* exec, JSValue slotBase, const Identifier&) |
|
238 { |
|
239 JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(asObject(slotBase)); |
|
240 UNUSED_PARAM(exec); |
|
241 HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); |
|
242 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::sandboxAttr)); |
|
243 return result; |
|
244 } |
|
245 |
|
246 JSValue jsHTMLIFrameElementScrolling(ExecState* exec, JSValue slotBase, const Identifier&) |
|
247 { |
|
248 JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(asObject(slotBase)); |
|
249 UNUSED_PARAM(exec); |
|
250 HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); |
|
251 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::scrollingAttr)); |
|
252 return result; |
|
253 } |
|
254 |
|
255 JSValue jsHTMLIFrameElementSrc(ExecState* exec, JSValue slotBase, const Identifier&) |
|
256 { |
|
257 JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(asObject(slotBase)); |
|
258 UNUSED_PARAM(exec); |
|
259 HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); |
|
260 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::srcAttr)); |
|
261 return result; |
|
262 } |
|
263 |
|
264 JSValue jsHTMLIFrameElementWidth(ExecState* exec, JSValue slotBase, const Identifier&) |
|
265 { |
|
266 JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(asObject(slotBase)); |
|
267 UNUSED_PARAM(exec); |
|
268 HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); |
|
269 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::widthAttr)); |
|
270 return result; |
|
271 } |
|
272 |
|
273 JSValue jsHTMLIFrameElementContentDocument(ExecState* exec, JSValue slotBase, const Identifier&) |
|
274 { |
|
275 JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(asObject(slotBase)); |
|
276 HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); |
|
277 return checkNodeSecurity(exec, imp->contentDocument()) ? toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->contentDocument())) : jsUndefined(); |
|
278 } |
|
279 |
|
280 JSValue jsHTMLIFrameElementContentWindow(ExecState* exec, JSValue slotBase, const Identifier&) |
|
281 { |
|
282 JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(asObject(slotBase)); |
|
283 UNUSED_PARAM(exec); |
|
284 HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); |
|
285 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->contentWindow())); |
|
286 return result; |
|
287 } |
|
288 |
|
289 JSValue jsHTMLIFrameElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&) |
|
290 { |
|
291 JSHTMLIFrameElement* domObject = static_cast<JSHTMLIFrameElement*>(asObject(slotBase)); |
|
292 return JSHTMLIFrameElement::getConstructor(exec, domObject->globalObject()); |
|
293 } |
|
294 void JSHTMLIFrameElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) |
|
295 { |
|
296 lookupPut<JSHTMLIFrameElement, Base>(exec, propertyName, value, &JSHTMLIFrameElementTable, this, slot); |
|
297 } |
|
298 |
|
299 void setJSHTMLIFrameElementAlign(ExecState* exec, JSObject* thisObject, JSValue value) |
|
300 { |
|
301 JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(thisObject); |
|
302 HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); |
|
303 imp->setAttribute(WebCore::HTMLNames::alignAttr, valueToStringWithNullCheck(exec, value)); |
|
304 } |
|
305 |
|
306 void setJSHTMLIFrameElementFrameBorder(ExecState* exec, JSObject* thisObject, JSValue value) |
|
307 { |
|
308 JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(thisObject); |
|
309 HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); |
|
310 imp->setAttribute(WebCore::HTMLNames::frameborderAttr, valueToStringWithNullCheck(exec, value)); |
|
311 } |
|
312 |
|
313 void setJSHTMLIFrameElementHeight(ExecState* exec, JSObject* thisObject, JSValue value) |
|
314 { |
|
315 JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(thisObject); |
|
316 HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); |
|
317 imp->setAttribute(WebCore::HTMLNames::heightAttr, valueToStringWithNullCheck(exec, value)); |
|
318 } |
|
319 |
|
320 void setJSHTMLIFrameElementLongDesc(ExecState* exec, JSObject* thisObject, JSValue value) |
|
321 { |
|
322 JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(thisObject); |
|
323 HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); |
|
324 imp->setAttribute(WebCore::HTMLNames::longdescAttr, valueToStringWithNullCheck(exec, value)); |
|
325 } |
|
326 |
|
327 void setJSHTMLIFrameElementMarginHeight(ExecState* exec, JSObject* thisObject, JSValue value) |
|
328 { |
|
329 JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(thisObject); |
|
330 HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); |
|
331 imp->setAttribute(WebCore::HTMLNames::marginheightAttr, valueToStringWithNullCheck(exec, value)); |
|
332 } |
|
333 |
|
334 void setJSHTMLIFrameElementMarginWidth(ExecState* exec, JSObject* thisObject, JSValue value) |
|
335 { |
|
336 JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(thisObject); |
|
337 HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); |
|
338 imp->setAttribute(WebCore::HTMLNames::marginwidthAttr, valueToStringWithNullCheck(exec, value)); |
|
339 } |
|
340 |
|
341 void setJSHTMLIFrameElementName(ExecState* exec, JSObject* thisObject, JSValue value) |
|
342 { |
|
343 JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(thisObject); |
|
344 HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); |
|
345 imp->setAttribute(WebCore::HTMLNames::nameAttr, valueToStringWithNullCheck(exec, value)); |
|
346 } |
|
347 |
|
348 void setJSHTMLIFrameElementSandbox(ExecState* exec, JSObject* thisObject, JSValue value) |
|
349 { |
|
350 JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(thisObject); |
|
351 HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); |
|
352 imp->setAttribute(WebCore::HTMLNames::sandboxAttr, valueToStringWithNullCheck(exec, value)); |
|
353 } |
|
354 |
|
355 void setJSHTMLIFrameElementScrolling(ExecState* exec, JSObject* thisObject, JSValue value) |
|
356 { |
|
357 JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(thisObject); |
|
358 HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); |
|
359 imp->setAttribute(WebCore::HTMLNames::scrollingAttr, valueToStringWithNullCheck(exec, value)); |
|
360 } |
|
361 |
|
362 void setJSHTMLIFrameElementSrc(ExecState* exec, JSObject* thisObject, JSValue value) |
|
363 { |
|
364 JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(thisObject); |
|
365 HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); |
|
366 imp->setAttribute(WebCore::HTMLNames::srcAttr, valueToStringWithNullCheck(exec, value)); |
|
367 } |
|
368 |
|
369 void setJSHTMLIFrameElementWidth(ExecState* exec, JSObject* thisObject, JSValue value) |
|
370 { |
|
371 JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(thisObject); |
|
372 HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); |
|
373 imp->setAttribute(WebCore::HTMLNames::widthAttr, valueToStringWithNullCheck(exec, value)); |
|
374 } |
|
375 |
|
376 JSValue JSHTMLIFrameElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) |
|
377 { |
|
378 return getDOMConstructor<JSHTMLIFrameElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); |
|
379 } |
|
380 |
|
381 EncodedJSValue JSC_HOST_CALL jsHTMLIFrameElementPrototypeFunctionGetSVGDocument(ExecState* exec) |
|
382 { |
|
383 JSValue thisValue = exec->hostThisValue(); |
|
384 if (!thisValue.inherits(&JSHTMLIFrameElement::s_info)) |
|
385 return throwVMTypeError(exec); |
|
386 JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(asObject(thisValue)); |
|
387 HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); |
|
388 ExceptionCode ec = 0; |
|
389 if (!checkNodeSecurity(exec, imp->getSVGDocument(ec))) |
|
390 return JSValue::encode(jsUndefined()); |
|
391 |
|
392 |
|
393 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->getSVGDocument(ec))); |
|
394 setDOMException(exec, ec); |
|
395 return JSValue::encode(result); |
|
396 } |
|
397 |
|
398 |
|
399 } |