CSSStyleDeclaration.h [plain text]
#ifndef CSSStyleDeclaration_h
#define CSSStyleDeclaration_h
#include "CSSPropertyNames.h"
#include "ScriptWrappable.h"
#include <wtf/Forward.h>
namespace WebCore {
class CSSProperty;
class CSSRule;
class CSSStyleSheet;
class CSSValue;
class MutableStyleProperties;
class StyleProperties;
class StyledElement;
typedef int ExceptionCode;
class CSSStyleDeclaration : public ScriptWrappable {
WTF_MAKE_NONCOPYABLE(CSSStyleDeclaration); WTF_MAKE_FAST_ALLOCATED;
public:
virtual ~CSSStyleDeclaration() { }
virtual void ref() = 0;
virtual void deref() = 0;
virtual StyledElement* parentElement() const { return nullptr; }
virtual CSSRule* parentRule() const = 0;
virtual String cssText() const = 0;
virtual void setCssText(const String&, ExceptionCode&) = 0;
virtual unsigned length() const = 0;
virtual String item(unsigned index) const = 0;
virtual PassRefPtr<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, ExceptionCode&) = 0;
virtual String removeProperty(const String& propertyName, ExceptionCode&) = 0;
virtual PassRefPtr<CSSValue> getPropertyCSSValueInternal(CSSPropertyID) = 0;
virtual String getPropertyValueInternal(CSSPropertyID) = 0;
virtual bool setPropertyInternal(CSSPropertyID, const String& value, bool important, ExceptionCode&) = 0;
virtual Ref<MutableStyleProperties> copyProperties() const = 0;
virtual CSSStyleSheet* parentStyleSheet() const { return 0; }
protected:
CSSStyleDeclaration() { }
};
}
#endif // CSSStyleDeclaration_h