| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 56 |
| 57 ScrollNode* current_native_scrolling_node() const; | 57 ScrollNode* current_native_scrolling_node() const; |
| 58 void set_current_native_scrolling_node( | 58 void set_current_native_scrolling_node( |
| 59 ScrollNode* current_native_scrolling_node); | 59 ScrollNode* current_native_scrolling_node); |
| 60 ElementId current_native_scrolling_element() const; | 60 uint64_t current_native_scrolling_element() const; |
| 61 void set_current_native_scrolling_element(ElementId element_id); | 61 void set_current_native_scrolling_element(uint64_t element_id); |
| 62 | 62 |
| 63 private: | 63 private: |
| 64 // Only one of current_native_scrolling_node_ and | 64 // Only one of current_native_scrolling_node_ and |
| 65 // current_native_scrolling_element_ may be non-null at a time. Whenever | 65 // current_native_scrolling_element_ may be non-null at a time. Whenever |
| 66 // possible, we should store the scroll node. | 66 // possible, we should store the scroll node. |
| 67 | 67 |
| 68 // The last scroll node to respond to a scroll, or null if none exists. | 68 // The last scroll node to respond to a scroll, or null if none exists. |
| 69 ScrollNode* current_native_scrolling_node_; | 69 ScrollNode* current_native_scrolling_node_; |
| 70 // The id of the last native element to respond to a scroll, or 0 if none | 70 // The id of the last native element to respond to a scroll, or 0 if none |
| 71 // exists. | 71 // exists. |
| 72 ElementId current_native_scrolling_element_; | 72 uint64_t current_native_scrolling_element_; |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 } // namespace cc | 75 } // namespace cc |
| 76 | 76 |
| 77 #endif // CC_INPUT_SCROLL_STATE_DATA_H_ | 77 #endif // CC_INPUT_SCROLL_STATE_DATA_H_ |
| OLD | NEW |