#ifndef StyleBase_h
#define StyleBase_h
#include <wtf/RefCounted.h>
namespace WebCore {
class String;
class StyleSheet;
class KURL;
class StyleBase : public RefCounted<StyleBase> {
public:
virtual ~StyleBase() { }
StyleBase* parent() const { return m_parent; }
void setParent(StyleBase* parent) { m_parent = parent; }
KURL baseURL() const;
virtual bool isCSSStyleSheet() const { return false; }
virtual bool isCharsetRule() { return false; }
virtual bool isFontFaceRule() { return false; }
virtual bool isImportRule() { return false; }
virtual bool isKeyframeRule() { return false; }
virtual bool isKeyframesRule() { return false; }
virtual bool isMediaRule() { return false; }
virtual bool isVariablesRule() { return false; }
virtual bool isPageRule() { return false; }
virtual bool isRule() { return false; }
virtual bool isStyleRule() { return false; }
virtual bool isStyleSheet() const { return false; }
virtual bool isXSLStyleSheet() const { return false; }
virtual bool isMutableStyleDeclaration() const { return false; }
virtual String cssText() const;
virtual void checkLoaded();
bool useStrictParsing() const { return !m_parent || m_parent->useStrictParsing(); }
virtual void insertedIntoParent() { }
StyleSheet* stylesheet();
protected:
StyleBase(StyleBase* parent)
: m_parent(parent)
{
}
private:
StyleBase* m_parent;
};
}
#endif