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 "JSHTMLTextAreaElement.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 "JSDOMConvertNumbers.h" |
32 | #include "JSDOMConvertStrings.h" |
33 | #include "JSDOMExceptionHandling.h" |
34 | #include "JSDOMGlobalObject.h" |
35 | #include "JSDOMOperation.h" |
36 | #include "JSDOMWrapperCache.h" |
37 | #include "JSHTMLFormElement.h" |
38 | #include "JSNodeList.h" |
39 | #include "JSValidityState.h" |
40 | #include "RuntimeEnabledFeatures.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 jsHTMLTextAreaElementPrototypeFunctionCheckValidity(JSC::ExecState*); |
55 | JSC::EncodedJSValue JSC_HOST_CALL jsHTMLTextAreaElementPrototypeFunctionReportValidity(JSC::ExecState*); |
56 | JSC::EncodedJSValue JSC_HOST_CALL jsHTMLTextAreaElementPrototypeFunctionSetCustomValidity(JSC::ExecState*); |
57 | JSC::EncodedJSValue JSC_HOST_CALL jsHTMLTextAreaElementPrototypeFunctionSelect(JSC::ExecState*); |
58 | JSC::EncodedJSValue JSC_HOST_CALL jsHTMLTextAreaElementPrototypeFunctionSetRangeText(JSC::ExecState*); |
59 | JSC::EncodedJSValue JSC_HOST_CALL jsHTMLTextAreaElementPrototypeFunctionSetSelectionRange(JSC::ExecState*); |
60 | |
61 | // Attributes |
62 | |
63 | JSC::EncodedJSValue jsHTMLTextAreaElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
64 | bool setJSHTMLTextAreaElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
65 | JSC::EncodedJSValue jsHTMLTextAreaElementAutofocus(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
66 | bool setJSHTMLTextAreaElementAutofocus(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
67 | JSC::EncodedJSValue jsHTMLTextAreaElementDirName(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
68 | bool setJSHTMLTextAreaElementDirName(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
69 | JSC::EncodedJSValue jsHTMLTextAreaElementDisabled(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
70 | bool setJSHTMLTextAreaElementDisabled(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
71 | JSC::EncodedJSValue jsHTMLTextAreaElementForm(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
72 | JSC::EncodedJSValue jsHTMLTextAreaElementMinLength(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
73 | bool setJSHTMLTextAreaElementMinLength(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
74 | JSC::EncodedJSValue jsHTMLTextAreaElementMaxLength(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
75 | bool setJSHTMLTextAreaElementMaxLength(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
76 | JSC::EncodedJSValue jsHTMLTextAreaElementName(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
77 | bool setJSHTMLTextAreaElementName(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
78 | JSC::EncodedJSValue jsHTMLTextAreaElementPlaceholder(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
79 | bool setJSHTMLTextAreaElementPlaceholder(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
80 | JSC::EncodedJSValue jsHTMLTextAreaElementReadOnly(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
81 | bool setJSHTMLTextAreaElementReadOnly(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
82 | JSC::EncodedJSValue jsHTMLTextAreaElementRequired(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
83 | bool setJSHTMLTextAreaElementRequired(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
84 | JSC::EncodedJSValue jsHTMLTextAreaElementRows(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
85 | bool setJSHTMLTextAreaElementRows(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
86 | JSC::EncodedJSValue jsHTMLTextAreaElementCols(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
87 | bool setJSHTMLTextAreaElementCols(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
88 | JSC::EncodedJSValue jsHTMLTextAreaElementWrap(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
89 | bool setJSHTMLTextAreaElementWrap(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
90 | JSC::EncodedJSValue jsHTMLTextAreaElementType(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
91 | JSC::EncodedJSValue jsHTMLTextAreaElementDefaultValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
92 | bool setJSHTMLTextAreaElementDefaultValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
93 | JSC::EncodedJSValue jsHTMLTextAreaElementValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
94 | bool setJSHTMLTextAreaElementValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
95 | JSC::EncodedJSValue jsHTMLTextAreaElementTextLength(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
96 | JSC::EncodedJSValue jsHTMLTextAreaElementWillValidate(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
97 | JSC::EncodedJSValue jsHTMLTextAreaElementValidity(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
98 | JSC::EncodedJSValue jsHTMLTextAreaElementValidationMessage(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
99 | JSC::EncodedJSValue jsHTMLTextAreaElementLabels(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
100 | JSC::EncodedJSValue jsHTMLTextAreaElementSelectionStart(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
101 | bool setJSHTMLTextAreaElementSelectionStart(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
102 | JSC::EncodedJSValue jsHTMLTextAreaElementSelectionEnd(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
103 | bool setJSHTMLTextAreaElementSelectionEnd(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
104 | JSC::EncodedJSValue jsHTMLTextAreaElementSelectionDirection(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
105 | bool setJSHTMLTextAreaElementSelectionDirection(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
106 | JSC::EncodedJSValue jsHTMLTextAreaElementAutocomplete(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
107 | bool setJSHTMLTextAreaElementAutocomplete(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
108 | |
109 | class JSHTMLTextAreaElementPrototype : public JSC::JSNonFinalObject { |
110 | public: |
111 | using Base = JSC::JSNonFinalObject; |
112 | static JSHTMLTextAreaElementPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) |
113 | { |
114 | JSHTMLTextAreaElementPrototype* ptr = new (NotNull, JSC::allocateCell<JSHTMLTextAreaElementPrototype>(vm.heap)) JSHTMLTextAreaElementPrototype(vm, globalObject, structure); |
115 | ptr->finishCreation(vm); |
116 | return ptr; |
117 | } |
118 | |
119 | DECLARE_INFO; |
120 | static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) |
121 | { |
122 | return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); |
123 | } |
124 | |
125 | private: |
126 | JSHTMLTextAreaElementPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) |
127 | : JSC::JSNonFinalObject(vm, structure) |
128 | { |
129 | } |
130 | |
131 | void finishCreation(JSC::VM&); |
132 | }; |
133 | |
134 | using JSHTMLTextAreaElementConstructor = JSDOMConstructorNotConstructable<JSHTMLTextAreaElement>; |
135 | |
136 | template<> JSValue JSHTMLTextAreaElementConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject) |
137 | { |
138 | return JSHTMLElement::getConstructor(vm, &globalObject); |
139 | } |
140 | |
141 | template<> void JSHTMLTextAreaElementConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) |
142 | { |
143 | putDirect(vm, vm.propertyNames->prototype, JSHTMLTextAreaElement::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
144 | putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("HTMLTextAreaElement"_s )), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
145 | putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
146 | } |
147 | |
148 | template<> const ClassInfo JSHTMLTextAreaElementConstructor::s_info = { "HTMLTextAreaElement" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTMLTextAreaElementConstructor) }; |
149 | |
150 | /* Hash table for prototype */ |
151 | |
152 | static const HashTableValue JSHTMLTextAreaElementPrototypeTableValues[] = |
153 | { |
154 | { "constructor" , static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTextAreaElementConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTextAreaElementConstructor) } }, |
155 | { "autofocus" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTextAreaElementAutofocus), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTextAreaElementAutofocus) } }, |
156 | { "dirName" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTextAreaElementDirName), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTextAreaElementDirName) } }, |
157 | { "disabled" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTextAreaElementDisabled), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTextAreaElementDisabled) } }, |
158 | { "form" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTextAreaElementForm), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
159 | { "minLength" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTextAreaElementMinLength), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTextAreaElementMinLength) } }, |
160 | { "maxLength" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTextAreaElementMaxLength), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTextAreaElementMaxLength) } }, |
161 | { "name" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTextAreaElementName), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTextAreaElementName) } }, |
162 | { "placeholder" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTextAreaElementPlaceholder), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTextAreaElementPlaceholder) } }, |
163 | { "readOnly" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTextAreaElementReadOnly), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTextAreaElementReadOnly) } }, |
164 | { "required" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTextAreaElementRequired), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTextAreaElementRequired) } }, |
165 | { "rows" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTextAreaElementRows), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTextAreaElementRows) } }, |
166 | { "cols" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTextAreaElementCols), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTextAreaElementCols) } }, |
167 | { "wrap" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTextAreaElementWrap), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTextAreaElementWrap) } }, |
168 | { "type" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTextAreaElementType), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
169 | { "defaultValue" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTextAreaElementDefaultValue), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTextAreaElementDefaultValue) } }, |
170 | { "value" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTextAreaElementValue), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTextAreaElementValue) } }, |
171 | { "textLength" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTextAreaElementTextLength), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
172 | { "willValidate" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTextAreaElementWillValidate), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
173 | { "validity" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTextAreaElementValidity), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
174 | { "validationMessage" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTextAreaElementValidationMessage), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
175 | { "labels" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTextAreaElementLabels), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
176 | { "selectionStart" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTextAreaElementSelectionStart), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTextAreaElementSelectionStart) } }, |
177 | { "selectionEnd" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTextAreaElementSelectionEnd), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTextAreaElementSelectionEnd) } }, |
178 | { "selectionDirection" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTextAreaElementSelectionDirection), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTextAreaElementSelectionDirection) } }, |
179 | { "autocomplete" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLTextAreaElementAutocomplete), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLTextAreaElementAutocomplete) } }, |
180 | { "checkValidity" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsHTMLTextAreaElementPrototypeFunctionCheckValidity), (intptr_t) (0) } }, |
181 | { "reportValidity" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsHTMLTextAreaElementPrototypeFunctionReportValidity), (intptr_t) (0) } }, |
182 | { "setCustomValidity" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsHTMLTextAreaElementPrototypeFunctionSetCustomValidity), (intptr_t) (1) } }, |
183 | { "select" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsHTMLTextAreaElementPrototypeFunctionSelect), (intptr_t) (0) } }, |
184 | { "setRangeText" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsHTMLTextAreaElementPrototypeFunctionSetRangeText), (intptr_t) (1) } }, |
185 | { "setSelectionRange" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsHTMLTextAreaElementPrototypeFunctionSetSelectionRange), (intptr_t) (0) } }, |
186 | }; |
187 | |
188 | const ClassInfo JSHTMLTextAreaElementPrototype::s_info = { "HTMLTextAreaElementPrototype" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTMLTextAreaElementPrototype) }; |
189 | |
190 | void JSHTMLTextAreaElementPrototype::finishCreation(VM& vm) |
191 | { |
192 | Base::finishCreation(vm); |
193 | reifyStaticProperties(vm, JSHTMLTextAreaElement::info(), JSHTMLTextAreaElementPrototypeTableValues, *this); |
194 | bool hasDisabledRuntimeProperties = false; |
195 | if (!RuntimeEnabledFeatures::sharedFeatures().interactiveFormValidationEnabled()) { |
196 | hasDisabledRuntimeProperties = true; |
197 | auto propertyName = Identifier::fromString(&vm, reinterpret_cast<const LChar*>("reportValidity" ), strlen("reportValidity" )); |
198 | VM::DeletePropertyModeScope scope(vm, VM::DeletePropertyMode::IgnoreConfigurable); |
199 | JSObject::deleteProperty(this, globalObject()->globalExec(), propertyName); |
200 | } |
201 | if (hasDisabledRuntimeProperties && structure()->isDictionary()) |
202 | flattenDictionaryObject(vm); |
203 | } |
204 | |
205 | const ClassInfo JSHTMLTextAreaElement::s_info = { "HTMLTextAreaElement" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTMLTextAreaElement) }; |
206 | |
207 | JSHTMLTextAreaElement::JSHTMLTextAreaElement(Structure* structure, JSDOMGlobalObject& globalObject, Ref<HTMLTextAreaElement>&& impl) |
208 | : JSHTMLElement(structure, globalObject, WTFMove(impl)) |
209 | { |
210 | } |
211 | |
212 | void JSHTMLTextAreaElement::finishCreation(VM& vm) |
213 | { |
214 | Base::finishCreation(vm); |
215 | ASSERT(inherits(vm, info())); |
216 | |
217 | } |
218 | |
219 | JSObject* JSHTMLTextAreaElement::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) |
220 | { |
221 | return JSHTMLTextAreaElementPrototype::create(vm, &globalObject, JSHTMLTextAreaElementPrototype::createStructure(vm, &globalObject, JSHTMLElement::prototype(vm, globalObject))); |
222 | } |
223 | |
224 | JSObject* JSHTMLTextAreaElement::prototype(VM& vm, JSDOMGlobalObject& globalObject) |
225 | { |
226 | return getDOMPrototype<JSHTMLTextAreaElement>(vm, globalObject); |
227 | } |
228 | |
229 | JSValue JSHTMLTextAreaElement::getConstructor(VM& vm, const JSGlobalObject* globalObject) |
230 | { |
231 | return getDOMConstructor<JSHTMLTextAreaElementConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject)); |
232 | } |
233 | |
234 | template<> inline JSHTMLTextAreaElement* IDLAttribute<JSHTMLTextAreaElement>::cast(ExecState& state, EncodedJSValue thisValue) |
235 | { |
236 | return jsDynamicCast<JSHTMLTextAreaElement*>(state.vm(), JSValue::decode(thisValue)); |
237 | } |
238 | |
239 | template<> inline JSHTMLTextAreaElement* IDLOperation<JSHTMLTextAreaElement>::cast(ExecState& state) |
240 | { |
241 | return jsDynamicCast<JSHTMLTextAreaElement*>(state.vm(), state.thisValue()); |
242 | } |
243 | |
244 | EncodedJSValue jsHTMLTextAreaElementConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName) |
245 | { |
246 | VM& vm = state->vm(); |
247 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
248 | auto* prototype = jsDynamicCast<JSHTMLTextAreaElementPrototype*>(vm, JSValue::decode(thisValue)); |
249 | if (UNLIKELY(!prototype)) |
250 | return throwVMTypeError(state, throwScope); |
251 | return JSValue::encode(JSHTMLTextAreaElement::getConstructor(state->vm(), prototype->globalObject())); |
252 | } |
253 | |
254 | bool setJSHTMLTextAreaElementConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
255 | { |
256 | VM& vm = state->vm(); |
257 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
258 | auto* prototype = jsDynamicCast<JSHTMLTextAreaElementPrototype*>(vm, JSValue::decode(thisValue)); |
259 | if (UNLIKELY(!prototype)) { |
260 | throwVMTypeError(state, throwScope); |
261 | return false; |
262 | } |
263 | // Shadowing a built-in constructor |
264 | return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue)); |
265 | } |
266 | |
267 | static inline JSValue jsHTMLTextAreaElementAutofocusGetter(ExecState& state, JSHTMLTextAreaElement& thisObject, ThrowScope& throwScope) |
268 | { |
269 | UNUSED_PARAM(throwScope); |
270 | UNUSED_PARAM(state); |
271 | auto& impl = thisObject.wrapped(); |
272 | JSValue result = toJS<IDLBoolean>(state, throwScope, impl.hasAttributeWithoutSynchronization(WebCore::HTMLNames::autofocusAttr)); |
273 | return result; |
274 | } |
275 | |
276 | EncodedJSValue jsHTMLTextAreaElementAutofocus(ExecState* state, EncodedJSValue thisValue, PropertyName) |
277 | { |
278 | return IDLAttribute<JSHTMLTextAreaElement>::get<jsHTMLTextAreaElementAutofocusGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "autofocus" ); |
279 | } |
280 | |
281 | static inline bool setJSHTMLTextAreaElementAutofocusSetter(ExecState& state, JSHTMLTextAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
282 | { |
283 | UNUSED_PARAM(throwScope); |
284 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
285 | auto& impl = thisObject.wrapped(); |
286 | auto nativeValue = convert<IDLBoolean>(state, value); |
287 | RETURN_IF_EXCEPTION(throwScope, false); |
288 | AttributeSetter::call(state, throwScope, [&] { |
289 | return impl.setBooleanAttribute(WebCore::HTMLNames::autofocusAttr, WTFMove(nativeValue)); |
290 | }); |
291 | return true; |
292 | } |
293 | |
294 | bool setJSHTMLTextAreaElementAutofocus(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
295 | { |
296 | return IDLAttribute<JSHTMLTextAreaElement>::set<setJSHTMLTextAreaElementAutofocusSetter>(*state, thisValue, encodedValue, "autofocus" ); |
297 | } |
298 | |
299 | static inline JSValue jsHTMLTextAreaElementDirNameGetter(ExecState& state, JSHTMLTextAreaElement& thisObject, ThrowScope& throwScope) |
300 | { |
301 | UNUSED_PARAM(throwScope); |
302 | UNUSED_PARAM(state); |
303 | auto& impl = thisObject.wrapped(); |
304 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::dirnameAttr)); |
305 | return result; |
306 | } |
307 | |
308 | EncodedJSValue jsHTMLTextAreaElementDirName(ExecState* state, EncodedJSValue thisValue, PropertyName) |
309 | { |
310 | return IDLAttribute<JSHTMLTextAreaElement>::get<jsHTMLTextAreaElementDirNameGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "dirName" ); |
311 | } |
312 | |
313 | static inline bool setJSHTMLTextAreaElementDirNameSetter(ExecState& state, JSHTMLTextAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
314 | { |
315 | UNUSED_PARAM(throwScope); |
316 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
317 | auto& impl = thisObject.wrapped(); |
318 | auto nativeValue = convert<IDLDOMString>(state, value); |
319 | RETURN_IF_EXCEPTION(throwScope, false); |
320 | AttributeSetter::call(state, throwScope, [&] { |
321 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::dirnameAttr, WTFMove(nativeValue)); |
322 | }); |
323 | return true; |
324 | } |
325 | |
326 | bool setJSHTMLTextAreaElementDirName(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
327 | { |
328 | return IDLAttribute<JSHTMLTextAreaElement>::set<setJSHTMLTextAreaElementDirNameSetter>(*state, thisValue, encodedValue, "dirName" ); |
329 | } |
330 | |
331 | static inline JSValue jsHTMLTextAreaElementDisabledGetter(ExecState& state, JSHTMLTextAreaElement& thisObject, ThrowScope& throwScope) |
332 | { |
333 | UNUSED_PARAM(throwScope); |
334 | UNUSED_PARAM(state); |
335 | auto& impl = thisObject.wrapped(); |
336 | JSValue result = toJS<IDLBoolean>(state, throwScope, impl.hasAttributeWithoutSynchronization(WebCore::HTMLNames::disabledAttr)); |
337 | return result; |
338 | } |
339 | |
340 | EncodedJSValue jsHTMLTextAreaElementDisabled(ExecState* state, EncodedJSValue thisValue, PropertyName) |
341 | { |
342 | return IDLAttribute<JSHTMLTextAreaElement>::get<jsHTMLTextAreaElementDisabledGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "disabled" ); |
343 | } |
344 | |
345 | static inline bool setJSHTMLTextAreaElementDisabledSetter(ExecState& state, JSHTMLTextAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
346 | { |
347 | UNUSED_PARAM(throwScope); |
348 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
349 | auto& impl = thisObject.wrapped(); |
350 | auto nativeValue = convert<IDLBoolean>(state, value); |
351 | RETURN_IF_EXCEPTION(throwScope, false); |
352 | AttributeSetter::call(state, throwScope, [&] { |
353 | return impl.setBooleanAttribute(WebCore::HTMLNames::disabledAttr, WTFMove(nativeValue)); |
354 | }); |
355 | return true; |
356 | } |
357 | |
358 | bool setJSHTMLTextAreaElementDisabled(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
359 | { |
360 | return IDLAttribute<JSHTMLTextAreaElement>::set<setJSHTMLTextAreaElementDisabledSetter>(*state, thisValue, encodedValue, "disabled" ); |
361 | } |
362 | |
363 | static inline JSValue jsHTMLTextAreaElementFormGetter(ExecState& state, JSHTMLTextAreaElement& thisObject, ThrowScope& throwScope) |
364 | { |
365 | UNUSED_PARAM(throwScope); |
366 | UNUSED_PARAM(state); |
367 | auto& impl = thisObject.wrapped(); |
368 | JSValue result = toJS<IDLInterface<HTMLFormElement>>(state, *thisObject.globalObject(), throwScope, impl.form()); |
369 | return result; |
370 | } |
371 | |
372 | EncodedJSValue jsHTMLTextAreaElementForm(ExecState* state, EncodedJSValue thisValue, PropertyName) |
373 | { |
374 | return IDLAttribute<JSHTMLTextAreaElement>::get<jsHTMLTextAreaElementFormGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "form" ); |
375 | } |
376 | |
377 | static inline JSValue jsHTMLTextAreaElementMinLengthGetter(ExecState& state, JSHTMLTextAreaElement& thisObject, ThrowScope& throwScope) |
378 | { |
379 | UNUSED_PARAM(throwScope); |
380 | UNUSED_PARAM(state); |
381 | auto& impl = thisObject.wrapped(); |
382 | JSValue result = toJS<IDLLong>(state, throwScope, impl.minLength()); |
383 | return result; |
384 | } |
385 | |
386 | EncodedJSValue jsHTMLTextAreaElementMinLength(ExecState* state, EncodedJSValue thisValue, PropertyName) |
387 | { |
388 | return IDLAttribute<JSHTMLTextAreaElement>::get<jsHTMLTextAreaElementMinLengthGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "minLength" ); |
389 | } |
390 | |
391 | static inline bool setJSHTMLTextAreaElementMinLengthSetter(ExecState& state, JSHTMLTextAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
392 | { |
393 | UNUSED_PARAM(throwScope); |
394 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
395 | auto& impl = thisObject.wrapped(); |
396 | auto nativeValue = convert<IDLLong>(state, value); |
397 | RETURN_IF_EXCEPTION(throwScope, false); |
398 | AttributeSetter::call(state, throwScope, [&] { |
399 | return impl.setMinLength(WTFMove(nativeValue)); |
400 | }); |
401 | return true; |
402 | } |
403 | |
404 | bool setJSHTMLTextAreaElementMinLength(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
405 | { |
406 | return IDLAttribute<JSHTMLTextAreaElement>::set<setJSHTMLTextAreaElementMinLengthSetter>(*state, thisValue, encodedValue, "minLength" ); |
407 | } |
408 | |
409 | static inline JSValue jsHTMLTextAreaElementMaxLengthGetter(ExecState& state, JSHTMLTextAreaElement& thisObject, ThrowScope& throwScope) |
410 | { |
411 | UNUSED_PARAM(throwScope); |
412 | UNUSED_PARAM(state); |
413 | auto& impl = thisObject.wrapped(); |
414 | JSValue result = toJS<IDLLong>(state, throwScope, impl.maxLength()); |
415 | return result; |
416 | } |
417 | |
418 | EncodedJSValue jsHTMLTextAreaElementMaxLength(ExecState* state, EncodedJSValue thisValue, PropertyName) |
419 | { |
420 | return IDLAttribute<JSHTMLTextAreaElement>::get<jsHTMLTextAreaElementMaxLengthGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "maxLength" ); |
421 | } |
422 | |
423 | static inline bool setJSHTMLTextAreaElementMaxLengthSetter(ExecState& state, JSHTMLTextAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
424 | { |
425 | UNUSED_PARAM(throwScope); |
426 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
427 | auto& impl = thisObject.wrapped(); |
428 | auto nativeValue = convert<IDLLong>(state, value); |
429 | RETURN_IF_EXCEPTION(throwScope, false); |
430 | AttributeSetter::call(state, throwScope, [&] { |
431 | return impl.setMaxLength(WTFMove(nativeValue)); |
432 | }); |
433 | return true; |
434 | } |
435 | |
436 | bool setJSHTMLTextAreaElementMaxLength(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
437 | { |
438 | return IDLAttribute<JSHTMLTextAreaElement>::set<setJSHTMLTextAreaElementMaxLengthSetter>(*state, thisValue, encodedValue, "maxLength" ); |
439 | } |
440 | |
441 | static inline JSValue jsHTMLTextAreaElementNameGetter(ExecState& state, JSHTMLTextAreaElement& thisObject, ThrowScope& throwScope) |
442 | { |
443 | UNUSED_PARAM(throwScope); |
444 | UNUSED_PARAM(state); |
445 | auto& impl = thisObject.wrapped(); |
446 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.getNameAttribute()); |
447 | return result; |
448 | } |
449 | |
450 | EncodedJSValue jsHTMLTextAreaElementName(ExecState* state, EncodedJSValue thisValue, PropertyName) |
451 | { |
452 | return IDLAttribute<JSHTMLTextAreaElement>::get<jsHTMLTextAreaElementNameGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "name" ); |
453 | } |
454 | |
455 | static inline bool setJSHTMLTextAreaElementNameSetter(ExecState& state, JSHTMLTextAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
456 | { |
457 | UNUSED_PARAM(throwScope); |
458 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
459 | auto& impl = thisObject.wrapped(); |
460 | auto nativeValue = convert<IDLDOMString>(state, value); |
461 | RETURN_IF_EXCEPTION(throwScope, false); |
462 | AttributeSetter::call(state, throwScope, [&] { |
463 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::nameAttr, WTFMove(nativeValue)); |
464 | }); |
465 | return true; |
466 | } |
467 | |
468 | bool setJSHTMLTextAreaElementName(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
469 | { |
470 | return IDLAttribute<JSHTMLTextAreaElement>::set<setJSHTMLTextAreaElementNameSetter>(*state, thisValue, encodedValue, "name" ); |
471 | } |
472 | |
473 | static inline JSValue jsHTMLTextAreaElementPlaceholderGetter(ExecState& state, JSHTMLTextAreaElement& thisObject, ThrowScope& throwScope) |
474 | { |
475 | UNUSED_PARAM(throwScope); |
476 | UNUSED_PARAM(state); |
477 | auto& impl = thisObject.wrapped(); |
478 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::placeholderAttr)); |
479 | return result; |
480 | } |
481 | |
482 | EncodedJSValue jsHTMLTextAreaElementPlaceholder(ExecState* state, EncodedJSValue thisValue, PropertyName) |
483 | { |
484 | return IDLAttribute<JSHTMLTextAreaElement>::get<jsHTMLTextAreaElementPlaceholderGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "placeholder" ); |
485 | } |
486 | |
487 | static inline bool setJSHTMLTextAreaElementPlaceholderSetter(ExecState& state, JSHTMLTextAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
488 | { |
489 | UNUSED_PARAM(throwScope); |
490 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
491 | auto& impl = thisObject.wrapped(); |
492 | auto nativeValue = convert<IDLDOMString>(state, value); |
493 | RETURN_IF_EXCEPTION(throwScope, false); |
494 | AttributeSetter::call(state, throwScope, [&] { |
495 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::placeholderAttr, WTFMove(nativeValue)); |
496 | }); |
497 | return true; |
498 | } |
499 | |
500 | bool setJSHTMLTextAreaElementPlaceholder(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
501 | { |
502 | return IDLAttribute<JSHTMLTextAreaElement>::set<setJSHTMLTextAreaElementPlaceholderSetter>(*state, thisValue, encodedValue, "placeholder" ); |
503 | } |
504 | |
505 | static inline JSValue jsHTMLTextAreaElementReadOnlyGetter(ExecState& state, JSHTMLTextAreaElement& thisObject, ThrowScope& throwScope) |
506 | { |
507 | UNUSED_PARAM(throwScope); |
508 | UNUSED_PARAM(state); |
509 | auto& impl = thisObject.wrapped(); |
510 | JSValue result = toJS<IDLBoolean>(state, throwScope, impl.hasAttributeWithoutSynchronization(WebCore::HTMLNames::readonlyAttr)); |
511 | return result; |
512 | } |
513 | |
514 | EncodedJSValue jsHTMLTextAreaElementReadOnly(ExecState* state, EncodedJSValue thisValue, PropertyName) |
515 | { |
516 | return IDLAttribute<JSHTMLTextAreaElement>::get<jsHTMLTextAreaElementReadOnlyGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "readOnly" ); |
517 | } |
518 | |
519 | static inline bool setJSHTMLTextAreaElementReadOnlySetter(ExecState& state, JSHTMLTextAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
520 | { |
521 | UNUSED_PARAM(throwScope); |
522 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
523 | auto& impl = thisObject.wrapped(); |
524 | auto nativeValue = convert<IDLBoolean>(state, value); |
525 | RETURN_IF_EXCEPTION(throwScope, false); |
526 | AttributeSetter::call(state, throwScope, [&] { |
527 | return impl.setBooleanAttribute(WebCore::HTMLNames::readonlyAttr, WTFMove(nativeValue)); |
528 | }); |
529 | return true; |
530 | } |
531 | |
532 | bool setJSHTMLTextAreaElementReadOnly(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
533 | { |
534 | return IDLAttribute<JSHTMLTextAreaElement>::set<setJSHTMLTextAreaElementReadOnlySetter>(*state, thisValue, encodedValue, "readOnly" ); |
535 | } |
536 | |
537 | static inline JSValue jsHTMLTextAreaElementRequiredGetter(ExecState& state, JSHTMLTextAreaElement& thisObject, ThrowScope& throwScope) |
538 | { |
539 | UNUSED_PARAM(throwScope); |
540 | UNUSED_PARAM(state); |
541 | auto& impl = thisObject.wrapped(); |
542 | JSValue result = toJS<IDLBoolean>(state, throwScope, impl.hasAttributeWithoutSynchronization(WebCore::HTMLNames::requiredAttr)); |
543 | return result; |
544 | } |
545 | |
546 | EncodedJSValue jsHTMLTextAreaElementRequired(ExecState* state, EncodedJSValue thisValue, PropertyName) |
547 | { |
548 | return IDLAttribute<JSHTMLTextAreaElement>::get<jsHTMLTextAreaElementRequiredGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "required" ); |
549 | } |
550 | |
551 | static inline bool setJSHTMLTextAreaElementRequiredSetter(ExecState& state, JSHTMLTextAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
552 | { |
553 | UNUSED_PARAM(throwScope); |
554 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
555 | auto& impl = thisObject.wrapped(); |
556 | auto nativeValue = convert<IDLBoolean>(state, value); |
557 | RETURN_IF_EXCEPTION(throwScope, false); |
558 | AttributeSetter::call(state, throwScope, [&] { |
559 | return impl.setBooleanAttribute(WebCore::HTMLNames::requiredAttr, WTFMove(nativeValue)); |
560 | }); |
561 | return true; |
562 | } |
563 | |
564 | bool setJSHTMLTextAreaElementRequired(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
565 | { |
566 | return IDLAttribute<JSHTMLTextAreaElement>::set<setJSHTMLTextAreaElementRequiredSetter>(*state, thisValue, encodedValue, "required" ); |
567 | } |
568 | |
569 | static inline JSValue jsHTMLTextAreaElementRowsGetter(ExecState& state, JSHTMLTextAreaElement& thisObject, ThrowScope& throwScope) |
570 | { |
571 | UNUSED_PARAM(throwScope); |
572 | UNUSED_PARAM(state); |
573 | auto& impl = thisObject.wrapped(); |
574 | JSValue result = toJS<IDLUnsignedLong>(state, throwScope, impl.rows()); |
575 | return result; |
576 | } |
577 | |
578 | EncodedJSValue jsHTMLTextAreaElementRows(ExecState* state, EncodedJSValue thisValue, PropertyName) |
579 | { |
580 | return IDLAttribute<JSHTMLTextAreaElement>::get<jsHTMLTextAreaElementRowsGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "rows" ); |
581 | } |
582 | |
583 | static inline bool setJSHTMLTextAreaElementRowsSetter(ExecState& state, JSHTMLTextAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
584 | { |
585 | UNUSED_PARAM(throwScope); |
586 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
587 | auto& impl = thisObject.wrapped(); |
588 | auto nativeValue = convert<IDLUnsignedLong>(state, value); |
589 | RETURN_IF_EXCEPTION(throwScope, false); |
590 | AttributeSetter::call(state, throwScope, [&] { |
591 | return impl.setRows(WTFMove(nativeValue)); |
592 | }); |
593 | return true; |
594 | } |
595 | |
596 | bool setJSHTMLTextAreaElementRows(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
597 | { |
598 | return IDLAttribute<JSHTMLTextAreaElement>::set<setJSHTMLTextAreaElementRowsSetter>(*state, thisValue, encodedValue, "rows" ); |
599 | } |
600 | |
601 | static inline JSValue jsHTMLTextAreaElementColsGetter(ExecState& state, JSHTMLTextAreaElement& thisObject, ThrowScope& throwScope) |
602 | { |
603 | UNUSED_PARAM(throwScope); |
604 | UNUSED_PARAM(state); |
605 | auto& impl = thisObject.wrapped(); |
606 | JSValue result = toJS<IDLUnsignedLong>(state, throwScope, impl.cols()); |
607 | return result; |
608 | } |
609 | |
610 | EncodedJSValue jsHTMLTextAreaElementCols(ExecState* state, EncodedJSValue thisValue, PropertyName) |
611 | { |
612 | return IDLAttribute<JSHTMLTextAreaElement>::get<jsHTMLTextAreaElementColsGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "cols" ); |
613 | } |
614 | |
615 | static inline bool setJSHTMLTextAreaElementColsSetter(ExecState& state, JSHTMLTextAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
616 | { |
617 | UNUSED_PARAM(throwScope); |
618 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
619 | auto& impl = thisObject.wrapped(); |
620 | auto nativeValue = convert<IDLUnsignedLong>(state, value); |
621 | RETURN_IF_EXCEPTION(throwScope, false); |
622 | AttributeSetter::call(state, throwScope, [&] { |
623 | return impl.setCols(WTFMove(nativeValue)); |
624 | }); |
625 | return true; |
626 | } |
627 | |
628 | bool setJSHTMLTextAreaElementCols(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
629 | { |
630 | return IDLAttribute<JSHTMLTextAreaElement>::set<setJSHTMLTextAreaElementColsSetter>(*state, thisValue, encodedValue, "cols" ); |
631 | } |
632 | |
633 | static inline JSValue jsHTMLTextAreaElementWrapGetter(ExecState& state, JSHTMLTextAreaElement& thisObject, ThrowScope& throwScope) |
634 | { |
635 | UNUSED_PARAM(throwScope); |
636 | UNUSED_PARAM(state); |
637 | auto& impl = thisObject.wrapped(); |
638 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::wrapAttr)); |
639 | return result; |
640 | } |
641 | |
642 | EncodedJSValue jsHTMLTextAreaElementWrap(ExecState* state, EncodedJSValue thisValue, PropertyName) |
643 | { |
644 | return IDLAttribute<JSHTMLTextAreaElement>::get<jsHTMLTextAreaElementWrapGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "wrap" ); |
645 | } |
646 | |
647 | static inline bool setJSHTMLTextAreaElementWrapSetter(ExecState& state, JSHTMLTextAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
648 | { |
649 | UNUSED_PARAM(throwScope); |
650 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
651 | auto& impl = thisObject.wrapped(); |
652 | auto nativeValue = convert<IDLDOMString>(state, value); |
653 | RETURN_IF_EXCEPTION(throwScope, false); |
654 | AttributeSetter::call(state, throwScope, [&] { |
655 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::wrapAttr, WTFMove(nativeValue)); |
656 | }); |
657 | return true; |
658 | } |
659 | |
660 | bool setJSHTMLTextAreaElementWrap(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
661 | { |
662 | return IDLAttribute<JSHTMLTextAreaElement>::set<setJSHTMLTextAreaElementWrapSetter>(*state, thisValue, encodedValue, "wrap" ); |
663 | } |
664 | |
665 | static inline JSValue jsHTMLTextAreaElementTypeGetter(ExecState& state, JSHTMLTextAreaElement& thisObject, ThrowScope& throwScope) |
666 | { |
667 | UNUSED_PARAM(throwScope); |
668 | UNUSED_PARAM(state); |
669 | auto& impl = thisObject.wrapped(); |
670 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.type()); |
671 | return result; |
672 | } |
673 | |
674 | EncodedJSValue jsHTMLTextAreaElementType(ExecState* state, EncodedJSValue thisValue, PropertyName) |
675 | { |
676 | return IDLAttribute<JSHTMLTextAreaElement>::get<jsHTMLTextAreaElementTypeGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "type" ); |
677 | } |
678 | |
679 | static inline JSValue jsHTMLTextAreaElementDefaultValueGetter(ExecState& state, JSHTMLTextAreaElement& thisObject, ThrowScope& throwScope) |
680 | { |
681 | UNUSED_PARAM(throwScope); |
682 | UNUSED_PARAM(state); |
683 | auto& impl = thisObject.wrapped(); |
684 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.defaultValue()); |
685 | return result; |
686 | } |
687 | |
688 | EncodedJSValue jsHTMLTextAreaElementDefaultValue(ExecState* state, EncodedJSValue thisValue, PropertyName) |
689 | { |
690 | return IDLAttribute<JSHTMLTextAreaElement>::get<jsHTMLTextAreaElementDefaultValueGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "defaultValue" ); |
691 | } |
692 | |
693 | static inline bool setJSHTMLTextAreaElementDefaultValueSetter(ExecState& state, JSHTMLTextAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
694 | { |
695 | UNUSED_PARAM(throwScope); |
696 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
697 | auto& impl = thisObject.wrapped(); |
698 | auto nativeValue = convert<IDLDOMString>(state, value); |
699 | RETURN_IF_EXCEPTION(throwScope, false); |
700 | AttributeSetter::call(state, throwScope, [&] { |
701 | return impl.setDefaultValue(WTFMove(nativeValue)); |
702 | }); |
703 | return true; |
704 | } |
705 | |
706 | bool setJSHTMLTextAreaElementDefaultValue(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
707 | { |
708 | return IDLAttribute<JSHTMLTextAreaElement>::set<setJSHTMLTextAreaElementDefaultValueSetter>(*state, thisValue, encodedValue, "defaultValue" ); |
709 | } |
710 | |
711 | static inline JSValue jsHTMLTextAreaElementValueGetter(ExecState& state, JSHTMLTextAreaElement& thisObject, ThrowScope& throwScope) |
712 | { |
713 | UNUSED_PARAM(throwScope); |
714 | UNUSED_PARAM(state); |
715 | auto& impl = thisObject.wrapped(); |
716 | JSValue result = toJS<IDLTreatNullAsEmptyAdaptor<IDLDOMString>>(state, throwScope, impl.value()); |
717 | return result; |
718 | } |
719 | |
720 | EncodedJSValue jsHTMLTextAreaElementValue(ExecState* state, EncodedJSValue thisValue, PropertyName) |
721 | { |
722 | return IDLAttribute<JSHTMLTextAreaElement>::get<jsHTMLTextAreaElementValueGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "value" ); |
723 | } |
724 | |
725 | static inline bool setJSHTMLTextAreaElementValueSetter(ExecState& state, JSHTMLTextAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
726 | { |
727 | UNUSED_PARAM(throwScope); |
728 | auto& impl = thisObject.wrapped(); |
729 | auto nativeValue = convert<IDLTreatNullAsEmptyAdaptor<IDLDOMString>>(state, value); |
730 | RETURN_IF_EXCEPTION(throwScope, false); |
731 | AttributeSetter::call(state, throwScope, [&] { |
732 | return impl.setValue(WTFMove(nativeValue)); |
733 | }); |
734 | return true; |
735 | } |
736 | |
737 | bool setJSHTMLTextAreaElementValue(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
738 | { |
739 | return IDLAttribute<JSHTMLTextAreaElement>::set<setJSHTMLTextAreaElementValueSetter>(*state, thisValue, encodedValue, "value" ); |
740 | } |
741 | |
742 | static inline JSValue jsHTMLTextAreaElementTextLengthGetter(ExecState& state, JSHTMLTextAreaElement& thisObject, ThrowScope& throwScope) |
743 | { |
744 | UNUSED_PARAM(throwScope); |
745 | UNUSED_PARAM(state); |
746 | auto& impl = thisObject.wrapped(); |
747 | JSValue result = toJS<IDLUnsignedLong>(state, throwScope, impl.textLength()); |
748 | return result; |
749 | } |
750 | |
751 | EncodedJSValue jsHTMLTextAreaElementTextLength(ExecState* state, EncodedJSValue thisValue, PropertyName) |
752 | { |
753 | return IDLAttribute<JSHTMLTextAreaElement>::get<jsHTMLTextAreaElementTextLengthGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "textLength" ); |
754 | } |
755 | |
756 | static inline JSValue jsHTMLTextAreaElementWillValidateGetter(ExecState& state, JSHTMLTextAreaElement& thisObject, ThrowScope& throwScope) |
757 | { |
758 | UNUSED_PARAM(throwScope); |
759 | UNUSED_PARAM(state); |
760 | auto& impl = thisObject.wrapped(); |
761 | JSValue result = toJS<IDLBoolean>(state, throwScope, impl.willValidate()); |
762 | return result; |
763 | } |
764 | |
765 | EncodedJSValue jsHTMLTextAreaElementWillValidate(ExecState* state, EncodedJSValue thisValue, PropertyName) |
766 | { |
767 | return IDLAttribute<JSHTMLTextAreaElement>::get<jsHTMLTextAreaElementWillValidateGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "willValidate" ); |
768 | } |
769 | |
770 | static inline JSValue jsHTMLTextAreaElementValidityGetter(ExecState& state, JSHTMLTextAreaElement& thisObject, ThrowScope& throwScope) |
771 | { |
772 | UNUSED_PARAM(throwScope); |
773 | UNUSED_PARAM(state); |
774 | auto& impl = thisObject.wrapped(); |
775 | JSValue result = toJS<IDLInterface<ValidityState>>(state, *thisObject.globalObject(), throwScope, impl.validity()); |
776 | return result; |
777 | } |
778 | |
779 | EncodedJSValue jsHTMLTextAreaElementValidity(ExecState* state, EncodedJSValue thisValue, PropertyName) |
780 | { |
781 | return IDLAttribute<JSHTMLTextAreaElement>::get<jsHTMLTextAreaElementValidityGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "validity" ); |
782 | } |
783 | |
784 | static inline JSValue jsHTMLTextAreaElementValidationMessageGetter(ExecState& state, JSHTMLTextAreaElement& thisObject, ThrowScope& throwScope) |
785 | { |
786 | UNUSED_PARAM(throwScope); |
787 | UNUSED_PARAM(state); |
788 | auto& impl = thisObject.wrapped(); |
789 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.validationMessage()); |
790 | return result; |
791 | } |
792 | |
793 | EncodedJSValue jsHTMLTextAreaElementValidationMessage(ExecState* state, EncodedJSValue thisValue, PropertyName) |
794 | { |
795 | return IDLAttribute<JSHTMLTextAreaElement>::get<jsHTMLTextAreaElementValidationMessageGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "validationMessage" ); |
796 | } |
797 | |
798 | static inline JSValue jsHTMLTextAreaElementLabelsGetter(ExecState& state, JSHTMLTextAreaElement& thisObject, ThrowScope& throwScope) |
799 | { |
800 | UNUSED_PARAM(throwScope); |
801 | UNUSED_PARAM(state); |
802 | auto& impl = thisObject.wrapped(); |
803 | JSValue result = toJS<IDLInterface<NodeList>>(state, *thisObject.globalObject(), throwScope, impl.labels()); |
804 | return result; |
805 | } |
806 | |
807 | EncodedJSValue jsHTMLTextAreaElementLabels(ExecState* state, EncodedJSValue thisValue, PropertyName) |
808 | { |
809 | return IDLAttribute<JSHTMLTextAreaElement>::get<jsHTMLTextAreaElementLabelsGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "labels" ); |
810 | } |
811 | |
812 | static inline JSValue jsHTMLTextAreaElementSelectionStartGetter(ExecState& state, JSHTMLTextAreaElement& thisObject, ThrowScope& throwScope) |
813 | { |
814 | UNUSED_PARAM(throwScope); |
815 | UNUSED_PARAM(state); |
816 | auto& impl = thisObject.wrapped(); |
817 | JSValue result = toJS<IDLLong>(state, throwScope, impl.selectionStart()); |
818 | return result; |
819 | } |
820 | |
821 | EncodedJSValue jsHTMLTextAreaElementSelectionStart(ExecState* state, EncodedJSValue thisValue, PropertyName) |
822 | { |
823 | return IDLAttribute<JSHTMLTextAreaElement>::get<jsHTMLTextAreaElementSelectionStartGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "selectionStart" ); |
824 | } |
825 | |
826 | static inline bool setJSHTMLTextAreaElementSelectionStartSetter(ExecState& state, JSHTMLTextAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
827 | { |
828 | UNUSED_PARAM(throwScope); |
829 | auto& impl = thisObject.wrapped(); |
830 | auto nativeValue = convert<IDLLong>(state, value); |
831 | RETURN_IF_EXCEPTION(throwScope, false); |
832 | AttributeSetter::call(state, throwScope, [&] { |
833 | return impl.setSelectionStart(WTFMove(nativeValue)); |
834 | }); |
835 | return true; |
836 | } |
837 | |
838 | bool setJSHTMLTextAreaElementSelectionStart(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
839 | { |
840 | return IDLAttribute<JSHTMLTextAreaElement>::set<setJSHTMLTextAreaElementSelectionStartSetter>(*state, thisValue, encodedValue, "selectionStart" ); |
841 | } |
842 | |
843 | static inline JSValue jsHTMLTextAreaElementSelectionEndGetter(ExecState& state, JSHTMLTextAreaElement& thisObject, ThrowScope& throwScope) |
844 | { |
845 | UNUSED_PARAM(throwScope); |
846 | UNUSED_PARAM(state); |
847 | auto& impl = thisObject.wrapped(); |
848 | JSValue result = toJS<IDLLong>(state, throwScope, impl.selectionEnd()); |
849 | return result; |
850 | } |
851 | |
852 | EncodedJSValue jsHTMLTextAreaElementSelectionEnd(ExecState* state, EncodedJSValue thisValue, PropertyName) |
853 | { |
854 | return IDLAttribute<JSHTMLTextAreaElement>::get<jsHTMLTextAreaElementSelectionEndGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "selectionEnd" ); |
855 | } |
856 | |
857 | static inline bool setJSHTMLTextAreaElementSelectionEndSetter(ExecState& state, JSHTMLTextAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
858 | { |
859 | UNUSED_PARAM(throwScope); |
860 | auto& impl = thisObject.wrapped(); |
861 | auto nativeValue = convert<IDLLong>(state, value); |
862 | RETURN_IF_EXCEPTION(throwScope, false); |
863 | AttributeSetter::call(state, throwScope, [&] { |
864 | return impl.setSelectionEnd(WTFMove(nativeValue)); |
865 | }); |
866 | return true; |
867 | } |
868 | |
869 | bool setJSHTMLTextAreaElementSelectionEnd(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
870 | { |
871 | return IDLAttribute<JSHTMLTextAreaElement>::set<setJSHTMLTextAreaElementSelectionEndSetter>(*state, thisValue, encodedValue, "selectionEnd" ); |
872 | } |
873 | |
874 | static inline JSValue jsHTMLTextAreaElementSelectionDirectionGetter(ExecState& state, JSHTMLTextAreaElement& thisObject, ThrowScope& throwScope) |
875 | { |
876 | UNUSED_PARAM(throwScope); |
877 | UNUSED_PARAM(state); |
878 | auto& impl = thisObject.wrapped(); |
879 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.selectionDirection()); |
880 | return result; |
881 | } |
882 | |
883 | EncodedJSValue jsHTMLTextAreaElementSelectionDirection(ExecState* state, EncodedJSValue thisValue, PropertyName) |
884 | { |
885 | return IDLAttribute<JSHTMLTextAreaElement>::get<jsHTMLTextAreaElementSelectionDirectionGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "selectionDirection" ); |
886 | } |
887 | |
888 | static inline bool setJSHTMLTextAreaElementSelectionDirectionSetter(ExecState& state, JSHTMLTextAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
889 | { |
890 | UNUSED_PARAM(throwScope); |
891 | auto& impl = thisObject.wrapped(); |
892 | auto nativeValue = convert<IDLDOMString>(state, value); |
893 | RETURN_IF_EXCEPTION(throwScope, false); |
894 | AttributeSetter::call(state, throwScope, [&] { |
895 | return impl.setSelectionDirection(WTFMove(nativeValue)); |
896 | }); |
897 | return true; |
898 | } |
899 | |
900 | bool setJSHTMLTextAreaElementSelectionDirection(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
901 | { |
902 | return IDLAttribute<JSHTMLTextAreaElement>::set<setJSHTMLTextAreaElementSelectionDirectionSetter>(*state, thisValue, encodedValue, "selectionDirection" ); |
903 | } |
904 | |
905 | static inline JSValue jsHTMLTextAreaElementAutocompleteGetter(ExecState& state, JSHTMLTextAreaElement& thisObject, ThrowScope& throwScope) |
906 | { |
907 | UNUSED_PARAM(throwScope); |
908 | UNUSED_PARAM(state); |
909 | auto& impl = thisObject.wrapped(); |
910 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.autocomplete()); |
911 | return result; |
912 | } |
913 | |
914 | EncodedJSValue jsHTMLTextAreaElementAutocomplete(ExecState* state, EncodedJSValue thisValue, PropertyName) |
915 | { |
916 | return IDLAttribute<JSHTMLTextAreaElement>::get<jsHTMLTextAreaElementAutocompleteGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "autocomplete" ); |
917 | } |
918 | |
919 | static inline bool setJSHTMLTextAreaElementAutocompleteSetter(ExecState& state, JSHTMLTextAreaElement& thisObject, JSValue value, ThrowScope& throwScope) |
920 | { |
921 | UNUSED_PARAM(throwScope); |
922 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
923 | auto& impl = thisObject.wrapped(); |
924 | auto nativeValue = convert<IDLDOMString>(state, value); |
925 | RETURN_IF_EXCEPTION(throwScope, false); |
926 | AttributeSetter::call(state, throwScope, [&] { |
927 | return impl.setAutocomplete(WTFMove(nativeValue)); |
928 | }); |
929 | return true; |
930 | } |
931 | |
932 | bool setJSHTMLTextAreaElementAutocomplete(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
933 | { |
934 | return IDLAttribute<JSHTMLTextAreaElement>::set<setJSHTMLTextAreaElementAutocompleteSetter>(*state, thisValue, encodedValue, "autocomplete" ); |
935 | } |
936 | |
937 | static inline JSC::EncodedJSValue jsHTMLTextAreaElementPrototypeFunctionCheckValidityBody(JSC::ExecState* state, typename IDLOperation<JSHTMLTextAreaElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
938 | { |
939 | UNUSED_PARAM(state); |
940 | UNUSED_PARAM(throwScope); |
941 | auto& impl = castedThis->wrapped(); |
942 | return JSValue::encode(toJS<IDLBoolean>(impl.checkValidity())); |
943 | } |
944 | |
945 | EncodedJSValue JSC_HOST_CALL jsHTMLTextAreaElementPrototypeFunctionCheckValidity(ExecState* state) |
946 | { |
947 | return IDLOperation<JSHTMLTextAreaElement>::call<jsHTMLTextAreaElementPrototypeFunctionCheckValidityBody>(*state, "checkValidity" ); |
948 | } |
949 | |
950 | static inline JSC::EncodedJSValue jsHTMLTextAreaElementPrototypeFunctionReportValidityBody(JSC::ExecState* state, typename IDLOperation<JSHTMLTextAreaElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
951 | { |
952 | UNUSED_PARAM(state); |
953 | UNUSED_PARAM(throwScope); |
954 | auto& impl = castedThis->wrapped(); |
955 | return JSValue::encode(toJS<IDLBoolean>(impl.reportValidity())); |
956 | } |
957 | |
958 | EncodedJSValue JSC_HOST_CALL jsHTMLTextAreaElementPrototypeFunctionReportValidity(ExecState* state) |
959 | { |
960 | return IDLOperation<JSHTMLTextAreaElement>::call<jsHTMLTextAreaElementPrototypeFunctionReportValidityBody>(*state, "reportValidity" ); |
961 | } |
962 | |
963 | static inline JSC::EncodedJSValue jsHTMLTextAreaElementPrototypeFunctionSetCustomValidityBody(JSC::ExecState* state, typename IDLOperation<JSHTMLTextAreaElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
964 | { |
965 | UNUSED_PARAM(state); |
966 | UNUSED_PARAM(throwScope); |
967 | auto& impl = castedThis->wrapped(); |
968 | if (UNLIKELY(state->argumentCount() < 1)) |
969 | return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
970 | auto error = convert<IDLDOMString>(*state, state->uncheckedArgument(0)); |
971 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
972 | impl.setCustomValidity(WTFMove(error)); |
973 | return JSValue::encode(jsUndefined()); |
974 | } |
975 | |
976 | EncodedJSValue JSC_HOST_CALL jsHTMLTextAreaElementPrototypeFunctionSetCustomValidity(ExecState* state) |
977 | { |
978 | return IDLOperation<JSHTMLTextAreaElement>::call<jsHTMLTextAreaElementPrototypeFunctionSetCustomValidityBody>(*state, "setCustomValidity" ); |
979 | } |
980 | |
981 | static inline JSC::EncodedJSValue jsHTMLTextAreaElementPrototypeFunctionSelectBody(JSC::ExecState* state, typename IDLOperation<JSHTMLTextAreaElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
982 | { |
983 | UNUSED_PARAM(state); |
984 | UNUSED_PARAM(throwScope); |
985 | auto& impl = castedThis->wrapped(); |
986 | impl.select(); |
987 | return JSValue::encode(jsUndefined()); |
988 | } |
989 | |
990 | EncodedJSValue JSC_HOST_CALL jsHTMLTextAreaElementPrototypeFunctionSelect(ExecState* state) |
991 | { |
992 | return IDLOperation<JSHTMLTextAreaElement>::call<jsHTMLTextAreaElementPrototypeFunctionSelectBody>(*state, "select" ); |
993 | } |
994 | |
995 | static inline JSC::EncodedJSValue jsHTMLTextAreaElementPrototypeFunctionSetRangeText1Body(JSC::ExecState* state, typename IDLOperation<JSHTMLTextAreaElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
996 | { |
997 | UNUSED_PARAM(state); |
998 | UNUSED_PARAM(throwScope); |
999 | auto& impl = castedThis->wrapped(); |
1000 | auto replacement = convert<IDLDOMString>(*state, state->uncheckedArgument(0)); |
1001 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
1002 | propagateException(*state, throwScope, impl.setRangeText(WTFMove(replacement))); |
1003 | return JSValue::encode(jsUndefined()); |
1004 | } |
1005 | |
1006 | static inline JSC::EncodedJSValue jsHTMLTextAreaElementPrototypeFunctionSetRangeText2Body(JSC::ExecState* state, typename IDLOperation<JSHTMLTextAreaElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
1007 | { |
1008 | UNUSED_PARAM(state); |
1009 | UNUSED_PARAM(throwScope); |
1010 | auto& impl = castedThis->wrapped(); |
1011 | auto replacement = convert<IDLDOMString>(*state, state->uncheckedArgument(0)); |
1012 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
1013 | auto start = convert<IDLUnsignedLong>(*state, state->uncheckedArgument(1)); |
1014 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
1015 | auto end = convert<IDLUnsignedLong>(*state, state->uncheckedArgument(2)); |
1016 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
1017 | auto selectionMode = state->argument(3).isUndefined() ? String() : convert<IDLDOMString>(*state, state->uncheckedArgument(3)); |
1018 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
1019 | propagateException(*state, throwScope, impl.setRangeText(WTFMove(replacement), WTFMove(start), WTFMove(end), WTFMove(selectionMode))); |
1020 | return JSValue::encode(jsUndefined()); |
1021 | } |
1022 | |
1023 | static inline JSC::EncodedJSValue jsHTMLTextAreaElementPrototypeFunctionSetRangeTextOverloadDispatcher(JSC::ExecState* state, typename IDLOperation<JSHTMLTextAreaElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
1024 | { |
1025 | UNUSED_PARAM(state); |
1026 | UNUSED_PARAM(throwScope); |
1027 | VM& vm = state->vm(); |
1028 | UNUSED_PARAM(vm); |
1029 | size_t argsCount = std::min<size_t>(4, state->argumentCount()); |
1030 | if (argsCount == 1) { |
1031 | return jsHTMLTextAreaElementPrototypeFunctionSetRangeText1Body(state, castedThis, throwScope); |
1032 | } |
1033 | if (argsCount == 3) { |
1034 | return jsHTMLTextAreaElementPrototypeFunctionSetRangeText2Body(state, castedThis, throwScope); |
1035 | } |
1036 | if (argsCount == 4) { |
1037 | return jsHTMLTextAreaElementPrototypeFunctionSetRangeText2Body(state, castedThis, throwScope); |
1038 | } |
1039 | return argsCount < 1 ? throwVMError(state, throwScope, createNotEnoughArgumentsError(state)) : throwVMTypeError(state, throwScope); |
1040 | } |
1041 | |
1042 | EncodedJSValue JSC_HOST_CALL jsHTMLTextAreaElementPrototypeFunctionSetRangeText(ExecState* state) |
1043 | { |
1044 | return IDLOperation<JSHTMLTextAreaElement>::call<jsHTMLTextAreaElementPrototypeFunctionSetRangeTextOverloadDispatcher>(*state, "setRangeText" ); |
1045 | } |
1046 | |
1047 | static inline JSC::EncodedJSValue jsHTMLTextAreaElementPrototypeFunctionSetSelectionRangeBody(JSC::ExecState* state, typename IDLOperation<JSHTMLTextAreaElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
1048 | { |
1049 | UNUSED_PARAM(state); |
1050 | UNUSED_PARAM(throwScope); |
1051 | auto& impl = castedThis->wrapped(); |
1052 | auto start = convert<IDLLong>(*state, state->argument(0)); |
1053 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
1054 | auto end = convert<IDLLong>(*state, state->argument(1)); |
1055 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
1056 | auto direction = state->argument(2).isUndefined() ? String() : convert<IDLDOMString>(*state, state->uncheckedArgument(2)); |
1057 | RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
1058 | impl.setSelectionRange(WTFMove(start), WTFMove(end), WTFMove(direction)); |
1059 | return JSValue::encode(jsUndefined()); |
1060 | } |
1061 | |
1062 | EncodedJSValue JSC_HOST_CALL jsHTMLTextAreaElementPrototypeFunctionSetSelectionRange(ExecState* state) |
1063 | { |
1064 | return IDLOperation<JSHTMLTextAreaElement>::call<jsHTMLTextAreaElementPrototypeFunctionSetSelectionRangeBody>(*state, "setSelectionRange" ); |
1065 | } |
1066 | |
1067 | void JSHTMLTextAreaElement::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) |
1068 | { |
1069 | auto* thisObject = jsCast<JSHTMLTextAreaElement*>(cell); |
1070 | builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); |
1071 | if (thisObject->scriptExecutionContext()) |
1072 | builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); |
1073 | Base::heapSnapshot(cell, builder); |
1074 | } |
1075 | |
1076 | |
1077 | } |
1078 | |