DescriptionSecond attempt at fixing pointer lock issues with Windows HiDPI.
The earlier attempt https://codereview.chromium.org/973123003/ was incorrect. Reverted parts that patch
which changed the WebMouseEventBuilder::Build function to convert from DIP to pixels and back. The initial
conversion from DIP to pixels was not needed as the values are picked up from the Windows message which gives
us these coordinates in pixels.
Changes in this patch are as below:-
1. The WebMouseEventBuilder::Build function has been changed to convert the WebMouseEvent::globalX and globalY values
to DIP. The other changes in the earlier patch as mentioned above have been reverted.
2. The RenderWidgetHostViewAura::UpdateMouseLockRegion function which executes on Windows was clipping the windows cursor
to a rectangle in DIPs. We need to convert this rectangle to pixels before calling the ClipCursor API. This was the
main reason for the lock operation not working correctly.
3. I was seeing a DCHECK in the renderer process in the WebViewImpl::pointerLockMouseEvent function as we were sending
the mouse leave message. Added code in the CanRendererHandleEvent function in the render_widget_host_view_aura.cc file
to not send this message if we are in the mouse locked state.
BUG=411634
TEST= The main test case in bug 411634
Committed: https://crrev.com/ef5361d976c30ad91cd9df5fccf4c046295bac0a
Cr-Commit-Position: refs/heads/master@{#319791}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Added a content unittest WebInputEventBuilderTEst.TestMouseEventScale #Patch Set 3 : Added the files for the test #
Messages
Total messages: 25 (7 generated)
|