diff options
Diffstat (limited to 'WebCore/loader/MediaDocument.cpp')
-rw-r--r-- | WebCore/loader/MediaDocument.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/WebCore/loader/MediaDocument.cpp b/WebCore/loader/MediaDocument.cpp index 97e1775..7e28d02 100644 --- a/WebCore/loader/MediaDocument.cpp +++ b/WebCore/loader/MediaDocument.cpp @@ -47,13 +47,18 @@ using namespace HTMLNames; // FIXME: Share more code with PluginDocumentParser. class MediaDocumentParser : public RawDataDocumentParser { public: + static PassRefPtr<MediaDocumentParser> create(MediaDocument* document) + { + return adoptRef(new MediaDocumentParser(document)); + } + +private: MediaDocumentParser(Document* document) : RawDataDocumentParser(document) , m_mediaElement(0) { } -private: virtual void appendBytes(DocumentWriter*, const char*, int, bool); void createDocumentStructure(); @@ -113,9 +118,9 @@ MediaDocument::~MediaDocument() ASSERT(!m_replaceMediaElementTimer.isActive()); } -DocumentParser* MediaDocument::createParser() +PassRefPtr<DocumentParser> MediaDocument::createParser() { - return new MediaDocumentParser(this); + return MediaDocumentParser::create(this); } void MediaDocument::defaultEventHandler(Event* event) |