ProcessingInstruction.h [plain text]
#ifndef ProcessingInstruction_h
#define ProcessingInstruction_h
#include "CachedResourceHandle.h"
#include "CachedStyleSheetClient.h"
#include "Node.h"
namespace WebCore {
class StyleSheet;
class CSSStyleSheet;
class ProcessingInstruction : public Node, private CachedStyleSheetClient {
public:
static PassRefPtr<ProcessingInstruction> create(Document*, const String& target, const String& data);
virtual ~ProcessingInstruction();
const String& target() const { return m_target; }
const String& data() const { return m_data; }
void setData(const String&, ExceptionCode&);
void setCreatedByParser(bool createdByParser) { m_createdByParser = createdByParser; }
virtual void finishParsingChildren();
const String& localHref() const { return m_localHref; }
StyleSheet* sheet() const { return m_sheet.get(); }
void setCSSStyleSheet(PassRefPtr<CSSStyleSheet>);
bool isCSS() const { return m_isCSS; }
#if ENABLE(XSLT)
bool isXSL() const { return m_isXSL; }
#endif
private:
ProcessingInstruction(Document*, const String& target, const String& data);
virtual String nodeName() const;
virtual NodeType nodeType() const;
virtual String nodeValue() const;
virtual void setNodeValue(const String&, ExceptionCode&);
virtual PassRefPtr<Node> cloneNode(bool deep);
virtual bool offsetInCharacters() const;
virtual int maxCharacterOffset() const;
virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
virtual void removedFrom(Node*) OVERRIDE;
void checkStyleSheet();
virtual void setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet*);
#if ENABLE(XSLT)
virtual void setXSLStyleSheet(const String& href, const KURL& baseURL, const String& sheet);
#endif
bool isLoading() const;
virtual bool sheetLoaded();
virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
void parseStyleSheet(const String& sheet);
String m_target;
String m_data;
String m_localHref;
String m_title;
String m_media;
CachedResourceHandle<CachedResource> m_cachedSheet;
RefPtr<StyleSheet> m_sheet;
bool m_loading;
bool m_alternate;
bool m_createdByParser;
bool m_isCSS;
#if ENABLE(XSLT)
bool m_isXSL;
#endif
};
}
#endif