The following frame should log something reasonable to the console when clicked (or throw a SecurityError exception?): <iframe sandbox="allow-scripts" srcdoc="<div></div><script>document.onclick = function () { document.querySelector('div').webkitRequestPointerLock(); }</script>"></iframe>
Created attachment 181104 [details] Patch
Comment on attachment 181104 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=181104&action=review LGTM, with one nit. Thanks Vincent! Now you just need an actual reviewer's approval... :) > Source/WebCore/page/PointerLockController.cpp:58 > + target->document()->addConsoleMessage(HTMLMessageSource, ErrorMessageLevel, "Blocked pointer lock on an element because the element's frame is sandboxed and the 'allow-pointer-lock' permission is not set."); Please change this to JSMessageSource (unless there's some way of triggering pointer lock declaratively from markup?).
Created attachment 181182 [details] Patch
Thanks Mike, fixed.
Comment on attachment 181182 [details] Patch R=me.
Comment on attachment 181182 [details] Patch Clearing flags on attachment: 181182 Committed r138722: <http://trac.webkit.org/changeset/138722>
All reviewed patches have been landed. Closing bug.