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

Unified Diff: cc/input/scroll_state_data.cc

Issue 1646663002: Refactor Scroll Customization to share cc::ScrollStateData with blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix linking. Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/input/scroll_state_data.h ('k') | cc/input/scroll_state_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/input/scroll_state_data.cc
diff --git a/cc/input/scroll_state_data.cc b/cc/input/scroll_state_data.cc
index 1eb1cebb8d1579e4da7f720f4b4e5e6801215829..5d5e147e76a957ee480bd981a6dafd0fbe86fea4 100644
--- a/cc/input/scroll_state_data.cc
+++ b/cc/input/scroll_state_data.cc
@@ -4,48 +4,47 @@
#include "cc/input/scroll_state_data.h"
+#include "cc/layers/layer_impl.h"
+
namespace cc {
-ScrollStateData::ScrollStateData(double delta_x,
- double delta_y,
- int start_position_x,
- int start_position_y,
- double velocity_x,
- double velocity_y,
- bool is_beginning,
- bool is_in_inertial_phase,
- bool is_ending,
- bool should_propagate,
- bool delta_consumed_for_scroll_sequence,
- bool is_direct_manipulation)
- : delta_x(delta_x),
- delta_y(delta_y),
- start_position_x(start_position_x),
- start_position_y(start_position_y),
- velocity_x(velocity_x),
- velocity_y(velocity_y),
- is_beginning(is_beginning),
- is_in_inertial_phase(is_in_inertial_phase),
- is_ending(is_ending),
- should_propagate(should_propagate),
- current_native_scrolling_layer(nullptr),
- delta_consumed_for_scroll_sequence(delta_consumed_for_scroll_sequence),
- is_direct_manipulation(is_direct_manipulation),
+ScrollStateData::ScrollStateData()
+ : delta_x(0),
+ delta_y(0),
+ start_position_x(0),
+ start_position_y(0),
+ velocity_x(0),
+ velocity_y(0),
+ is_beginning(false),
+ is_in_inertial_phase(false),
+ is_ending(false),
+ should_propagate(false),
+ from_user_input(false),
+ delta_consumed_for_scroll_sequence(false),
+ is_direct_manipulation(false),
+ delta_granularity(0),
caused_scroll_x(false),
- caused_scroll_y(false) {}
+ caused_scroll_y(false),
+ current_native_scrolling_layer_(nullptr),
+ current_native_scrolling_element_(0) {}
-ScrollStateData::ScrollStateData()
- : ScrollStateData(0,
- 0,
- 0,
- 0,
- 0,
- 0,
- false,
- false,
- false,
- true,
- false,
- false) {}
+LayerImpl* ScrollStateData::current_native_scrolling_layer() const {
+ return current_native_scrolling_layer_;
+}
+void ScrollStateData::set_current_native_scrolling_layer(
+ LayerImpl* current_native_scrolling_layer) {
+ current_native_scrolling_layer_ = current_native_scrolling_layer;
+ current_native_scrolling_element_ = 0;
+}
+uint64_t ScrollStateData::current_native_scrolling_element() const {
+ if (current_native_scrolling_layer_)
+ return current_native_scrolling_layer_->element_id();
+ return current_native_scrolling_element_;
+}
+void ScrollStateData::set_current_native_scrolling_element(
+ uint64_t element_id) {
+ current_native_scrolling_element_ = element_id;
+ current_native_scrolling_layer_ = nullptr;
+}
} // namespace cc
« no previous file with comments | « cc/input/scroll_state_data.h ('k') | cc/input/scroll_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698