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 "JSHTMLAreaElement.h" |
23 | |
24 | #include "CustomElementReactionQueue.h" |
25 | #include "HTMLNames.h" |
26 | #include "JSDOMAttribute.h" |
27 | #include "JSDOMBinding.h" |
28 | #include "JSDOMConstructorNotConstructable.h" |
29 | #include "JSDOMConvertBoolean.h" |
30 | #include "JSDOMConvertInterface.h" |
31 | #include "JSDOMConvertStrings.h" |
32 | #include "JSDOMExceptionHandling.h" |
33 | #include "JSDOMGlobalObject.h" |
34 | #include "JSDOMOperation.h" |
35 | #include "JSDOMTokenList.h" |
36 | #include "JSDOMWrapperCache.h" |
37 | #include "RuntimeEnabledFeatures.h" |
38 | #include "ScriptExecutionContext.h" |
39 | #include <JavaScriptCore/HeapSnapshotBuilder.h> |
40 | #include <JavaScriptCore/JSCInlines.h> |
41 | #include <wtf/GetPtr.h> |
42 | #include <wtf/PointerPreparations.h> |
43 | #include <wtf/URL.h> |
44 | |
45 | |
46 | namespace WebCore { |
47 | using namespace JSC; |
48 | |
49 | // Functions |
50 | |
51 | JSC::EncodedJSValue JSC_HOST_CALL jsHTMLAreaElementPrototypeFunctionToString(JSC::ExecState*); |
52 | |
53 | // Attributes |
54 | |
55 | JSC::EncodedJSValue jsHTMLAreaElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
56 | bool setJSHTMLAreaElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
57 | JSC::EncodedJSValue jsHTMLAreaElementAlt(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
58 | bool setJSHTMLAreaElementAlt(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
59 | JSC::EncodedJSValue jsHTMLAreaElementCoords(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
60 | bool setJSHTMLAreaElementCoords(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
61 | JSC::EncodedJSValue jsHTMLAreaElementNoHref(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
62 | bool setJSHTMLAreaElementNoHref(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
63 | JSC::EncodedJSValue jsHTMLAreaElementPing(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
64 | bool setJSHTMLAreaElementPing(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
65 | JSC::EncodedJSValue jsHTMLAreaElementRel(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
66 | bool setJSHTMLAreaElementRel(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
67 | JSC::EncodedJSValue jsHTMLAreaElementShape(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
68 | bool setJSHTMLAreaElementShape(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
69 | JSC::EncodedJSValue jsHTMLAreaElementTarget(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
70 | bool setJSHTMLAreaElementTarget(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
71 | #if ENABLE(DOWNLOAD_ATTRIBUTE) |
72 | JSC::EncodedJSValue jsHTMLAreaElementDownload(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
73 | bool setJSHTMLAreaElementDownload(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
74 | #endif |
75 | JSC::EncodedJSValue jsHTMLAreaElementRelList(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
76 | bool setJSHTMLAreaElementRelList(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
77 | JSC::EncodedJSValue jsHTMLAreaElementHref(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
78 | bool setJSHTMLAreaElementHref(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
79 | JSC::EncodedJSValue jsHTMLAreaElementOrigin(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
80 | JSC::EncodedJSValue jsHTMLAreaElementProtocol(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
81 | bool setJSHTMLAreaElementProtocol(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
82 | JSC::EncodedJSValue jsHTMLAreaElementUsername(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
83 | bool setJSHTMLAreaElementUsername(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
84 | JSC::EncodedJSValue jsHTMLAreaElementPassword(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
85 | bool setJSHTMLAreaElementPassword(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
86 | JSC::EncodedJSValue jsHTMLAreaElementHost(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
87 | bool setJSHTMLAreaElementHost(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
88 | JSC::EncodedJSValue jsHTMLAreaElementHostname(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
89 | bool setJSHTMLAreaElementHostname(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
90 | JSC::EncodedJSValue jsHTMLAreaElementPort(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
91 | bool setJSHTMLAreaElementPort(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
92 | JSC::EncodedJSValue jsHTMLAreaElementPathname(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
93 | bool setJSHTMLAreaElementPathname(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
94 | JSC::EncodedJSValue jsHTMLAreaElementSearch(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
95 | bool setJSHTMLAreaElementSearch(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
96 | JSC::EncodedJSValue jsHTMLAreaElementHash(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
97 | bool setJSHTMLAreaElementHash(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
98 | |
99 | class JSHTMLAreaElementPrototype : public JSC::JSNonFinalObject { |
100 | public: |
101 | using Base = JSC::JSNonFinalObject; |
102 | static JSHTMLAreaElementPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) |
103 | { |
104 | JSHTMLAreaElementPrototype* ptr = new (NotNull, JSC::allocateCell<JSHTMLAreaElementPrototype>(vm.heap)) JSHTMLAreaElementPrototype(vm, globalObject, structure); |
105 | ptr->finishCreation(vm); |
106 | return ptr; |
107 | } |
108 | |
109 | DECLARE_INFO; |
110 | static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) |
111 | { |
112 | return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); |
113 | } |
114 | |
115 | private: |
116 | JSHTMLAreaElementPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) |
117 | : JSC::JSNonFinalObject(vm, structure) |
118 | { |
119 | } |
120 | |
121 | void finishCreation(JSC::VM&); |
122 | }; |
123 | |
124 | using JSHTMLAreaElementConstructor = JSDOMConstructorNotConstructable<JSHTMLAreaElement>; |
125 | |
126 | template<> JSValue JSHTMLAreaElementConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject) |
127 | { |
128 | return JSHTMLElement::getConstructor(vm, &globalObject); |
129 | } |
130 | |
131 | template<> void JSHTMLAreaElementConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) |
132 | { |
133 | putDirect(vm, vm.propertyNames->prototype, JSHTMLAreaElement::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
134 | putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("HTMLAreaElement"_s )), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
135 | putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
136 | } |
137 | |
138 | template<> const ClassInfo JSHTMLAreaElementConstructor::s_info = { "HTMLAreaElement" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTMLAreaElementConstructor) }; |
139 | |
140 | /* Hash table for prototype */ |
141 | |
142 | static const HashTableValue JSHTMLAreaElementPrototypeTableValues[] = |
143 | { |
144 | { "constructor" , static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAreaElementConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAreaElementConstructor) } }, |
145 | { "alt" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAreaElementAlt), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAreaElementAlt) } }, |
146 | { "coords" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAreaElementCoords), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAreaElementCoords) } }, |
147 | { "noHref" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAreaElementNoHref), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAreaElementNoHref) } }, |
148 | { "ping" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAreaElementPing), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAreaElementPing) } }, |
149 | { "rel" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAreaElementRel), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAreaElementRel) } }, |
150 | { "shape" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAreaElementShape), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAreaElementShape) } }, |
151 | { "target" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAreaElementTarget), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAreaElementTarget) } }, |
152 | #if ENABLE(DOWNLOAD_ATTRIBUTE) |
153 | { "download" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAreaElementDownload), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAreaElementDownload) } }, |
154 | #else |
155 | { 0, 0, NoIntrinsic, { 0, 0 } }, |
156 | #endif |
157 | { "relList" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAreaElementRelList), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAreaElementRelList) } }, |
158 | { "href" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAreaElementHref), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAreaElementHref) } }, |
159 | { "origin" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAreaElementOrigin), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
160 | { "protocol" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAreaElementProtocol), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAreaElementProtocol) } }, |
161 | { "username" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAreaElementUsername), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAreaElementUsername) } }, |
162 | { "password" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAreaElementPassword), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAreaElementPassword) } }, |
163 | { "host" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAreaElementHost), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAreaElementHost) } }, |
164 | { "hostname" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAreaElementHostname), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAreaElementHostname) } }, |
165 | { "port" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAreaElementPort), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAreaElementPort) } }, |
166 | { "pathname" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAreaElementPathname), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAreaElementPathname) } }, |
167 | { "search" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAreaElementSearch), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAreaElementSearch) } }, |
168 | { "hash" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAreaElementHash), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLAreaElementHash) } }, |
169 | { "toString" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsHTMLAreaElementPrototypeFunctionToString), (intptr_t) (0) } }, |
170 | }; |
171 | |
172 | const ClassInfo JSHTMLAreaElementPrototype::s_info = { "HTMLAreaElementPrototype" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTMLAreaElementPrototype) }; |
173 | |
174 | void JSHTMLAreaElementPrototype::finishCreation(VM& vm) |
175 | { |
176 | Base::finishCreation(vm); |
177 | reifyStaticProperties(vm, JSHTMLAreaElement::info(), JSHTMLAreaElementPrototypeTableValues, *this); |
178 | bool hasDisabledRuntimeProperties = false; |
179 | #if ENABLE(DOWNLOAD_ATTRIBUTE) |
180 | if (!RuntimeEnabledFeatures::sharedFeatures().downloadAttributeEnabled()) { |
181 | hasDisabledRuntimeProperties = true; |
182 | auto propertyName = Identifier::fromString(&vm, reinterpret_cast<const LChar*>("download" ), strlen("download" )); |
183 | VM::DeletePropertyModeScope scope(vm, VM::DeletePropertyMode::IgnoreConfigurable); |
184 | JSObject::deleteProperty(this, globalObject()->globalExec(), propertyName); |
185 | } |
186 | #endif |
187 | if (hasDisabledRuntimeProperties && structure()->isDictionary()) |
188 | flattenDictionaryObject(vm); |
189 | } |
190 | |
191 | const ClassInfo JSHTMLAreaElement::s_info = { "HTMLAreaElement" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTMLAreaElement) }; |
192 | |
193 | JSHTMLAreaElement::JSHTMLAreaElement(Structure* structure, JSDOMGlobalObject& globalObject, Ref<HTMLAreaElement>&& impl) |
194 | : JSHTMLElement(structure, globalObject, WTFMove(impl)) |
195 | { |
196 | } |
197 | |
198 | void JSHTMLAreaElement::finishCreation(VM& vm) |
199 | { |
200 | Base::finishCreation(vm); |
201 | ASSERT(inherits(vm, info())); |
202 | |
203 | } |
204 | |
205 | JSObject* JSHTMLAreaElement::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) |
206 | { |
207 | return JSHTMLAreaElementPrototype::create(vm, &globalObject, JSHTMLAreaElementPrototype::createStructure(vm, &globalObject, JSHTMLElement::prototype(vm, globalObject))); |
208 | } |
209 | |
210 | JSObject* JSHTMLAreaElement::prototype(VM& vm, JSDOMGlobalObject& globalObject) |
211 | { |
212 | return getDOMPrototype<JSHTMLAreaElement>(vm, globalObject); |
213 | } |
214 | |
215 | JSValue JSHTMLAreaElement::getConstructor(VM& vm, const JSGlobalObject* globalObject) |
216 | { |
217 | return getDOMConstructor<JSHTMLAreaElementConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject)); |
218 | } |
219 | |
220 | template<> inline JSHTMLAreaElement* IDLAttribute<JSHTMLAreaElement>::cast(ExecState& state, EncodedJSValue thisValue) |
221 | { |
222 | return jsDynamicCast<JSHTMLAreaElement*>(state.vm(), JSValue::decode(thisValue)); |
223 | } |
224 | |
225 | template<> inline JSHTMLAreaElement* IDLOperation<JSHTMLAreaElement>::cast(ExecState& state) |
226 | { |
227 | return jsDynamicCast<JSHTMLAreaElement*>(state.vm(), state.thisValue()); |
228 | } |
229 | |
230 | EncodedJSValue jsHTMLAreaElementConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName) |
231 | { |
232 | VM& vm = state->vm(); |
233 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
234 | auto* prototype = jsDynamicCast<JSHTMLAreaElementPrototype*>(vm, JSValue::decode(thisValue)); |
235 | if (UNLIKELY(!prototype)) |
236 | return throwVMTypeError(state, throwScope); |
237 | return JSValue::encode(JSHTMLAreaElement::getConstructor(state->vm(), prototype->globalObject())); |
238 | } |
239 | |
240 | bool setJSHTMLAreaElementConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
241 | { |
242 | VM& vm = state->vm(); |
243 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
244 | auto* prototype = jsDynamicCast<JSHTMLAreaElementPrototype*>(vm, JSValue::decode(thisValue)); |
245 | if (UNLIKELY(!prototype)) { |
246 | throwVMTypeError(state, throwScope); |
247 | return false; |
248 | } |
249 | // Shadowing a built-in constructor |
250 | return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue)); |
251 | } |
252 | |
253 | static inline JSValue jsHTMLAreaElementAltGetter(ExecState& state, JSHTMLAreaElement& thisObject, ThrowScope& throwScope) |
254 | { |
255 | UNUSED_PARAM(throwScope); |
256 | UNUSED_PARAM(state); |
257 | auto& impl = thisObject.wrapped(); |
258 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::altAttr)); |
259 | return result; |
260 | } |
261 | |
262 | EncodedJSValue jsHTMLAreaElementAlt(ExecState* state, EncodedJSValue thisValue, PropertyName) |
263 | { |
264 | return IDLAttribute<JSHTMLAreaElement>::get<jsHTMLAreaElementAltGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "alt" ); |
265 | } |
266 | |
267 | static inline bool setJSHTMLAreaElementAltSetter(ExecState& state, JSHTMLAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
268 | { |
269 | UNUSED_PARAM(throwScope); |
270 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
271 | auto& impl = thisObject.wrapped(); |
272 | auto nativeValue = convert<IDLDOMString>(state, value); |
273 | RETURN_IF_EXCEPTION(throwScope, false); |
274 | AttributeSetter::call(state, throwScope, [&] { |
275 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::altAttr, WTFMove(nativeValue)); |
276 | }); |
277 | return true; |
278 | } |
279 | |
280 | bool setJSHTMLAreaElementAlt(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
281 | { |
282 | return IDLAttribute<JSHTMLAreaElement>::set<setJSHTMLAreaElementAltSetter>(*state, thisValue, encodedValue, "alt" ); |
283 | } |
284 | |
285 | static inline JSValue jsHTMLAreaElementCoordsGetter(ExecState& state, JSHTMLAreaElement& thisObject, ThrowScope& throwScope) |
286 | { |
287 | UNUSED_PARAM(throwScope); |
288 | UNUSED_PARAM(state); |
289 | auto& impl = thisObject.wrapped(); |
290 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::coordsAttr)); |
291 | return result; |
292 | } |
293 | |
294 | EncodedJSValue jsHTMLAreaElementCoords(ExecState* state, EncodedJSValue thisValue, PropertyName) |
295 | { |
296 | return IDLAttribute<JSHTMLAreaElement>::get<jsHTMLAreaElementCoordsGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "coords" ); |
297 | } |
298 | |
299 | static inline bool setJSHTMLAreaElementCoordsSetter(ExecState& state, JSHTMLAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
300 | { |
301 | UNUSED_PARAM(throwScope); |
302 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
303 | auto& impl = thisObject.wrapped(); |
304 | auto nativeValue = convert<IDLDOMString>(state, value); |
305 | RETURN_IF_EXCEPTION(throwScope, false); |
306 | AttributeSetter::call(state, throwScope, [&] { |
307 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::coordsAttr, WTFMove(nativeValue)); |
308 | }); |
309 | return true; |
310 | } |
311 | |
312 | bool setJSHTMLAreaElementCoords(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
313 | { |
314 | return IDLAttribute<JSHTMLAreaElement>::set<setJSHTMLAreaElementCoordsSetter>(*state, thisValue, encodedValue, "coords" ); |
315 | } |
316 | |
317 | static inline JSValue jsHTMLAreaElementNoHrefGetter(ExecState& state, JSHTMLAreaElement& thisObject, ThrowScope& throwScope) |
318 | { |
319 | UNUSED_PARAM(throwScope); |
320 | UNUSED_PARAM(state); |
321 | auto& impl = thisObject.wrapped(); |
322 | JSValue result = toJS<IDLBoolean>(state, throwScope, impl.hasAttributeWithoutSynchronization(WebCore::HTMLNames::nohrefAttr)); |
323 | return result; |
324 | } |
325 | |
326 | EncodedJSValue jsHTMLAreaElementNoHref(ExecState* state, EncodedJSValue thisValue, PropertyName) |
327 | { |
328 | return IDLAttribute<JSHTMLAreaElement>::get<jsHTMLAreaElementNoHrefGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "noHref" ); |
329 | } |
330 | |
331 | static inline bool setJSHTMLAreaElementNoHrefSetter(ExecState& state, JSHTMLAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
332 | { |
333 | UNUSED_PARAM(throwScope); |
334 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
335 | auto& impl = thisObject.wrapped(); |
336 | auto nativeValue = convert<IDLBoolean>(state, value); |
337 | RETURN_IF_EXCEPTION(throwScope, false); |
338 | AttributeSetter::call(state, throwScope, [&] { |
339 | return impl.setBooleanAttribute(WebCore::HTMLNames::nohrefAttr, WTFMove(nativeValue)); |
340 | }); |
341 | return true; |
342 | } |
343 | |
344 | bool setJSHTMLAreaElementNoHref(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
345 | { |
346 | return IDLAttribute<JSHTMLAreaElement>::set<setJSHTMLAreaElementNoHrefSetter>(*state, thisValue, encodedValue, "noHref" ); |
347 | } |
348 | |
349 | static inline JSValue jsHTMLAreaElementPingGetter(ExecState& state, JSHTMLAreaElement& thisObject, ThrowScope& throwScope) |
350 | { |
351 | UNUSED_PARAM(throwScope); |
352 | UNUSED_PARAM(state); |
353 | auto& impl = thisObject.wrapped(); |
354 | JSValue result = toJS<IDLUSVString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::pingAttr)); |
355 | return result; |
356 | } |
357 | |
358 | EncodedJSValue jsHTMLAreaElementPing(ExecState* state, EncodedJSValue thisValue, PropertyName) |
359 | { |
360 | return IDLAttribute<JSHTMLAreaElement>::get<jsHTMLAreaElementPingGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "ping" ); |
361 | } |
362 | |
363 | static inline bool setJSHTMLAreaElementPingSetter(ExecState& state, JSHTMLAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
364 | { |
365 | UNUSED_PARAM(throwScope); |
366 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
367 | auto& impl = thisObject.wrapped(); |
368 | auto nativeValue = convert<IDLUSVString>(state, value); |
369 | RETURN_IF_EXCEPTION(throwScope, false); |
370 | AttributeSetter::call(state, throwScope, [&] { |
371 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::pingAttr, WTFMove(nativeValue)); |
372 | }); |
373 | return true; |
374 | } |
375 | |
376 | bool setJSHTMLAreaElementPing(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
377 | { |
378 | return IDLAttribute<JSHTMLAreaElement>::set<setJSHTMLAreaElementPingSetter>(*state, thisValue, encodedValue, "ping" ); |
379 | } |
380 | |
381 | static inline JSValue jsHTMLAreaElementRelGetter(ExecState& state, JSHTMLAreaElement& thisObject, ThrowScope& throwScope) |
382 | { |
383 | UNUSED_PARAM(throwScope); |
384 | UNUSED_PARAM(state); |
385 | auto& impl = thisObject.wrapped(); |
386 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::relAttr)); |
387 | return result; |
388 | } |
389 | |
390 | EncodedJSValue jsHTMLAreaElementRel(ExecState* state, EncodedJSValue thisValue, PropertyName) |
391 | { |
392 | return IDLAttribute<JSHTMLAreaElement>::get<jsHTMLAreaElementRelGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "rel" ); |
393 | } |
394 | |
395 | static inline bool setJSHTMLAreaElementRelSetter(ExecState& state, JSHTMLAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
396 | { |
397 | UNUSED_PARAM(throwScope); |
398 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
399 | auto& impl = thisObject.wrapped(); |
400 | auto nativeValue = convert<IDLDOMString>(state, value); |
401 | RETURN_IF_EXCEPTION(throwScope, false); |
402 | AttributeSetter::call(state, throwScope, [&] { |
403 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::relAttr, WTFMove(nativeValue)); |
404 | }); |
405 | return true; |
406 | } |
407 | |
408 | bool setJSHTMLAreaElementRel(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
409 | { |
410 | return IDLAttribute<JSHTMLAreaElement>::set<setJSHTMLAreaElementRelSetter>(*state, thisValue, encodedValue, "rel" ); |
411 | } |
412 | |
413 | static inline JSValue jsHTMLAreaElementShapeGetter(ExecState& state, JSHTMLAreaElement& thisObject, ThrowScope& throwScope) |
414 | { |
415 | UNUSED_PARAM(throwScope); |
416 | UNUSED_PARAM(state); |
417 | auto& impl = thisObject.wrapped(); |
418 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::shapeAttr)); |
419 | return result; |
420 | } |
421 | |
422 | EncodedJSValue jsHTMLAreaElementShape(ExecState* state, EncodedJSValue thisValue, PropertyName) |
423 | { |
424 | return IDLAttribute<JSHTMLAreaElement>::get<jsHTMLAreaElementShapeGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "shape" ); |
425 | } |
426 | |
427 | static inline bool setJSHTMLAreaElementShapeSetter(ExecState& state, JSHTMLAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
428 | { |
429 | UNUSED_PARAM(throwScope); |
430 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
431 | auto& impl = thisObject.wrapped(); |
432 | auto nativeValue = convert<IDLDOMString>(state, value); |
433 | RETURN_IF_EXCEPTION(throwScope, false); |
434 | AttributeSetter::call(state, throwScope, [&] { |
435 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::shapeAttr, WTFMove(nativeValue)); |
436 | }); |
437 | return true; |
438 | } |
439 | |
440 | bool setJSHTMLAreaElementShape(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
441 | { |
442 | return IDLAttribute<JSHTMLAreaElement>::set<setJSHTMLAreaElementShapeSetter>(*state, thisValue, encodedValue, "shape" ); |
443 | } |
444 | |
445 | static inline JSValue jsHTMLAreaElementTargetGetter(ExecState& state, JSHTMLAreaElement& thisObject, ThrowScope& throwScope) |
446 | { |
447 | UNUSED_PARAM(throwScope); |
448 | UNUSED_PARAM(state); |
449 | auto& impl = thisObject.wrapped(); |
450 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::targetAttr)); |
451 | return result; |
452 | } |
453 | |
454 | EncodedJSValue jsHTMLAreaElementTarget(ExecState* state, EncodedJSValue thisValue, PropertyName) |
455 | { |
456 | return IDLAttribute<JSHTMLAreaElement>::get<jsHTMLAreaElementTargetGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "target" ); |
457 | } |
458 | |
459 | static inline bool setJSHTMLAreaElementTargetSetter(ExecState& state, JSHTMLAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
460 | { |
461 | UNUSED_PARAM(throwScope); |
462 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
463 | auto& impl = thisObject.wrapped(); |
464 | auto nativeValue = convert<IDLDOMString>(state, value); |
465 | RETURN_IF_EXCEPTION(throwScope, false); |
466 | AttributeSetter::call(state, throwScope, [&] { |
467 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::targetAttr, WTFMove(nativeValue)); |
468 | }); |
469 | return true; |
470 | } |
471 | |
472 | bool setJSHTMLAreaElementTarget(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
473 | { |
474 | return IDLAttribute<JSHTMLAreaElement>::set<setJSHTMLAreaElementTargetSetter>(*state, thisValue, encodedValue, "target" ); |
475 | } |
476 | |
477 | #if ENABLE(DOWNLOAD_ATTRIBUTE) |
478 | static inline JSValue jsHTMLAreaElementDownloadGetter(ExecState& state, JSHTMLAreaElement& thisObject, ThrowScope& throwScope) |
479 | { |
480 | UNUSED_PARAM(throwScope); |
481 | UNUSED_PARAM(state); |
482 | auto& impl = thisObject.wrapped(); |
483 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::downloadAttr)); |
484 | return result; |
485 | } |
486 | |
487 | EncodedJSValue jsHTMLAreaElementDownload(ExecState* state, EncodedJSValue thisValue, PropertyName) |
488 | { |
489 | return IDLAttribute<JSHTMLAreaElement>::get<jsHTMLAreaElementDownloadGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "download" ); |
490 | } |
491 | |
492 | #endif |
493 | |
494 | #if ENABLE(DOWNLOAD_ATTRIBUTE) |
495 | static inline bool setJSHTMLAreaElementDownloadSetter(ExecState& state, JSHTMLAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
496 | { |
497 | UNUSED_PARAM(throwScope); |
498 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
499 | auto& impl = thisObject.wrapped(); |
500 | auto nativeValue = convert<IDLDOMString>(state, value); |
501 | RETURN_IF_EXCEPTION(throwScope, false); |
502 | AttributeSetter::call(state, throwScope, [&] { |
503 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::downloadAttr, WTFMove(nativeValue)); |
504 | }); |
505 | return true; |
506 | } |
507 | |
508 | bool setJSHTMLAreaElementDownload(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
509 | { |
510 | return IDLAttribute<JSHTMLAreaElement>::set<setJSHTMLAreaElementDownloadSetter>(*state, thisValue, encodedValue, "download" ); |
511 | } |
512 | |
513 | #endif |
514 | |
515 | static inline JSValue jsHTMLAreaElementRelListGetter(ExecState& state, JSHTMLAreaElement& thisObject, ThrowScope& throwScope) |
516 | { |
517 | UNUSED_PARAM(throwScope); |
518 | UNUSED_PARAM(state); |
519 | auto& impl = thisObject.wrapped(); |
520 | JSValue result = toJS<IDLInterface<DOMTokenList>>(state, *thisObject.globalObject(), throwScope, impl.relList()); |
521 | return result; |
522 | } |
523 | |
524 | EncodedJSValue jsHTMLAreaElementRelList(ExecState* state, EncodedJSValue thisValue, PropertyName) |
525 | { |
526 | return IDLAttribute<JSHTMLAreaElement>::get<jsHTMLAreaElementRelListGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "relList" ); |
527 | } |
528 | |
529 | static inline bool setJSHTMLAreaElementRelListSetter(ExecState& state, JSHTMLAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
530 | { |
531 | UNUSED_PARAM(throwScope); |
532 | auto id = Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("relList" ), strlen("relList" )); |
533 | auto valueToForwardTo = thisObject.get(&state, id); |
534 | RETURN_IF_EXCEPTION(throwScope, false); |
535 | if (UNLIKELY(!valueToForwardTo.isObject())) { |
536 | throwTypeError(&state, throwScope); |
537 | return false; |
538 | } |
539 | auto forwardId = Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("value" ), strlen("value" )); |
540 | PutPropertySlot slot(valueToForwardTo, false); |
541 | asObject(valueToForwardTo)->methodTable(state.vm())->put(asObject(valueToForwardTo), &state, forwardId, value, slot); |
542 | RETURN_IF_EXCEPTION(throwScope, false); |
543 | return true; |
544 | } |
545 | |
546 | bool setJSHTMLAreaElementRelList(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
547 | { |
548 | return IDLAttribute<JSHTMLAreaElement>::set<setJSHTMLAreaElementRelListSetter>(*state, thisValue, encodedValue, "relList" ); |
549 | } |
550 | |
551 | static inline JSValue jsHTMLAreaElementHrefGetter(ExecState& state, JSHTMLAreaElement& thisObject, ThrowScope& throwScope) |
552 | { |
553 | UNUSED_PARAM(throwScope); |
554 | UNUSED_PARAM(state); |
555 | auto& impl = thisObject.wrapped(); |
556 | JSValue result = toJS<IDLUSVString>(state, throwScope, impl.getURLAttribute(WebCore::HTMLNames::hrefAttr)); |
557 | return result; |
558 | } |
559 | |
560 | EncodedJSValue jsHTMLAreaElementHref(ExecState* state, EncodedJSValue thisValue, PropertyName) |
561 | { |
562 | return IDLAttribute<JSHTMLAreaElement>::get<jsHTMLAreaElementHrefGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "href" ); |
563 | } |
564 | |
565 | static inline bool setJSHTMLAreaElementHrefSetter(ExecState& state, JSHTMLAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
566 | { |
567 | UNUSED_PARAM(throwScope); |
568 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
569 | auto& impl = thisObject.wrapped(); |
570 | auto nativeValue = convert<IDLUSVString>(state, value); |
571 | RETURN_IF_EXCEPTION(throwScope, false); |
572 | AttributeSetter::call(state, throwScope, [&] { |
573 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::hrefAttr, WTFMove(nativeValue)); |
574 | }); |
575 | return true; |
576 | } |
577 | |
578 | bool setJSHTMLAreaElementHref(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
579 | { |
580 | return IDLAttribute<JSHTMLAreaElement>::set<setJSHTMLAreaElementHrefSetter>(*state, thisValue, encodedValue, "href" ); |
581 | } |
582 | |
583 | static inline JSValue jsHTMLAreaElementOriginGetter(ExecState& state, JSHTMLAreaElement& thisObject, ThrowScope& throwScope) |
584 | { |
585 | UNUSED_PARAM(throwScope); |
586 | UNUSED_PARAM(state); |
587 | auto& impl = thisObject.wrapped(); |
588 | JSValue result = toJS<IDLUSVString>(state, throwScope, impl.origin()); |
589 | return result; |
590 | } |
591 | |
592 | EncodedJSValue jsHTMLAreaElementOrigin(ExecState* state, EncodedJSValue thisValue, PropertyName) |
593 | { |
594 | return IDLAttribute<JSHTMLAreaElement>::get<jsHTMLAreaElementOriginGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "origin" ); |
595 | } |
596 | |
597 | static inline JSValue jsHTMLAreaElementProtocolGetter(ExecState& state, JSHTMLAreaElement& thisObject, ThrowScope& throwScope) |
598 | { |
599 | UNUSED_PARAM(throwScope); |
600 | UNUSED_PARAM(state); |
601 | auto& impl = thisObject.wrapped(); |
602 | JSValue result = toJS<IDLUSVString>(state, throwScope, impl.protocol()); |
603 | return result; |
604 | } |
605 | |
606 | EncodedJSValue jsHTMLAreaElementProtocol(ExecState* state, EncodedJSValue thisValue, PropertyName) |
607 | { |
608 | return IDLAttribute<JSHTMLAreaElement>::get<jsHTMLAreaElementProtocolGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "protocol" ); |
609 | } |
610 | |
611 | static inline bool setJSHTMLAreaElementProtocolSetter(ExecState& state, JSHTMLAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
612 | { |
613 | UNUSED_PARAM(throwScope); |
614 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
615 | auto& impl = thisObject.wrapped(); |
616 | auto nativeValue = convert<IDLUSVString>(state, value); |
617 | RETURN_IF_EXCEPTION(throwScope, false); |
618 | AttributeSetter::call(state, throwScope, [&] { |
619 | return impl.setProtocol(WTFMove(nativeValue)); |
620 | }); |
621 | return true; |
622 | } |
623 | |
624 | bool setJSHTMLAreaElementProtocol(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
625 | { |
626 | return IDLAttribute<JSHTMLAreaElement>::set<setJSHTMLAreaElementProtocolSetter>(*state, thisValue, encodedValue, "protocol" ); |
627 | } |
628 | |
629 | static inline JSValue jsHTMLAreaElementUsernameGetter(ExecState& state, JSHTMLAreaElement& thisObject, ThrowScope& throwScope) |
630 | { |
631 | UNUSED_PARAM(throwScope); |
632 | UNUSED_PARAM(state); |
633 | auto& impl = thisObject.wrapped(); |
634 | JSValue result = toJS<IDLUSVString>(state, throwScope, impl.username()); |
635 | return result; |
636 | } |
637 | |
638 | EncodedJSValue jsHTMLAreaElementUsername(ExecState* state, EncodedJSValue thisValue, PropertyName) |
639 | { |
640 | return IDLAttribute<JSHTMLAreaElement>::get<jsHTMLAreaElementUsernameGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "username" ); |
641 | } |
642 | |
643 | static inline bool setJSHTMLAreaElementUsernameSetter(ExecState& state, JSHTMLAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
644 | { |
645 | UNUSED_PARAM(throwScope); |
646 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
647 | auto& impl = thisObject.wrapped(); |
648 | auto nativeValue = convert<IDLUSVString>(state, value); |
649 | RETURN_IF_EXCEPTION(throwScope, false); |
650 | AttributeSetter::call(state, throwScope, [&] { |
651 | return impl.setUsername(WTFMove(nativeValue)); |
652 | }); |
653 | return true; |
654 | } |
655 | |
656 | bool setJSHTMLAreaElementUsername(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
657 | { |
658 | return IDLAttribute<JSHTMLAreaElement>::set<setJSHTMLAreaElementUsernameSetter>(*state, thisValue, encodedValue, "username" ); |
659 | } |
660 | |
661 | static inline JSValue jsHTMLAreaElementPasswordGetter(ExecState& state, JSHTMLAreaElement& thisObject, ThrowScope& throwScope) |
662 | { |
663 | UNUSED_PARAM(throwScope); |
664 | UNUSED_PARAM(state); |
665 | auto& impl = thisObject.wrapped(); |
666 | JSValue result = toJS<IDLUSVString>(state, throwScope, impl.password()); |
667 | return result; |
668 | } |
669 | |
670 | EncodedJSValue jsHTMLAreaElementPassword(ExecState* state, EncodedJSValue thisValue, PropertyName) |
671 | { |
672 | return IDLAttribute<JSHTMLAreaElement>::get<jsHTMLAreaElementPasswordGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "password" ); |
673 | } |
674 | |
675 | static inline bool setJSHTMLAreaElementPasswordSetter(ExecState& state, JSHTMLAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
676 | { |
677 | UNUSED_PARAM(throwScope); |
678 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
679 | auto& impl = thisObject.wrapped(); |
680 | auto nativeValue = convert<IDLUSVString>(state, value); |
681 | RETURN_IF_EXCEPTION(throwScope, false); |
682 | AttributeSetter::call(state, throwScope, [&] { |
683 | return impl.setPassword(WTFMove(nativeValue)); |
684 | }); |
685 | return true; |
686 | } |
687 | |
688 | bool setJSHTMLAreaElementPassword(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
689 | { |
690 | return IDLAttribute<JSHTMLAreaElement>::set<setJSHTMLAreaElementPasswordSetter>(*state, thisValue, encodedValue, "password" ); |
691 | } |
692 | |
693 | static inline JSValue jsHTMLAreaElementHostGetter(ExecState& state, JSHTMLAreaElement& thisObject, ThrowScope& throwScope) |
694 | { |
695 | UNUSED_PARAM(throwScope); |
696 | UNUSED_PARAM(state); |
697 | auto& impl = thisObject.wrapped(); |
698 | JSValue result = toJS<IDLUSVString>(state, throwScope, impl.host()); |
699 | return result; |
700 | } |
701 | |
702 | EncodedJSValue jsHTMLAreaElementHost(ExecState* state, EncodedJSValue thisValue, PropertyName) |
703 | { |
704 | return IDLAttribute<JSHTMLAreaElement>::get<jsHTMLAreaElementHostGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "host" ); |
705 | } |
706 | |
707 | static inline bool setJSHTMLAreaElementHostSetter(ExecState& state, JSHTMLAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
708 | { |
709 | UNUSED_PARAM(throwScope); |
710 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
711 | auto& impl = thisObject.wrapped(); |
712 | auto nativeValue = convert<IDLUSVString>(state, value); |
713 | RETURN_IF_EXCEPTION(throwScope, false); |
714 | AttributeSetter::call(state, throwScope, [&] { |
715 | return impl.setHost(WTFMove(nativeValue)); |
716 | }); |
717 | return true; |
718 | } |
719 | |
720 | bool setJSHTMLAreaElementHost(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
721 | { |
722 | return IDLAttribute<JSHTMLAreaElement>::set<setJSHTMLAreaElementHostSetter>(*state, thisValue, encodedValue, "host" ); |
723 | } |
724 | |
725 | static inline JSValue jsHTMLAreaElementHostnameGetter(ExecState& state, JSHTMLAreaElement& thisObject, ThrowScope& throwScope) |
726 | { |
727 | UNUSED_PARAM(throwScope); |
728 | UNUSED_PARAM(state); |
729 | auto& impl = thisObject.wrapped(); |
730 | JSValue result = toJS<IDLUSVString>(state, throwScope, impl.hostname()); |
731 | return result; |
732 | } |
733 | |
734 | EncodedJSValue jsHTMLAreaElementHostname(ExecState* state, EncodedJSValue thisValue, PropertyName) |
735 | { |
736 | return IDLAttribute<JSHTMLAreaElement>::get<jsHTMLAreaElementHostnameGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "hostname" ); |
737 | } |
738 | |
739 | static inline bool setJSHTMLAreaElementHostnameSetter(ExecState& state, JSHTMLAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
740 | { |
741 | UNUSED_PARAM(throwScope); |
742 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
743 | auto& impl = thisObject.wrapped(); |
744 | auto nativeValue = convert<IDLUSVString>(state, value); |
745 | RETURN_IF_EXCEPTION(throwScope, false); |
746 | AttributeSetter::call(state, throwScope, [&] { |
747 | return impl.setHostname(WTFMove(nativeValue)); |
748 | }); |
749 | return true; |
750 | } |
751 | |
752 | bool setJSHTMLAreaElementHostname(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
753 | { |
754 | return IDLAttribute<JSHTMLAreaElement>::set<setJSHTMLAreaElementHostnameSetter>(*state, thisValue, encodedValue, "hostname" ); |
755 | } |
756 | |
757 | static inline JSValue jsHTMLAreaElementPortGetter(ExecState& state, JSHTMLAreaElement& thisObject, ThrowScope& throwScope) |
758 | { |
759 | UNUSED_PARAM(throwScope); |
760 | UNUSED_PARAM(state); |
761 | auto& impl = thisObject.wrapped(); |
762 | JSValue result = toJS<IDLUSVString>(state, throwScope, impl.port()); |
763 | return result; |
764 | } |
765 | |
766 | EncodedJSValue jsHTMLAreaElementPort(ExecState* state, EncodedJSValue thisValue, PropertyName) |
767 | { |
768 | return IDLAttribute<JSHTMLAreaElement>::get<jsHTMLAreaElementPortGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "port" ); |
769 | } |
770 | |
771 | static inline bool setJSHTMLAreaElementPortSetter(ExecState& state, JSHTMLAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
772 | { |
773 | UNUSED_PARAM(throwScope); |
774 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
775 | auto& impl = thisObject.wrapped(); |
776 | auto nativeValue = convert<IDLUSVString>(state, value); |
777 | RETURN_IF_EXCEPTION(throwScope, false); |
778 | AttributeSetter::call(state, throwScope, [&] { |
779 | return impl.setPort(WTFMove(nativeValue)); |
780 | }); |
781 | return true; |
782 | } |
783 | |
784 | bool setJSHTMLAreaElementPort(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
785 | { |
786 | return IDLAttribute<JSHTMLAreaElement>::set<setJSHTMLAreaElementPortSetter>(*state, thisValue, encodedValue, "port" ); |
787 | } |
788 | |
789 | static inline JSValue jsHTMLAreaElementPathnameGetter(ExecState& state, JSHTMLAreaElement& thisObject, ThrowScope& throwScope) |
790 | { |
791 | UNUSED_PARAM(throwScope); |
792 | UNUSED_PARAM(state); |
793 | auto& impl = thisObject.wrapped(); |
794 | JSValue result = toJS<IDLUSVString>(state, throwScope, impl.pathname()); |
795 | return result; |
796 | } |
797 | |
798 | EncodedJSValue jsHTMLAreaElementPathname(ExecState* state, EncodedJSValue thisValue, PropertyName) |
799 | { |
800 | return IDLAttribute<JSHTMLAreaElement>::get<jsHTMLAreaElementPathnameGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "pathname" ); |
801 | } |
802 | |
803 | static inline bool setJSHTMLAreaElementPathnameSetter(ExecState& state, JSHTMLAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
804 | { |
805 | UNUSED_PARAM(throwScope); |
806 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
807 | auto& impl = thisObject.wrapped(); |
808 | auto nativeValue = convert<IDLUSVString>(state, value); |
809 | RETURN_IF_EXCEPTION(throwScope, false); |
810 | AttributeSetter::call(state, throwScope, [&] { |
811 | return impl.setPathname(WTFMove(nativeValue)); |
812 | }); |
813 | return true; |
814 | } |
815 | |
816 | bool setJSHTMLAreaElementPathname(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
817 | { |
818 | return IDLAttribute<JSHTMLAreaElement>::set<setJSHTMLAreaElementPathnameSetter>(*state, thisValue, encodedValue, "pathname" ); |
819 | } |
820 | |
821 | static inline JSValue jsHTMLAreaElementSearchGetter(ExecState& state, JSHTMLAreaElement& thisObject, ThrowScope& throwScope) |
822 | { |
823 | UNUSED_PARAM(throwScope); |
824 | UNUSED_PARAM(state); |
825 | auto& impl = thisObject.wrapped(); |
826 | JSValue result = toJS<IDLUSVString>(state, throwScope, impl.search()); |
827 | return result; |
828 | } |
829 | |
830 | EncodedJSValue jsHTMLAreaElementSearch(ExecState* state, EncodedJSValue thisValue, PropertyName) |
831 | { |
832 | return IDLAttribute<JSHTMLAreaElement>::get<jsHTMLAreaElementSearchGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "search" ); |
833 | } |
834 | |
835 | static inline bool setJSHTMLAreaElementSearchSetter(ExecState& state, JSHTMLAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
836 | { |
837 | UNUSED_PARAM(throwScope); |
838 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
839 | auto& impl = thisObject.wrapped(); |
840 | auto nativeValue = convert<IDLUSVString>(state, value); |
841 | RETURN_IF_EXCEPTION(throwScope, false); |
842 | AttributeSetter::call(state, throwScope, [&] { |
843 | return impl.setSearch(WTFMove(nativeValue)); |
844 | }); |
845 | return true; |
846 | } |
847 | |
848 | bool setJSHTMLAreaElementSearch(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
849 | { |
850 | return IDLAttribute<JSHTMLAreaElement>::set<setJSHTMLAreaElementSearchSetter>(*state, thisValue, encodedValue, "search" ); |
851 | } |
852 | |
853 | static inline JSValue jsHTMLAreaElementHashGetter(ExecState& state, JSHTMLAreaElement& thisObject, ThrowScope& throwScope) |
854 | { |
855 | UNUSED_PARAM(throwScope); |
856 | UNUSED_PARAM(state); |
857 | auto& impl = thisObject.wrapped(); |
858 | JSValue result = toJS<IDLUSVString>(state, throwScope, impl.hash()); |
859 | return result; |
860 | } |
861 | |
862 | EncodedJSValue jsHTMLAreaElementHash(ExecState* state, EncodedJSValue thisValue, PropertyName) |
863 | { |
864 | return IDLAttribute<JSHTMLAreaElement>::get<jsHTMLAreaElementHashGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "hash" ); |
865 | } |
866 | |
867 | static inline bool setJSHTMLAreaElementHashSetter(ExecState& state, JSHTMLAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
868 | { |
869 | UNUSED_PARAM(throwScope); |
870 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
871 | auto& impl = thisObject.wrapped(); |
872 | auto nativeValue = convert<IDLUSVString>(state, value); |
873 | RETURN_IF_EXCEPTION(throwScope, false); |
874 | AttributeSetter::call(state, throwScope, [&] { |
875 | return impl.setHash(WTFMove(nativeValue)); |
876 | }); |
877 | return true; |
878 | } |
879 | |
880 | bool setJSHTMLAreaElementHash(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
881 | { |
882 | return IDLAttribute<JSHTMLAreaElement>::set<setJSHTMLAreaElementHashSetter>(*state, thisValue, encodedValue, "hash" ); |
883 | } |
884 | |
885 | static inline JSC::EncodedJSValue jsHTMLAreaElementPrototypeFunctionToStringBody(JSC::ExecState* state, typename IDLOperation<JSHTMLAreaElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
886 | { |
887 | UNUSED_PARAM(state); |
888 | UNUSED_PARAM(throwScope); |
889 | auto& impl = castedThis->wrapped(); |
890 | return JSValue::encode(toJS<IDLUSVString>(*state, impl.href())); |
891 | } |
892 | |
893 | EncodedJSValue JSC_HOST_CALL jsHTMLAreaElementPrototypeFunctionToString(ExecState* state) |
894 | { |
895 | return IDLOperation<JSHTMLAreaElement>::call<jsHTMLAreaElementPrototypeFunctionToStringBody>(*state, "toString" ); |
896 | } |
897 | |
898 | void JSHTMLAreaElement::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) |
899 | { |
900 | auto* thisObject = jsCast<JSHTMLAreaElement*>(cell); |
901 | builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); |
902 | if (thisObject->scriptExecutionContext()) |
903 | builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); |
904 | Base::heapSnapshot(cell, builder); |
905 | } |
906 | |
907 | |
908 | } |
909 | |