Call XSSAuditor.filterToken() from threaded HTML parser
https://bugs.webkit.org/show_bug.cgi?id=107603

Reviewed by Adam Barth.

With this patch we now pass 180 of 182 tests in http/tests/security/xssAuditor.

We do this by creating aan XSSAuditor on the main thread and passing ownership of them to the BackgroundHTMLParser upon its creation.

Then the background thread calls filterToken() and stores the resulting XSSInfo (if any) on the CompactHTMLToken for the main thread to handle.

This involved trimming the XSSAuditor to only depend on the TextEncoding instead of the whole TextResourceDecoder.

No new tests because covered by existing tests.

* html/parser/BackgroundHTMLParser.cpp:
(WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
(WebCore::BackgroundHTMLParser::pumpTokenizer):
(WebCore::BackgroundHTMLParser::createPartial):
* html/parser/BackgroundHTMLParser.h:
(WebCore):
(WebCore::BackgroundHTMLParser::create):
(BackgroundHTMLParser):
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::pumpTokenizer):
(WebCore::HTMLDocumentParser::startBackgroundParser):
* html/parser/HTMLSourceTracker.cpp:
(WebCore::HTMLSourceTracker::start):
(WebCore::HTMLSourceTracker::end):
* html/parser/HTMLSourceTracker.h: Change the HTMLInputStream args to SegmentedString because the background thread only has a BackgroundHTMLInputStream.
(HTMLSourceTracker):
* html/parser/HTMLViewSourceParser.cpp:
(WebCore::HTMLViewSourceParser::pumpTokenizer):
* html/parser/XSSAuditor.cpp:
(WebCore::fullyDecodeString):
(WebCore::XSSAuditor::XSSAuditor):
(WebCore::XSSAuditor::init): Copies necessary to make isSafeToSendToAnotherThread() happy.
(WebCore::XSSAuditor::decodedSnippetForName):
(WebCore::XSSAuditor::decodedSnippetForAttribute):
(WebCore::XSSAuditor::decodedSnippetForJavaScript):
(WebCore::XSSAuditor::isSafeToSendToAnotherThread): Check that all String and KURL members are safe to send to another thread.
(WebCore):
* html/parser/XSSAuditor.h:
(WebCore):
(WebCore::FilterTokenRequest::FilterTokenRequest):
(FilterTokenRequest):
(XSSAuditor):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142099 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add WebGL Conformance Tests programs folder.
https://bugs.webkit.org/show_bug.cgi?id=109120

Reviewed by Kenneth Russell.

* webgl/conformance/programs/get-active-test-expected.txt: Added.
* webgl/conformance/programs/get-active-test.html: Added.
* webgl/conformance/programs/gl-bind-attrib-location-test-expected.txt: Added.
* webgl/conformance/programs/gl-bind-attrib-location-test.html: Added.
* webgl/conformance/programs/gl-get-active-attribute-expected.txt: Added.
* webgl/conformance/programs/gl-get-active-attribute.html: Added.
* webgl/conformance/programs/gl-get-active-uniform-expected.txt: Added.
* webgl/conformance/programs/gl-get-active-uniform.html: Added.
* webgl/conformance/programs/gl-getshadersource-expected.txt: Added.
* webgl/conformance/programs/gl-getshadersource.html: Added.
* webgl/conformance/programs/gl-shader-test-expected.txt: Added.
* webgl/conformance/programs/gl-shader-test.html: Added.
* webgl/conformance/programs/invalid-UTF-16-expected.txt: Added.
* webgl/conformance/programs/invalid-UTF-16.html: Added.
* webgl/conformance/programs/use-program-crash-with-discard-in-fragment-shader-expected.txt: Added.
* webgl/conformance/programs/use-program-crash-with-discard-in-fragment-shader.html: Added.
* webgl/resources/webgl_test_files/conformance/programs/00_test_list.txt: Added.
* webgl/resources/webgl_test_files/conformance/programs/get-active-test.html: Added.
* webgl/resources/webgl_test_files/conformance/programs/gl-bind-attrib-location-test.html: Added.
* webgl/resources/webgl_test_files/conformance/programs/gl-get-active-attribute.html: Added.
* webgl/resources/webgl_test_files/conformance/programs/gl-get-active-uniform.html: Added.
* webgl/resources/webgl_test_files/conformance/programs/gl-getshadersource.html: Added.
* webgl/resources/webgl_test_files/conformance/programs/gl-shader-test.html: Added.
* webgl/resources/webgl_test_files/conformance/programs/invalid-UTF-16.html: Added.
* webgl/resources/webgl_test_files/conformance/programs/use-program-crash-with-discard-in-fragment-shader.html: Added.


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