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

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

Issue 2542693002: Use WTF::TimeTicks to represent timestamp in Platform/Core event types (Closed)
Patch Set: rebase Created 4 years 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
Index: third_party/WebKit/Source/core/input/MouseEventManager.cpp
diff --git a/third_party/WebKit/Source/core/input/MouseEventManager.cpp b/third_party/WebKit/Source/core/input/MouseEventManager.cpp
index 8052943148fe33fa2a571a38daa564dc5e7bd217..1a99cf8fcfe81a5b2fe36e4e67721574b17df9bc 100644
--- a/third_party/WebKit/Source/core/input/MouseEventManager.cpp
+++ b/third_party/WebKit/Source/core/input/MouseEventManager.cpp
@@ -63,11 +63,11 @@ const double kFakeMouseMoveInterval = 0.1;
#if OS(MACOSX)
const int kDragThresholdX = 3;
const int kDragThresholdY = 3;
-const double kTextDragDelay = 0.15;
+const TimeDelta kTextDragDelay = TimeDelta::FromSecondsD(0.15);
#else
const int kDragThresholdX = 4;
const int kDragThresholdY = 4;
-const double kTextDragDelay = 0.0;
+const TimeDelta kTextDragDelay = TimeDelta::FromSecondsD(0.0);
#endif
} // namespace
@@ -97,7 +97,7 @@ void MouseEventManager::clear() {
m_clickCount = 0;
m_clickNode = nullptr;
m_mouseDownPos = IntPoint();
- m_mouseDownTimestamp = 0;
+ m_mouseDownTimestamp = TimeTicks();
m_mouseDown = PlatformMouseEvent();
m_svgPan = false;
m_dragStartPos = LayoutPoint();
@@ -304,8 +304,8 @@ void MouseEventManager::fakeMouseMoveEventTimerFired(TimerBase* timer) {
WebPointerProperties::Button::NoButton, PlatformEvent::MouseMoved, 0,
static_cast<PlatformEvent::Modifiers>(
KeyboardEventManager::getCurrentModifierState()),
- PlatformMouseEvent::RealOrIndistinguishable,
- monotonicallyIncreasingTime(), WebPointerProperties::PointerType::Mouse);
+ PlatformMouseEvent::RealOrIndistinguishable, TimeTicks::Now(),
+ WebPointerProperties::PointerType::Mouse);
Vector<PlatformMouseEvent> coalescedEvents;
m_frame->eventHandler().handleMouseMoveEvent(fakeMouseMoveEvent,
coalescedEvents);
@@ -656,7 +656,7 @@ bool MouseEventManager::handleDragDropIfPossible(
WebPointerProperties::Button::Left, PlatformEvent::MousePressed, 1,
static_cast<PlatformEvent::Modifiers>(modifiers |
PlatformEvent::LeftButtonDown),
- PlatformMouseEvent::FromTouch, WTF::monotonicallyIncreasingTime(),
+ PlatformMouseEvent::FromTouch, TimeTicks::Now(),
WebPointerProperties::PointerType::Mouse);
m_mouseDown = mouseDownEvent;
@@ -665,7 +665,7 @@ bool MouseEventManager::handleDragDropIfPossible(
WebPointerProperties::Button::Left, PlatformEvent::MouseMoved, 1,
static_cast<PlatformEvent::Modifiers>(modifiers |
PlatformEvent::LeftButtonDown),
- PlatformMouseEvent::FromTouch, WTF::monotonicallyIncreasingTime(),
+ PlatformMouseEvent::FromTouch, TimeTicks::Now(),
WebPointerProperties::PointerType::Mouse);
HitTestRequest request(HitTestRequest::ReadOnly);
MouseEventWithHitTestResults mev =
« no previous file with comments | « third_party/WebKit/Source/core/input/MouseEventManager.h ('k') | third_party/WebKit/Source/core/input/TouchEventManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698