summaryrefslogtreecommitdiffstats
path: root/WebCore/loader/TextDocument.cpp
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-08-27 11:02:25 +0100
committerSteve Block <steveblock@google.com>2010-09-02 17:17:20 +0100
commite8b154fd68f9b33be40a3590e58347f353835f5c (patch)
tree0733ce26384183245aaa5656af26c653636fe6c1 /WebCore/loader/TextDocument.cpp
parentda56157816334089526a7a115a85fd85a6e9a1dc (diff)
downloadexternal_webkit-e8b154fd68f9b33be40a3590e58347f353835f5c.zip
external_webkit-e8b154fd68f9b33be40a3590e58347f353835f5c.tar.gz
external_webkit-e8b154fd68f9b33be40a3590e58347f353835f5c.tar.bz2
Merge WebKit at r66079 : Initial merge by git
Change-Id: Ie2e1440fb9d487d24e52c247342c076fecaecac7
Diffstat (limited to 'WebCore/loader/TextDocument.cpp')
-rw-r--r--WebCore/loader/TextDocument.cpp23
1 files changed, 17 insertions, 6 deletions
diff --git a/WebCore/loader/TextDocument.cpp b/WebCore/loader/TextDocument.cpp
index 6b53084..5e2b774 100644
--- a/WebCore/loader/TextDocument.cpp
+++ b/WebCore/loader/TextDocument.cpp
@@ -42,11 +42,22 @@ using namespace HTMLNames;
// which started the Tokenizer in the PlainText state.
class TextDocumentParser : public DecodedDataDocumentParser {
public:
- TextDocumentParser(Document*);
+ static PassRefPtr<TextDocumentParser> create(Document* document)
+ {
+ return adoptRef(new TextDocumentParser(document));
+ }
+
+ static PassRefPtr<TextDocumentParser> create(HTMLViewSourceDocument* document)
+ {
+ return adoptRef(new TextDocumentParser(document));
+ }
+
virtual ~TextDocumentParser();
+
+private:
+ TextDocumentParser(Document*);
TextDocumentParser(HTMLViewSourceDocument*);
-private:
virtual void insert(const SegmentedString&);
virtual void append(const SegmentedString&);
virtual void finish();
@@ -193,14 +204,14 @@ TextDocument::TextDocument(Frame* frame, const KURL& url)
{
}
-DocumentParser* TextDocument::createParser()
+PassRefPtr<DocumentParser> TextDocument::createParser()
{
- return new TextDocumentParser(this);
+ return TextDocumentParser::create(this);
}
-DocumentParser* createTextDocumentParser(HTMLViewSourceDocument* document)
+PassRefPtr<DocumentParser> createTextDocumentParser(HTMLViewSourceDocument* document)
{
- return new TextDocumentParser(document);
+ return TextDocumentParser::create(document);
}
}