| Index: cc/trees/layer_tree_host_in_process.cc
|
| diff --git a/cc/trees/layer_tree_host_in_process.cc b/cc/trees/layer_tree_host_in_process.cc
|
| index f980b489a44074c12908f8d2316ed967c7d96084..f420f887c1a88ad88704621d95c7c6f85e451b05 100644
|
| --- a/cc/trees/layer_tree_host_in_process.cc
|
| +++ b/cc/trees/layer_tree_host_in_process.cc
|
| @@ -450,11 +450,24 @@ void LayerTreeHostInProcess::FinishCommitOnImplThread(
|
|
|
| sync_tree->set_source_frame_number(SourceFrameNumber());
|
|
|
| + // TODO(bokan): The tree sync might destroy the currently scrolling layer.
|
| + // Normally, this would be fine and we'd just drop incoming scrolls but some
|
| + // telemetry tests rely on the viewport not having this behavior. Those should
|
| + // be fixed and this removed. crbug.com/652905.
|
| + bool restore_currently_scrolling_viewport =
|
| + host_impl->IsCurrentlyScrollingViewport();
|
| +
|
| if (layer_tree_->needs_full_tree_sync())
|
| TreeSynchronizer::SynchronizeTrees(layer_tree_->root_layer(), sync_tree);
|
|
|
| layer_tree_->PushPropertiesTo(sync_tree);
|
|
|
| + if (restore_currently_scrolling_viewport &&
|
| + !host_impl->IsCurrentlyScrollingViewport()) {
|
| + host_impl->active_tree()->SetCurrentlyScrollingLayer(
|
| + host_impl->ViewportMainScrollLayer());
|
| + }
|
| +
|
| sync_tree->PassSwapPromises(swap_promise_manager_.TakeSwapPromises());
|
|
|
| host_impl->SetHasGpuRasterizationTrigger(has_gpu_rasterization_trigger_);
|
|
|