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

Unified Diff: cc/layers/layer_impl.h

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/layers/layer.cc ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_impl.h
diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h
index 60cc0c3124a83246fb8642c847c5c7a5c27e003c..50ea767044cc886c02b4ac80ec86f4c4d351a95a 100644
--- a/cc/layers/layer_impl.h
+++ b/cc/layers/layer_impl.h
@@ -298,6 +298,8 @@ class CC_EXPORT LayerImpl {
void SetCurrentScrollOffset(const gfx::ScrollOffset& scroll_offset);
gfx::ScrollOffset CurrentScrollOffset() const;
+ void SetCurrentOverscroll(const gfx::ScrollOffset& overscroll);
+ gfx::ScrollOffset CurrentOverscroll() const;
gfx::ScrollOffset MaxScrollOffset() const;
gfx::ScrollOffset ClampScrollOffsetToLimits(gfx::ScrollOffset offset) const;
@@ -307,10 +309,16 @@ class CC_EXPORT LayerImpl {
// initial scroll
gfx::Vector2dF ScrollBy(const gfx::Vector2dF& scroll);
- void SetScrollClipLayer(int scroll_clip_layer_id);
+ // TODO(tapted): Remove this overload.
+ void SetScrollClipLayer(int scroll_clip_layer_id) {
+ SetScrollClipAndCanOverscroll(scroll_clip_layer_id, false);
+ }
+ void SetScrollClipAndCanOverscroll(int scroll_clip_layer_id,
+ bool can_overscroll);
int scroll_clip_layer_id() const { return scroll_clip_layer_id_; }
LayerImpl* scroll_clip_layer() const;
bool scrollable() const;
+ bool can_overscroll() const { return can_overscroll_; }
void set_user_scrollable_horizontal(bool scrollable);
bool user_scrollable_horizontal() const {
@@ -510,6 +518,7 @@ class CC_EXPORT LayerImpl {
bool user_scrollable_horizontal_ : 1;
bool user_scrollable_vertical_ : 1;
+ bool can_overscroll_ : 1;
bool should_flatten_transform_from_property_tree_ : 1;
// Tracks if drawing-related properties have changed since last redraw.
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698