| 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 1974eb1dcc8fc394ae5a201b8d53a867833d1892..1bf68060e19d0f95e3447b5b1ccac7e0b0ce316a 100644
|
| --- a/cc/trees/layer_tree_host_impl.cc
|
| +++ b/cc/trees/layer_tree_host_impl.cc
|
| @@ -2690,6 +2690,8 @@ InputHandler::ScrollStatus LayerTreeHostImpl::ScrollBeginImpl(
|
| client_->RenewTreePriority();
|
| RecordCompositorSlowScrollMetric(type, CC_THREAD);
|
|
|
| + UpdateScrollSourceInfo(wheel_scrolling_);
|
| +
|
| return scroll_status;
|
| }
|
|
|
| @@ -3486,6 +3488,11 @@ std::unique_ptr<ScrollAndScaleSet> LayerTreeHostImpl::ProcessScrollDeltas() {
|
| active_tree_->elastic_overscroll()->PullDeltaForMainThread();
|
| scroll_info->swap_promises.swap(swap_promises_for_main_thread_scroll_update_);
|
|
|
| + // Record and reset scroll source flags.
|
| + scroll_info->has_scrolled_by_wheel = has_scrolled_by_wheel_;
|
| + scroll_info->has_scrolled_by_touch = has_scrolled_by_touch_;
|
| + has_scrolled_by_wheel_ = has_scrolled_by_touch_ = false;
|
| +
|
| return scroll_info;
|
| }
|
|
|
| @@ -4188,4 +4195,11 @@ void LayerTreeHostImpl::SetContextVisibility(bool is_visible) {
|
| }
|
| }
|
|
|
| +void LayerTreeHostImpl::UpdateScrollSourceInfo(bool is_wheel_scroll) {
|
| + if (is_wheel_scroll)
|
| + has_scrolled_by_wheel_ = true;
|
| + else
|
| + has_scrolled_by_touch_ = true;
|
| +}
|
| +
|
| } // namespace cc
|
|
|