#ifndef CSSStyleDeclaration_h
#define CSSStyleDeclaration_h
#include "CSSPropertyNames.h"
#include "bindings/v8/ScriptWrappable.h"
#include "wtf/Forward.h"
#include "wtf/Noncopyable.h"
namespace WebCore {
class CSSProperty;
class CSSRule;
class CSSStyleSheet;
class CSSValue;
class ExceptionState;
class MutableStylePropertySet;
class CSSStyleDeclaration : public ScriptWrappable {
WTF_MAKE_NONCOPYABLE(CSSStyleDeclaration); WTF_MAKE_FAST_ALLOCATED;
public:
virtual ~CSSStyleDeclaration() { }
virtual void ref() = 0;
virtual void deref() = 0;
virtual CSSRule* parentRule() const = 0;
virtual String cssText() const = 0;
virtual void setCSSText(const String&, ExceptionState&) = 0;
virtual unsigned length() const = 0;
virtual String item(unsigned index) const = 0;
virtual PassRefPtrWillBeRawPtr<CSSValue> getPropertyCSSValue(const String& propertyName) = 0;
virtual String getPropertyValue(const String& propertyName) = 0;
virtual String getPropertyPriority(const String& propertyName) = 0;
virtual String getPropertyShorthand(const String& propertyName) = 0;
virtual bool isPropertyImplicit(const String& propertyName) = 0;
virtual void setProperty(const String& propertyName, const String& value, const String& priority, ExceptionState&) = 0;
virtual String removeProperty(const String& propertyName, ExceptionState&) = 0;
virtual PassRefPtrWillBeRawPtr<CSSValue> getPropertyCSSValueInternal(CSSPropertyID) = 0;
virtual String getPropertyValueInternal(CSSPropertyID) = 0;
virtual void setPropertyInternal(CSSPropertyID, const String& value, bool important, ExceptionState&) = 0;
virtual PassRefPtrWillBeRawPtr<MutableStylePropertySet> copyProperties() const = 0;
virtual bool cssPropertyMatches(CSSPropertyID, const CSSValue*) const = 0;
virtual CSSStyleSheet* parentStyleSheet() const { return 0; }
protected:
CSSStyleDeclaration()
{
ScriptWrappable::init(this);
}
};
}
#endif