Factor HTMLTokenScanner out of HTMLPreloadScanner
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Feb 2013 00:56:47 +0000 (00:56 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Feb 2013 00:56:47 +0000 (00:56 +0000)
commitcc2b677960782eaa174beee53da220d65188cffe
tree8c897a07f1c45bd5de67781173236d90021f45bf
parent706ba9a1a902e60b45ec5e702a0b00e7e1fd69d8
Factor HTMLTokenScanner out of HTMLPreloadScanner
https://bugs.webkit.org/show_bug.cgi?id=109754

Reviewed by Eric Seidel.

This patch is just a mechanical separation of the per-token "scanning"
logic from HTMLPreloadScanner into a separate class.
HTMLPreloadScanner's job is now to keep track of the input stream and
to pump the tokenizer.

This factorization class will let us use HTMLTokenScanner on the
background thread (once we finish making it thread-safe). In a follow
up patch, I'll move HTMLTokenScanner to its own file.

* html/parser/HTMLPreloadScanner.cpp:
(WebCore::HTMLTokenScanner::HTMLTokenScanner):
(WebCore::HTMLTokenScanner::~HTMLTokenScanner):
(WebCore::HTMLTokenScanner::processPossibleTemplateTag):
(WebCore::HTMLTokenScanner::processPossibleStyleTag):
(WebCore::HTMLTokenScanner::processPossibleBaseTag):
(WebCore::HTMLTokenScanner::scan):
(WebCore::HTMLPreloadScanner::HTMLPreloadScanner):
(WebCore):
(WebCore::HTMLPreloadScanner::~HTMLPreloadScanner):
(WebCore::HTMLPreloadScanner::appendToEnd):
(WebCore::HTMLPreloadScanner::scan):
* html/parser/HTMLPreloadScanner.h:
(HTMLTokenScanner):
(WebCore::HTMLTokenScanner::setPredictedBaseElementURL):
(HTMLPreloadScanner):
(WebCore):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142822 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/parser/HTMLPreloadScanner.cpp
Source/WebCore/html/parser/HTMLPreloadScanner.h