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

Unified Diff: Source/platform/UserGestureIndicator.cpp

Issue 239963005: Fixes in UserGestureIndicator (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Comments addressed, tests fixed Created 6 years, 8 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 | « no previous file | Source/web/tests/WebUserGestureTokenTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/UserGestureIndicator.cpp
diff --git a/Source/platform/UserGestureIndicator.cpp b/Source/platform/UserGestureIndicator.cpp
index dbebd06a9ddc724f81f454e1af6366d3c0ae55fb..b2d90814dc678a69bf2b1fc6453be130c9689e92 100644
--- a/Source/platform/UserGestureIndicator.cpp
+++ b/Source/platform/UserGestureIndicator.cpp
@@ -130,14 +130,15 @@ UserGestureIndicator::UserGestureIndicator(ProcessingUserGestureState state)
m_token = s_topmostIndicator->currentToken();
}
s_state = state;
- if (state == DefinitelyProcessingNewUserGesture || state == DefinitelyProcessingUserGesture)
- s_processedUserGestureInPast = true;
}
- if (state == DefinitelyProcessingNewUserGesture)
+ if (state == DefinitelyProcessingNewUserGesture) {
static_cast<GestureToken*>(m_token.get())->addGesture();
- else if (state == DefinitelyProcessingUserGesture && s_topmostIndicator == this)
+ s_processedUserGestureInPast = true;
+ } else if (state == DefinitelyProcessingUserGesture && s_topmostIndicator == this) {
static_cast<GestureToken*>(m_token.get())->addGesture();
+ s_processedUserGestureInPast = true;
+ }
ASSERT(isDefinite(s_state));
}
@@ -161,7 +162,6 @@ UserGestureIndicator::UserGestureIndicator(PassRefPtr<UserGestureToken> token)
}
}
s_state = DefinitelyProcessingUserGesture;
- s_processedUserGestureInPast = true;
}
ASSERT(isDefinite(s_state));
@@ -201,7 +201,7 @@ UserGestureToken* UserGestureIndicator::currentToken()
void UserGestureIndicator::clearProcessedUserGestureInPast()
{
if (isMainThread())
- s_processedUserGestureInPast = true;
+ s_processedUserGestureInPast = false;
}
bool UserGestureIndicator::processedUserGestureInPast()
« no previous file with comments | « no previous file | Source/web/tests/WebUserGestureTokenTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698