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

Unified Diff: cc/debug/debug_rect_history.cc

Issue 1577263004: Communicate whether passive event listeners exist to cc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_wheel_passive_listeners
Patch Set: Fix nits Created 4 years, 10 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 | « no previous file | cc/input/event_listener_properties.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/debug/debug_rect_history.cc
diff --git a/cc/debug/debug_rect_history.cc b/cc/debug/debug_rect_history.cc
index 59ca9de9ce63eb1bc0bebce7560fab495ffbb1d9..87d83b83c44b14c60ed7e77355ab6247800cbe3d 100644
--- a/cc/debug/debug_rect_history.cc
+++ b/cc/debug/debug_rect_history.cc
@@ -181,8 +181,14 @@ void DebugRectHistory::SaveWheelEventHandlerRects(LayerImpl* layer) {
}
void DebugRectHistory::SaveWheelEventHandlerRectsCallback(LayerImpl* layer) {
- if (!layer->layer_tree_impl()->have_wheel_event_handlers())
+ EventListenerProperties event_properties =
+ layer->layer_tree_impl()->event_listener_properties(
+ EventListenerClass::kMouseWheel);
+ if (event_properties == EventListenerProperties::kNone ||
+ (layer->layer_tree_impl()->settings().use_mouse_wheel_gestures &&
+ event_properties == EventListenerProperties::kPassive)) {
return;
+ }
debug_rects_.push_back(
DebugRect(WHEEL_EVENT_HANDLER_RECT_TYPE,
« no previous file with comments | « no previous file | cc/input/event_listener_properties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698