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

Unified Diff: cc/layers/layer.h

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/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 879beaab1f29863a474602889f52ce64a02a338f..8765a3ec67083157b976d51784ca48aa775e06ff 100644
--- a/cc/layers/layer.h
+++ b/cc/layers/layer.h
@@ -233,10 +233,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);
@@ -279,6 +286,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> {
FilterOperations background_filters;
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