| Index: cc/trees/layer_tree_impl.cc
|
| diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
|
| index 9ebf811b7edfd47757ed3f55461277f3f860244a..a42bd6830f26a2579c1a7975cfd6ce91c1f6b38b 100644
|
| --- a/cc/trees/layer_tree_impl.cc
|
| +++ b/cc/trees/layer_tree_impl.cc
|
| @@ -243,31 +243,27 @@ void LayerTreeImpl::UpdateScrollbars(int scroll_layer_id, int clip_layer_id) {
|
| }
|
|
|
| bool scrollbar_needs_animation = false;
|
| - bool clip_layer_size_did_change = false;
|
| bool scroll_layer_size_did_change = false;
|
| bool y_offset_did_change = false;
|
| for (ScrollbarLayerImplBase* scrollbar : ScrollbarsFor(scroll_layer_id)) {
|
| if (scrollbar->orientation() == HORIZONTAL) {
|
| scrollbar_needs_animation |= scrollbar->SetCurrentPos(current_offset.x());
|
| - clip_layer_size_did_change |=
|
| + scrollbar_needs_animation |=
|
| scrollbar->SetClipLayerLength(clip_size.width());
|
| - scroll_layer_size_did_change |=
|
| + scrollbar_needs_animation |= scroll_layer_size_did_change |=
|
| scrollbar->SetScrollLayerLength(scroll_size.width());
|
| } else {
|
| scrollbar_needs_animation |= y_offset_did_change |=
|
| scrollbar->SetCurrentPos(current_offset.y());
|
| - clip_layer_size_did_change |=
|
| + scrollbar_needs_animation |=
|
| scrollbar->SetClipLayerLength(clip_size.height());
|
| - scroll_layer_size_did_change |=
|
| + scrollbar_needs_animation |= scroll_layer_size_did_change |=
|
| scrollbar->SetScrollLayerLength(scroll_size.height());
|
| }
|
| scrollbar_needs_animation |=
|
| scrollbar->SetVerticalAdjust(clip_layer->bounds_delta().y());
|
| }
|
|
|
| - scrollbar_needs_animation |=
|
| - (clip_layer_size_did_change || scroll_layer_size_did_change);
|
| -
|
| if (y_offset_did_change && IsViewportLayerId(scroll_layer_id))
|
| TRACE_COUNTER_ID1("cc", "scroll_offset_y", scroll_layer->id(),
|
| current_offset.y());
|
| @@ -276,14 +272,8 @@ void LayerTreeImpl::UpdateScrollbars(int scroll_layer_id, int clip_layer_id) {
|
| ScrollbarAnimationController* controller =
|
| layer_tree_host_impl_->ScrollbarAnimationControllerForId(
|
| scroll_layer_id);
|
| - if (!controller)
|
| - return;
|
| -
|
| - if (clip_layer_size_did_change || scroll_layer_size_did_change) {
|
| - controller->DidResize();
|
| - } else {
|
| - controller->DidScrollUpdate();
|
| - }
|
| + if (controller)
|
| + controller->DidScrollUpdate(scroll_layer_size_did_change);
|
| }
|
| }
|
|
|
|
|