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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 2884423003: Use scroll-boundary-behavior to control overscroll-refresh/glow on android. (Closed)
Patch Set: rebase and update comments Created 3 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 3573 matching lines...) Expand 10 before | Expand all | Expand 10 after
3584 3584
3585 bool did_scroll_top_controls = 3585 bool did_scroll_top_controls =
3586 initial_top_controls_offset != 3586 initial_top_controls_offset !=
3587 browser_controls_offset_manager_->ControlsTopOffset(); 3587 browser_controls_offset_manager_->ControlsTopOffset();
3588 3588
3589 InputHandlerScrollResult scroll_result; 3589 InputHandlerScrollResult scroll_result;
3590 scroll_result.did_scroll = did_scroll_content || did_scroll_top_controls; 3590 scroll_result.did_scroll = did_scroll_content || did_scroll_top_controls;
3591 scroll_result.did_overscroll_root = !unused_root_delta.IsZero(); 3591 scroll_result.did_overscroll_root = !unused_root_delta.IsZero();
3592 scroll_result.accumulated_root_overscroll = accumulated_root_overscroll_; 3592 scroll_result.accumulated_root_overscroll = accumulated_root_overscroll_;
3593 scroll_result.unused_scroll_delta = unused_root_delta; 3593 scroll_result.unused_scroll_delta = unused_root_delta;
3594 3594 scroll_result.scroll_boundary_behavior =
3595 active_tree()->scroll_boundary_behavior();
3595 if (scroll_result.did_scroll) { 3596 if (scroll_result.did_scroll) {
3596 // Scrolling can change the root scroll offset, so inform the synchronous 3597 // Scrolling can change the root scroll offset, so inform the synchronous
3597 // input handler. 3598 // input handler.
3598 UpdateRootLayerStateForSynchronousInputHandler(); 3599 UpdateRootLayerStateForSynchronousInputHandler();
3599 } 3600 }
3600 3601
3601 // Update compositor worker mutations which may respond to scrolling. 3602 // Update compositor worker mutations which may respond to scrolling.
3602 Mutate(CurrentBeginFrameArgs().frame_time); 3603 Mutate(CurrentBeginFrameArgs().frame_time);
3603 3604
3604 return scroll_result; 3605 return scroll_result;
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after
4483 4484
4484 void LayerTreeHostImpl::ShowScrollbarsForImplScroll(ElementId element_id) { 4485 void LayerTreeHostImpl::ShowScrollbarsForImplScroll(ElementId element_id) {
4485 if (!element_id) 4486 if (!element_id)
4486 return; 4487 return;
4487 if (ScrollbarAnimationController* animation_controller = 4488 if (ScrollbarAnimationController* animation_controller =
4488 ScrollbarAnimationControllerForElementId(element_id)) 4489 ScrollbarAnimationControllerForElementId(element_id))
4489 animation_controller->DidScrollUpdate(); 4490 animation_controller->DidScrollUpdate();
4490 } 4491 }
4491 4492
4492 } // namespace cc 4493 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698