JSValue jsHTMLFrameElementSrc(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSHTMLFrameElement* castedThis = static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(castedThis->impl()); return jsString(exec, imp->getURLAttribute(HTMLNames::srcAttr)); }
JSValue jsHTMLFrameElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSHTMLFrameElement* castedThis = static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(castedThis->impl()); return jsNumber(exec, imp->height()); }
JSValue jsHTMLFrameElementNoResize(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSHTMLFrameElement* castedThis = static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(castedThis->impl()); return jsBoolean(imp->noResize()); }
JSValue jsHTMLFrameElementContentWindow(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSHTMLFrameElement* castedThis = static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(castedThis->impl()); return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->contentWindow())); }
JSValue jsHTMLFrameElementNoResize(ExecState* exec, JSValue slotBase, const Identifier&) { JSHTMLFrameElement* castedThis = static_cast<JSHTMLFrameElement*>(asObject(slotBase)); UNUSED_PARAM(exec); HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(castedThis->impl()); JSValue result = jsBoolean(imp->hasAttribute(WebCore::HTMLNames::noresizeAttr)); return result; }
JSValue jsHTMLFrameElementSrc(ExecState* exec, JSValue slotBase, const Identifier&) { JSHTMLFrameElement* castedThis = static_cast<JSHTMLFrameElement*>(asObject(slotBase)); UNUSED_PARAM(exec); HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(castedThis->impl()); JSValue result = jsString(exec, imp->getURLAttribute(WebCore::HTMLNames::srcAttr)); return result; }
JSValue jsHTMLFrameElementContentWindow(ExecState* exec, JSValue slotBase, const Identifier&) { JSHTMLFrameElement* castedThis = static_cast<JSHTMLFrameElement*>(asObject(slotBase)); UNUSED_PARAM(exec); HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(castedThis->impl()); JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->contentWindow())); return result; }
JSValue jsHTMLFrameElementLocation(ExecState* exec, JSValue slotBase, const Identifier&) { JSHTMLFrameElement* castedThis = static_cast<JSHTMLFrameElement*>(asObject(slotBase)); UNUSED_PARAM(exec); HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(castedThis->impl()); JSValue result = jsString(exec, imp->location()); return result; }
JSValue jsHTMLFrameElementHeight(ExecState* exec, JSValue slotBase, const Identifier&) { JSHTMLFrameElement* castedThis = static_cast<JSHTMLFrameElement*>(asObject(slotBase)); UNUSED_PARAM(exec); HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(castedThis->impl()); JSValue result = jsNumber(imp->height()); return result; }
void V8HTMLFrameElement::locationAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) { HTMLFrameElement* frame = V8HTMLFrameElement::toNative(info.Holder()); String locationValue = toWebCoreStringWithNullCheck(value); if (!V8BindingSecurity::allowSettingFrameSrcToJavascriptUrl(V8BindingState::Only(), frame, locationValue)) return; frame->setLocation(locationValue); }
void V8HTMLFrameElement::locationAttrSetterCustom(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) { HTMLFrameElement* frame = V8HTMLFrameElement::toNative(info.Holder()); String locationValue = toWebCoreStringWithNullCheck(value); if (!BindingSecurity::allowSettingFrameSrcToJavascriptUrl(frame, locationValue)) return; frame->setLocation(locationValue); }
void JSHTMLFrameElement::setLocation(ExecState* exec, JSValue value) { HTMLFrameElement* imp = impl(); String locationValue = valueToStringWithNullCheck(exec, value); if (!allowSettingJavascriptURL(exec, imp, locationValue)) return; imp->setLocation(locationValue); }
void RenderFrame::viewCleared() { HTMLFrameElement* element = static_cast<HTMLFrameElement*>(node()); if (!element || !widget() || !widget()->isFrameView()) return; FrameView* view = static_cast<FrameView*>(widget()); int marginWidth = element->marginWidth(); int marginHeight = element->marginHeight(); if (marginWidth != -1) view->setMarginWidth(marginWidth); if (marginHeight != -1) view->setMarginHeight(marginHeight); }
JSValue JSC_HOST_CALL jsHTMLFrameElementPrototypeFunctionGetSVGDocument(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); if (!thisValue.inherits(&JSHTMLFrameElement::s_info)) return throwError(exec, TypeError); JSHTMLFrameElement* castedThisObj = static_cast<JSHTMLFrameElement*>(asObject(thisValue)); HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(castedThisObj->impl()); ExceptionCode ec = 0; if (!checkNodeSecurity(exec, imp->getSVGDocument(ec))) return jsUndefined(); JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getSVGDocument(ec))); setDOMException(exec, ec); return result; }
EncodedJSValue JSC_HOST_CALL jsHTMLFrameElementPrototypeFunctionGetSVGDocument(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&JSHTMLFrameElement::s_info)) return throwVMTypeError(exec); JSHTMLFrameElement* castedThis = static_cast<JSHTMLFrameElement*>(asObject(thisValue)); ASSERT_GC_OBJECT_INHERITS(castedThis, &JSHTMLFrameElement::s_info); HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(castedThis->impl()); ExceptionCode ec = 0; if (!checkNodeSecurity(exec, imp->getSVGDocument(ec))) return JSValue::encode(jsUndefined()); JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->getSVGDocument(ec))); setDOMException(exec, ec); return JSValue::encode(result); }
PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement, const String& referrer, bool /*allowsScrolling*/, int /*marginWidth*/, int /*marginHeight*/) { RefPtr<Frame> result = createFrame(url, name, ownerElement, referrer); if (!result) return 0; // Propagate the marginwidth/height and scrolling modes to the view. if (ownerElement->hasTagName(frameTag) || ownerElement->hasTagName(iframeTag)) { HTMLFrameElement* frameElt = static_cast<HTMLFrameElement*>(ownerElement); if (frameElt->scrollingMode() == ScrollbarAlwaysOff) result->view()->setScrollbarsMode(ScrollbarAlwaysOff); int marginWidth = frameElt->getMarginWidth(); int marginHeight = frameElt->getMarginHeight(); if (marginWidth != -1) result->view()->setMarginWidth(marginWidth); if (marginHeight != -1) result->view()->setMarginHeight(marginHeight); } return result.release(); }
JSValue jsHTMLFrameElementContentDocument(ExecState* exec, const Identifier&, const PropertySlot& slot) { HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase()))->impl()); return checkNodeSecurity(exec, imp->contentDocument()) ? toJS(exec, WTF::getPtr(imp->contentDocument())) : jsUndefined(); }
void setJSHTMLFrameElementSrc(ExecState* exec, JSObject* thisObject, JSValue value) { JSHTMLFrameElement* castedThis = static_cast<JSHTMLFrameElement*>(thisObject); HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(castedThis->impl()); imp->setAttribute(WebCore::HTMLNames::srcAttr, valueToStringWithNullCheck(exec, value)); }
void setJSHTMLFrameElementNoResize(ExecState* exec, JSObject* thisObject, JSValue value) { JSHTMLFrameElement* castedThis = static_cast<JSHTMLFrameElement*>(thisObject); HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(castedThis->impl()); imp->setBooleanAttribute(WebCore::HTMLNames::noresizeAttr, value.toBoolean(exec)); }
JSValue jsHTMLFrameElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { UNUSED_PARAM(exec); HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase()))->impl()); return jsNumber(exec, imp->width()); }
void setJSHTMLFrameElementName(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(static_cast<JSHTMLFrameElement*>(thisObject)->impl()); imp->setName(valueToStringWithNullCheck(exec, value)); }
void setJSHTMLFrameElementMarginWidth(ExecState* exec, JSObject* thisObject, JSValue value) { JSHTMLFrameElement* castedThisObj = static_cast<JSHTMLFrameElement*>(thisObject); HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(castedThisObj->impl()); imp->setAttribute(HTMLNames::marginwidthAttr, valueToStringWithNullCheck(exec, value)); }
JSValue jsHTMLFrameElementContentDocument(ExecState* exec, JSValue slotBase, const Identifier&) { JSHTMLFrameElement* castedThis = static_cast<JSHTMLFrameElement*>(asObject(slotBase)); HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(castedThis->impl()); return checkNodeSecurity(exec, imp->contentDocument()) ? toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->contentDocument())) : jsUndefined(); }
JSValue* JSHTMLFrameElement::getValueProperty(ExecState* exec, int token) const { switch (token) { case FrameBorderAttrNum: { HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(impl()); return jsString(exec, imp->frameBorder()); } case LongDescAttrNum: { HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(impl()); return jsString(exec, imp->longDesc()); } case MarginHeightAttrNum: { HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(impl()); return jsString(exec, imp->marginHeight()); } case MarginWidthAttrNum: { HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(impl()); return jsString(exec, imp->marginWidth()); } case NameAttrNum: { HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(impl()); return jsString(exec, imp->name()); } case NoResizeAttrNum: { HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(impl()); return jsBoolean(imp->noResize()); } case ScrollingAttrNum: { HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(impl()); return jsString(exec, imp->scrolling()); } case SrcAttrNum: { HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(impl()); return jsString(exec, imp->src()); } case ContentDocumentAttrNum: { HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(impl()); return checkNodeSecurity(exec, imp->contentDocument()) ? toJS(exec, WTF::getPtr(imp->contentDocument())) : jsUndefined(); } case ContentWindowAttrNum: { HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(impl()); return toJS(exec, WTF::getPtr(imp->contentWindow())); } case LocationAttrNum: { HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(impl()); return jsString(exec, imp->location()); } case WidthAttrNum: { HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(impl()); return jsNumber(exec, imp->width()); } case HeightAttrNum: { HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(impl()); return jsNumber(exec, imp->height()); } case ConstructorAttrNum: return getConstructor(exec); } return 0; }
void JSHTMLFrameElement::putValueProperty(ExecState* exec, int token, JSValue* value) { switch (token) { case FrameBorderAttrNum: { HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(impl()); imp->setFrameBorder(valueToStringWithNullCheck(exec, value)); break; } case LongDescAttrNum: { HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(impl()); imp->setLongDesc(valueToStringWithNullCheck(exec, value)); break; } case MarginHeightAttrNum: { HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(impl()); imp->setMarginHeight(valueToStringWithNullCheck(exec, value)); break; } case MarginWidthAttrNum: { HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(impl()); imp->setMarginWidth(valueToStringWithNullCheck(exec, value)); break; } case NameAttrNum: { HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(impl()); imp->setName(valueToStringWithNullCheck(exec, value)); break; } case NoResizeAttrNum: { HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(impl()); imp->setNoResize(value->toBoolean(exec)); break; } case ScrollingAttrNum: { HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(impl()); imp->setScrolling(valueToStringWithNullCheck(exec, value)); break; } case SrcAttrNum: { setSrc(exec, value); break; } case LocationAttrNum: { setLocation(exec, value); break; } } }
FrameEdgeInfo RenderFrame::edgeInfo() const { HTMLFrameElement* element = static_cast<HTMLFrameElement*>(node()); return FrameEdgeInfo(element->noResize(), element->hasFrameBorder()); }
void setJSHTMLFrameElementScrolling(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(static_cast<JSHTMLFrameElement*>(thisObject)->impl()); imp->setAttribute(HTMLNames::scrollingAttr, valueToStringWithNullCheck(exec, value)); }
void setJSHTMLFrameElementNoResize(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(static_cast<JSHTMLFrameElement*>(thisObject)->impl()); imp->setNoResize(value.toBoolean(exec)); }
JSValue jsHTMLFrameElementLocation(ExecState* exec, const Identifier&, const PropertySlot& slot) { UNUSED_PARAM(exec); HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase()))->impl()); return jsString(exec, imp->location()); }