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

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

Issue 2358323003: Keep expanded if mouse moves off of scrollbar while dragging (Closed)
Patch Set: style 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
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | ui/events/blink/input_handler_proxy_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..e2a2d3dbf525f63ef1234af00717d4fd81c0c7be 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_->MouseDown();
+ }
+ 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_);
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | ui/events/blink/input_handler_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698