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

Unified Diff: cc/trees/layer_tree_impl.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: Rebase 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
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 156996d0557b9f374e047b6fdc1567be5596e856..46561da920d67ada5df4ccbb8314cf19304699e9 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -77,7 +77,7 @@ LayerTreeImpl::LayerTreeImpl(
has_ever_been_drawn_(false),
render_surface_layer_list_id_(0),
have_scroll_event_handlers_(false),
- have_wheel_event_handlers_(false),
+ event_listener_properties_(),
top_controls_shrink_blink_size_(false),
top_controls_height_(0),
top_controls_shown_ratio_(top_controls_shown_ratio) {}
@@ -348,7 +348,12 @@ void LayerTreeImpl::PushPropertiesTo(LayerTreeImpl* target_tree) {
target_tree->set_background_color(background_color());
target_tree->set_has_transparent_background(has_transparent_background());
target_tree->set_have_scroll_event_handlers(have_scroll_event_handlers());
- target_tree->set_have_wheel_event_handlers(have_wheel_event_handlers());
+ target_tree->set_event_listener_properties(
+ EventListenerClass::kTouch,
+ event_listener_properties(EventListenerClass::kTouch));
+ target_tree->set_event_listener_properties(
+ EventListenerClass::kMouseWheel,
+ event_listener_properties(EventListenerClass::kMouseWheel));
if (ViewportSizeInvalid())
target_tree->SetViewportSizeInvalid();
@@ -1690,7 +1695,9 @@ struct HitTestVisibleScrollableOrTouchableFunctor {
return layer->IsDrawnRenderSurfaceLayerListMember() ||
ScrollsAnyDrawnRenderSurfaceLayerListMember(layer) ||
!layer->touch_event_handler_region().IsEmpty() ||
- layer->layer_tree_impl()->have_wheel_event_handlers();
+ layer->layer_tree_impl()->event_listener_properties(
+ EventListenerClass::kMouseWheel) !=
+ EventListenerProperties::kNone;
}
};

Powered by Google App Engine
This is Rietveld 408576698