Skip to content
Commit e31007f1 authored by scheib@chromium.org's avatar scheib@chromium.org
Browse files

webkitFullscreenElement, webkitCurrentFullScreenElement,...

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
parent 1f562649
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment