2011-06-08 Kenneth Russell <kbr@google.com>
authorkbr@google.com <kbr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Jun 2011 21:27:51 +0000 (21:27 +0000)
committerkbr@google.com <kbr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Jun 2011 21:27:51 +0000 (21:27 +0000)
commiteb26acdabfba536ba7d35f8706c597fb61e02808
treed37435c09daa5baf7beae5aec9b3ab803bda6130
parentc5d87a3fd9f7598abff2854e2795a2bb491c1e70
2011-06-08  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.

        * 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/mac-wk2/Skipped:
2011-06-08  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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@88387 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 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/mac-wk2/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