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

Unified Diff: cc/layers/layer.h

Issue 2189583004: [not for review - epic CL] Adding Elastic+Momentum+Layered scrolling to views::ScrollView Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 2 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/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 d0bd07ce9b90e717ccf5c7ce5ab56e5ff6f11480..c9840c6ceb724404f61f40b771748a1553a9986c 100644
--- a/cc/layers/layer.h
+++ b/cc/layers/layer.h
@@ -236,10 +236,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);
@@ -282,6 +289,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; }
@@ -652,6 +660,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
@@ -659,6 +668,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