Add support for crossorigin attribute in script elements
https://bugs.webkit.org/show_bug.cgi?id=81438
Patch by Pablo Flouret <pablof@motorola.com> on 2012-03-19
Reviewed by Adam Barth.
Source/WebCore:
Works similarly to img and its crossorigin attribute. In the future it
could allow for things like showing full error messages in error
handlers, etc.
Tests: http/tests/security/script-crossorigin-loads-correctly.html
http/tests/security/script-crossorigin-loads-same-origin.html
http/tests/security/script-with-failed-cors-check-fails-to-load.html
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::ScriptElement):
(WebCore::ScriptElement::requestScript):
(WebCore::ScriptElement::notifyFinished):
* dom/ScriptElement.h:
(ScriptElement):
* html/HTMLScriptElement.idl:
LayoutTests:
* http/tests/security/resources/alert-fail.js: Added.
* http/tests/security/resources/cors-script.php: Added.
* http/tests/security/script-crossorigin-loads-correctly-expected.txt: Added.
* http/tests/security/script-crossorigin-loads-correctly.html: Added.
* http/tests/security/script-crossorigin-loads-same-origin-expected.txt: Added.
* http/tests/security/script-crossorigin-loads-same-origin.html: Added.
* http/tests/security/script-with-failed-cors-check-fails-to-load-expected.txt: Added.
* http/tests/security/script-with-failed-cors-check-fails-to-load.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111359
268f45cc-cd09-0410-ab3c-
d52691b4dbfc