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

Unified Diff: third_party/WebKit/Source/core/input/EventHandler.cpp

Issue 2656843003: Do not expose is_null API for time values in Blink (Closed)
Patch Set: Created 3 years, 11 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 | third_party/WebKit/Source/core/input/GestureManager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/input/EventHandler.cpp
diff --git a/third_party/WebKit/Source/core/input/EventHandler.cpp b/third_party/WebKit/Source/core/input/EventHandler.cpp
index 31405d7b6c4e80e8f9ae74caa40cd00e674843aa..768a336489276e2453ab304e6e833313084204eb 100644
--- a/third_party/WebKit/Source/core/input/EventHandler.cpp
+++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
@@ -1663,15 +1663,14 @@ GestureEventWithHitTestResults EventHandler::targetGestureEvent(
bool shouldKeepActiveForMinInterval = false;
if (readOnly) {
hitType |= HitTestRequest::ReadOnly;
- } else if (gestureEvent.type() == WebInputEvent::GestureTap) {
+ } else if (gestureEvent.type() == WebInputEvent::GestureTap &&
+ m_gestureManager->getLastShowPressTimestamp()) {
esprehn 2017/02/01 05:25:20 getLastShowPressTimestamp() I suppose is cheap eno
majidvp 2017/02/03 15:42:27 It is cheap. Just a plain data member access.
// If the Tap is received very shortly after ShowPress, we want to
// delay clearing of the active state so that it's visible to the user
// for at least a couple of frames.
- activeInterval =
- TimeTicks::Now() - m_gestureManager->getLastShowPressTimestamp();
- shouldKeepActiveForMinInterval =
- !m_gestureManager->getLastShowPressTimestamp().isNull() &&
- activeInterval < minimumActiveInterval;
+ activeInterval = TimeTicks::Now() -
+ m_gestureManager->getLastShowPressTimestamp().value();
+ shouldKeepActiveForMinInterval = activeInterval < minimumActiveInterval;
if (shouldKeepActiveForMinInterval)
hitType |= HitTestRequest::ReadOnly;
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/input/GestureManager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698