2010-09-08 Adam Barth <abarth@webkit.org>
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Sep 2010 08:52:17 +0000 (08:52 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Sep 2010 08:52:17 +0000 (08:52 +0000)
commit482e4a60a98abf8752bd45bf2354bdddc3c61205
tree7668214d4bca6f96dde411618c4d959f77a48977
parent502010fcad20fe66c3ad23cd196d1eeb30c61088
2010-09-08  Adam Barth  <abarth@webkit.org>

        Reviewed by Eric Seidel.

        TextDocument should come in from the cold
        https://bugs.webkit.org/show_bug.cgi?id=45334

        Previously, TextDocument reinvented the wheel to parse text.  This
        patch replaces TextDocument's hand-rolled parser with a parser built on
        the HTML parser infrustructure, which gives us that stuff for free.  I
        also disentangled TextDocument from HTMLViewSourceDocument.

        In a future patch, I'll move TextDocument out of the "loader" directory.

        * Android.mk:
        * CMakeLists.txt:
        * GNUmakefile.am:
        * WebCore.gypi:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * html/HTMLViewSourceDocument.cpp:
        (WebCore::HTMLViewSourceDocument::createParser):
        * html/HTMLViewSourceDocument.h:
        * html/parser/HTMLTreeBuilder.cpp:
        (WebCore::HTMLTreeBuilder::constructTreeFromToken):
        (WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken):
        * html/parser/HTMLTreeBuilder.h:
        * html/parser/HTMLViewSourceParser.cpp:
        (WebCore::HTMLViewSourceParser::forcePlaintext):
        * html/parser/HTMLViewSourceParser.h:
        * html/parser/TextDocumentParser.cpp: Added.
        (WebCore::TextDocumentParser::TextDocumentParser):
        (WebCore::TextDocumentParser::~TextDocumentParser):
        (WebCore::TextDocumentParser::insertFakePreElement):
        * html/parser/TextDocumentParser.h: Added.
        (WebCore::TextDocumentParser::create):
        * loader/TextDocument.cpp:
        * loader/TextDocument.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@66957 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
WebCore/Android.mk
WebCore/CMakeLists.txt
WebCore/ChangeLog
WebCore/GNUmakefile.am
WebCore/WebCore.gypi
WebCore/WebCore.pro
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/html/HTMLViewSourceDocument.cpp
WebCore/html/HTMLViewSourceDocument.h
WebCore/html/parser/HTMLDocumentParser.h
WebCore/html/parser/HTMLTreeBuilder.cpp
WebCore/html/parser/HTMLTreeBuilder.h
WebCore/html/parser/HTMLViewSourceParser.cpp
WebCore/html/parser/HTMLViewSourceParser.h
WebCore/html/parser/TextDocumentParser.cpp [new file with mode: 0644]
WebCore/html/parser/TextDocumentParser.h [new file with mode: 0644]
WebCore/loader/TextDocument.cpp
WebCore/loader/TextDocument.h