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

Unified Diff: Source/core/page/scrolling/ScrollState.cpp

Issue 988823003: Use scroll customization primitives for touch scrolling (behind REF). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address rbyers' nit. Created 5 years, 9 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 | « Source/core/page/scrolling/ScrollState.h ('k') | Source/core/page/scrolling/ScrollState.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/scrolling/ScrollState.cpp
diff --git a/Source/core/page/scrolling/ScrollState.cpp b/Source/core/page/scrolling/ScrollState.cpp
index 28436dad133a4df127f5c74524996aa6a6e082e1..4ed9ae802049cce2f3589e1eb33dc3f2f6844795 100644
--- a/Source/core/page/scrolling/ScrollState.cpp
+++ b/Source/core/page/scrolling/ScrollState.cpp
@@ -12,24 +12,26 @@ namespace blink {
PassRefPtrWillBeRawPtr<ScrollState> ScrollState::create(double deltaX, double deltaY,
double deltaGranularity, double velocityX, double velocityY, bool inInertialPhase,
- bool isEnding, bool fromUserInput, bool shouldPropagate,
+ bool isBeginning, bool isEnding, bool fromUserInput, bool shouldPropagate,
bool deltaConsumedForScrollSequence)
{
return adoptRefWillBeNoop(new ScrollState(
deltaX, deltaY, deltaGranularity, velocityX, velocityY,
- inInertialPhase, isEnding, fromUserInput, shouldPropagate,
+ inInertialPhase, isBeginning, isEnding, fromUserInput, shouldPropagate,
deltaConsumedForScrollSequence));
}
ScrollState::ScrollState(double deltaX, double deltaY, double deltaGranularity,
- double velocityX, double velocityY, bool inInertialPhase, bool isEnding,
- bool fromUserInput, bool shouldPropagate, bool deltaConsumedForScrollSequence)
+ double velocityX, double velocityY, bool inInertialPhase, bool isBeginning,
+ bool isEnding, bool fromUserInput, bool shouldPropagate,
+ bool deltaConsumedForScrollSequence)
: m_deltaX(deltaX)
, m_deltaY(deltaY)
, m_deltaGranularity(deltaGranularity)
, m_velocityX(velocityX)
, m_velocityY(velocityY)
, m_inInertialPhase(inInertialPhase)
+ , m_isBeginning(isBeginning)
, m_isEnding(isEnding)
, m_fromUserInput(fromUserInput)
, m_shouldPropagate(shouldPropagate)
@@ -50,6 +52,12 @@ void ScrollState::consumeDelta(double x, double y, ExceptionState& exceptionStat
consumeDeltaNative(x, y);
}
+void ScrollState::distributeToScrollChainDescendant()
+{
+ if (!m_scrollChain.isEmpty())
+ m_scrollChain.takeFirst()->distributeScroll(*this);
+}
+
void ScrollState::consumeDeltaNative(double x, double y)
{
m_deltaX -= x;
« no previous file with comments | « Source/core/page/scrolling/ScrollState.h ('k') | Source/core/page/scrolling/ScrollState.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698