• scheib@chromium.org's avatar
    webkitFullscreenElement, webkitCurrentFullScreenElement,... · e31007f1
    scheib@chromium.org authored
    webkitFullscreenElement, webkitCurrentFullScreenElement, webkitPointerLockElement block cross origin access.
    https://bugs.webkit.org/show_bug.cgi?id=91892
    
    Reviewed by Adam Barth.
    
    Source/WebCore:
    
    PointerLockElement only returned when requested from the document that owns it.
    
    Tests: http/tests/fullscreen/fullscreenelement-different-origin.html
           http/tests/fullscreen/fullscreenelement-same-origin.html
           http/tests/pointer-lock/pointerlockelement-different-origin.html
           http/tests/pointer-lock/pointerlockelement-same-origin.html
    
    * dom/Document.cpp:
    (WebCore::Document::webkitPointerLockElement):
    
    LayoutTests:
    
    Tests verifying the behavior of accessing
    webkitFullscreenElement, webkitCurrentFullScreenElement, webkitPointerLockElement
    from different origins.
    
    * http/tests/fullscreen/fullscreenelement-different-origin-expected.txt: Added.
    * http/tests/fullscreen/fullscreenelement-different-origin.html: Added.
    * http/tests/fullscreen/fullscreenelement-same-origin-expected.txt: Added.
    * http/tests/fullscreen/fullscreenelement-same-origin.html: Added.
    * http/tests/pointer-lock/pointerlockelement-different-origin-expected.txt: Added.
    * http/tests/pointer-lock/pointerlockelement-different-origin.html: Added.
    * http/tests/pointer-lock/pointerlockelement-same-origin-expected.txt: Added.
    * http/tests/pointer-lock/pointerlockelement-same-origin.html: Added.
    * http/tests/resources/pointer-lock/iframe-common.js: Added.
    (thisFileName):
    (window.onmessage):
    * http/tests/resources/pointer-lock/inner-iframe.html: Added.
    * http/tests/resources/pointer-lock/pointer-lock-test-harness.js:
    (runOnKeyPress.keypressHandler):
    * pointer-lock/locked-element-iframe-removed-from-dom-expected.txt:
    * pointer-lock/locked-element-iframe-removed-from-dom.html:
    * pointer-lock/locked-element-removed-from-dom-expected.txt:
    * pointer-lock/locked-element-removed-from-dom.html:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123343 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    e31007f1
locked-element-removed-from-dom.html 2.28 KB