scroll_state_data.cc 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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
  3. // found in the LICENSE file.
  4. #include "cc/input/scroll_state_data.h"
  5. #include "cc/trees/scroll_node.h"
  6. namespace cc {
  7. ScrollStateData::ScrollStateData()
  8. : delta_x(0),
  9. delta_y(0),
  10. delta_x_hint(0),
  11. delta_y_hint(0),
  12. position_x(0),
  13. position_y(0),
  14. velocity_x(0),
  15. velocity_y(0),
  16. is_beginning(false),
  17. is_in_inertial_phase(false),
  18. is_ending(false),
  19. from_user_input(false),
  20. delta_consumed_for_scroll_sequence(false),
  21. is_direct_manipulation(false),
  22. is_scrollbar_interaction(false),
  23. delta_granularity(ui::ScrollGranularity::kScrollByPrecisePixel),
  24. caused_scroll_x(false),
  25. caused_scroll_y(false),
  26. is_scroll_chain_cut(false),
  27. is_main_thread_hit_tested(false) {}
  28. ScrollStateData::ScrollStateData(const ScrollStateData&) = default;
  29. ScrollStateData& ScrollStateData::operator=(const ScrollStateData&) = default;
  30. ElementId ScrollStateData::current_native_scrolling_element() const {
  31. return current_native_scrolling_element_;
  32. }
  33. void ScrollStateData::set_current_native_scrolling_element(
  34. ElementId element_id) {
  35. current_native_scrolling_element_ = element_id;
  36. }
  37. } // namespace cc