| 1 | /* |
| 2 | This file is part of the WebKit open source project. |
| 3 | This file has been generated by generate-bindings.pl. DO NOT MODIFY! |
| 4 | |
| 5 | This library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU Library General Public |
| 7 | License as published by the Free Software Foundation; either |
| 8 | version 2 of the License, or (at your option) any later version. |
| 9 | |
| 10 | This library is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | Library General Public License for more details. |
| 14 | |
| 15 | You should have received a copy of the GNU Library General Public License |
| 16 | along with this library; see the file COPYING.LIB. If not, write to |
| 17 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 18 | Boston, MA 02110-1301, USA. |
| 19 | */ |
| 20 | |
| 21 | #include "config.h" |
| 22 | #include "JSHTMLIFrameElement.h" |
| 23 | |
| 24 | #include "CustomElementReactionQueue.h" |
| 25 | #include "HTMLNames.h" |
| 26 | #include "JSDOMAttribute.h" |
| 27 | #include "JSDOMBinding.h" |
| 28 | #include "JSDOMBindingSecurity.h" |
| 29 | #include "JSDOMConstructorNotConstructable.h" |
| 30 | #include "JSDOMConvertBoolean.h" |
| 31 | #include "JSDOMConvertInterface.h" |
| 32 | #include "JSDOMConvertStrings.h" |
| 33 | #include "JSDOMExceptionHandling.h" |
| 34 | #include "JSDOMGlobalObject.h" |
| 35 | #include "JSDOMOperation.h" |
| 36 | #include "JSDOMTokenList.h" |
| 37 | #include "JSDOMWrapperCache.h" |
| 38 | #include "JSDocument.h" |
| 39 | #include "JSWindowProxy.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 jsHTMLIFrameElementPrototypeFunctionGetSVGDocument(JSC::ExecState*); |
| 55 | |
| 56 | // Attributes |
| 57 | |
| 58 | JSC::EncodedJSValue jsHTMLIFrameElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 59 | bool setJSHTMLIFrameElementConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 60 | JSC::EncodedJSValue jsHTMLIFrameElementAlign(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 61 | bool setJSHTMLIFrameElementAlign(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 62 | JSC::EncodedJSValue jsHTMLIFrameElementFrameBorder(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 63 | bool setJSHTMLIFrameElementFrameBorder(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 64 | JSC::EncodedJSValue jsHTMLIFrameElementHeight(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 65 | bool setJSHTMLIFrameElementHeight(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 66 | JSC::EncodedJSValue jsHTMLIFrameElementLongDesc(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 67 | bool setJSHTMLIFrameElementLongDesc(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 68 | JSC::EncodedJSValue jsHTMLIFrameElementMarginHeight(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 69 | bool setJSHTMLIFrameElementMarginHeight(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 70 | JSC::EncodedJSValue jsHTMLIFrameElementMarginWidth(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 71 | bool setJSHTMLIFrameElementMarginWidth(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 72 | JSC::EncodedJSValue jsHTMLIFrameElementName(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 73 | bool setJSHTMLIFrameElementName(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 74 | JSC::EncodedJSValue jsHTMLIFrameElementSandbox(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 75 | bool setJSHTMLIFrameElementSandbox(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 76 | JSC::EncodedJSValue jsHTMLIFrameElementAllowFullscreen(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 77 | bool setJSHTMLIFrameElementAllowFullscreen(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 78 | JSC::EncodedJSValue jsHTMLIFrameElementAllow(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 79 | bool setJSHTMLIFrameElementAllow(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 80 | JSC::EncodedJSValue jsHTMLIFrameElementScrolling(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 81 | bool setJSHTMLIFrameElementScrolling(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 82 | JSC::EncodedJSValue jsHTMLIFrameElementSrc(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 83 | bool setJSHTMLIFrameElementSrc(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 84 | JSC::EncodedJSValue jsHTMLIFrameElementSrcdoc(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 85 | bool setJSHTMLIFrameElementSrcdoc(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 86 | JSC::EncodedJSValue jsHTMLIFrameElementWidth(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 87 | bool setJSHTMLIFrameElementWidth(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 88 | JSC::EncodedJSValue jsHTMLIFrameElementContentDocument(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 89 | JSC::EncodedJSValue jsHTMLIFrameElementContentWindow(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 90 | JSC::EncodedJSValue jsHTMLIFrameElementReferrerPolicy(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| 91 | bool setJSHTMLIFrameElementReferrerPolicy(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| 92 | |
| 93 | class JSHTMLIFrameElementPrototype : public JSC::JSNonFinalObject { |
| 94 | public: |
| 95 | using Base = JSC::JSNonFinalObject; |
| 96 | static JSHTMLIFrameElementPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) |
| 97 | { |
| 98 | JSHTMLIFrameElementPrototype* ptr = new (NotNull, JSC::allocateCell<JSHTMLIFrameElementPrototype>(vm.heap)) JSHTMLIFrameElementPrototype(vm, globalObject, structure); |
| 99 | ptr->finishCreation(vm); |
| 100 | return ptr; |
| 101 | } |
| 102 | |
| 103 | DECLARE_INFO; |
| 104 | static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) |
| 105 | { |
| 106 | return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); |
| 107 | } |
| 108 | |
| 109 | private: |
| 110 | JSHTMLIFrameElementPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) |
| 111 | : JSC::JSNonFinalObject(vm, structure) |
| 112 | { |
| 113 | } |
| 114 | |
| 115 | void finishCreation(JSC::VM&); |
| 116 | }; |
| 117 | |
| 118 | using JSHTMLIFrameElementConstructor = JSDOMConstructorNotConstructable<JSHTMLIFrameElement>; |
| 119 | |
| 120 | template<> JSValue JSHTMLIFrameElementConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject) |
| 121 | { |
| 122 | return JSHTMLElement::getConstructor(vm, &globalObject); |
| 123 | } |
| 124 | |
| 125 | template<> void JSHTMLIFrameElementConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) |
| 126 | { |
| 127 | putDirect(vm, vm.propertyNames->prototype, JSHTMLIFrameElement::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
| 128 | putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("HTMLIFrameElement"_s )), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
| 129 | putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
| 130 | } |
| 131 | |
| 132 | template<> const ClassInfo JSHTMLIFrameElementConstructor::s_info = { "HTMLIFrameElement" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTMLIFrameElementConstructor) }; |
| 133 | |
| 134 | /* Hash table for prototype */ |
| 135 | |
| 136 | static const HashTableValue JSHTMLIFrameElementPrototypeTableValues[] = |
| 137 | { |
| 138 | { "constructor" , static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLIFrameElementConstructor) } }, |
| 139 | { "align" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementAlign), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLIFrameElementAlign) } }, |
| 140 | { "frameBorder" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementFrameBorder), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLIFrameElementFrameBorder) } }, |
| 141 | { "height" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementHeight), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLIFrameElementHeight) } }, |
| 142 | { "longDesc" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementLongDesc), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLIFrameElementLongDesc) } }, |
| 143 | { "marginHeight" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementMarginHeight), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLIFrameElementMarginHeight) } }, |
| 144 | { "marginWidth" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementMarginWidth), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLIFrameElementMarginWidth) } }, |
| 145 | { "name" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementName), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLIFrameElementName) } }, |
| 146 | { "sandbox" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementSandbox), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLIFrameElementSandbox) } }, |
| 147 | { "allowFullscreen" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementAllowFullscreen), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLIFrameElementAllowFullscreen) } }, |
| 148 | { "allow" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementAllow), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLIFrameElementAllow) } }, |
| 149 | { "scrolling" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementScrolling), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLIFrameElementScrolling) } }, |
| 150 | { "src" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementSrc), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLIFrameElementSrc) } }, |
| 151 | { "srcdoc" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementSrcdoc), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLIFrameElementSrcdoc) } }, |
| 152 | { "width" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementWidth), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLIFrameElementWidth) } }, |
| 153 | { "contentDocument" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementContentDocument), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 154 | { "contentWindow" , static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementContentWindow), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| 155 | { "referrerPolicy" , static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLIFrameElementReferrerPolicy), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSHTMLIFrameElementReferrerPolicy) } }, |
| 156 | { "getSVGDocument" , static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsHTMLIFrameElementPrototypeFunctionGetSVGDocument), (intptr_t) (0) } }, |
| 157 | }; |
| 158 | |
| 159 | const ClassInfo JSHTMLIFrameElementPrototype::s_info = { "HTMLIFrameElementPrototype" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTMLIFrameElementPrototype) }; |
| 160 | |
| 161 | void JSHTMLIFrameElementPrototype::finishCreation(VM& vm) |
| 162 | { |
| 163 | Base::finishCreation(vm); |
| 164 | reifyStaticProperties(vm, JSHTMLIFrameElement::info(), JSHTMLIFrameElementPrototypeTableValues, *this); |
| 165 | bool hasDisabledRuntimeProperties = false; |
| 166 | if (!RuntimeEnabledFeatures::sharedFeatures().referrerPolicyAttributeEnabled()) { |
| 167 | hasDisabledRuntimeProperties = true; |
| 168 | auto propertyName = Identifier::fromString(&vm, reinterpret_cast<const LChar*>("referrerPolicy" ), strlen("referrerPolicy" )); |
| 169 | VM::DeletePropertyModeScope scope(vm, VM::DeletePropertyMode::IgnoreConfigurable); |
| 170 | JSObject::deleteProperty(this, globalObject()->globalExec(), propertyName); |
| 171 | } |
| 172 | if (hasDisabledRuntimeProperties && structure()->isDictionary()) |
| 173 | flattenDictionaryObject(vm); |
| 174 | } |
| 175 | |
| 176 | const ClassInfo JSHTMLIFrameElement::s_info = { "HTMLIFrameElement" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSHTMLIFrameElement) }; |
| 177 | |
| 178 | JSHTMLIFrameElement::JSHTMLIFrameElement(Structure* structure, JSDOMGlobalObject& globalObject, Ref<HTMLIFrameElement>&& impl) |
| 179 | : JSHTMLElement(structure, globalObject, WTFMove(impl)) |
| 180 | { |
| 181 | } |
| 182 | |
| 183 | void JSHTMLIFrameElement::finishCreation(VM& vm) |
| 184 | { |
| 185 | Base::finishCreation(vm); |
| 186 | ASSERT(inherits(vm, info())); |
| 187 | |
| 188 | } |
| 189 | |
| 190 | JSObject* JSHTMLIFrameElement::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) |
| 191 | { |
| 192 | return JSHTMLIFrameElementPrototype::create(vm, &globalObject, JSHTMLIFrameElementPrototype::createStructure(vm, &globalObject, JSHTMLElement::prototype(vm, globalObject))); |
| 193 | } |
| 194 | |
| 195 | JSObject* JSHTMLIFrameElement::prototype(VM& vm, JSDOMGlobalObject& globalObject) |
| 196 | { |
| 197 | return getDOMPrototype<JSHTMLIFrameElement>(vm, globalObject); |
| 198 | } |
| 199 | |
| 200 | JSValue JSHTMLIFrameElement::getConstructor(VM& vm, const JSGlobalObject* globalObject) |
| 201 | { |
| 202 | return getDOMConstructor<JSHTMLIFrameElementConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject)); |
| 203 | } |
| 204 | |
| 205 | template<> inline JSHTMLIFrameElement* IDLAttribute<JSHTMLIFrameElement>::cast(ExecState& state, EncodedJSValue thisValue) |
| 206 | { |
| 207 | return jsDynamicCast<JSHTMLIFrameElement*>(state.vm(), JSValue::decode(thisValue)); |
| 208 | } |
| 209 | |
| 210 | template<> inline JSHTMLIFrameElement* IDLOperation<JSHTMLIFrameElement>::cast(ExecState& state) |
| 211 | { |
| 212 | return jsDynamicCast<JSHTMLIFrameElement*>(state.vm(), state.thisValue()); |
| 213 | } |
| 214 | |
| 215 | EncodedJSValue jsHTMLIFrameElementConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 216 | { |
| 217 | VM& vm = state->vm(); |
| 218 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
| 219 | auto* prototype = jsDynamicCast<JSHTMLIFrameElementPrototype*>(vm, JSValue::decode(thisValue)); |
| 220 | if (UNLIKELY(!prototype)) |
| 221 | return throwVMTypeError(state, throwScope); |
| 222 | return JSValue::encode(JSHTMLIFrameElement::getConstructor(state->vm(), prototype->globalObject())); |
| 223 | } |
| 224 | |
| 225 | bool setJSHTMLIFrameElementConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 226 | { |
| 227 | VM& vm = state->vm(); |
| 228 | auto throwScope = DECLARE_THROW_SCOPE(vm); |
| 229 | auto* prototype = jsDynamicCast<JSHTMLIFrameElementPrototype*>(vm, JSValue::decode(thisValue)); |
| 230 | if (UNLIKELY(!prototype)) { |
| 231 | throwVMTypeError(state, throwScope); |
| 232 | return false; |
| 233 | } |
| 234 | // Shadowing a built-in constructor |
| 235 | return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue)); |
| 236 | } |
| 237 | |
| 238 | static inline JSValue jsHTMLIFrameElementAlignGetter(ExecState& state, JSHTMLIFrameElement& thisObject, ThrowScope& throwScope) |
| 239 | { |
| 240 | UNUSED_PARAM(throwScope); |
| 241 | UNUSED_PARAM(state); |
| 242 | auto& impl = thisObject.wrapped(); |
| 243 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::alignAttr)); |
| 244 | return result; |
| 245 | } |
| 246 | |
| 247 | EncodedJSValue jsHTMLIFrameElementAlign(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 248 | { |
| 249 | return IDLAttribute<JSHTMLIFrameElement>::get<jsHTMLIFrameElementAlignGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "align" ); |
| 250 | } |
| 251 | |
| 252 | static inline bool setJSHTMLIFrameElementAlignSetter(ExecState& state, JSHTMLIFrameElement& thisObject, JSValue value, ThrowScope& throwScope) |
| 253 | { |
| 254 | UNUSED_PARAM(throwScope); |
| 255 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
| 256 | auto& impl = thisObject.wrapped(); |
| 257 | auto nativeValue = convert<IDLDOMString>(state, value); |
| 258 | RETURN_IF_EXCEPTION(throwScope, false); |
| 259 | AttributeSetter::call(state, throwScope, [&] { |
| 260 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::alignAttr, WTFMove(nativeValue)); |
| 261 | }); |
| 262 | return true; |
| 263 | } |
| 264 | |
| 265 | bool setJSHTMLIFrameElementAlign(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 266 | { |
| 267 | return IDLAttribute<JSHTMLIFrameElement>::set<setJSHTMLIFrameElementAlignSetter>(*state, thisValue, encodedValue, "align" ); |
| 268 | } |
| 269 | |
| 270 | static inline JSValue jsHTMLIFrameElementFrameBorderGetter(ExecState& state, JSHTMLIFrameElement& thisObject, ThrowScope& throwScope) |
| 271 | { |
| 272 | UNUSED_PARAM(throwScope); |
| 273 | UNUSED_PARAM(state); |
| 274 | auto& impl = thisObject.wrapped(); |
| 275 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::frameborderAttr)); |
| 276 | return result; |
| 277 | } |
| 278 | |
| 279 | EncodedJSValue jsHTMLIFrameElementFrameBorder(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 280 | { |
| 281 | return IDLAttribute<JSHTMLIFrameElement>::get<jsHTMLIFrameElementFrameBorderGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "frameBorder" ); |
| 282 | } |
| 283 | |
| 284 | static inline bool setJSHTMLIFrameElementFrameBorderSetter(ExecState& state, JSHTMLIFrameElement& thisObject, JSValue value, ThrowScope& throwScope) |
| 285 | { |
| 286 | UNUSED_PARAM(throwScope); |
| 287 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
| 288 | auto& impl = thisObject.wrapped(); |
| 289 | auto nativeValue = convert<IDLDOMString>(state, value); |
| 290 | RETURN_IF_EXCEPTION(throwScope, false); |
| 291 | AttributeSetter::call(state, throwScope, [&] { |
| 292 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::frameborderAttr, WTFMove(nativeValue)); |
| 293 | }); |
| 294 | return true; |
| 295 | } |
| 296 | |
| 297 | bool setJSHTMLIFrameElementFrameBorder(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 298 | { |
| 299 | return IDLAttribute<JSHTMLIFrameElement>::set<setJSHTMLIFrameElementFrameBorderSetter>(*state, thisValue, encodedValue, "frameBorder" ); |
| 300 | } |
| 301 | |
| 302 | static inline JSValue jsHTMLIFrameElementHeightGetter(ExecState& state, JSHTMLIFrameElement& thisObject, ThrowScope& throwScope) |
| 303 | { |
| 304 | UNUSED_PARAM(throwScope); |
| 305 | UNUSED_PARAM(state); |
| 306 | auto& impl = thisObject.wrapped(); |
| 307 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::heightAttr)); |
| 308 | return result; |
| 309 | } |
| 310 | |
| 311 | EncodedJSValue jsHTMLIFrameElementHeight(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 312 | { |
| 313 | return IDLAttribute<JSHTMLIFrameElement>::get<jsHTMLIFrameElementHeightGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "height" ); |
| 314 | } |
| 315 | |
| 316 | static inline bool setJSHTMLIFrameElementHeightSetter(ExecState& state, JSHTMLIFrameElement& thisObject, JSValue value, ThrowScope& throwScope) |
| 317 | { |
| 318 | UNUSED_PARAM(throwScope); |
| 319 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
| 320 | auto& impl = thisObject.wrapped(); |
| 321 | auto nativeValue = convert<IDLDOMString>(state, value); |
| 322 | RETURN_IF_EXCEPTION(throwScope, false); |
| 323 | AttributeSetter::call(state, throwScope, [&] { |
| 324 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::heightAttr, WTFMove(nativeValue)); |
| 325 | }); |
| 326 | return true; |
| 327 | } |
| 328 | |
| 329 | bool setJSHTMLIFrameElementHeight(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 330 | { |
| 331 | return IDLAttribute<JSHTMLIFrameElement>::set<setJSHTMLIFrameElementHeightSetter>(*state, thisValue, encodedValue, "height" ); |
| 332 | } |
| 333 | |
| 334 | static inline JSValue jsHTMLIFrameElementLongDescGetter(ExecState& state, JSHTMLIFrameElement& thisObject, ThrowScope& throwScope) |
| 335 | { |
| 336 | UNUSED_PARAM(throwScope); |
| 337 | UNUSED_PARAM(state); |
| 338 | auto& impl = thisObject.wrapped(); |
| 339 | JSValue result = toJS<IDLUSVString>(state, throwScope, impl.getURLAttribute(WebCore::HTMLNames::longdescAttr)); |
| 340 | return result; |
| 341 | } |
| 342 | |
| 343 | EncodedJSValue jsHTMLIFrameElementLongDesc(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 344 | { |
| 345 | return IDLAttribute<JSHTMLIFrameElement>::get<jsHTMLIFrameElementLongDescGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "longDesc" ); |
| 346 | } |
| 347 | |
| 348 | static inline bool setJSHTMLIFrameElementLongDescSetter(ExecState& state, JSHTMLIFrameElement& thisObject, JSValue value, ThrowScope& throwScope) |
| 349 | { |
| 350 | UNUSED_PARAM(throwScope); |
| 351 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
| 352 | auto& impl = thisObject.wrapped(); |
| 353 | auto nativeValue = convert<IDLUSVString>(state, value); |
| 354 | RETURN_IF_EXCEPTION(throwScope, false); |
| 355 | AttributeSetter::call(state, throwScope, [&] { |
| 356 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::longdescAttr, WTFMove(nativeValue)); |
| 357 | }); |
| 358 | return true; |
| 359 | } |
| 360 | |
| 361 | bool setJSHTMLIFrameElementLongDesc(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 362 | { |
| 363 | return IDLAttribute<JSHTMLIFrameElement>::set<setJSHTMLIFrameElementLongDescSetter>(*state, thisValue, encodedValue, "longDesc" ); |
| 364 | } |
| 365 | |
| 366 | static inline JSValue jsHTMLIFrameElementMarginHeightGetter(ExecState& state, JSHTMLIFrameElement& thisObject, ThrowScope& throwScope) |
| 367 | { |
| 368 | UNUSED_PARAM(throwScope); |
| 369 | UNUSED_PARAM(state); |
| 370 | auto& impl = thisObject.wrapped(); |
| 371 | JSValue result = toJS<IDLTreatNullAsEmptyAdaptor<IDLDOMString>>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::marginheightAttr)); |
| 372 | return result; |
| 373 | } |
| 374 | |
| 375 | EncodedJSValue jsHTMLIFrameElementMarginHeight(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 376 | { |
| 377 | return IDLAttribute<JSHTMLIFrameElement>::get<jsHTMLIFrameElementMarginHeightGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "marginHeight" ); |
| 378 | } |
| 379 | |
| 380 | static inline bool setJSHTMLIFrameElementMarginHeightSetter(ExecState& state, JSHTMLIFrameElement& thisObject, JSValue value, ThrowScope& throwScope) |
| 381 | { |
| 382 | UNUSED_PARAM(throwScope); |
| 383 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
| 384 | auto& impl = thisObject.wrapped(); |
| 385 | auto nativeValue = convert<IDLTreatNullAsEmptyAdaptor<IDLDOMString>>(state, value); |
| 386 | RETURN_IF_EXCEPTION(throwScope, false); |
| 387 | AttributeSetter::call(state, throwScope, [&] { |
| 388 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::marginheightAttr, WTFMove(nativeValue)); |
| 389 | }); |
| 390 | return true; |
| 391 | } |
| 392 | |
| 393 | bool setJSHTMLIFrameElementMarginHeight(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 394 | { |
| 395 | return IDLAttribute<JSHTMLIFrameElement>::set<setJSHTMLIFrameElementMarginHeightSetter>(*state, thisValue, encodedValue, "marginHeight" ); |
| 396 | } |
| 397 | |
| 398 | static inline JSValue jsHTMLIFrameElementMarginWidthGetter(ExecState& state, JSHTMLIFrameElement& thisObject, ThrowScope& throwScope) |
| 399 | { |
| 400 | UNUSED_PARAM(throwScope); |
| 401 | UNUSED_PARAM(state); |
| 402 | auto& impl = thisObject.wrapped(); |
| 403 | JSValue result = toJS<IDLTreatNullAsEmptyAdaptor<IDLDOMString>>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::marginwidthAttr)); |
| 404 | return result; |
| 405 | } |
| 406 | |
| 407 | EncodedJSValue jsHTMLIFrameElementMarginWidth(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 408 | { |
| 409 | return IDLAttribute<JSHTMLIFrameElement>::get<jsHTMLIFrameElementMarginWidthGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "marginWidth" ); |
| 410 | } |
| 411 | |
| 412 | static inline bool setJSHTMLIFrameElementMarginWidthSetter(ExecState& state, JSHTMLIFrameElement& thisObject, JSValue value, ThrowScope& throwScope) |
| 413 | { |
| 414 | UNUSED_PARAM(throwScope); |
| 415 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
| 416 | auto& impl = thisObject.wrapped(); |
| 417 | auto nativeValue = convert<IDLTreatNullAsEmptyAdaptor<IDLDOMString>>(state, value); |
| 418 | RETURN_IF_EXCEPTION(throwScope, false); |
| 419 | AttributeSetter::call(state, throwScope, [&] { |
| 420 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::marginwidthAttr, WTFMove(nativeValue)); |
| 421 | }); |
| 422 | return true; |
| 423 | } |
| 424 | |
| 425 | bool setJSHTMLIFrameElementMarginWidth(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 426 | { |
| 427 | return IDLAttribute<JSHTMLIFrameElement>::set<setJSHTMLIFrameElementMarginWidthSetter>(*state, thisValue, encodedValue, "marginWidth" ); |
| 428 | } |
| 429 | |
| 430 | static inline JSValue jsHTMLIFrameElementNameGetter(ExecState& state, JSHTMLIFrameElement& thisObject, ThrowScope& throwScope) |
| 431 | { |
| 432 | UNUSED_PARAM(throwScope); |
| 433 | UNUSED_PARAM(state); |
| 434 | auto& impl = thisObject.wrapped(); |
| 435 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.getNameAttribute()); |
| 436 | return result; |
| 437 | } |
| 438 | |
| 439 | EncodedJSValue jsHTMLIFrameElementName(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 440 | { |
| 441 | return IDLAttribute<JSHTMLIFrameElement>::get<jsHTMLIFrameElementNameGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "name" ); |
| 442 | } |
| 443 | |
| 444 | static inline bool setJSHTMLIFrameElementNameSetter(ExecState& state, JSHTMLIFrameElement& thisObject, JSValue value, ThrowScope& throwScope) |
| 445 | { |
| 446 | UNUSED_PARAM(throwScope); |
| 447 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
| 448 | auto& impl = thisObject.wrapped(); |
| 449 | auto nativeValue = convert<IDLDOMString>(state, value); |
| 450 | RETURN_IF_EXCEPTION(throwScope, false); |
| 451 | AttributeSetter::call(state, throwScope, [&] { |
| 452 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::nameAttr, WTFMove(nativeValue)); |
| 453 | }); |
| 454 | return true; |
| 455 | } |
| 456 | |
| 457 | bool setJSHTMLIFrameElementName(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 458 | { |
| 459 | return IDLAttribute<JSHTMLIFrameElement>::set<setJSHTMLIFrameElementNameSetter>(*state, thisValue, encodedValue, "name" ); |
| 460 | } |
| 461 | |
| 462 | static inline JSValue jsHTMLIFrameElementSandboxGetter(ExecState& state, JSHTMLIFrameElement& thisObject, ThrowScope& throwScope) |
| 463 | { |
| 464 | UNUSED_PARAM(throwScope); |
| 465 | UNUSED_PARAM(state); |
| 466 | auto& impl = thisObject.wrapped(); |
| 467 | JSValue result = toJS<IDLInterface<DOMTokenList>>(state, *thisObject.globalObject(), throwScope, impl.sandbox()); |
| 468 | return result; |
| 469 | } |
| 470 | |
| 471 | EncodedJSValue jsHTMLIFrameElementSandbox(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 472 | { |
| 473 | return IDLAttribute<JSHTMLIFrameElement>::get<jsHTMLIFrameElementSandboxGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "sandbox" ); |
| 474 | } |
| 475 | |
| 476 | static inline bool setJSHTMLIFrameElementSandboxSetter(ExecState& state, JSHTMLIFrameElement& thisObject, JSValue value, ThrowScope& throwScope) |
| 477 | { |
| 478 | UNUSED_PARAM(throwScope); |
| 479 | auto id = Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("sandbox" ), strlen("sandbox" )); |
| 480 | auto valueToForwardTo = thisObject.get(&state, id); |
| 481 | RETURN_IF_EXCEPTION(throwScope, false); |
| 482 | if (UNLIKELY(!valueToForwardTo.isObject())) { |
| 483 | throwTypeError(&state, throwScope); |
| 484 | return false; |
| 485 | } |
| 486 | auto forwardId = Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("value" ), strlen("value" )); |
| 487 | PutPropertySlot slot(valueToForwardTo, false); |
| 488 | asObject(valueToForwardTo)->methodTable(state.vm())->put(asObject(valueToForwardTo), &state, forwardId, value, slot); |
| 489 | RETURN_IF_EXCEPTION(throwScope, false); |
| 490 | return true; |
| 491 | } |
| 492 | |
| 493 | bool setJSHTMLIFrameElementSandbox(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 494 | { |
| 495 | return IDLAttribute<JSHTMLIFrameElement>::set<setJSHTMLIFrameElementSandboxSetter>(*state, thisValue, encodedValue, "sandbox" ); |
| 496 | } |
| 497 | |
| 498 | static inline JSValue jsHTMLIFrameElementAllowFullscreenGetter(ExecState& state, JSHTMLIFrameElement& thisObject, ThrowScope& throwScope) |
| 499 | { |
| 500 | UNUSED_PARAM(throwScope); |
| 501 | UNUSED_PARAM(state); |
| 502 | auto& impl = thisObject.wrapped(); |
| 503 | JSValue result = toJS<IDLBoolean>(state, throwScope, impl.hasAttributeWithoutSynchronization(WebCore::HTMLNames::allowfullscreenAttr)); |
| 504 | return result; |
| 505 | } |
| 506 | |
| 507 | EncodedJSValue jsHTMLIFrameElementAllowFullscreen(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 508 | { |
| 509 | return IDLAttribute<JSHTMLIFrameElement>::get<jsHTMLIFrameElementAllowFullscreenGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "allowFullscreen" ); |
| 510 | } |
| 511 | |
| 512 | static inline bool setJSHTMLIFrameElementAllowFullscreenSetter(ExecState& state, JSHTMLIFrameElement& thisObject, JSValue value, ThrowScope& throwScope) |
| 513 | { |
| 514 | UNUSED_PARAM(throwScope); |
| 515 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
| 516 | auto& impl = thisObject.wrapped(); |
| 517 | auto nativeValue = convert<IDLBoolean>(state, value); |
| 518 | RETURN_IF_EXCEPTION(throwScope, false); |
| 519 | AttributeSetter::call(state, throwScope, [&] { |
| 520 | return impl.setBooleanAttribute(WebCore::HTMLNames::allowfullscreenAttr, WTFMove(nativeValue)); |
| 521 | }); |
| 522 | return true; |
| 523 | } |
| 524 | |
| 525 | bool setJSHTMLIFrameElementAllowFullscreen(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 526 | { |
| 527 | return IDLAttribute<JSHTMLIFrameElement>::set<setJSHTMLIFrameElementAllowFullscreenSetter>(*state, thisValue, encodedValue, "allowFullscreen" ); |
| 528 | } |
| 529 | |
| 530 | static inline JSValue jsHTMLIFrameElementAllowGetter(ExecState& state, JSHTMLIFrameElement& thisObject, ThrowScope& throwScope) |
| 531 | { |
| 532 | UNUSED_PARAM(throwScope); |
| 533 | UNUSED_PARAM(state); |
| 534 | auto& impl = thisObject.wrapped(); |
| 535 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::allowAttr)); |
| 536 | return result; |
| 537 | } |
| 538 | |
| 539 | EncodedJSValue jsHTMLIFrameElementAllow(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 540 | { |
| 541 | return IDLAttribute<JSHTMLIFrameElement>::get<jsHTMLIFrameElementAllowGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "allow" ); |
| 542 | } |
| 543 | |
| 544 | static inline bool setJSHTMLIFrameElementAllowSetter(ExecState& state, JSHTMLIFrameElement& thisObject, JSValue value, ThrowScope& throwScope) |
| 545 | { |
| 546 | UNUSED_PARAM(throwScope); |
| 547 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
| 548 | auto& impl = thisObject.wrapped(); |
| 549 | auto nativeValue = convert<IDLDOMString>(state, value); |
| 550 | RETURN_IF_EXCEPTION(throwScope, false); |
| 551 | AttributeSetter::call(state, throwScope, [&] { |
| 552 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::allowAttr, WTFMove(nativeValue)); |
| 553 | }); |
| 554 | return true; |
| 555 | } |
| 556 | |
| 557 | bool setJSHTMLIFrameElementAllow(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 558 | { |
| 559 | return IDLAttribute<JSHTMLIFrameElement>::set<setJSHTMLIFrameElementAllowSetter>(*state, thisValue, encodedValue, "allow" ); |
| 560 | } |
| 561 | |
| 562 | static inline JSValue jsHTMLIFrameElementScrollingGetter(ExecState& state, JSHTMLIFrameElement& thisObject, ThrowScope& throwScope) |
| 563 | { |
| 564 | UNUSED_PARAM(throwScope); |
| 565 | UNUSED_PARAM(state); |
| 566 | auto& impl = thisObject.wrapped(); |
| 567 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::scrollingAttr)); |
| 568 | return result; |
| 569 | } |
| 570 | |
| 571 | EncodedJSValue jsHTMLIFrameElementScrolling(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 572 | { |
| 573 | return IDLAttribute<JSHTMLIFrameElement>::get<jsHTMLIFrameElementScrollingGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "scrolling" ); |
| 574 | } |
| 575 | |
| 576 | static inline bool setJSHTMLIFrameElementScrollingSetter(ExecState& state, JSHTMLIFrameElement& thisObject, JSValue value, ThrowScope& throwScope) |
| 577 | { |
| 578 | UNUSED_PARAM(throwScope); |
| 579 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
| 580 | auto& impl = thisObject.wrapped(); |
| 581 | auto nativeValue = convert<IDLDOMString>(state, value); |
| 582 | RETURN_IF_EXCEPTION(throwScope, false); |
| 583 | AttributeSetter::call(state, throwScope, [&] { |
| 584 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::scrollingAttr, WTFMove(nativeValue)); |
| 585 | }); |
| 586 | return true; |
| 587 | } |
| 588 | |
| 589 | bool setJSHTMLIFrameElementScrolling(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 590 | { |
| 591 | return IDLAttribute<JSHTMLIFrameElement>::set<setJSHTMLIFrameElementScrollingSetter>(*state, thisValue, encodedValue, "scrolling" ); |
| 592 | } |
| 593 | |
| 594 | static inline JSValue jsHTMLIFrameElementSrcGetter(ExecState& state, JSHTMLIFrameElement& thisObject, ThrowScope& throwScope) |
| 595 | { |
| 596 | UNUSED_PARAM(throwScope); |
| 597 | UNUSED_PARAM(state); |
| 598 | auto& impl = thisObject.wrapped(); |
| 599 | JSValue result = toJS<IDLUSVString>(state, throwScope, impl.getURLAttribute(WebCore::HTMLNames::srcAttr)); |
| 600 | return result; |
| 601 | } |
| 602 | |
| 603 | EncodedJSValue jsHTMLIFrameElementSrc(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 604 | { |
| 605 | return IDLAttribute<JSHTMLIFrameElement>::get<jsHTMLIFrameElementSrcGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "src" ); |
| 606 | } |
| 607 | |
| 608 | static inline bool setJSHTMLIFrameElementSrcSetter(ExecState& state, JSHTMLIFrameElement& thisObject, JSValue value, ThrowScope& throwScope) |
| 609 | { |
| 610 | UNUSED_PARAM(throwScope); |
| 611 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
| 612 | auto& impl = thisObject.wrapped(); |
| 613 | auto nativeValue = convert<IDLUSVString>(state, value); |
| 614 | RETURN_IF_EXCEPTION(throwScope, false); |
| 615 | AttributeSetter::call(state, throwScope, [&] { |
| 616 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::srcAttr, WTFMove(nativeValue)); |
| 617 | }); |
| 618 | return true; |
| 619 | } |
| 620 | |
| 621 | bool setJSHTMLIFrameElementSrc(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 622 | { |
| 623 | return IDLAttribute<JSHTMLIFrameElement>::set<setJSHTMLIFrameElementSrcSetter>(*state, thisValue, encodedValue, "src" ); |
| 624 | } |
| 625 | |
| 626 | static inline JSValue jsHTMLIFrameElementSrcdocGetter(ExecState& state, JSHTMLIFrameElement& thisObject, ThrowScope& throwScope) |
| 627 | { |
| 628 | UNUSED_PARAM(throwScope); |
| 629 | UNUSED_PARAM(state); |
| 630 | auto& impl = thisObject.wrapped(); |
| 631 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::srcdocAttr)); |
| 632 | return result; |
| 633 | } |
| 634 | |
| 635 | EncodedJSValue jsHTMLIFrameElementSrcdoc(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 636 | { |
| 637 | return IDLAttribute<JSHTMLIFrameElement>::get<jsHTMLIFrameElementSrcdocGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "srcdoc" ); |
| 638 | } |
| 639 | |
| 640 | static inline bool setJSHTMLIFrameElementSrcdocSetter(ExecState& state, JSHTMLIFrameElement& thisObject, JSValue value, ThrowScope& throwScope) |
| 641 | { |
| 642 | UNUSED_PARAM(throwScope); |
| 643 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
| 644 | auto& impl = thisObject.wrapped(); |
| 645 | auto nativeValue = convert<IDLDOMString>(state, value); |
| 646 | RETURN_IF_EXCEPTION(throwScope, false); |
| 647 | AttributeSetter::call(state, throwScope, [&] { |
| 648 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::srcdocAttr, WTFMove(nativeValue)); |
| 649 | }); |
| 650 | return true; |
| 651 | } |
| 652 | |
| 653 | bool setJSHTMLIFrameElementSrcdoc(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 654 | { |
| 655 | return IDLAttribute<JSHTMLIFrameElement>::set<setJSHTMLIFrameElementSrcdocSetter>(*state, thisValue, encodedValue, "srcdoc" ); |
| 656 | } |
| 657 | |
| 658 | static inline JSValue jsHTMLIFrameElementWidthGetter(ExecState& state, JSHTMLIFrameElement& thisObject, ThrowScope& throwScope) |
| 659 | { |
| 660 | UNUSED_PARAM(throwScope); |
| 661 | UNUSED_PARAM(state); |
| 662 | auto& impl = thisObject.wrapped(); |
| 663 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::widthAttr)); |
| 664 | return result; |
| 665 | } |
| 666 | |
| 667 | EncodedJSValue jsHTMLIFrameElementWidth(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 668 | { |
| 669 | return IDLAttribute<JSHTMLIFrameElement>::get<jsHTMLIFrameElementWidthGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "width" ); |
| 670 | } |
| 671 | |
| 672 | static inline bool setJSHTMLIFrameElementWidthSetter(ExecState& state, JSHTMLIFrameElement& thisObject, JSValue value, ThrowScope& throwScope) |
| 673 | { |
| 674 | UNUSED_PARAM(throwScope); |
| 675 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
| 676 | auto& impl = thisObject.wrapped(); |
| 677 | auto nativeValue = convert<IDLDOMString>(state, value); |
| 678 | RETURN_IF_EXCEPTION(throwScope, false); |
| 679 | AttributeSetter::call(state, throwScope, [&] { |
| 680 | return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::widthAttr, WTFMove(nativeValue)); |
| 681 | }); |
| 682 | return true; |
| 683 | } |
| 684 | |
| 685 | bool setJSHTMLIFrameElementWidth(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 686 | { |
| 687 | return IDLAttribute<JSHTMLIFrameElement>::set<setJSHTMLIFrameElementWidthSetter>(*state, thisValue, encodedValue, "width" ); |
| 688 | } |
| 689 | |
| 690 | static inline JSValue jsHTMLIFrameElementContentDocumentGetter(ExecState& state, JSHTMLIFrameElement& thisObject, ThrowScope& throwScope) |
| 691 | { |
| 692 | UNUSED_PARAM(throwScope); |
| 693 | UNUSED_PARAM(state); |
| 694 | auto& impl = thisObject.wrapped(); |
| 695 | JSValue result = toJS<IDLInterface<Document>>(state, *thisObject.globalObject(), throwScope, BindingSecurity::checkSecurityForNode(state, impl.contentDocument())); |
| 696 | return result; |
| 697 | } |
| 698 | |
| 699 | EncodedJSValue jsHTMLIFrameElementContentDocument(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 700 | { |
| 701 | return IDLAttribute<JSHTMLIFrameElement>::get<jsHTMLIFrameElementContentDocumentGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "contentDocument" ); |
| 702 | } |
| 703 | |
| 704 | static inline JSValue jsHTMLIFrameElementContentWindowGetter(ExecState& state, JSHTMLIFrameElement& thisObject, ThrowScope& throwScope) |
| 705 | { |
| 706 | UNUSED_PARAM(throwScope); |
| 707 | UNUSED_PARAM(state); |
| 708 | auto& impl = thisObject.wrapped(); |
| 709 | JSValue result = toJS<IDLInterface<WindowProxy>>(state, *thisObject.globalObject(), throwScope, impl.contentWindow()); |
| 710 | return result; |
| 711 | } |
| 712 | |
| 713 | EncodedJSValue jsHTMLIFrameElementContentWindow(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 714 | { |
| 715 | return IDLAttribute<JSHTMLIFrameElement>::get<jsHTMLIFrameElementContentWindowGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "contentWindow" ); |
| 716 | } |
| 717 | |
| 718 | static inline JSValue jsHTMLIFrameElementReferrerPolicyGetter(ExecState& state, JSHTMLIFrameElement& thisObject, ThrowScope& throwScope) |
| 719 | { |
| 720 | UNUSED_PARAM(throwScope); |
| 721 | UNUSED_PARAM(state); |
| 722 | auto& impl = thisObject.wrapped(); |
| 723 | JSValue result = toJS<IDLDOMString>(state, throwScope, impl.referrerPolicyForBindings()); |
| 724 | return result; |
| 725 | } |
| 726 | |
| 727 | EncodedJSValue jsHTMLIFrameElementReferrerPolicy(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| 728 | { |
| 729 | return IDLAttribute<JSHTMLIFrameElement>::get<jsHTMLIFrameElementReferrerPolicyGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "referrerPolicy" ); |
| 730 | } |
| 731 | |
| 732 | static inline bool setJSHTMLIFrameElementReferrerPolicySetter(ExecState& state, JSHTMLIFrameElement& thisObject, JSValue value, ThrowScope& throwScope) |
| 733 | { |
| 734 | UNUSED_PARAM(throwScope); |
| 735 | CustomElementReactionDisallowedScope customElementReactionDisallowedScope; |
| 736 | auto& impl = thisObject.wrapped(); |
| 737 | auto nativeValue = convert<IDLDOMString>(state, value); |
| 738 | RETURN_IF_EXCEPTION(throwScope, false); |
| 739 | AttributeSetter::call(state, throwScope, [&] { |
| 740 | return impl.setReferrerPolicyForBindings(WTFMove(nativeValue)); |
| 741 | }); |
| 742 | return true; |
| 743 | } |
| 744 | |
| 745 | bool setJSHTMLIFrameElementReferrerPolicy(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| 746 | { |
| 747 | return IDLAttribute<JSHTMLIFrameElement>::set<setJSHTMLIFrameElementReferrerPolicySetter>(*state, thisValue, encodedValue, "referrerPolicy" ); |
| 748 | } |
| 749 | |
| 750 | static inline JSC::EncodedJSValue jsHTMLIFrameElementPrototypeFunctionGetSVGDocumentBody(JSC::ExecState* state, typename IDLOperation<JSHTMLIFrameElement>::ClassParameter castedThis, JSC::ThrowScope& throwScope) |
| 751 | { |
| 752 | UNUSED_PARAM(state); |
| 753 | UNUSED_PARAM(throwScope); |
| 754 | auto& impl = castedThis->wrapped(); |
| 755 | return JSValue::encode(toJS<IDLInterface<Document>>(*state, *castedThis->globalObject(), throwScope, BindingSecurity::checkSecurityForNode(*state, impl.getSVGDocument()))); |
| 756 | } |
| 757 | |
| 758 | EncodedJSValue JSC_HOST_CALL jsHTMLIFrameElementPrototypeFunctionGetSVGDocument(ExecState* state) |
| 759 | { |
| 760 | return IDLOperation<JSHTMLIFrameElement>::call<jsHTMLIFrameElementPrototypeFunctionGetSVGDocumentBody>(*state, "getSVGDocument" ); |
| 761 | } |
| 762 | |
| 763 | void JSHTMLIFrameElement::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) |
| 764 | { |
| 765 | auto* thisObject = jsCast<JSHTMLIFrameElement*>(cell); |
| 766 | builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); |
| 767 | if (thisObject->scriptExecutionContext()) |
| 768 | builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); |
| 769 | Base::heapSnapshot(cell, builder); |
| 770 | } |
| 771 | |
| 772 | |
| 773 | } |
| 774 | |