Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2748343004: Revert of Show Overlay Scrollbar when GestureScrollUpdate (Closed)
Patch Set: rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/input/scrollbar_animation_controller_unittest.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0051d95f68e7e3f7fdf3ffebbd74f09ecf87079f..c7238e8b010676ff9bfebaeb3ac0e2ec7de27982 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2904,15 +2904,7 @@ 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);
@@ -2951,13 +2943,6 @@ 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
@@ -3202,18 +3187,9 @@ InputHandlerScrollResult LayerTreeHostImpl::ScrollBy(
DCHECK(scroll_state);
TRACE_EVENT0("cc", "LayerTreeHostImpl::ScrollBy");
- ScrollTree& scroll_tree = active_tree_->property_trees()->scroll_tree;
- ScrollNode* scroll_node = scroll_tree.CurrentlyScrollingNode();
-
- if (!scroll_node)
+ if (!CurrentlyScrollingNode())
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();
« no previous file with comments | « cc/input/scrollbar_animation_controller_unittest.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698