New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 601926 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

OOPIF: Implement Pointer Lock API

Project Member Reported by lfg@chromium.org, Apr 8 2016

Issue description

The Pointer Lock API doesn't work on remote subframes. For reference: https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API

Repro steps:
Execute this javascript in a remote subframe, then click the button.

var button = document.createElement('button')
button.onclick = function() { document.body.requestPointerLock(); }
button.innerHTML = 'pointerlock'
document.body.appendChild(button)

 

Comment 1 by lfg@chromium.org, Apr 28 2016

Cc: -lfg@chromium.org
Owner: lfg@chromium.org

Comment 2 by lfg@chromium.org, Apr 28 2016

Status: Started (was: Available)
Project Member

Comment 3 by bugdroid1@chromium.org, Jun 8 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bee1e0ad56ce6b9def191f6ec6ef5a71a2f5d83e

commit bee1e0ad56ce6b9def191f6ec6ef5a71a2f5d83e
Author: lfg <lfg@chromium.org>
Date: Wed Jun 08 21:24:21 2016

Implement pointer lock API for out-of-process iframes.

This patch moves the MouseLockDispatcher from RenderView to RenderWidget and
implements the necessary plumbing to allow pointer locking from out-of-process
iframes.

TEST=Manual test please:
Navigate to http://scheib.github.io/HTMLMisc/PointerLockAndFullscreen-iframes.html
and verify that toggling pointer lock from all iframes work
as well as exiting* pointer lock. Verify that the mouse
movement continues to be tracked in the frame that locked
the pointer.
* Exiting can be done by ESC key, ALT-TAB (on Mac Command
Tab), Windows key to bring up start menu etc.

BUG= 601926 ,419087
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/1980133002
Cr-Commit-Position: refs/heads/master@{#398679}

[modify] https://crrev.com/bee1e0ad56ce6b9def191f6ec6ef5a71a2f5d83e/content/browser/frame_host/cross_process_frame_connector.cc
[modify] https://crrev.com/bee1e0ad56ce6b9def191f6ec6ef5a71a2f5d83e/content/browser/frame_host/cross_process_frame_connector.h
[modify] https://crrev.com/bee1e0ad56ce6b9def191f6ec6ef5a71a2f5d83e/content/browser/frame_host/render_widget_host_view_child_frame.cc
[modify] https://crrev.com/bee1e0ad56ce6b9def191f6ec6ef5a71a2f5d83e/content/browser/frame_host/render_widget_host_view_child_frame.h
[modify] https://crrev.com/bee1e0ad56ce6b9def191f6ec6ef5a71a2f5d83e/content/browser/renderer_host/render_widget_host_impl.cc
[modify] https://crrev.com/bee1e0ad56ce6b9def191f6ec6ef5a71a2f5d83e/content/browser/renderer_host/render_widget_host_impl.h
[modify] https://crrev.com/bee1e0ad56ce6b9def191f6ec6ef5a71a2f5d83e/content/browser/web_contents/web_contents_impl.cc
[modify] https://crrev.com/bee1e0ad56ce6b9def191f6ec6ef5a71a2f5d83e/content/browser/web_contents/web_contents_impl.h
[modify] https://crrev.com/bee1e0ad56ce6b9def191f6ec6ef5a71a2f5d83e/content/content_renderer.gypi
[modify] https://crrev.com/bee1e0ad56ce6b9def191f6ec6ef5a71a2f5d83e/content/renderer/mouse_lock_dispatcher_browsertest.cc
[modify] https://crrev.com/bee1e0ad56ce6b9def191f6ec6ef5a71a2f5d83e/content/renderer/render_view_impl.cc
[modify] https://crrev.com/bee1e0ad56ce6b9def191f6ec6ef5a71a2f5d83e/content/renderer/render_view_impl.h
[delete] https://crrev.com/68da48f3c013555d779a0a0c86634e53dfb65ce4/content/renderer/render_view_mouse_lock_dispatcher.h
[modify] https://crrev.com/bee1e0ad56ce6b9def191f6ec6ef5a71a2f5d83e/content/renderer/render_widget.cc
[modify] https://crrev.com/bee1e0ad56ce6b9def191f6ec6ef5a71a2f5d83e/content/renderer/render_widget.h
[rename] https://crrev.com/bee1e0ad56ce6b9def191f6ec6ef5a71a2f5d83e/content/renderer/render_widget_mouse_lock_dispatcher.cc
[add] https://crrev.com/bee1e0ad56ce6b9def191f6ec6ef5a71a2f5d83e/content/renderer/render_widget_mouse_lock_dispatcher.h
[modify] https://crrev.com/bee1e0ad56ce6b9def191f6ec6ef5a71a2f5d83e/third_party/WebKit/Source/core/dom/Document.cpp
[modify] https://crrev.com/bee1e0ad56ce6b9def191f6ec6ef5a71a2f5d83e/third_party/WebKit/Source/core/page/ChromeClient.h
[modify] https://crrev.com/bee1e0ad56ce6b9def191f6ec6ef5a71a2f5d83e/third_party/WebKit/Source/core/page/PointerLockController.cpp
[modify] https://crrev.com/bee1e0ad56ce6b9def191f6ec6ef5a71a2f5d83e/third_party/WebKit/Source/web/ChromeClientImpl.cpp
[modify] https://crrev.com/bee1e0ad56ce6b9def191f6ec6ef5a71a2f5d83e/third_party/WebKit/Source/web/ChromeClientImpl.h
[modify] https://crrev.com/bee1e0ad56ce6b9def191f6ec6ef5a71a2f5d83e/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
[modify] https://crrev.com/bee1e0ad56ce6b9def191f6ec6ef5a71a2f5d83e/third_party/WebKit/Source/web/WebFrameWidgetImpl.h
[modify] https://crrev.com/bee1e0ad56ce6b9def191f6ec6ef5a71a2f5d83e/third_party/WebKit/Source/web/WebViewImpl.cpp
[modify] https://crrev.com/bee1e0ad56ce6b9def191f6ec6ef5a71a2f5d83e/third_party/WebKit/Source/web/WebViewImpl.h
[modify] https://crrev.com/bee1e0ad56ce6b9def191f6ec6ef5a71a2f5d83e/third_party/WebKit/public/web/WebViewClient.h

Comment 4 by lfg@chromium.org, Jun 8 2016

Status: Fixed (was: Started)
Cc: tkonch...@chromium.org
Labels: TE-Verified-M53 TE-Verified-53.0.2763.0
Tested the same on mac 10.11, win8.1 and Linux 14.04 chrome version 53.0.2763.0 - Toggling pointer lock from all iframes works well as exiting* pointer lock and also the mouse movement continues to be tracked in the frame that locked the pointer.

Please find the screencast

Adding TE-Verified labels
601926.mov
14.3 MB Download

Sign in to add a comment