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..eefb5c5982f344400f960e5dbe91ff792e1b1239 100644 |
--- a/cc/trees/layer_tree_host_impl.cc |
+++ b/cc/trees/layer_tree_host_impl.cc |
@@ -2900,7 +2900,15 @@ InputHandler::ScrollStatus LayerTreeHostImpl::ScrollAnimated( |
MainThreadScrollingReason::kNotScrollingOnMain; |
ScrollTree& scroll_tree = active_tree_->property_trees()->scroll_tree; |
ScrollNode* scroll_node = scroll_tree.CurrentlyScrollingNode(); |
+ |
if (scroll_node) { |
+ // Flash the overlay scrollbar even if the scroll dalta is 0. |
+ ScrollbarAnimationController* animation_controller = |
+ ScrollbarAnimationControllerForId(scroll_node->owning_layer_id); |
+ |
+ if (animation_controller) |
+ animation_controller->WillUpdateScroll(); |
+ |
gfx::Vector2dF delta = scroll_delta; |
if (!scroll_node->user_scrollable_horizontal) |
delta.set_x(0); |
@@ -2939,6 +2947,13 @@ InputHandler::ScrollStatus LayerTreeHostImpl::ScrollAnimated( |
viewport()->MainScrollLayer() && |
viewport()->MainScrollLayer()->scroll_tree_index() == scroll_node->id; |
if (scrolls_main_viewport_scroll_layer) { |
+ // Flash the overlay scrollbar even if the scroll dalta is 0. |
+ ScrollbarAnimationController* animation_controller = |
+ ScrollbarAnimationControllerForId(scroll_node->owning_layer_id); |
+ |
+ if (animation_controller) |
+ animation_controller->WillUpdateScroll(); |
+ |
gfx::Vector2dF scrolled = |
viewport()->ScrollAnimated(pending_delta, delayed_by); |
// Viewport::ScrollAnimated returns pending_delta as long as it starts |
@@ -3183,9 +3198,18 @@ InputHandlerScrollResult LayerTreeHostImpl::ScrollBy( |
DCHECK(scroll_state); |
TRACE_EVENT0("cc", "LayerTreeHostImpl::ScrollBy"); |
- if (!CurrentlyScrollingNode()) |
+ ScrollTree& scroll_tree = active_tree_->property_trees()->scroll_tree; |
+ ScrollNode* scroll_node = scroll_tree.CurrentlyScrollingNode(); |
+ |
+ if (!scroll_node) |
return InputHandlerScrollResult(); |
+ ScrollbarAnimationController* animation_controller = |
+ ScrollbarAnimationControllerForId(scroll_node->owning_layer_id); |
+ |
+ if (animation_controller) |
+ animation_controller->WillUpdateScroll(); |
+ |
float initial_top_controls_offset = |
browser_controls_offset_manager_->ControlsTopOffset(); |