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

Unified 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 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_impl.h » ('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 094e63e94b1866820a80d12cf2f01cd90d98b485..9c231a5379db48dea790ea6ccbe3c46fb9956a64 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -3213,8 +3213,10 @@ InputHandler::ScrollStatus LayerTreeHostImpl::ScrollAnimated(
pending_delta -= scroll_delta;
- if (!CanPropagate(scroll_node, pending_delta.x(), pending_delta.y()))
+ if (!CanPropagate(scroll_node, pending_delta.x(), pending_delta.y())) {
+ scroll_state.set_is_scroll_chain_cut(true);
break;
+ }
}
}
scroll_state.set_is_ending(true);
@@ -3477,8 +3479,10 @@ void LayerTreeHostImpl::DistributeScrollDelta(ScrollState* scroll_state) {
? scroll_state->delta_y_hint()
: scroll_state->delta_y();
- if (!CanPropagate(scroll_node, delta_x, delta_y))
+ if (!CanPropagate(scroll_node, delta_x, delta_y)) {
+ scroll_state->set_is_scroll_chain_cut(true);
break;
+ }
}
}
active_tree_->SetCurrentlyScrollingNode(
@@ -3601,6 +3605,12 @@ InputHandlerScrollResult LayerTreeHostImpl::ScrollBy(
scroll_result.did_overscroll_root = !unused_root_delta.IsZero();
scroll_result.accumulated_root_overscroll = accumulated_root_overscroll_;
scroll_result.unused_scroll_delta = unused_root_delta;
+ scroll_result.scroll_boundary_behavior =
+ scroll_state->is_scroll_chain_cut()
+ ? ScrollBoundaryBehavior(
+ ScrollBoundaryBehavior::ScrollBoundaryBehaviorType::
+ kScrollBoundaryBehaviorTypeNone)
+ : active_tree()->scroll_boundary_behavior();
if (scroll_result.did_scroll) {
// Scrolling can change the root scroll offset, so inform the synchronous
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698