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

Unified Diff: cc/trees/layer_tree_host_common.cc

Issue 1680613002: Adding momentum/overscroll to views:: ScrollViews Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Tableview layout. aaaand I think we are done Created 4 years, 5 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_common.h ('k') | cc/trees/layer_tree_host_common_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_common.cc
diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc
index 7024f3a0717c419dc43f318f11e4dd64d51a6f0c..eb091493e9e548abfd5114bc2593df57e1af5137 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -145,19 +145,22 @@ LayerTreeHostCommon::ScrollUpdateInfo::ScrollUpdateInfo()
bool LayerTreeHostCommon::ScrollUpdateInfo::operator==(
const LayerTreeHostCommon::ScrollUpdateInfo& other) const {
- return layer_id == other.layer_id && scroll_delta == other.scroll_delta;
+ return layer_id == other.layer_id && scroll_delta == other.scroll_delta &&
+ overscroll == other.overscroll;
}
void LayerTreeHostCommon::ScrollUpdateInfo::ToProtobuf(
proto::ScrollUpdateInfo* proto) const {
proto->set_layer_id(layer_id);
Vector2dToProto(scroll_delta, proto->mutable_scroll_delta());
+ ScrollOffsetToProto(overscroll, proto->mutable_overscroll());
}
void LayerTreeHostCommon::ScrollUpdateInfo::FromProtobuf(
const proto::ScrollUpdateInfo& proto) {
layer_id = proto.layer_id();
scroll_delta = ProtoToVector2d(proto.scroll_delta());
+ overscroll = ProtoToScrollOffset(proto.overscroll());
}
ScrollAndScaleSet::ScrollAndScaleSet()
« no previous file with comments | « cc/trees/layer_tree_host_common.h ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698