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

Issue 472303004: Do not dispatch gesture events to disabled views (Closed)

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

Description

Do not dispatch gesture events to disabled views The current logic in RootView::DispatchGestureEvent() will dispatch gesture events to disabled views in some circumstances but not others. The correct behaviour here is: * Disabled views may be the target of a gesture event. * Gesture events should never be dispatched to a disabled view, and instead the event should simply be marked as handled. This prevents context menus being shown when long-pressing disabled textfields (issue 337568). BUG=403893, 337568 TEST=WidgetTest.DisabledGestureEventTarget, RootViewTest.ContextMenuFromLongPress, RootViewTest.ContextMenuFromLongPressOnDisabledView Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=290159

Patch Set 1 #

Total comments: 4

Patch Set 2 : cleanup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+290 lines, -21 lines) Patch
M ui/views/widget/root_view.cc View 1 3 chunks +34 lines, -18 lines 0 comments Download
M ui/views/widget/root_view_unittest.cc View 4 chunks +120 lines, -3 lines 0 comments Download
M ui/views/widget/widget_unittest.cc View 1 chunk +136 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
tdanderson
Sadrul, can you please take a look? Let's wait until early M39 to land this, ...
6 years, 4 months ago (2014-08-15 18:22:00 UTC) #1
sadrul
https://codereview.chromium.org/472303004/diff/1/ui/views/widget/root_view.cc File ui/views/widget/root_view.cc (right): https://codereview.chromium.org/472303004/diff/1/ui/views/widget/root_view.cc#newcode645 ui/views/widget/root_view.cc:645: event->SetHandled(); the indent here seems off https://codereview.chromium.org/472303004/diff/1/ui/views/widget/root_view.cc#newcode655 ui/views/widget/root_view.cc:655: } ...
6 years, 4 months ago (2014-08-15 18:58:52 UTC) #2
tdanderson
Code cleaned up. Can you PTAL? https://codereview.chromium.org/472303004/diff/1/ui/views/widget/root_view.cc File ui/views/widget/root_view.cc (right): https://codereview.chromium.org/472303004/diff/1/ui/views/widget/root_view.cc#newcode645 ui/views/widget/root_view.cc:645: event->SetHandled(); On 2014/08/15 ...
6 years, 4 months ago (2014-08-15 20:21:51 UTC) #3
sadrul
lgtm
6 years, 4 months ago (2014-08-15 21:11:43 UTC) #4
tdanderson
The CQ bit was checked by tdanderson@chromium.org
6 years, 4 months ago (2014-08-16 17:31:48 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tdanderson@chromium.org/472303004/20001
6 years, 4 months ago (2014-08-16 17:32:47 UTC) #6
tdanderson
The CQ bit was unchecked by tdanderson@chromium.org
6 years, 4 months ago (2014-08-16 17:33:55 UTC) #7
tdanderson
The CQ bit was checked by tdanderson@chromium.org
6 years, 4 months ago (2014-08-16 17:46:18 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tdanderson@chromium.org/472303004/20001
6 years, 4 months ago (2014-08-16 17:46:46 UTC) #9
tdanderson
The CQ bit was unchecked by tdanderson@chromium.org
6 years, 4 months ago (2014-08-16 19:52:16 UTC) #10
tdanderson
The CQ bit was checked by tdanderson@chromium.org
6 years, 4 months ago (2014-08-16 19:52:17 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tdanderson@chromium.org/472303004/20001
6 years, 4 months ago (2014-08-16 19:52:28 UTC) #12
commit-bot: I haz the power
6 years, 4 months ago (2014-08-16 20:47:58 UTC) #13
Message was sent while issue was closed.
Committed patchset #2 (20001) as 290159

Powered by Google App Engine
This is Rietveld 408576698