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

Unified Diff: Source/platform/UserGestureIndicator.cpp

Issue 239963005: Fixes in UserGestureIndicator (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Now with test 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..03864e7f539cc8adeca0e4dc168a449e66110da7 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));
}
@@ -156,12 +157,12 @@ UserGestureIndicator::UserGestureIndicator(PassRefPtr<UserGestureToken> token)
} else {
m_token = s_topmostIndicator->currentToken();
if (static_cast<GestureToken*>(token.get())->hasGestures()) {
+ s_processedUserGestureInPast = true;
jochen (gone - plz use gerrit) 2014/04/17 08:25:38 here we're not really adding a gesture, we're just
vabr (Chromium) 2014/04/17 13:55:56 Good point, I will remove the line. The flag was f
static_cast<GestureToken*>(m_token.get())->addGesture();
static_cast<GestureToken*>(token.get())->consumeGesture();
}
}
s_state = DefinitelyProcessingUserGesture;
- s_processedUserGestureInPast = true;
}
ASSERT(isDefinite(s_state));
@@ -201,7 +202,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