Chromium Code Reviews| 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 c3005c8a4bfaa15b1db877b8618f0f341f2d64fc..b50177aca1d8de6823a72c5efe8121f3d3cbfbe7 100644 |
| --- a/cc/trees/layer_tree_host_impl.cc |
| +++ b/cc/trees/layer_tree_host_impl.cc |
| @@ -36,6 +36,7 @@ |
| #include "cc/input/scroll_elasticity_helper.h" |
| #include "cc/input/scroll_state.h" |
| #include "cc/input/scrollbar_animation_controller.h" |
| +#include "cc/input/scroller_size.h" |
| #include "cc/layers/append_quads_data.h" |
| #include "cc/layers/effect_tree_layer_list_iterator.h" |
| #include "cc/layers/heads_up_display_layer_impl.h" |
| @@ -2768,6 +2769,24 @@ InputHandler::ScrollStatus LayerTreeHostImpl::ScrollBegin( |
| scrolling_node = FindScrollNodeForDeviceViewportPoint( |
| device_viewport_point, type, layer_impl, &scroll_on_main_thread, |
| &scroll_status.main_thread_scrolling_reasons); |
| + if (!scroll_on_main_thread && scrolling_node && |
| + InnerViewportScrollLayer() && OuterViewportScrollLayer() && |
|
flackr
2017/04/20 07:15:01
Why do we need to have a inner and outer viewport
bokan
2017/04/20 14:34:06
I think it's meant to null check the conditions be
|
| + scrolling_node->element_id != |
| + InnerViewportScrollLayer()->element_id() && |
| + scrolling_node->element_id != |
| + OuterViewportScrollLayer()->element_id()) { |
| + if (IsWheelBasedScroll(type)) { |
| + UMA_HISTOGRAM_CUSTOM_COUNTS( |
| + "Event.Scroll.ScrollerSize.OnScroll_Wheel", |
| + scrolling_node->scroll_clip_layer_bounds.GetArea(), 1, |
| + kMaxScrollerSize, kScrollerSizeBucketCount); |
| + } else { |
| + UMA_HISTOGRAM_CUSTOM_COUNTS( |
| + "Event.Scroll.ScrollerSize.OnScroll_Touch", |
| + scrolling_node->scroll_clip_layer_bounds.GetArea(), 1, |
| + kMaxScrollerSize, kScrollerSizeBucketCount); |
| + } |
| + } |
| } |
| if (scroll_on_main_thread) { |