JSValue* JSScreen::getValueProperty(ExecState* exec, int token) const { switch (token) { case HeightAttrNum: { Screen* imp = static_cast<Screen*>(impl()); return jsNumber(exec, imp->height()); } case WidthAttrNum: { Screen* imp = static_cast<Screen*>(impl()); return jsNumber(exec, imp->width()); } case ColorDepthAttrNum: { Screen* imp = static_cast<Screen*>(impl()); return jsNumber(exec, imp->colorDepth()); } case PixelDepthAttrNum: { Screen* imp = static_cast<Screen*>(impl()); return jsNumber(exec, imp->pixelDepth()); } case AvailLeftAttrNum: { Screen* imp = static_cast<Screen*>(impl()); return jsNumber(exec, imp->availLeft()); } case AvailTopAttrNum: { Screen* imp = static_cast<Screen*>(impl()); return jsNumber(exec, imp->availTop()); } case AvailHeightAttrNum: { Screen* imp = static_cast<Screen*>(impl()); return jsNumber(exec, imp->availHeight()); } case AvailWidthAttrNum: { Screen* imp = static_cast<Screen*>(impl()); return jsNumber(exec, imp->availWidth()); } } return 0; }
static v8::Handle<v8::Value> availTopAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) { INC_STATS("DOM.Screen.availTop._get"); Screen* imp = V8Screen::toNative(info.Holder()); return v8::Integer::NewFromUnsigned(imp->availTop()); }