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

Unified Diff: ui/views/controls/textfield/textfield.cc

Issue 2007083002: Validate that ui::Event::time_stamp comes from the same clock as TimeTicks::Now (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@453559-use-timeticks-ui-event
Patch Set: Address feedback Created 4 years, 6 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 | « ui/message_center/message_center.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/textfield/textfield.cc
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc
index 85c318a03008ae83a4b8f43515478ff3866f0e4a..e1cc9d40294a54f88c6a5e8302f1dba178566694 100644
--- a/ui/views/controls/textfield/textfield.cc
+++ b/ui/views/controls/textfield/textfield.cc
@@ -1868,7 +1868,8 @@ void Textfield::UpdateContextMenu() {
void Textfield::TrackMouseClicks(const ui::MouseEvent& event) {
if (event.IsOnlyLeftMouseButton()) {
base::TimeDelta time_delta = event.time_stamp() - last_click_time_;
- if (time_delta.InMilliseconds() <= GetDoubleClickInterval() &&
+ if (!last_click_time_.is_null() &&
+ time_delta.InMilliseconds() <= GetDoubleClickInterval() &&
!ExceededDragThreshold(event.location() - last_click_location_)) {
// Upon clicking after a triple click, the count should go back to double
// click and alternate between double and triple. This assignment maps
« no previous file with comments | « ui/message_center/message_center.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698