diff options
Diffstat (limited to 'WebCore/loader/ImageDocument.cpp')
-rw-r--r-- | WebCore/loader/ImageDocument.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/WebCore/loader/ImageDocument.cpp b/WebCore/loader/ImageDocument.cpp index b1e33f4..a1a9f80 100644 --- a/WebCore/loader/ImageDocument.cpp +++ b/WebCore/loader/ImageDocument.cpp @@ -73,17 +73,22 @@ private: class ImageDocumentParser : public RawDataDocumentParser { public: - ImageDocumentParser(ImageDocument* document) - : RawDataDocumentParser(document) + static PassRefPtr<ImageDocumentParser> create(ImageDocument* document) { + return adoptRef(new ImageDocumentParser(document)); } ImageDocument* document() const { - return static_cast<ImageDocument*>(m_document); + return static_cast<ImageDocument*>(RawDataDocumentParser::document()); } - + private: + ImageDocumentParser(ImageDocument* document) + : RawDataDocumentParser(document) + { + } + virtual void appendBytes(DocumentWriter*, const char*, int, bool); virtual void finish(); }; @@ -175,9 +180,9 @@ ImageDocument::ImageDocument(Frame* frame, const KURL& url) setParseMode(Compat); } -DocumentParser* ImageDocument::createParser() +PassRefPtr<DocumentParser> ImageDocument::createParser() { - return new ImageDocumentParser(this); + return ImageDocumentParser::create(this); } void ImageDocument::createDocumentStructure() |