static void sizeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) { INC_STATS("DOM.HTMLBaseFontElement.size._set"); HTMLBaseFontElement* imp = V8HTMLBaseFontElement::toNative(info.Holder()); int v = toInt32(value); imp->setSize(v); return; }
void JSHTMLBaseFontElement::putValueProperty(ExecState* exec, int token, JSValue* value) { switch (token) { case ColorAttrNum: { HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(impl()); imp->setColor(valueToStringWithNullCheck(exec, value)); break; } case FaceAttrNum: { HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(impl()); imp->setFace(valueToStringWithNullCheck(exec, value)); break; } case SizeAttrNum: { HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(impl()); imp->setSize(value->toInt32(exec)); break; } } }
JSValue* JSHTMLBaseFontElement::getValueProperty(ExecState* exec, int token) const { switch (token) { case ColorAttrNum: { HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(impl()); return jsString(exec, imp->color()); } case FaceAttrNum: { HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(impl()); return jsString(exec, imp->face()); } case SizeAttrNum: { HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(impl()); return jsNumber(exec, imp->size()); } case ConstructorAttrNum: return getConstructor(exec); } return 0; }
static v8::Handle<v8::Value> sizeAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) { INC_STATS("DOM.HTMLBaseFontElement.size._get"); HTMLBaseFontElement* imp = V8HTMLBaseFontElement::toNative(info.Holder()); return v8::Integer::New(imp->size()); }
void setJSHTMLBaseFontElementSize(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(static_cast<JSHTMLBaseFontElement*>(thisObject)->impl()); imp->setSize(value.toInt32(exec)); }
void setJSHTMLBaseFontElementFace(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(static_cast<JSHTMLBaseFontElement*>(thisObject)->impl()); imp->setAttribute(HTMLNames::faceAttr, valueToStringWithNullCheck(exec, value)); }