#ifndef XSLImportRule_h
#define XSLImportRule_h
#if ENABLE(XSLT)
#include "CachedResourceHandle.h"
#include "CachedStyleSheetClient.h"
#include "XSLStyleSheet.h"
#include <wtf/PassOwnPtr.h>
namespace WebCore {
class CachedXSLStyleSheet;
class XSLImportRule : private CachedStyleSheetClient {
WTF_MAKE_FAST_ALLOCATED;
public:
static PassOwnPtr<XSLImportRule> create(XSLStyleSheet* parentSheet, const String& href)
{
return adoptPtr(new XSLImportRule(parentSheet, href));
}
virtual ~XSLImportRule();
const String& href() const { return m_strHref; }
XSLStyleSheet* styleSheet() const { return m_styleSheet.get(); }
XSLStyleSheet* parentStyleSheet() const { return m_parentStyleSheet; }
void setParentStyleSheet(XSLStyleSheet* styleSheet) { m_parentStyleSheet = styleSheet; }
bool isLoading();
void loadSheet();
private:
XSLImportRule(XSLStyleSheet* parentSheet, const String& href);
virtual void setXSLStyleSheet(const String& href, const KURL& baseURL, const String& sheet);
XSLStyleSheet* m_parentStyleSheet;
String m_strHref;
RefPtr<XSLStyleSheet> m_styleSheet;
CachedResourceHandle<CachedXSLStyleSheet> m_cachedSheet;
bool m_loading;
};
}
#endif // ENABLE(XSLT)
#endif // XSLImportRule_h