| OLD | NEW |
| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 double delta_granularity; | 46 double delta_granularity; |
| 47 | 47 |
| 48 // TODO(tdresser): ScrollState shouldn't need to keep track of whether or not | 48 // TODO(tdresser): ScrollState shouldn't need to keep track of whether or not |
| 49 // this ScrollState object has caused a scroll. Ideally, any native scroller | 49 // this ScrollState object has caused a scroll. Ideally, any native scroller |
| 50 // consuming delta has caused a scroll. Currently, there are some cases where | 50 // consuming delta has caused a scroll. Currently, there are some cases where |
| 51 // we consume delta without scrolling, such as in | 51 // we consume delta without scrolling, such as in |
| 52 // |Viewport::AdjustOverscroll|. Once these cases are fixed, we should get rid | 52 // |Viewport::AdjustOverscroll|. Once these cases are fixed, we should get rid |
| 53 // of |caused_scroll_*_|. See crbug.com/510045 for details. | 53 // of |caused_scroll_*_|. See crbug.com/510045 for details. |
| 54 bool caused_scroll_x; | 54 bool caused_scroll_x; |
| 55 bool caused_scroll_y; | 55 bool caused_scroll_y; |
| 56 // True for scrollEnd if, a fling might happen after the scrollEnd. |
| 57 bool fling_might_happen_next; |
| 56 | 58 |
| 57 ScrollNode* current_native_scrolling_node() const; | 59 ScrollNode* current_native_scrolling_node() const; |
| 58 void set_current_native_scrolling_node( | 60 void set_current_native_scrolling_node( |
| 59 ScrollNode* current_native_scrolling_node); | 61 ScrollNode* current_native_scrolling_node); |
| 60 ElementId current_native_scrolling_element() const; | 62 ElementId current_native_scrolling_element() const; |
| 61 void set_current_native_scrolling_element(ElementId element_id); | 63 void set_current_native_scrolling_element(ElementId element_id); |
| 62 | 64 |
| 63 private: | 65 private: |
| 64 // Only one of current_native_scrolling_node_ and | 66 // Only one of current_native_scrolling_node_ and |
| 65 // current_native_scrolling_element_ may be non-null at a time. Whenever | 67 // current_native_scrolling_element_ may be non-null at a time. Whenever |
| 66 // possible, we should store the scroll node. | 68 // possible, we should store the scroll node. |
| 67 | 69 |
| 68 // The last scroll node to respond to a scroll, or null if none exists. | 70 // The last scroll node to respond to a scroll, or null if none exists. |
| 69 ScrollNode* current_native_scrolling_node_; | 71 ScrollNode* current_native_scrolling_node_; |
| 70 // The id of the last native element to respond to a scroll, or 0 if none | 72 // The id of the last native element to respond to a scroll, or 0 if none |
| 71 // exists. | 73 // exists. |
| 72 ElementId current_native_scrolling_element_; | 74 ElementId current_native_scrolling_element_; |
| 73 }; | 75 }; |
| 74 | 76 |
| 75 } // namespace cc | 77 } // namespace cc |
| 76 | 78 |
| 77 #endif // CC_INPUT_SCROLL_STATE_DATA_H_ | 79 #endif // CC_INPUT_SCROLL_STATE_DATA_H_ |
| OLD | NEW |