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 ea8a29f46560dbaf88d13c08f9247dd7c3da857a..abec01ea496df05eecf176593b53c3a7772ff7ff 100644 |
--- a/cc/trees/layer_tree_host_impl.cc |
+++ b/cc/trees/layer_tree_host_impl.cc |
@@ -278,11 +278,11 @@ LayerTreeHostImpl::~LayerTreeHostImpl() { |
DestroyTileManager(); |
} |
-void LayerTreeHostImpl::BeginMainFrameAborted(bool did_handle) { |
+void LayerTreeHostImpl::BeginMainFrameAborted(CommitEarlyOutReason reason) { |
// If the begin frame data was handled, then scroll and scale set was applied |
// by the main thread, so the active tree needs to be updated as if these sent |
// values were applied and committed. |
- if (did_handle) { |
+ if (CommitEarlyOutHandledCommit(reason)) { |
active_tree_->ApplySentScrollAndScaleDeltasFromAbortedCommit(); |
active_tree_->ResetContentsTexturesPurged(); |
} |
@@ -474,7 +474,8 @@ LayerTreeHostImpl::CreateLatencyInfoSwapPromiseMonitor( |
ScrollElasticityHelper* LayerTreeHostImpl::CreateScrollElasticityHelper() { |
DCHECK(!scroll_elasticity_helper_); |
- scroll_elasticity_helper_.reset(new ScrollElasticityHelper(this)); |
+ scroll_elasticity_helper_.reset( |
+ ScrollElasticityHelper::CreateForLayerTreeHostImpl(this)); |
return scroll_elasticity_helper_.get(); |
} |
@@ -2564,10 +2565,6 @@ bool LayerTreeHostImpl::ShouldTopControlsConsumeScroll( |
if (scroll_delta.y() < 0) |
return true; |
- if (CurrentlyScrollingLayer() != InnerViewportScrollLayer() && |
- CurrentlyScrollingLayer() != OuterViewportScrollLayer()) |
- return false; |
- |
if (active_tree()->TotalScrollOffset().y() < |
active_tree()->TotalMaxScrollOffset().y()) |
return true; |