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