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

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

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_data.h ('k') | cc/trees/layer_tree_host.h » ('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 #include "cc/input/scroll_state_data.h" 5 #include "cc/input/scroll_state_data.h"
6 #include "cc/trees/scroll_node.h" 6 #include "cc/trees/scroll_node.h"
7 7
8 namespace cc { 8 namespace cc {
9 9
10 ScrollStateData::ScrollStateData() 10 ScrollStateData::ScrollStateData()
11 : delta_x(0), 11 : delta_x(0),
12 delta_y(0), 12 delta_y(0),
13 delta_x_hint(0), 13 delta_x_hint(0),
14 delta_y_hint(0), 14 delta_y_hint(0),
15 position_x(0), 15 position_x(0),
16 position_y(0), 16 position_y(0),
17 velocity_x(0), 17 velocity_x(0),
18 velocity_y(0), 18 velocity_y(0),
19 is_beginning(false), 19 is_beginning(false),
20 is_in_inertial_phase(false), 20 is_in_inertial_phase(false),
21 is_ending(false), 21 is_ending(false),
22 should_propagate(false), 22 should_propagate(false),
23 from_user_input(false), 23 from_user_input(false),
24 delta_consumed_for_scroll_sequence(false), 24 delta_consumed_for_scroll_sequence(false),
25 is_direct_manipulation(false), 25 is_direct_manipulation(false),
26 delta_granularity(0), 26 delta_granularity(0),
27 caused_scroll_x(false), 27 caused_scroll_x(false),
28 caused_scroll_y(false), 28 caused_scroll_y(false),
29 is_scroll_chain_cut(false),
29 current_native_scrolling_node_(nullptr) {} 30 current_native_scrolling_node_(nullptr) {}
30 31
31 ScrollStateData::ScrollStateData(const ScrollStateData& other) = default; 32 ScrollStateData::ScrollStateData(const ScrollStateData& other) = default;
32 33
33 ScrollNode* ScrollStateData::current_native_scrolling_node() const { 34 ScrollNode* ScrollStateData::current_native_scrolling_node() const {
34 return current_native_scrolling_node_; 35 return current_native_scrolling_node_;
35 } 36 }
36 37
37 void ScrollStateData::set_current_native_scrolling_node( 38 void ScrollStateData::set_current_native_scrolling_node(
38 ScrollNode* current_native_scrolling_node) { 39 ScrollNode* current_native_scrolling_node) {
39 current_native_scrolling_node_ = current_native_scrolling_node; 40 current_native_scrolling_node_ = current_native_scrolling_node;
40 current_native_scrolling_element_ = ElementId(); 41 current_native_scrolling_element_ = ElementId();
41 } 42 }
42 43
43 ElementId ScrollStateData::current_native_scrolling_element() const { 44 ElementId ScrollStateData::current_native_scrolling_element() const {
44 if (current_native_scrolling_node_) 45 if (current_native_scrolling_node_)
45 return current_native_scrolling_node_->element_id; 46 return current_native_scrolling_node_->element_id;
46 return current_native_scrolling_element_; 47 return current_native_scrolling_element_;
47 } 48 }
48 49
49 void ScrollStateData::set_current_native_scrolling_element( 50 void ScrollStateData::set_current_native_scrolling_element(
50 ElementId element_id) { 51 ElementId element_id) {
51 current_native_scrolling_element_ = element_id; 52 current_native_scrolling_element_ = element_id;
52 current_native_scrolling_node_ = nullptr; 53 current_native_scrolling_node_ = nullptr;
53 } 54 }
54 55
55 } // namespace cc 56 } // namespace cc
OLDNEW
« no previous file with comments | « cc/input/scroll_state_data.h ('k') | cc/trees/layer_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698