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

Issue 291273007: Prevent the context menu from showing when long pressing the window controls (Closed)

Created:
6 years, 7 months ago by pkotwicz
Modified:
6 years, 7 months ago
Reviewers:
tdanderson, sadrul
CC:
chromium-reviews, tfarina, ben+views_chromium.org, tdanderson+views_chromium.org
Visibility:
Public.

Description

Make PostEventDispatchHandler::OnGestureEvent() only show the context menu on long press if the events are targetted at a view which can show the context menu. If a different view is the gesture handler and the event was targetted at a different view (e.g. because the maximize button handled ET_GESTURE_TAP_DOWN) the parent view should not show a context menu on long press. Previously, we were assuming that events were in the coordinates of |PostEventDispatchHandler::owner_| and were sometimes passing an incorrect position to BrowserFrame::ShowContextMenuForView(). BUG=375232 TEST=RootViewTest.ContextMenuFromLongPress Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=272907

Patch Set 1 : #

Total comments: 5

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+137 lines, -54 lines) Patch
M ui/views/view.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M ui/views/view.cc View 1 3 chunks +0 lines, -51 lines 0 comments Download
M ui/views/widget/root_view.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/widget/root_view.cc View 1 3 chunks +51 lines, -0 lines 0 comments Download
M ui/views/widget/root_view_unittest.cc View 1 2 chunks +85 lines, -2 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
pkotwicz
Sadrul, PTAL
6 years, 7 months ago (2014-05-22 01:22:55 UTC) #1
sadrul
+tdanderson@ mind reviewing this change? Is the right fix to not do anything if target ...
6 years, 7 months ago (2014-05-22 01:27:44 UTC) #2
tdanderson
Peter, please see my comments below. Also: - I would suggest re-wording the double negative ...
6 years, 7 months ago (2014-05-22 14:40:37 UTC) #3
sadrul
https://codereview.chromium.org/291273007/diff/90001/ui/views/view.cc File ui/views/view.cc (right): https://codereview.chromium.org/291273007/diff/90001/ui/views/view.cc#newcode104 ui/views/view.cc:104: virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE { On 2014/05/22 14:40:37, ...
6 years, 7 months ago (2014-05-22 14:50:53 UTC) #4
tdanderson
https://codereview.chromium.org/291273007/diff/90001/ui/views/view.cc File ui/views/view.cc (right): https://codereview.chromium.org/291273007/diff/90001/ui/views/view.cc#newcode104 ui/views/view.cc:104: virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE { On 2014/05/22 14:50:53, ...
6 years, 7 months ago (2014-05-22 16:08:20 UTC) #5
sadrul
https://codereview.chromium.org/291273007/diff/90001/ui/views/view.cc File ui/views/view.cc (right): https://codereview.chromium.org/291273007/diff/90001/ui/views/view.cc#newcode104 ui/views/view.cc:104: virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE { On 2014/05/22 16:08:20, ...
6 years, 7 months ago (2014-05-22 16:26:21 UTC) #6
tdanderson
https://codereview.chromium.org/291273007/diff/90001/ui/views/view.cc File ui/views/view.cc (right): https://codereview.chromium.org/291273007/diff/90001/ui/views/view.cc#newcode104 ui/views/view.cc:104: virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE { On 2014/05/22 16:26:22, ...
6 years, 7 months ago (2014-05-22 18:35:10 UTC) #7
pkotwicz
Sadrul, can you please take another look?
6 years, 7 months ago (2014-05-23 03:46:34 UTC) #8
tdanderson
LGTM with the nits addressed regarding the issue description in my original comments. Plus please ...
6 years, 7 months ago (2014-05-23 15:02:37 UTC) #9
pkotwicz
Sadrul, can you please take a look? Fixed the CL description as per tdanderson@'s request. ...
6 years, 7 months ago (2014-05-23 16:05:57 UTC) #10
sadrul
On 2014/05/23 16:05:57, pkotwicz wrote: > Sadrul, can you please take a look? > > ...
6 years, 7 months ago (2014-05-26 14:53:58 UTC) #11
pkotwicz
The CQ bit was checked by pkotwicz@chromium.org
6 years, 7 months ago (2014-05-26 15:09:00 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pkotwicz@chromium.org/291273007/120001
6 years, 7 months ago (2014-05-26 15:10:24 UTC) #13
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-26 19:42:10 UTC) #14
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-26 22:46:19 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/win_chromium_rel/builds/19908)
6 years, 7 months ago (2014-05-26 22:46:19 UTC) #16
pkotwicz
The CQ bit was checked by pkotwicz@chromium.org
6 years, 7 months ago (2014-05-26 23:28:33 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pkotwicz@chromium.org/291273007/120001
6 years, 7 months ago (2014-05-26 23:29:24 UTC) #18
commit-bot: I haz the power
6 years, 7 months ago (2014-05-27 01:13:42 UTC) #19
Message was sent while issue was closed.
Change committed as 272907

Powered by Google App Engine
This is Rietveld 408576698