JSValue jsCSSStyleDeclarationCssText(ExecState* exec, JSValue slotBase, const Identifier&) { JSCSSStyleDeclaration* castedThis = static_cast<JSCSSStyleDeclaration*>(asObject(slotBase)); UNUSED_PARAM(exec); CSSStyleDeclaration* imp = static_cast<CSSStyleDeclaration*>(castedThis->impl()); JSValue result = jsStringOrNull(exec, imp->cssText()); return result; }
JSValue* JSCSSStyleDeclaration::getValueProperty(ExecState* exec, int token) const { switch (token) { case CssTextAttrNum: { CSSStyleDeclaration* imp = static_cast<CSSStyleDeclaration*>(impl()); return jsStringOrNull(exec, imp->cssText()); } case LengthAttrNum: { CSSStyleDeclaration* imp = static_cast<CSSStyleDeclaration*>(impl()); return jsNumber(exec, imp->length()); } case ParentRuleAttrNum: { CSSStyleDeclaration* imp = static_cast<CSSStyleDeclaration*>(impl()); return toJS(exec, WTF::getPtr(imp->parentRule())); } case ConstructorAttrNum: return getConstructor(exec); } return 0; }