Fix TextDocumentParser to play nice with threading
https://bugs.webkit.org/show_bug.cgi?id=109240
Reviewed by Adam Barth.
Before the HTML5 parser re-write the text document parser
was completely custom. With the HTML5 parser, we just made
the TextDocumentParser use the HTMLDocumentParser with an
artificial script tag.
However, our solution was slightly over-engineered to avoid
lying about the column numbers of the first line of the text document
during parsing. :)
This change makes us use a simpler (and threading-compatible)
solution by just inserting a real "<pre>" tag into the
input stream instead of hacking one together with the treebuilder
and manually setting the Tokenizer state.
fast/parser/empty-text-resource.html covers this case.
* html/parser/TextDocumentParser.cpp:
(WebCore::TextDocumentParser::TextDocumentParser):
(WebCore::TextDocumentParser::insertFakePreElement):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142363
268f45cc-cd09-0410-ab3c-
d52691b4dbfc