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

Unified Diff: cc/trees/layer_tree_host_common.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/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 ecd848bc5af859d82cb2151a4aa3f0667a8d648c..c42b8bed0b06f542b200a3afc72cbe0a37426870 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -169,19 +169,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