Commit 2872e8e2 authored by Toni Barzic's avatar Toni Barzic Committed by Chromium LUCI CQ

FrameCaptionButton: Pass only unhandled gesture events to base class

Do not call Button::OnGestureEvent if the event has been handled by the
FrameCaptionButton. FrameCaptionButton may handle
ui::ET_GESTURE_SCROLL_END by invoking click handler, which, depending on
the button implementation, may end up deleting the button, so continuing
to process the event is not safe.

BUG=1142568

Change-Id: I6ba6099beff577026a90e749b99430c5819099a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2602600Reviewed-by: default avatarAllen Bauer <kylixrd@chromium.org>
Commit-Queue: Toni Baržić <tbarzic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#839483}
parent caf95d83
...@@ -190,6 +190,8 @@ void FrameCaptionButton::OnGestureEvent(ui::GestureEvent* event) { ...@@ -190,6 +190,8 @@ void FrameCaptionButton::OnGestureEvent(ui::GestureEvent* event) {
event->StopPropagation(); event->StopPropagation();
} }
} }
if (!event->handled())
Button::OnGestureEvent(event); Button::OnGestureEvent(event);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment