JSValue* JSStyleSheet::getValueProperty(ExecState* exec, int token) const { switch (token) { case TypeAttrNum: { StyleSheet* imp = static_cast<StyleSheet*>(impl()); return jsStringOrNull(exec, imp->type()); } case DisabledAttrNum: { StyleSheet* imp = static_cast<StyleSheet*>(impl()); return jsBoolean(imp->disabled()); } case OwnerNodeAttrNum: { StyleSheet* imp = static_cast<StyleSheet*>(impl()); return toJS(exec, WTF::getPtr(imp->ownerNode())); } case ParentStyleSheetAttrNum: { StyleSheet* imp = static_cast<StyleSheet*>(impl()); return toJS(exec, WTF::getPtr(imp->parentStyleSheet())); } case HrefAttrNum: { StyleSheet* imp = static_cast<StyleSheet*>(impl()); return jsStringOrNull(exec, imp->href()); } case TitleAttrNum: { StyleSheet* imp = static_cast<StyleSheet*>(impl()); return jsStringOrNull(exec, imp->title()); } case MediaAttrNum: { StyleSheet* imp = static_cast<StyleSheet*>(impl()); return toJS(exec, WTF::getPtr(imp->media())); } case ConstructorAttrNum: return getConstructor(exec); } return 0; }
JSValue jsStyleSheetTitle(ExecState* exec, const Identifier&, const PropertySlot& slot) { UNUSED_PARAM(exec); StyleSheet* imp = static_cast<StyleSheet*>(static_cast<JSStyleSheet*>(asObject(slot.slotBase()))->impl()); return jsStringOrNull(exec, imp->title()); }
static v8::Handle<v8::Value> titleAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) { INC_STATS("DOM.StyleSheet.title._get"); StyleSheet* imp = V8StyleSheet::toNative(info.Holder()); return v8StringOrNull(imp->title()); }
static v8::Handle<v8::Value> titleAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) { StyleSheet* imp = V8StyleSheet::toNative(info.Holder()); return v8StringOrNull(imp->title(), info.GetIsolate()); }