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 "JSHTMLFrameElement.h" |
23 | |
24 | #include "CustomElementReactionQueue.h" |
25 | #include "HTMLNames.h" |
26 | #include "JSDOMAttribute.h" |
27 | #include "JSDOMBinding.h" |
28 | #include "JSDOMBindingSecurity.h" |
29 | #include "JSDOMConstructorNotConstructable.h" |
30 | #include "JSDOMConvertBoolean.h" |
31 | #include "JSDOMConvertInterface.h" |
32 | #include "JSDOMConvertNullable.h" |
33 | #include "JSDOMConvertNumbers.h" |
34 | #include "JSDOMConvertStrings.h" |
35 | #include "JSDOMExceptionHandling.h" |
36 | #include "JSDOMGlobalObject.h" |
37 | #include "JSDOMOperation.h" |
38 | #include "JSDOMWrapperCache.h" |
39 | #include "JSDocument.h" |
40 | #include "JSWindowProxy.h" |
41 | #include "ScriptExecutionContext.h" |
42 | #include <JavaScriptCore/HeapSnapshotBuilder.h> |
43 | #include <JavaScriptCore/JSCInlines.h> |
44 | #include <wtf/GetPtr.h> |
45 | #include <wtf/PointerPreparations.h> |
46 | #include <wtf/URL.h> |
47 | |
48 | |
49 | namespace WebCore { |
50 | using namespace JSC; |
51 | |
52 | // Functions |
53 | |
54 | JSC::EncodedJSValue JSC_HOST_CALL jsHTMLFrameElementPrototypeFunctionGetSVGDocument(JSC::ExecState*); |
55 | |
56 | // Attributes |
57 | |
58 | JSC::EncodedJSValue jsHTMLFrameElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
59 | bool setJSHTMLFrameElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
60 | JSC::EncodedJSValue jsHTMLFrameElementName(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
61 | bool setJSHTMLFrameElementName(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
62 | JSC::EncodedJSValue jsHTMLFrameElementScrolling(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
63 | bool setJSHTMLFrameElementScrolling(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
64 | JSC::EncodedJSValue jsHTMLFrameElementSrc(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
65 | bool setJSHTMLFrameElementSrc(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
66 | JSC::EncodedJSValue jsHTMLFrameElementFrameBorder(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
67 | bool setJSHTMLFrameElementFrameBorder(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
68 | JSC::EncodedJSValue jsHTMLFrameElementLongDesc(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
69 | bool setJSHTMLFrameElementLongDesc(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
70 | JSC::EncodedJSValue jsHTMLFrameElementNoResize(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
71 | bool setJSHTMLFrameElementNoResize(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
72 | JSC::EncodedJSValue jsHTMLFrameElementContentDocument(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
73 | JSC::EncodedJSValue jsHTMLFrameElementContentWindow(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
74 | JSC::EncodedJSValue jsHTMLFrameElementMarginHeight(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
75 | bool setJSHTMLFrameElementMarginHeight(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
76 | JSC::EncodedJSValue jsHTMLFrameElementMarginWidth(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
77 | bool setJSHTMLFrameElementMarginWidth(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
78 | JSC::EncodedJSValue jsHTMLFrameElementWidth(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
79 | JSC::EncodedJSValue jsHTMLFrameElementHeight(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
80 | JSC::EncodedJSValue jsHTMLFrameElementLocation(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
81 | bool setJSHTMLFrameElementLocation(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
82 | |
83 | class JSHTMLFrameElementPrototype : public JSC::JSNonFinalObject { |
84 | public: |
85 | using Base = JSC::JSNonFinalObject; |
86 | static JSHTMLFrameElementPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) |
87 | { |
88 | JSHTMLFrameElementPrototype* ptr = new (NotNull, JSC::allocateCell<JSHTMLFrameElementPrototype>(vm.heap)) JSHTMLFrameElementPrototype(vm, globalObject, structure); |
89 | ptr->finishCreation(vm); |
90 | return ptr; |
91 | } |
92 | |
93 | DECLARE_INFO; |
94 | static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) |
95 | { |
96 | return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); |
97 | } |
98 | |
99 | private: |
100 | JSHTMLFrameElementPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) |
101 | : JSC::JSNonFinalObject(vm, structure) |
102 | { |
103 | } |
104 | |
105 | void finishCreation(JSC::VM&); |
106 | }; |
107 | |
108 | using JSHTMLFrameElementConstructor = JSDOMConstructorNotConstructable<JSHTMLFrameElement>; |
109 | |
110 | template<> JSValue JSHTMLFrameElementConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject) |
111 | { |
112 | return JSHTMLElement::getConstructor(vm, &globalObject); |
113 | } |
114 | |
115 | template<> void JSHTMLFrameElementConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) |
116 | { |
117 | putDirect(vm, vm.propertyNames->prototype, JSHTMLFrameElement::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
118 | putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("HTMLFrameElement"_s )), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
119 | putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
120 | } |
121 | |
122 | template<> const ClassInfo JSHTMLFrameElementConstructor::s_info = { "HTMLFrameElement" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTMLFrameElementConstructor) }; |
123 | |
124 | /* Hash table for prototype */ |
125 | |
126 | static const HashTableValue JSHTMLFrameElementPrototypeTableValues[] = |
127 | { |
128 | { "constructor" , static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLFrameElementConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLFrameElementConstructor) } }, |
129 | { "name" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLFrameElementName), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLFrameElementName) } }, |
130 | { "scrolling" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLFrameElementScrolling), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLFrameElementScrolling) } }, |
131 | { "src" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLFrameElementSrc), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLFrameElementSrc) } }, |
132 | { "frameBorder" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLFrameElementFrameBorder), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLFrameElementFrameBorder) } }, |
133 | { "longDesc" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLFrameElementLongDesc), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLFrameElementLongDesc) } }, |
134 | { "noResize" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLFrameElementNoResize), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLFrameElementNoResize) } }, |
135 | { "contentDocument" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLFrameElementContentDocument), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
136 | { "contentWindow" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLFrameElementContentWindow), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
137 | { "marginHeight" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLFrameElementMarginHeight), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLFrameElementMarginHeight) } }, |
138 | { "marginWidth" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLFrameElementMarginWidth), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLFrameElementMarginWidth) } }, |
139 | { "width" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLFrameElementWidth), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
140 | { "height" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLFrameElementHeight), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
141 | { "location" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLFrameElementLocation), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLFrameElementLocation) } }, |
142 | { "getSVGDocument" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsHTMLFrameElementPrototypeFunctionGetSVGDocument), (intptr_t) (0) } }, |
143 | }; |
144 | |
145 | const ClassInfo JSHTMLFrameElementPrototype::s_info = { "HTMLFrameElementPrototype" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTMLFrameElementPrototype) }; |
146 | |
147 | void JSHTMLFrameElementPrototype::finishCreation(VM& vm) |
148 | { |
149 | Base::finishCreation(vm); |
150 | reifyStaticProperties(vm, JSHTMLFrameElement::info(), JSHTMLFrameElementPrototypeTableValues, *this); |
151 | } |
152 | |
153 | const ClassInfo JSHTMLFrameElement::s_info = { "HTMLFrameElement" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTMLFrameElement) }; |
154 | |
155 | JSHTMLFrameElement::JSHTMLFrameElement(Structure* structure, JSDOMGlobalObject& globalObject, Ref<HTMLFrameElement>&& impl) |
156 | : JSHTMLElement(structure, globalObject, WTFMove(impl)) |
157 | { |
158 | } |
159 | |
160 | void JSHTMLFrameElement::finishCreation(VM& vm) |
161 | { |
162 | Base::finishCreation(vm); |
163 | ASSERT(inherits(vm, info())); |
164 | |
165 | } |
166 | |
167 | JSObject* JSHTMLFrameElement::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) |
168 | { |
169 | return JSHTMLFrameElementPrototype::create(vm, &globalObject, JSHTMLFrameElementPrototype::createStructure(vm, &globalObject, JSHTMLElement::prototype(vm, globalObject))); |
170 | } |
171 | |
172 | JSObject* JSHTMLFrameElement::prototype(VM& vm, JSDOMGlobalObject& globalObject) |
173 | { |
174 | return getDOMPrototype<JSHTMLFrameElement>(vm, globalObject); |
175 | } |
176 | |
177 | JSValue JSHTMLFrameElement::getConstructor(VM& vm, const JSGlobalObject* globalObject) |
178 | { |
179 | return getDOMConstructor<JSHTMLFrameElementConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject)); |
180 | } |
181 | |
182 | template<> inline JSHTMLFrameElement* IDLAttribute<JSHTMLFrameElement>::cast(ExecState& state, EncodedJSValue thisValue) |
183 | { |
184 | return jsDynamicCast<JSHTMLFrameElement*>(state.vm(), JSValue::decode(thisValue)); |
185 | } |
186 | |
187 | template<> inline JSHTMLFrameElement* IDLOperation<JSHTMLFrameElement>::cast(ExecState& state) |
188 | { |
189 | return jsDynamicCast<JSHTMLFrameElement*>(state.vm(), state.thisValue()); |
190 | } |
191 | |
192 | EncodedJSValue jsHTMLFrameElementConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName) |
193 | { |
194 | VM& vm = state->vm(); |
195 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
196 | auto* prototype = jsDynamicCast<JSHTMLFrameElementPrototype*>(vm, JSValue::decode(thisValue)); |
197 | if (UNLIKELY(!prototype)) |
198 | return throwVMTypeError(state, throwScope); |
199 | return JSValue::encode(JSHTMLFrameElement::getConstructor(state->vm(), prototype->globalObject())); |
200 | } |
201 | |
202 | bool setJSHTMLFrameElementConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
203 | { |
204 | VM& vm = state->vm(); |
205 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
206 | auto* prototype = jsDynamicCast<JSHTMLFrameElementPrototype*>(vm, JSValue::decode(thisValue)); |
207 | if (UNLIKELY(!prototype)) { |
208 | throwVMTypeError(state, throwScope); |
209 | return false; |
210 | } |
211 | // Shadowing a built-in constructor |
212 | return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue)); |
213 | } |
214 | |
215 | static inline JSValue jsHTMLFrameElementNameGetter(ExecState& state, JSHTMLFrameElement& thisObject, ThrowScope& throwScope) |
216 | { |
217 | UNUSED_PARAM(throwScope); |
218 | UNUSED_PARAM(state); |
219 | auto& impl = thisObject.wrapped(); |
220 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.getNameAttribute()); |
221 | return result; |
222 | } |
223 | |
224 | EncodedJSValue jsHTMLFrameElementName(ExecState* state, EncodedJSValue thisValue, PropertyName) |
225 | { |
226 | return IDLAttribute<JSHTMLFrameElement>::get<jsHTMLFrameElementNameGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "name" ); |
227 | } |
228 | |
229 | static inline bool setJSHTMLFrameElementNameSetter(ExecState& state, JSHTMLFrameElement& thisObject, JSValue value, ThrowScope& throwScope) |
230 | { |
231 | UNUSED_PARAM(throwScope); |
232 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
233 | auto& impl = thisObject.wrapped(); |
234 | auto nativeValue = convert<IDLDOMString>(state, value); |
235 | RETURN_IF_EXCEPTION(throwScope, false); |
236 | AttributeSetter::call(state, throwScope, [&] { |
237 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::nameAttr, WTFMove(nativeValue)); |
238 | }); |
239 | return true; |
240 | } |
241 | |
242 | bool setJSHTMLFrameElementName(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
243 | { |
244 | return IDLAttribute<JSHTMLFrameElement>::set<setJSHTMLFrameElementNameSetter>(*state, thisValue, encodedValue, "name" ); |
245 | } |
246 | |
247 | static inline JSValue jsHTMLFrameElementScrollingGetter(ExecState& state, JSHTMLFrameElement& thisObject, ThrowScope& throwScope) |
248 | { |
249 | UNUSED_PARAM(throwScope); |
250 | UNUSED_PARAM(state); |
251 | auto& impl = thisObject.wrapped(); |
252 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::scrollingAttr)); |
253 | return result; |
254 | } |
255 | |
256 | EncodedJSValue jsHTMLFrameElementScrolling(ExecState* state, EncodedJSValue thisValue, PropertyName) |
257 | { |
258 | return IDLAttribute<JSHTMLFrameElement>::get<jsHTMLFrameElementScrollingGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "scrolling" ); |
259 | } |
260 | |
261 | static inline bool setJSHTMLFrameElementScrollingSetter(ExecState& state, JSHTMLFrameElement& thisObject, JSValue value, ThrowScope& throwScope) |
262 | { |
263 | UNUSED_PARAM(throwScope); |
264 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
265 | auto& impl = thisObject.wrapped(); |
266 | auto nativeValue = convert<IDLDOMString>(state, value); |
267 | RETURN_IF_EXCEPTION(throwScope, false); |
268 | AttributeSetter::call(state, throwScope, [&] { |
269 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::scrollingAttr, WTFMove(nativeValue)); |
270 | }); |
271 | return true; |
272 | } |
273 | |
274 | bool setJSHTMLFrameElementScrolling(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
275 | { |
276 | return IDLAttribute<JSHTMLFrameElement>::set<setJSHTMLFrameElementScrollingSetter>(*state, thisValue, encodedValue, "scrolling" ); |
277 | } |
278 | |
279 | static inline JSValue jsHTMLFrameElementSrcGetter(ExecState& state, JSHTMLFrameElement& thisObject, ThrowScope& throwScope) |
280 | { |
281 | UNUSED_PARAM(throwScope); |
282 | UNUSED_PARAM(state); |
283 | auto& impl = thisObject.wrapped(); |
284 | JSValue result = toJS<IDLUSVString>(state, throwScope, impl.getURLAttribute(WebCore::HTMLNames::srcAttr)); |
285 | return result; |
286 | } |
287 | |
288 | EncodedJSValue jsHTMLFrameElementSrc(ExecState* state, EncodedJSValue thisValue, PropertyName) |
289 | { |
290 | return IDLAttribute<JSHTMLFrameElement>::get<jsHTMLFrameElementSrcGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "src" ); |
291 | } |
292 | |
293 | static inline bool setJSHTMLFrameElementSrcSetter(ExecState& state, JSHTMLFrameElement& thisObject, JSValue value, ThrowScope& throwScope) |
294 | { |
295 | UNUSED_PARAM(throwScope); |
296 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
297 | auto& impl = thisObject.wrapped(); |
298 | auto nativeValue = convert<IDLUSVString>(state, value); |
299 | RETURN_IF_EXCEPTION(throwScope, false); |
300 | AttributeSetter::call(state, throwScope, [&] { |
301 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::srcAttr, WTFMove(nativeValue)); |
302 | }); |
303 | return true; |
304 | } |
305 | |
306 | bool setJSHTMLFrameElementSrc(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
307 | { |
308 | return IDLAttribute<JSHTMLFrameElement>::set<setJSHTMLFrameElementSrcSetter>(*state, thisValue, encodedValue, "src" ); |
309 | } |
310 | |
311 | static inline JSValue jsHTMLFrameElementFrameBorderGetter(ExecState& state, JSHTMLFrameElement& thisObject, ThrowScope& throwScope) |
312 | { |
313 | UNUSED_PARAM(throwScope); |
314 | UNUSED_PARAM(state); |
315 | auto& impl = thisObject.wrapped(); |
316 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::frameborderAttr)); |
317 | return result; |
318 | } |
319 | |
320 | EncodedJSValue jsHTMLFrameElementFrameBorder(ExecState* state, EncodedJSValue thisValue, PropertyName) |
321 | { |
322 | return IDLAttribute<JSHTMLFrameElement>::get<jsHTMLFrameElementFrameBorderGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "frameBorder" ); |
323 | } |
324 | |
325 | static inline bool setJSHTMLFrameElementFrameBorderSetter(ExecState& state, JSHTMLFrameElement& thisObject, JSValue value, ThrowScope& throwScope) |
326 | { |
327 | UNUSED_PARAM(throwScope); |
328 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
329 | auto& impl = thisObject.wrapped(); |
330 | auto nativeValue = convert<IDLDOMString>(state, value); |
331 | RETURN_IF_EXCEPTION(throwScope, false); |
332 | AttributeSetter::call(state, throwScope, [&] { |
333 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::frameborderAttr, WTFMove(nativeValue)); |
334 | }); |
335 | return true; |
336 | } |
337 | |
338 | bool setJSHTMLFrameElementFrameBorder(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
339 | { |
340 | return IDLAttribute<JSHTMLFrameElement>::set<setJSHTMLFrameElementFrameBorderSetter>(*state, thisValue, encodedValue, "frameBorder" ); |
341 | } |
342 | |
343 | static inline JSValue jsHTMLFrameElementLongDescGetter(ExecState& state, JSHTMLFrameElement& thisObject, ThrowScope& throwScope) |
344 | { |
345 | UNUSED_PARAM(throwScope); |
346 | UNUSED_PARAM(state); |
347 | auto& impl = thisObject.wrapped(); |
348 | JSValue result = toJS<IDLUSVString>(state, throwScope, impl.getURLAttribute(WebCore::HTMLNames::longdescAttr)); |
349 | return result; |
350 | } |
351 | |
352 | EncodedJSValue jsHTMLFrameElementLongDesc(ExecState* state, EncodedJSValue thisValue, PropertyName) |
353 | { |
354 | return IDLAttribute<JSHTMLFrameElement>::get<jsHTMLFrameElementLongDescGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "longDesc" ); |
355 | } |
356 | |
357 | static inline bool setJSHTMLFrameElementLongDescSetter(ExecState& state, JSHTMLFrameElement& thisObject, JSValue value, ThrowScope& throwScope) |
358 | { |
359 | UNUSED_PARAM(throwScope); |
360 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
361 | auto& impl = thisObject.wrapped(); |
362 | auto nativeValue = convert<IDLUSVString>(state, value); |
363 | RETURN_IF_EXCEPTION(throwScope, false); |
364 | AttributeSetter::call(state, throwScope, [&] { |
365 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::longdescAttr, WTFMove(nativeValue)); |
366 | }); |
367 | return true; |
368 | } |
369 | |
370 | bool setJSHTMLFrameElementLongDesc(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
371 | { |
372 | return IDLAttribute<JSHTMLFrameElement>::set<setJSHTMLFrameElementLongDescSetter>(*state, thisValue, encodedValue, "longDesc" ); |
373 | } |
374 | |
375 | static inline JSValue jsHTMLFrameElementNoResizeGetter(ExecState& state, JSHTMLFrameElement& thisObject, ThrowScope& throwScope) |
376 | { |
377 | UNUSED_PARAM(throwScope); |
378 | UNUSED_PARAM(state); |
379 | auto& impl = thisObject.wrapped(); |
380 | JSValue result = toJS<IDLBoolean>(state, throwScope, impl.hasAttributeWithoutSynchronization(WebCore::HTMLNames::noresizeAttr)); |
381 | return result; |
382 | } |
383 | |
384 | EncodedJSValue jsHTMLFrameElementNoResize(ExecState* state, EncodedJSValue thisValue, PropertyName) |
385 | { |
386 | return IDLAttribute<JSHTMLFrameElement>::get<jsHTMLFrameElementNoResizeGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "noResize" ); |
387 | } |
388 | |
389 | static inline bool setJSHTMLFrameElementNoResizeSetter(ExecState& state, JSHTMLFrameElement& thisObject, JSValue value, ThrowScope& throwScope) |
390 | { |
391 | UNUSED_PARAM(throwScope); |
392 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
393 | auto& impl = thisObject.wrapped(); |
394 | auto nativeValue = convert<IDLBoolean>(state, value); |
395 | RETURN_IF_EXCEPTION(throwScope, false); |
396 | AttributeSetter::call(state, throwScope, [&] { |
397 | return impl.setBooleanAttribute(WebCore::HTMLNames::noresizeAttr, WTFMove(nativeValue)); |
398 | }); |
399 | return true; |
400 | } |
401 | |
402 | bool setJSHTMLFrameElementNoResize(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
403 | { |
404 | return IDLAttribute<JSHTMLFrameElement>::set<setJSHTMLFrameElementNoResizeSetter>(*state, thisValue, encodedValue, "noResize" ); |
405 | } |
406 | |
407 | static inline JSValue jsHTMLFrameElementContentDocumentGetter(ExecState& state, JSHTMLFrameElement& thisObject, ThrowScope& throwScope) |
408 | { |
409 | UNUSED_PARAM(throwScope); |
410 | UNUSED_PARAM(state); |
411 | auto& impl = thisObject.wrapped(); |
412 | JSValue result = toJS<IDLInterface<Document>>(state, *thisObject.globalObject(), throwScope, BindingSecurity::checkSecurityForNode(state, impl.contentDocument())); |
413 | return result; |
414 | } |
415 | |
416 | EncodedJSValue jsHTMLFrameElementContentDocument(ExecState* state, EncodedJSValue thisValue, PropertyName) |
417 | { |
418 | return IDLAttribute<JSHTMLFrameElement>::get<jsHTMLFrameElementContentDocumentGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "contentDocument" ); |
419 | } |
420 | |
421 | static inline JSValue jsHTMLFrameElementContentWindowGetter(ExecState& state, JSHTMLFrameElement& thisObject, ThrowScope& throwScope) |
422 | { |
423 | UNUSED_PARAM(throwScope); |
424 | UNUSED_PARAM(state); |
425 | auto& impl = thisObject.wrapped(); |
426 | JSValue result = toJS<IDLInterface<WindowProxy>>(state, *thisObject.globalObject(), throwScope, impl.contentWindow()); |
427 | return result; |
428 | } |
429 | |
430 | EncodedJSValue jsHTMLFrameElementContentWindow(ExecState* state, EncodedJSValue thisValue, PropertyName) |
431 | { |
432 | return IDLAttribute<JSHTMLFrameElement>::get<jsHTMLFrameElementContentWindowGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "contentWindow" ); |
433 | } |
434 | |
435 | static inline JSValue jsHTMLFrameElementMarginHeightGetter(ExecState& state, JSHTMLFrameElement& thisObject, ThrowScope& throwScope) |
436 | { |
437 | UNUSED_PARAM(throwScope); |
438 | UNUSED_PARAM(state); |
439 | auto& impl = thisObject.wrapped(); |
440 | JSValue result = toJS<IDLTreatNullAsEmptyAdaptor<IDLDOMString>>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::marginheightAttr)); |
441 | return result; |
442 | } |
443 | |
444 | EncodedJSValue jsHTMLFrameElementMarginHeight(ExecState* state, EncodedJSValue thisValue, PropertyName) |
445 | { |
446 | return IDLAttribute<JSHTMLFrameElement>::get<jsHTMLFrameElementMarginHeightGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "marginHeight" ); |
447 | } |
448 | |
449 | static inline bool setJSHTMLFrameElementMarginHeightSetter(ExecState& state, JSHTMLFrameElement& thisObject, JSValue value, ThrowScope& throwScope) |
450 | { |
451 | UNUSED_PARAM(throwScope); |
452 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
453 | auto& impl = thisObject.wrapped(); |
454 | auto nativeValue = convert<IDLTreatNullAsEmptyAdaptor<IDLDOMString>>(state, value); |
455 | RETURN_IF_EXCEPTION(throwScope, false); |
456 | AttributeSetter::call(state, throwScope, [&] { |
457 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::marginheightAttr, WTFMove(nativeValue)); |
458 | }); |
459 | return true; |
460 | } |
461 | |
462 | bool setJSHTMLFrameElementMarginHeight(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
463 | { |
464 | return IDLAttribute<JSHTMLFrameElement>::set<setJSHTMLFrameElementMarginHeightSetter>(*state, thisValue, encodedValue, "marginHeight" ); |
465 | } |
466 | |
467 | static inline JSValue jsHTMLFrameElementMarginWidthGetter(ExecState& state, JSHTMLFrameElement& thisObject, ThrowScope& throwScope) |
468 | { |
469 | UNUSED_PARAM(throwScope); |
470 | UNUSED_PARAM(state); |
471 | auto& impl = thisObject.wrapped(); |
472 | JSValue result = toJS<IDLTreatNullAsEmptyAdaptor<IDLDOMString>>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::marginwidthAttr)); |
473 | return result; |
474 | } |
475 | |
476 | EncodedJSValue jsHTMLFrameElementMarginWidth(ExecState* state, EncodedJSValue thisValue, PropertyName) |
477 | { |
478 | return IDLAttribute<JSHTMLFrameElement>::get<jsHTMLFrameElementMarginWidthGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "marginWidth" ); |
479 | } |
480 | |
481 | static inline bool setJSHTMLFrameElementMarginWidthSetter(ExecState& state, JSHTMLFrameElement& thisObject, JSValue value, ThrowScope& throwScope) |
482 | { |
483 | UNUSED_PARAM(throwScope); |
484 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
485 | auto& impl = thisObject.wrapped(); |
486 | auto nativeValue = convert<IDLTreatNullAsEmptyAdaptor<IDLDOMString>>(state, value); |
487 | RETURN_IF_EXCEPTION(throwScope, false); |
488 | AttributeSetter::call(state, throwScope, [&] { |
489 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::marginwidthAttr, WTFMove(nativeValue)); |
490 | }); |
491 | return true; |
492 | } |
493 | |
494 | bool setJSHTMLFrameElementMarginWidth(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
495 | { |
496 | return IDLAttribute<JSHTMLFrameElement>::set<setJSHTMLFrameElementMarginWidthSetter>(*state, thisValue, encodedValue, "marginWidth" ); |
497 | } |
498 | |
499 | static inline JSValue jsHTMLFrameElementWidthGetter(ExecState& state, JSHTMLFrameElement& thisObject, ThrowScope& throwScope) |
500 | { |
501 | UNUSED_PARAM(throwScope); |
502 | UNUSED_PARAM(state); |
503 | auto& impl = thisObject.wrapped(); |
504 | JSValue result = toJS<IDLLong>(state, throwScope, impl.width()); |
505 | return result; |
506 | } |
507 | |
508 | EncodedJSValue jsHTMLFrameElementWidth(ExecState* state, EncodedJSValue thisValue, PropertyName) |
509 | { |
510 | return IDLAttribute<JSHTMLFrameElement>::get<jsHTMLFrameElementWidthGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "width" ); |
511 | } |
512 | |
513 | static inline JSValue jsHTMLFrameElementHeightGetter(ExecState& state, JSHTMLFrameElement& thisObject, ThrowScope& throwScope) |
514 | { |
515 | UNUSED_PARAM(throwScope); |
516 | UNUSED_PARAM(state); |
517 | auto& impl = thisObject.wrapped(); |
518 | JSValue result = toJS<IDLLong>(state, throwScope, impl.height()); |
519 | return result; |
520 | } |
521 | |
522 | EncodedJSValue jsHTMLFrameElementHeight(ExecState* state, EncodedJSValue thisValue, PropertyName) |
523 | { |
524 | return IDLAttribute<JSHTMLFrameElement>::get<jsHTMLFrameElementHeightGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "height" ); |
525 | } |
526 | |
527 | static inline JSValue jsHTMLFrameElementLocationGetter(ExecState& state, JSHTMLFrameElement& thisObject, ThrowScope& throwScope) |
528 | { |
529 | UNUSED_PARAM(throwScope); |
530 | UNUSED_PARAM(state); |
531 | auto& impl = thisObject.wrapped(); |
532 | JSValue result = toJS<IDLNullable<IDLDOMString>>(state, throwScope, impl.location()); |
533 | return result; |
534 | } |
535 | |
536 | EncodedJSValue jsHTMLFrameElementLocation(ExecState* state, EncodedJSValue thisValue, PropertyName) |
537 | { |
538 | return IDLAttribute<JSHTMLFrameElement>::get<jsHTMLFrameElementLocationGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "location" ); |
539 | } |
540 | |
541 | static inline bool setJSHTMLFrameElementLocationSetter(ExecState& state, JSHTMLFrameElement& thisObject, JSValue value, ThrowScope& throwScope) |
542 | { |
543 | UNUSED_PARAM(throwScope); |
544 | auto& impl = thisObject.wrapped(); |
545 | auto nativeValue = convert<IDLNullable<IDLDOMString>>(state, value); |
546 | RETURN_IF_EXCEPTION(throwScope, false); |
547 | AttributeSetter::call(state, throwScope, [&] { |
548 | return impl.setLocation(state, WTFMove(nativeValue)); |
549 | }); |
550 | return true; |
551 | } |
552 | |
553 | bool setJSHTMLFrameElementLocation(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
554 | { |
555 | return IDLAttribute<JSHTMLFrameElement>::set<setJSHTMLFrameElementLocationSetter>(*state, thisValue, encodedValue, "location" ); |
556 | } |
557 | |
558 | static inline JSC::EncodedJSValue jsHTMLFrameElementPrototypeFunctionGetSVGDocumentBody(JSC::ExecState* state, typename IDLOperation<JSHTMLFrameElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
559 | { |
560 | UNUSED_PARAM(state); |
561 | UNUSED_PARAM(throwScope); |
562 | auto& impl = castedThis->wrapped(); |
563 | return JSValue::encode(toJS<IDLInterface<Document>>(*state, *castedThis->globalObject(), throwScope, BindingSecurity::checkSecurityForNode(*state, impl.getSVGDocument()))); |
564 | } |
565 | |
566 | EncodedJSValue JSC_HOST_CALL jsHTMLFrameElementPrototypeFunctionGetSVGDocument(ExecState* state) |
567 | { |
568 | return IDLOperation<JSHTMLFrameElement>::call<jsHTMLFrameElementPrototypeFunctionGetSVGDocumentBody>(*state, "getSVGDocument" ); |
569 | } |
570 | |
571 | void JSHTMLFrameElement::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) |
572 | { |
573 | auto* thisObject = jsCast<JSHTMLFrameElement*>(cell); |
574 | builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); |
575 | if (thisObject->scriptExecutionContext()) |
576 | builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); |
577 | Base::heapSnapshot(cell, builder); |
578 | } |
579 | |
580 | |
581 | } |
582 | |