RESOLVED FIXED Bug 105794
Sandbox-blocked pointer lock should log to the console.
https://bugs.webkit.org/show_bug.cgi?id=105794
Summary Sandbox-blocked pointer lock should log to the console.
Mike West
Reported 2012-12-27 04:20:17 PST
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>
Attachments
Patch (4.42 KB, patch)
2013-01-02 16:19 PST, Vincent Scheib
no flags
Patch (4.43 KB, patch)
2013-01-03 10:01 PST, Vincent Scheib
no flags
Vincent Scheib
Comment 1 2013-01-02 16:19:03 PST
Mike West
Comment 2 2013-01-03 00:27:05 PST
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?).
Vincent Scheib
Comment 3 2013-01-03 10:01:11 PST
Vincent Scheib
Comment 4 2013-01-03 10:01:51 PST
Thanks Mike, fixed.
Adrienne Walker
Comment 5 2013-01-03 10:56:16 PST
Comment on attachment 181182 [details] Patch R=me.
WebKit Review Bot
Comment 6 2013-01-03 11:08:34 PST
Comment on attachment 181182 [details] Patch Clearing flags on attachment: 181182 Committed r138722: <http://trac.webkit.org/changeset/138722>
WebKit Review Bot
Comment 7 2013-01-03 11:08:38 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.