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

Issue 49383004: Ensure on Windows AURA that the cursor stays within the bounds of the window during a LockMouse ope… (Closed)

Created:
7 years, 1 month ago by ananta
Modified:
7 years, 1 month ago
Reviewers:
scheib, jam, sky, scottmg
CC:
chromium-reviews, joi+watch-content_chromium.org, yusukes+watch_chromium.org, yukishiino+watch_chromium.org, penghuang+watch_chromium.org, sievers+watch_chromium.org, jbauman+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, kalyank, piman+watch_chromium.org, danakj+watch_chromium.org, James Su, miu+watch_chromium.org
Visibility:
Public.

Description

Ensure on Windows AURA that the cursor stays within the bounds of the window during a LockMouse operation and is unclipped during the UnlockMouse operation. On Windows we can ensure that the cursor stays within the bounds of a window via the ClipCursor API. Changes in this CL are as below:- 1. The cursor is clipped in the RootWindowHost::ConfineCursorToRootWindow abstraction and is unclipped in the RootWindowHost::UnConfineCursor abstraction. Currently these functions are only implemented on Windows in the DesktopRootWindowHostWin class. 2. Added an accessor method UnConfineCursor to the RootWindow class which forwards this call to the RootWindowHost. This is on the same lines as the ConfineCursorToWindow method in the RootWindow class. 3. We need to explicitly hide the cursor on Windows via the ShowCursor API. This is done in the DesktopRootWindowHostWin::OnCursorVisibilityChanged function. 4. If we receive non client messages in the RenderWidgetHostViewAura class in the locked mouse state, we should move the cursor to the center and return. If we don't do this then it causes DCHECKs to fire in the webkit mouse event conversion code. In any case non client messages should not be sent to webkit. Fixes bug https://code.google.com/p/chromium/issues/detail?id=305563 BUG=305563 R=scheib@chromium.org, sky@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=232176

Patch Set 1 #

Patch Set 2 : #

Total comments: 3

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Total comments: 2

Patch Set 7 : #

Total comments: 4

Patch Set 8 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -12 lines) Patch
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 2 3 4 5 6 7 5 chunks +24 lines, -11 lines 0 comments Download
M ui/aura/root_window.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M ui/aura/root_window.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_root_window_host_win.cc View 1 2 1 chunk +5 lines, -1 line 0 comments Download

Messages

Total messages: 14 (0 generated)
ananta
7 years, 1 month ago (2013-10-30 02:17:48 UTC) #1
jam
I'm not familiar with this code, so I defer to scott
7 years, 1 month ago (2013-10-30 17:49:34 UTC) #2
ananta
+scheib
7 years, 1 month ago (2013-10-30 18:06:14 UTC) #3
scheib
https://codereview.chromium.org/49383004/diff/50001/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): https://codereview.chromium.org/49383004/diff/50001/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode2200 content/browser/renderer_host/render_widget_host_view_aura.cc:2200: ::ClipCursor(&window_rect); Yes, clipping to the window is necessary. It's ...
7 years, 1 month ago (2013-10-30 18:16:45 UTC) #4
ananta
+sky for overall review.
7 years, 1 month ago (2013-10-30 20:41:26 UTC) #5
ananta
+sky for overall review.
7 years, 1 month ago (2013-10-30 20:41:26 UTC) #6
ananta
https://codereview.chromium.org/49383004/diff/50001/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): https://codereview.chromium.org/49383004/diff/50001/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode2200 content/browser/renderer_host/render_widget_host_view_aura.cc:2200: ::ClipCursor(&window_rect); On 2013/10/30 18:16:45, scheib wrote: > Yes, clipping ...
7 years, 1 month ago (2013-10-30 20:47:29 UTC) #7
scheib
Thumbs up on the use of ConfineCursor. Please confirm you've checked that moving/resizing windows will ...
7 years, 1 month ago (2013-10-30 21:23:07 UTC) #8
ananta
I verified that this change does not regress sizing and moving in any way https://codereview.chromium.org/49383004/diff/400001/content/browser/renderer_host/render_widget_host_view_aura.cc ...
7 years, 1 month ago (2013-10-30 21:43:15 UTC) #9
scheib
lgtm
7 years, 1 month ago (2013-10-30 21:48:03 UTC) #10
sky
https://codereview.chromium.org/49383004/diff/650002/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): https://codereview.chromium.org/49383004/diff/650002/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode2173 content/browser/renderer_host/render_widget_host_view_aura.cc:2173: aura::RootWindow* root_window = window_->GetDispatcher(); Use WindowEventDispatcher, not RootWindow (they ...
7 years, 1 month ago (2013-10-30 22:02:52 UTC) #11
ananta
https://codereview.chromium.org/49383004/diff/650002/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): https://codereview.chromium.org/49383004/diff/650002/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode2173 content/browser/renderer_host/render_widget_host_view_aura.cc:2173: aura::RootWindow* root_window = window_->GetDispatcher(); On 2013/10/30 22:02:53, sky wrote: ...
7 years, 1 month ago (2013-10-30 22:11:40 UTC) #12
sky
LGTM
7 years, 1 month ago (2013-10-31 01:42:22 UTC) #13
ananta
7 years, 1 month ago (2013-10-31 18:27:17 UTC) #14
Message was sent while issue was closed.
Committed patchset #8 manually as r232176 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698