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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2050033002: Revert of Remove enable/disable wheel gestures setting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@can_scroll_remove
Patch Set: Created 4 years, 6 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/proto/layer_tree_settings.proto ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 586d61645072cda956209dd77e24a39f8dc682d8..98a81238a04e5f913a00f371ce3bb0576a18cbe0 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2520,6 +2520,20 @@
}
}
+ if (IsWheelBasedScroll(type) &&
+ !active_tree()->settings().use_mouse_wheel_gestures) {
+ EventListenerProperties event_properties =
+ active_tree()->event_listener_properties(
+ EventListenerClass::kMouseWheel);
+ if (event_properties != EventListenerProperties::kNone) {
+ TRACE_EVENT0("cc", "LayerImpl::tryScroll: Failed WheelEventHandlers");
+ scroll_status.thread = InputHandler::SCROLL_ON_MAIN_THREAD;
+ scroll_status.main_thread_scrolling_reasons =
+ MainThreadScrollingReason::kEventHandlers;
+ return scroll_status;
+ }
+ }
+
if (!scroll_node->data.scrollable) {
TRACE_EVENT0("cc", "LayerImpl::tryScroll: Ignored not scrollable");
scroll_status.thread = InputHandler::SCROLL_IGNORED;
« no previous file with comments | « cc/proto/layer_tree_settings.proto ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698