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

Side by Side Diff: cc/input/scroll_state_data.h

Issue 2884423003: Use scroll-boundary-behavior to control overscroll-refresh/glow on android. (Closed)
Patch Set: Rebase Created 3 years, 3 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 unified diff | Download patch
« no previous file with comments | « cc/input/scroll_state.h ('k') | cc/input/scroll_state_data.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_INPUT_SCROLL_STATE_DATA_H_ 5 #ifndef CC_INPUT_SCROLL_STATE_DATA_H_
6 #define CC_INPUT_SCROLL_STATE_DATA_H_ 6 #define CC_INPUT_SCROLL_STATE_DATA_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 // TODO(tdresser): ScrollState shouldn't need to keep track of whether or not 53 // TODO(tdresser): ScrollState shouldn't need to keep track of whether or not
54 // this ScrollState object has caused a scroll. Ideally, any native scroller 54 // this ScrollState object has caused a scroll. Ideally, any native scroller
55 // consuming delta has caused a scroll. Currently, there are some cases where 55 // consuming delta has caused a scroll. Currently, there are some cases where
56 // we consume delta without scrolling, such as in 56 // we consume delta without scrolling, such as in
57 // |Viewport::AdjustOverscroll|. Once these cases are fixed, we should get rid 57 // |Viewport::AdjustOverscroll|. Once these cases are fixed, we should get rid
58 // of |caused_scroll_*_|. See crbug.com/510045 for details. 58 // of |caused_scroll_*_|. See crbug.com/510045 for details.
59 bool caused_scroll_x; 59 bool caused_scroll_x;
60 bool caused_scroll_y; 60 bool caused_scroll_y;
61 61
62 // Track if the scroll_chain has been cut by scroll_boundary_behavior, in
63 // order to properly handle overscroll-effects.
64 // TODO(sunyunjia): overscroll should be handled at the top of scroll_chain,
65 // as implemented at blink side. This field should be removed after it's
66 // resolved. crbug.com/755164.
67 bool is_scroll_chain_cut;
68
62 ScrollNode* current_native_scrolling_node() const; 69 ScrollNode* current_native_scrolling_node() const;
63 void set_current_native_scrolling_node( 70 void set_current_native_scrolling_node(
64 ScrollNode* current_native_scrolling_node); 71 ScrollNode* current_native_scrolling_node);
65 ElementId current_native_scrolling_element() const; 72 ElementId current_native_scrolling_element() const;
66 void set_current_native_scrolling_element(ElementId element_id); 73 void set_current_native_scrolling_element(ElementId element_id);
67 74
68 private: 75 private:
69 // Only one of current_native_scrolling_node_ and 76 // Only one of current_native_scrolling_node_ and
70 // current_native_scrolling_element_ may be non-null at a time. Whenever 77 // current_native_scrolling_element_ may be non-null at a time. Whenever
71 // possible, we should store the scroll node. 78 // possible, we should store the scroll node.
72 79
73 // The last scroll node to respond to a scroll, or null if none exists. 80 // The last scroll node to respond to a scroll, or null if none exists.
74 ScrollNode* current_native_scrolling_node_; 81 ScrollNode* current_native_scrolling_node_;
75 // The id of the last native element to respond to a scroll, or 0 if none 82 // The id of the last native element to respond to a scroll, or 0 if none
76 // exists. 83 // exists.
77 ElementId current_native_scrolling_element_; 84 ElementId current_native_scrolling_element_;
78 }; 85 };
79 86
80 } // namespace cc 87 } // namespace cc
81 88
82 #endif // CC_INPUT_SCROLL_STATE_DATA_H_ 89 #endif // CC_INPUT_SCROLL_STATE_DATA_H_
OLDNEW
« no previous file with comments | « cc/input/scroll_state.h ('k') | cc/input/scroll_state_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698