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

Unified Diff: cc/layers/layer.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/input/scroll_state.h ('k') | cc/layers/layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer.h
diff --git a/cc/layers/layer.h b/cc/layers/layer.h
index dd0464e4f79872b96d577d79fa02e425e7b34ddc..4f771b9b1ddb3a553cb0dc4c5ccd744cded11ca1 100644
--- a/cc/layers/layer.h
+++ b/cc/layers/layer.h
@@ -234,10 +234,17 @@ class CC_EXPORT Layer : public base::RefCounted<Layer> {
void SetScrollOffset(const gfx::ScrollOffset& scroll_offset);
gfx::ScrollOffset scroll_offset() const { return inputs_.scroll_offset; }
- void SetScrollOffsetFromImplSide(const gfx::ScrollOffset& scroll_offset);
+ void SetScrollOffsetFromImplSide(const gfx::ScrollOffset& scroll_offset,
+ gfx::Vector2dF* overscroll_delta);
+
+ // TODO(tapted): Remove this overload.
+ void SetScrollClipLayerId(int clip_layer_id) {
+ SetScrollClipAndCanOverscroll(clip_layer_id, false);
+ }
+ void SetScrollClipAndCanOverscroll(int clip_layer_id, bool can_overscroll);
- void SetScrollClipLayerId(int clip_layer_id);
bool scrollable() const { return inputs_.scroll_clip_layer_id != INVALID_ID; }
+ gfx::ScrollOffset overscroll() const { return inputs_.overscroll; }
Layer* scroll_clip_layer() const;
void SetUserScrollable(bool horizontal, bool vertical);
@@ -280,6 +287,7 @@ class CC_EXPORT Layer : public base::RefCounted<Layer> {
gfx::ScrollOffset CurrentScrollOffset() const {
return inputs_.scroll_offset;
}
+ gfx::ScrollOffset CurrentOverscroll() const { return inputs_.overscroll; }
void SetDoubleSided(bool double_sided);
bool double_sided() const { return inputs_.double_sided; }
@@ -661,6 +669,7 @@ class CC_EXPORT Layer : public base::RefCounted<Layer> {
gfx::PointF filters_origin;
gfx::ScrollOffset scroll_offset;
+ gfx::ScrollOffset overscroll;
// This variable indicates which ancestor layer (if any) whose size,
// transformed relative to this layer, defines the maximum scroll offset
@@ -668,6 +677,7 @@ class CC_EXPORT Layer : public base::RefCounted<Layer> {
int scroll_clip_layer_id;
bool user_scrollable_horizontal : 1;
bool user_scrollable_vertical : 1;
+ bool can_overscroll : 1;
uint32_t main_thread_scrolling_reasons;
Region non_fast_scrollable_region;
« no previous file with comments | « cc/input/scroll_state.h ('k') | cc/layers/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698