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

Side by Side Diff: third_party/WebKit/Source/core/page/scrolling/ScrollState.h

Issue 2907053004: GSB uses delta_hints to calculate scrolling chain. (Closed)
Patch Set: ignore_delta_hints_ deleted. Created 3 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
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 #ifndef ScrollState_h 5 #ifndef ScrollState_h
6 #define ScrollState_h 6 #define ScrollState_h
7 7
8 #include <deque> 8 #include <deque>
9 #include <memory> 9 #include <memory>
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 25 matching lines...) Expand all
36 void consumeDelta(double x, double y, ExceptionState&); 36 void consumeDelta(double x, double y, ExceptionState&);
37 // Pops the first element off of |m_scrollChain| and calls |distributeScroll| 37 // Pops the first element off of |m_scrollChain| and calls |distributeScroll|
38 // on it. 38 // on it.
39 void distributeToScrollChainDescendant(); 39 void distributeToScrollChainDescendant();
40 int positionX() { return data_->position_x; }; 40 int positionX() { return data_->position_x; };
41 int positionY() { return data_->position_y; }; 41 int positionY() { return data_->position_y; };
42 // Positive when scrolling right. 42 // Positive when scrolling right.
43 double deltaX() const { return data_->delta_x; }; 43 double deltaX() const { return data_->delta_x; };
44 // Positive when scrolling down. 44 // Positive when scrolling down.
45 double deltaY() const { return data_->delta_y; }; 45 double deltaY() const { return data_->delta_y; };
46 // Positive when scrolling right.
47 double deltaXHint() const { return data_->delta_x_hint; };
48 // Positive when scrolling down.
49 double deltaYHint() const { return data_->delta_y_hint; };
46 // Indicates the smallest delta the input device can produce. 0 for 50 // Indicates the smallest delta the input device can produce. 0 for
47 // unquantized inputs. 51 // unquantized inputs.
48 double deltaGranularity() const { return data_->delta_granularity; }; 52 double deltaGranularity() const { return data_->delta_granularity; };
49 // Positive if moving right. 53 // Positive if moving right.
50 double velocityX() const { return data_->velocity_x; }; 54 double velocityX() const { return data_->velocity_x; };
51 // Positive if moving down. 55 // Positive if moving down.
52 double velocityY() const { return data_->velocity_y; }; 56 double velocityY() const { return data_->velocity_y; };
53 // True for events dispatched after the users's gesture has finished. 57 // True for events dispatched after the users's gesture has finished.
54 bool inInertialPhase() const { return data_->is_in_inertial_phase; }; 58 bool inInertialPhase() const { return data_->is_in_inertial_phase; };
55 // True if this is the first event for this scroll. 59 // True if this is the first event for this scroll.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 explicit ScrollState(std::unique_ptr<ScrollStateData>); 99 explicit ScrollState(std::unique_ptr<ScrollStateData>);
96 100
97 std::unique_ptr<ScrollStateData> data_; 101 std::unique_ptr<ScrollStateData> data_;
98 std::deque<int> scroll_chain_; 102 std::deque<int> scroll_chain_;
99 Member<Element> element_; 103 Member<Element> element_;
100 }; 104 };
101 105
102 } // namespace blink 106 } // namespace blink
103 107
104 #endif // ScrollState_h 108 #endif // ScrollState_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698