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

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

Issue 2118993002: Detemplatize cc property nodes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 unified diff | Download patch
« no previous file with comments | « cc/input/scroll_state.cc ('k') | cc/input/scroll_state_unittest.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 #include "cc/input/scroll_state_data.h" 5 #include "cc/input/scroll_state_data.h"
6 #include "cc/trees/scroll_node.h"
6 7
7 namespace cc { 8 namespace cc {
8 9
9 ScrollStateData::ScrollStateData() 10 ScrollStateData::ScrollStateData()
10 : delta_x(0), 11 : delta_x(0),
11 delta_y(0), 12 delta_y(0),
12 position_x(0), 13 position_x(0),
13 position_y(0), 14 position_y(0),
14 velocity_x(0), 15 velocity_x(0),
15 velocity_y(0), 16 velocity_y(0),
(...skipping 16 matching lines...) Expand all
32 } 33 }
33 34
34 void ScrollStateData::set_current_native_scrolling_node( 35 void ScrollStateData::set_current_native_scrolling_node(
35 ScrollNode* current_native_scrolling_node) { 36 ScrollNode* current_native_scrolling_node) {
36 current_native_scrolling_node_ = current_native_scrolling_node; 37 current_native_scrolling_node_ = current_native_scrolling_node;
37 current_native_scrolling_element_ = ElementId(); 38 current_native_scrolling_element_ = ElementId();
38 } 39 }
39 40
40 ElementId ScrollStateData::current_native_scrolling_element() const { 41 ElementId ScrollStateData::current_native_scrolling_element() const {
41 if (current_native_scrolling_node_) 42 if (current_native_scrolling_node_)
42 return current_native_scrolling_node_->data.element_id; 43 return current_native_scrolling_node_->element_id;
43 return current_native_scrolling_element_; 44 return current_native_scrolling_element_;
44 } 45 }
45 46
46 void ScrollStateData::set_current_native_scrolling_element( 47 void ScrollStateData::set_current_native_scrolling_element(
47 ElementId element_id) { 48 ElementId element_id) {
48 current_native_scrolling_element_ = element_id; 49 current_native_scrolling_element_ = element_id;
49 current_native_scrolling_node_ = nullptr; 50 current_native_scrolling_node_ = nullptr;
50 } 51 }
51 52
52 } // namespace cc 53 } // namespace cc
OLDNEW
« no previous file with comments | « cc/input/scroll_state.cc ('k') | cc/input/scroll_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698