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

Side by Side Diff: cc/debug/debug_rect_history.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 unified diff | Download patch
« no previous file with comments | « no previous file | cc/proto/layer_tree_settings.proto » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/debug/debug_rect_history.h" 5 #include "cc/debug/debug_rect_history.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "cc/base/math_util.h" 10 #include "cc/base/math_util.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 MathUtil::MapEnclosingClippedRect( 172 MathUtil::MapEnclosingClippedRect(
173 layer->ScreenSpaceTransform(), iter.rect()))); 173 layer->ScreenSpaceTransform(), iter.rect())));
174 } 174 }
175 } 175 }
176 176
177 void DebugRectHistory::SaveWheelEventHandlerRects(LayerImpl* root_layer) { 177 void DebugRectHistory::SaveWheelEventHandlerRects(LayerImpl* root_layer) {
178 EventListenerProperties event_properties = 178 EventListenerProperties event_properties =
179 root_layer->layer_tree_impl()->event_listener_properties( 179 root_layer->layer_tree_impl()->event_listener_properties(
180 EventListenerClass::kMouseWheel); 180 EventListenerClass::kMouseWheel);
181 if (event_properties == EventListenerProperties::kNone || 181 if (event_properties == EventListenerProperties::kNone ||
182 event_properties == EventListenerProperties::kPassive) { 182 (root_layer->layer_tree_impl()->settings().use_mouse_wheel_gestures &&
183 event_properties == EventListenerProperties::kPassive)) {
183 return; 184 return;
184 } 185 }
185 186
186 // Since the wheel event handlers property is on the entire layer tree just 187 // Since the wheel event handlers property is on the entire layer tree just
187 // mark inner viewport if have listeners. 188 // mark inner viewport if have listeners.
188 LayerImpl* inner_viewport = 189 LayerImpl* inner_viewport =
189 root_layer->layer_tree_impl()->InnerViewportScrollLayer(); 190 root_layer->layer_tree_impl()->InnerViewportScrollLayer();
190 if (!inner_viewport) 191 if (!inner_viewport)
191 return; 192 return;
192 debug_rects_.push_back(DebugRect( 193 debug_rects_.push_back(DebugRect(
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 debug_rects_.push_back( 246 debug_rects_.push_back(
246 DebugRect(ANIMATION_BOUNDS_RECT_TYPE, 247 DebugRect(ANIMATION_BOUNDS_RECT_TYPE,
247 gfx::ToEnclosingRect(gfx::RectF(inflated_bounds.x(), 248 gfx::ToEnclosingRect(gfx::RectF(inflated_bounds.x(),
248 inflated_bounds.y(), 249 inflated_bounds.y(),
249 inflated_bounds.width(), 250 inflated_bounds.width(),
250 inflated_bounds.height())))); 251 inflated_bounds.height()))));
251 } 252 }
252 } 253 }
253 254
254 } // namespace cc 255 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/proto/layer_tree_settings.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698