Introduce HTMLParserThread to be able to parse on a background thread
https://bugs.webkit.org/show_bug.cgi?id=107071

Reviewed by Tony Gentilcore.

This patch introduces a simple thread class that we can use to parse
HTML. This patch is unlikely to be the final design because we'll
likely want to use libdispatch or some other platform-specific thread
pool. However, this implementation is enough to let us work on the
parser-specific aspects of this feature.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* html/parser/HTMLParserThread.cpp: Added.
(WebCore):
(WebCore::HTMLParserThread::HTMLParserThread):
(WebCore::HTMLParserThread::~HTMLParserThread):
(WebCore::HTMLParserThread::start):
(WebCore::HTMLParserThread::stop):
(WebCore::HTMLParserThread::shared):
(WebCore::HTMLParserThread::postTask):
(WebCore::HTMLParserThread::threadStart):
(WebCore::HTMLParserThread::runLoop):
* html/parser/HTMLParserThread.h: Added.
(WebCore):
(HTMLParserThread):
(WebCore::HTMLParserThread::create):
(WebCore::HTMLParserThread::threadId):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139944 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Introduce a CompactHTMLToken for the threaded HTML parser
https://bugs.webkit.org/show_bug.cgi?id=107069

Reviewed by Adam Barth.

This class is used for transporting tokens from the parser thread to the main thread where they are fed to the tree builder.

No new tests because covered by existing fast/parser tests.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* html/parser/CompactHTMLToken.cpp: Added.
(WebCore):
(WebCore::CompactHTMLToken::CompactHTMLToken):
(WebCore::isStringSafeToSendToAnotherThread):
(WebCore::CompactHTMLToken::isSafeToSendToAnotherThread):
* html/parser/CompactHTMLToken.h: Added.
(WebCore):
(CompactAttribute):
(WebCore::CompactAttribute::CompactAttribute):
(WebCore::CompactAttribute::name):
(WebCore::CompactAttribute::value):
(CompactHTMLToken):
(WebCore::CompactHTMLToken::type):
(WebCore::CompactHTMLToken::data):
(WebCore::CompactHTMLToken::selfClosing):
(WebCore::CompactHTMLToken::attributes):
(WebCore::CompactHTMLToken::publicIdentifier):
(WebCore::CompactHTMLToken::systemIdentifier):
* xml/parser/MarkupTokenBase.h:
(WebCore::MarkupTokenBase::data):
(MarkupTokenBase):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139945 268f45cc-cd09-0410-ab3c-d52691b4dbfc