2011-06-09 Kenneth Russell <kbr@google.com>
authorkbr@google.com <kbr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Jun 2011 22:02:22 +0000 (22:02 +0000)
committerkbr@google.com <kbr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Jun 2011 22:02:22 +0000 (22:02 +0000)
commitd8b9d4b64ec85d26ae2d4bdedc0449ab52bb8f4d
tree72af890ea3658fb543eaeaf3f3a17c8642c18188
parentd84af66a168fbff06e3128d40e811e616bd577de
2011-06-09  Kenneth Russell  <kbr@google.com>

        Reviewed by Adam Barth.

        Disallow use of cross-domain media (images, video) in WebGL
        https://bugs.webkit.org/show_bug.cgi?id=62257

        Updated WebGL implementation to track recent spec updates in this area.

        Tests: http/tests/security/webgl-remote-read-remote-image-allowed-with-credentials.html
               http/tests/security/webgl-remote-read-remote-image-allowed.html
               http/tests/security/webgl-remote-read-remote-image-blocked-no-crossorigin.html

        * html/canvas/CanvasRenderingContext.cpp:
        (WebCore::CanvasRenderingContext::wouldTaintOrigin):
        (WebCore::CanvasRenderingContext::checkOrigin):
        * html/canvas/CanvasRenderingContext.h:
        (WebCore::CanvasRenderingContext::checkOrigin):
        * html/canvas/WebGLRenderingContext.cpp:
        (WebCore::WebGLRenderingContext::readPixels):
        (WebCore::WebGLRenderingContext::texImage2D):
        (WebCore::WebGLRenderingContext::videoFrameToImage):
        (WebCore::WebGLRenderingContext::texSubImage2D):
        * html/canvas/WebGLRenderingContext.h:
2011-06-09  Kenneth Russell  <kbr@google.com>

        Reviewed by Adam Barth.

        Disallow use of cross-domain media (images, video) in WebGL
        https://bugs.webkit.org/show_bug.cgi?id=62257

        Updated origin-clean-conformance.html to track upstream version in
        Khronos repository. Added new layout tests mirroring those added
        in bug 61015 which verify that new CORS support for images is
        working in the context of WebGL.

        Verified new tests in WebKit and Chromium. Skipped tests on
        platforms where WebGL is disabled.

        * http/tests/canvas/webgl/origin-clean-conformance-expected.txt:
        * http/tests/canvas/webgl/origin-clean-conformance.html:
        * http/tests/security/webgl-remote-read-remote-image-allowed-expected.txt: Added.
        * http/tests/security/webgl-remote-read-remote-image-allowed-with-credentials-expected.txt: Added.
        * http/tests/security/webgl-remote-read-remote-image-allowed-with-credentials.html: Added.
        * http/tests/security/webgl-remote-read-remote-image-allowed.html: Added.
        * http/tests/security/webgl-remote-read-remote-image-blocked-no-crossorigin-expected.txt: Added.
        * http/tests/security/webgl-remote-read-remote-image-blocked-no-crossorigin.html: Added.
        * platform/gtk/Skipped:
        * platform/mac-leopard/Skipped:
        * platform/mac-wk2/Skipped:
        * platform/qt/Skipped:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@88489 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/canvas/webgl/origin-clean-conformance-expected.txt
LayoutTests/http/tests/canvas/webgl/origin-clean-conformance.html
LayoutTests/http/tests/security/webgl-remote-read-remote-image-allowed-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/security/webgl-remote-read-remote-image-allowed-with-credentials-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/security/webgl-remote-read-remote-image-allowed-with-credentials.html [new file with mode: 0644]
LayoutTests/http/tests/security/webgl-remote-read-remote-image-allowed.html [new file with mode: 0644]
LayoutTests/http/tests/security/webgl-remote-read-remote-image-blocked-no-crossorigin-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/security/webgl-remote-read-remote-image-blocked-no-crossorigin.html [new file with mode: 0644]
LayoutTests/platform/gtk/Skipped
LayoutTests/platform/mac-leopard/Skipped
LayoutTests/platform/mac-wk2/Skipped
LayoutTests/platform/qt/Skipped
Source/WebCore/ChangeLog
Source/WebCore/html/canvas/CanvasRenderingContext.cpp
Source/WebCore/html/canvas/CanvasRenderingContext.h
Source/WebCore/html/canvas/WebGLRenderingContext.cpp
Source/WebCore/html/canvas/WebGLRenderingContext.h