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

Unified Diff: ui/events/blink/input_handler_proxy.cc

Issue 2358323003: Keep expanded if mouse moves off of scrollbar while dragging (Closed)
Patch Set: Merge remote-tracking branch 'origin/master' into fix-636438 Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/events/blink/input_handler_proxy.cc
diff --git a/ui/events/blink/input_handler_proxy.cc b/ui/events/blink/input_handler_proxy.cc
index f52553411664137dee6048642429b128deaec6d0..2fbf5c54a2f8de6fe56698c9810873f0f16b4cd7 100644
--- a/ui/events/blink/input_handler_proxy.cc
+++ b/ui/events/blink/input_handler_proxy.cc
@@ -374,10 +374,31 @@ InputHandlerProxy::EventDisposition InputHandlerProxy::HandleInputEvent(
case WebInputEvent::TouchEnd:
return HandleTouchEnd(static_cast<const WebTouchEvent&>(event));
+ case WebInputEvent::MouseDown: {
+ // Only for check scrollbar captured
+ const WebMouseEvent& mouse_event =
+ static_cast<const WebMouseEvent&>(event);
+
+ if (mouse_event.button == blink::WebMouseEvent::Button::Left) {
+ CHECK(input_handler_);
+ input_handler_->MouseDownAt(gfx::Point(mouse_event.x, mouse_event.y));
+ }
+ return DID_NOT_HANDLE;
+ }
+ case WebInputEvent::MouseUp: {
+ // Only for release scrollbar captured
+ const WebMouseEvent& mouse_event =
+ static_cast<const WebMouseEvent&>(event);
+
+ if (mouse_event.button == blink::WebMouseEvent::Button::Left) {
+ CHECK(input_handler_);
+ input_handler_->MouseUp();
+ }
+ return DID_NOT_HANDLE;
+ }
case WebInputEvent::MouseMove: {
const WebMouseEvent& mouse_event =
static_cast<const WebMouseEvent&>(event);
- // TODO(tony): Ignore when mouse buttons are down?
// TODO(davemoore): This should never happen, but bug #326635 showed some
// surprising crashes.
CHECK(input_handler_);

Powered by Google App Engine
This is Rietveld 408576698