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

webkitRequestPointerLock and webkitExitPointerLock limited to the same...

webkitRequestPointerLock and webkitExitPointerLock limited to the same document of an active Pointer lock.
https://bugs.webkit.org/show_bug.cgi?id=91284

Reviewed by Adrienne Walker.

Previously, cross-talk between documents was possible, e.g. allowing one
document.webkitExitPointerLock to exit the lock from another document.
This change brings Pointer Lock closer to the Fullscreen API behavior,
and stops the pointer lock target from being transferable between
documents.

Source/WebCore:

Test: http/tests/pointer-lock/requestPointerLock-can-not-transfer-between-documents.html

* dom/Document.cpp:
(WebCore::Document::webkitExitPointerLock):
* page/PointerLockController.cpp:
(WebCore::PointerLockController::requestPointerLock):

LayoutTests:

* http/tests/pointer-lock/requestPointerLock-can-not-transfer-between-documents-expected.txt: Added.
* http/tests/pointer-lock/requestPointerLock-can-not-transfer-between-documents.html: Added.
* http/tests/resources/pointer-lock/iframe-common.js:
(document.onwebkitpointerlockchange):
(document.onwebkitpointerlockerror):
* pointer-lock/pointerlockchange-pointerlockerror-events-expected.txt:
* pointer-lock/pointerlockchange-pointerlockerror-events.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124301 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 18d30506
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