Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Issue 2807433003: No pointer captured when the pointer lock is applied (Closed)

Created:
3 years, 8 months ago by lanwei
Modified:
3 years, 6 months ago
CC:
chromium-reviews, dtapuska+blinkwatch_chromium.org, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, Navid Zolghadr, blink-reviews, kinuko+watch, rwlbuis
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

No pointer captured when the pointer lock is applied We want to make the pointer lock always take priority over the capture. There are three cases: 1. If we set a pointer lock, at the same time we want to set the pointer capture as well, we should not set pointer capture and send out 'gotpointercapture' event. 2. After we set a pointer lock, we should throw an error when trying to set any pointer capture. 3. If there is a pointer capture and when trying to request a pointer lock, we should release the pointer capture. Testing pages: http://jsbin.com/zasesu/quiet http://jsbin.com/qabopik/quiet http://jsbin.com/fucewup/quiet BUG=697581 Review-Url: https://codereview.chromium.org/2807433003 Cr-Commit-Position: refs/heads/master@{#475572} Committed: https://chromium.googlesource.com/chromium/src/+/3d0d129b2cbc4e9547e34ffbf67a5e872b7d006f

Patch Set 1 : pointer lock #

Total comments: 7

Patch Set 2 : pointer lock #

Total comments: 18

Patch Set 3 : pointer lock #

Total comments: 5

Patch Set 4 : Change the tests and move code to WebFrameWidgetBase #

Total comments: 13

Patch Set 5 : Merge tests and rename functions #

Total comments: 4

Patch Set 6 : pointer lock #

Unified diffs Side-by-side diffs Delta from patch set Stats (+285 lines, -13 lines) Patch
M content/browser/renderer_host/input/synthetic_mouse_driver.cc View 1 2 1 chunk +4 lines, -1 line 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/pointerevents/pointerlock/pointerevent_pointerlock_after_pointercapture-manual.html View 1 2 3 1 chunk +69 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/pointerevents/pointerlock/pointerevent_pointerlock_supercedes_capture-manual.html View 1 2 3 4 1 chunk +93 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt_automation/pointerevents/pointerevent_common_input.js View 1 2 3 4 1 chunk +38 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt_automation/pointerevents/pointerlock/pointerevent_pointerlock_after_pointercapture-manual-automation.js View 1 1 chunk +5 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt_automation/pointerevents/pointerlock/pointerevent_pointerlock_supercedes_capture-manual-automation.js View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Element.cpp View 1 2 3 4 1 chunk +8 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/frame/WebFrameWidgetBase.h View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/WebFrameWidgetBase.cpp View 1 2 3 4 4 chunks +29 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/input/EventHandler.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/input/EventHandler.cpp View 1 2 3 4 2 chunks +10 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/input/PointerEventManager.h View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/input/PointerEventManager.cpp View 1 2 3 4 5 3 chunks +14 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 84 (65 generated)
lanwei
3 years, 8 months ago (2017-04-07 17:48:27 UTC) #10
Navid Zolghadr
Overall sounds good. Although you need to put up a PR for the spec and ...
3 years, 8 months ago (2017-04-10 17:16:14 UTC) #14
lanwei
https://codereview.chromium.org/2807433003/diff/20001/third_party/WebKit/Source/core/dom/Element.cpp File third_party/WebKit/Source/core/dom/Element.cpp (right): https://codereview.chromium.org/2807433003/diff/20001/third_party/WebKit/Source/core/dom/Element.cpp#newcode3039 third_party/WebKit/Source/core/dom/Element.cpp:3039: InvalidStateError, "Cannot capture when the mouse is locked"); On ...
3 years, 7 months ago (2017-05-17 13:56:00 UTC) #34
Navid Zolghadr
https://codereview.chromium.org/2807433003/diff/100001/content/browser/renderer_host/input/synthetic_mouse_driver.cc File content/browser/renderer_host/input/synthetic_mouse_driver.cc (right): https://codereview.chromium.org/2807433003/diff/100001/content/browser/renderer_host/input/synthetic_mouse_driver.cc#newcode22 content/browser/renderer_host/input/synthetic_mouse_driver.cc:22: mouse_event_.SetType(blink::WebInputEvent::kUndefined); We set the type to kUndefined again if ...
3 years, 7 months ago (2017-05-17 16:30:11 UTC) #35
scheib
I agree with the intent of the change. Tests are shaping up, I agree with ...
3 years, 7 months ago (2017-05-18 23:30:47 UTC) #36
lanwei
https://codereview.chromium.org/2807433003/diff/100001/content/browser/renderer_host/input/synthetic_mouse_driver.cc File content/browser/renderer_host/input/synthetic_mouse_driver.cc (right): https://codereview.chromium.org/2807433003/diff/100001/content/browser/renderer_host/input/synthetic_mouse_driver.cc#newcode22 content/browser/renderer_host/input/synthetic_mouse_driver.cc:22: mouse_event_.SetType(blink::WebInputEvent::kUndefined); On 2017/05/17 16:30:10, Navid Zolghadr wrote: > We ...
3 years, 7 months ago (2017-05-19 15:05:02 UTC) #44
scheib
https://codereview.chromium.org/2807433003/diff/140001/third_party/WebKit/LayoutTests/external/wpt/pointerevents/pointerlock/pointerevent_pointerlock-manual.html File third_party/WebKit/LayoutTests/external/wpt/pointerevents/pointerlock/pointerevent_pointerlock-manual.html (right): https://codereview.chromium.org/2807433003/diff/140001/third_party/WebKit/LayoutTests/external/wpt/pointerevents/pointerlock/pointerevent_pointerlock-manual.html#newcode28 third_party/WebKit/LayoutTests/external/wpt/pointerevents/pointerlock/pointerevent_pointerlock-manual.html:28: on_event(div1, 'pointermove', function(event) { why not pointerup? If using ...
3 years, 7 months ago (2017-05-19 19:54:18 UTC) #45
mustaq
https://codereview.chromium.org/2807433003/diff/140001/third_party/WebKit/Source/web/WebViewImpl.cpp File third_party/WebKit/Source/web/WebViewImpl.cpp (right): https://codereview.chromium.org/2807433003/diff/140001/third_party/WebKit/Source/web/WebViewImpl.cpp#newcode2206 third_party/WebKit/Source/web/WebViewImpl.cpp:2206: MainFrameImpl()->FrameWidget()->PointerLockMouseEvent(input_event); I believe we need a similar fix before ...
3 years, 7 months ago (2017-05-19 20:05:33 UTC) #47
lanwei
https://codereview.chromium.org/2807433003/diff/140001/third_party/WebKit/LayoutTests/external/wpt/pointerevents/pointerlock/pointerevent_pointerlock-manual.html File third_party/WebKit/LayoutTests/external/wpt/pointerevents/pointerlock/pointerevent_pointerlock-manual.html (right): https://codereview.chromium.org/2807433003/diff/140001/third_party/WebKit/LayoutTests/external/wpt/pointerevents/pointerlock/pointerevent_pointerlock-manual.html#newcode28 third_party/WebKit/LayoutTests/external/wpt/pointerevents/pointerlock/pointerevent_pointerlock-manual.html:28: on_event(div1, 'pointermove', function(event) { On 2017/05/19 19:54:17, scheib wrote: ...
3 years, 7 months ago (2017-05-23 23:11:43 UTC) #56
Navid Zolghadr
lgtm https://codereview.chromium.org/2807433003/diff/180001/third_party/WebKit/Source/core/frame/WebFrameWidgetBase.cpp File third_party/WebKit/Source/core/frame/WebFrameWidgetBase.cpp (right): https://codereview.chromium.org/2807433003/diff/180001/third_party/WebKit/Source/core/frame/WebFrameWidgetBase.cpp#newcode258 third_party/WebKit/Source/core/frame/WebFrameWidgetBase.cpp:258: const WebCoalescedInputEvent& coalesced_event) { I love the idea ...
3 years, 7 months ago (2017-05-25 16:59:15 UTC) #57
scheib
LGTM Suggested filename change. Added a note where I'm not an effective reviewer. https://codereview.chromium.org/2807433003/diff/180001/third_party/WebKit/LayoutTests/external/wpt/pointerevents/pointerlock/pointerevent_pointerlock-manual.html File ...
3 years, 7 months ago (2017-05-26 05:44:12 UTC) #58
mustaq
Looks good overall but I would ask for a few cleanup. Also: I didn't quite ...
3 years, 7 months ago (2017-05-26 14:56:19 UTC) #59
lanwei
https://codereview.chromium.org/2807433003/diff/180001/third_party/WebKit/LayoutTests/external/wpt/pointerevents/pointerlock/pointerevent_pointerlock-manual.html File third_party/WebKit/LayoutTests/external/wpt/pointerevents/pointerlock/pointerevent_pointerlock-manual.html (right): https://codereview.chromium.org/2807433003/diff/180001/third_party/WebKit/LayoutTests/external/wpt/pointerevents/pointerlock/pointerevent_pointerlock-manual.html#newcode1 third_party/WebKit/LayoutTests/external/wpt/pointerevents/pointerlock/pointerevent_pointerlock-manual.html:1: <!doctype html> On 2017/05/26 05:44:12, scheib wrote: > Filename ...
3 years, 6 months ago (2017-05-29 18:30:07 UTC) #72
mustaq
lgtm https://codereview.chromium.org/2807433003/diff/240001/third_party/WebKit/Source/core/input/PointerEventManager.cpp File third_party/WebKit/Source/core/input/PointerEventManager.cpp (right): https://codereview.chromium.org/2807433003/diff/240001/third_party/WebKit/Source/core/input/PointerEventManager.cpp#newcode552 third_party/WebKit/Source/core/input/PointerEventManager.cpp:552: // TODO(727333): Replace the last two parameters by ...
3 years, 6 months ago (2017-05-29 18:37:44 UTC) #75
bokan
rs lgtm based on other reviewers.
3 years, 6 months ago (2017-05-29 18:54:10 UTC) #76
dtapuska
lgtm % please fix mustaq's comment and my nit https://codereview.chromium.org/2807433003/diff/240001/content/browser/renderer_host/input/synthetic_mouse_driver.cc File content/browser/renderer_host/input/synthetic_mouse_driver.cc (right): https://codereview.chromium.org/2807433003/diff/240001/content/browser/renderer_host/input/synthetic_mouse_driver.cc#newcode22 content/browser/renderer_host/input/synthetic_mouse_driver.cc:22: ...
3 years, 6 months ago (2017-05-29 20:57:41 UTC) #77
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2807433003/260001
3 years, 6 months ago (2017-05-30 14:59:45 UTC) #80
commit-bot: I haz the power
Committed patchset #6 (id:260001) as https://chromium.googlesource.com/chromium/src/+/3d0d129b2cbc4e9547e34ffbf67a5e872b7d006f
3 years, 6 months ago (2017-05-30 17:09:43 UTC) #83
lanwei
3 years, 6 months ago (2017-05-30 17:11:36 UTC) #84
Message was sent while issue was closed.
https://codereview.chromium.org/2807433003/diff/240001/content/browser/render...
File content/browser/renderer_host/input/synthetic_mouse_driver.cc (right):

https://codereview.chromium.org/2807433003/diff/240001/content/browser/render...
content/browser/renderer_host/input/synthetic_mouse_driver.cc:22:
mouse_event_.SetType(blink::WebInputEvent::kUndefined);
On 2017/05/29 20:57:40, dtapuska wrote:
> Can we avoid the calls to SetType() and just mouse_event_ =
> blink::WebMouseEvent();
> 
> to clear all state?

We still need other states, like button, click count.

https://codereview.chromium.org/2807433003/diff/240001/third_party/WebKit/Sou...
File third_party/WebKit/Source/core/input/PointerEventManager.cpp (right):

https://codereview.chromium.org/2807433003/diff/240001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/input/PointerEventManager.cpp:552: //
TODO(727333): Replace the last two parameters by a single WebMouseEvent
On 2017/05/29 18:37:44, mustaq wrote:
> Nit: Let's stick to the official style:
> TODO(lanwei): ... crbug.com/bugNo.

Done.

Powered by Google App Engine
This is Rietveld 408576698