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

Unified Diff: cc/trees/draw_property_utils.cc

Issue 2194833002: Overscroll and Elasticity for views::ScrollView Base URL: https://chromium.googlesource.com/chromium/src.git@20160728-MacViews-RouteThroughInputHandler
Patch Set: Restore functionality and fix bugs \o/ Created 4 years, 1 month 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/test/test_layer_tree_host_base.cc ('k') | cc/trees/layer_tree_host_common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/draw_property_utils.cc
diff --git a/cc/trees/draw_property_utils.cc b/cc/trees/draw_property_utils.cc
index 4dde99d6ac9ee6aebf98ffabd0b380b71dad764c..e0b40d8c3b9d0108d775dc82c3b2bd14c70d746b 100644
--- a/cc/trees/draw_property_utils.cc
+++ b/cc/trees/draw_property_utils.cc
@@ -1438,16 +1438,21 @@ static void UpdateElasticOverscrollInternal(
const LayerType* overscroll_elasticity_layer,
const gfx::Vector2dF& elastic_overscroll) {
if (!overscroll_elasticity_layer) {
- DCHECK(elastic_overscroll.IsZero());
+ // When only the viewport has elasticity, elastic_overscroll should be zero
+ // here, but for now elasticity doesn't bubble up, only down. So, that won't
+ // be the case if a sublayer has its own overscroll.
+ // TODO(tapted): Give the viewport overscroll and completely remove
+ // overscroll_elasticity_layer.
return;
}
TransformNode* node = property_trees->transform_tree.Node(
overscroll_elasticity_layer->transform_tree_index());
- if (node->scroll_offset == gfx::ScrollOffset(elastic_overscroll))
+ if (node->scroll_offset_with_overscroll ==
+ gfx::ScrollOffset(elastic_overscroll))
return;
- node->scroll_offset = gfx::ScrollOffset(elastic_overscroll);
+ node->scroll_offset_with_overscroll = gfx::ScrollOffset(elastic_overscroll);
node->needs_local_transform_update = true;
property_trees->transform_tree.set_needs_update(true);
}
« no previous file with comments | « cc/test/test_layer_tree_host_base.cc ('k') | cc/trees/layer_tree_host_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698