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

Unified Diff: cc/debug/debug_rect_history.cc

Issue 1816723003: Revert of Fix display of wheel event listeners on a page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/debug/debug_rect_history.h ('k') | no next file » | 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 70dc4ca95f87f2b71edb6eb9c523e121d2fe329b..ebe6936f6473210d00bbda025602ce9eecca677c 100644
--- a/cc/debug/debug_rect_history.cc
+++ b/cc/debug/debug_rect_history.cc
@@ -174,26 +174,26 @@
}
}
-void DebugRectHistory::SaveWheelEventHandlerRects(LayerImpl* root_layer) {
+void DebugRectHistory::SaveWheelEventHandlerRects(LayerImpl* layer) {
+ LayerTreeHostCommon::CallFunctionForSubtree(layer, [this](LayerImpl* layer) {
+ SaveWheelEventHandlerRectsCallback(layer);
+ });
+}
+
+void DebugRectHistory::SaveWheelEventHandlerRectsCallback(LayerImpl* layer) {
EventListenerProperties event_properties =
- root_layer->layer_tree_impl()->event_listener_properties(
+ layer->layer_tree_impl()->event_listener_properties(
EventListenerClass::kMouseWheel);
if (event_properties == EventListenerProperties::kNone ||
- (root_layer->layer_tree_impl()->settings().use_mouse_wheel_gestures &&
+ (layer->layer_tree_impl()->settings().use_mouse_wheel_gestures &&
event_properties == EventListenerProperties::kPassive)) {
return;
}
- // Since the wheel event handlers property is on the entire layer tree just
- // mark inner viewport if have listeners.
- LayerImpl* inner_viewport =
- root_layer->layer_tree_impl()->InnerViewportScrollLayer();
- if (!inner_viewport)
- return;
- debug_rects_.push_back(DebugRect(
- WHEEL_EVENT_HANDLER_RECT_TYPE,
- MathUtil::MapEnclosingClippedRect(inner_viewport->ScreenSpaceTransform(),
- gfx::Rect(inner_viewport->bounds()))));
+ debug_rects_.push_back(
+ DebugRect(WHEEL_EVENT_HANDLER_RECT_TYPE,
+ MathUtil::MapEnclosingClippedRect(layer->ScreenSpaceTransform(),
+ gfx::Rect(layer->bounds()))));
}
void DebugRectHistory::SaveScrollEventHandlerRects(LayerImpl* layer) {
« no previous file with comments | « cc/debug/debug_rect_history.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698