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

Issue 2007083002: Validate that ui::Event::time_stamp comes from the same clock as TimeTicks::Now (Closed)

Created:
4 years, 7 months ago by majidvp
Modified:
4 years, 6 months ago
Reviewers:
sadrul, ccameron
CC:
chromium-reviews, tdresser+watch_chromium.org, caseq
Base URL:
https://chromium.googlesource.com/chromium/src.git@453559-use-timeticks-ui-event
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Validate that ui::Event::time_stamp comes from the same clock as TimeTicks::Now Generalize existing X11 event timestamp's clock mismatch detection logic and use it on all platforms. On X11 deviation from system clock is not exceptional so after detection we correct by falling back to TimeTicks::Now(). On all other platforms, this is an exception so we assert and fail (only on DCHECK builds). Other changes: - add hooks to allow mocking underlying tick clock used in ui/events. - fix bug in textfield double click detection logic where small timestamp values led to breakage. BUG=614409 Committed: https://crrev.com/c9cc06afc9329f475cf5efd244cc80f713728873 Cr-Commit-Position: refs/heads/master@{#401987}

Patch Set 1 #

Patch Set 2 : Add DCHECK #

Patch Set 3 : rebase #

Patch Set 4 : Rebase and use on all build on X11 #

Patch Set 5 : Fix textfield bug #

Patch Set 6 : Fix chromeos issue #

Patch Set 7 : fail fast on non-x11 #

Patch Set 8 : Remove evdev to a separate patch #

Patch Set 9 : Fix macOs and chromeOS #

Patch Set 10 : Fix macOS test #

Total comments: 6

Patch Set 11 : Address feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+91 lines, -40 lines) Patch
M chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper_browsertest.mm View 1 2 3 4 5 6 7 8 6 chunks +16 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac_unittest.mm View 1 2 3 4 5 6 7 8 9 10 4 chunks +10 lines, -1 line 0 comments Download
M ui/chromeos/ui_chromeos.gyp View 1 2 3 4 5 6 7 8 10 1 chunk +1 line, -0 lines 0 comments Download
M ui/events/base_event_utils.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +8 lines, -0 lines 0 comments Download
M ui/events/base_event_utils.cc View 2 chunks +13 lines, -0 lines 0 comments Download
M ui/events/cocoa/events_mac.mm View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M ui/events/event_utils.h View 1 2 3 4 5 6 7 2 chunks +5 lines, -4 lines 0 comments Download
M ui/events/event_utils.cc View 1 2 3 4 5 6 1 chunk +21 lines, -2 lines 0 comments Download
M ui/events/test/event_generator.cc View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M ui/events/win/events_win.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M ui/events/x/events_x.cc View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M ui/events/x/events_x_utils.cc View 1 2 3 5 chunks +4 lines, -27 lines 0 comments Download
M ui/message_center/message_center.gyp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/controls/textfield/textfield.cc View 1 2 3 4 10 1 chunk +2 lines, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 18 (10 generated)
majidvp
4 years, 6 months ago (2016-06-22 11:54:51 UTC) #6
sadrul
ui lgtm. But I do not understand the mac bits in content/ Can you get ...
4 years, 6 months ago (2016-06-23 16:38:37 UTC) #7
majidvp
https://codereview.chromium.org/2007083002/diff/180001/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm File content/browser/renderer_host/render_widget_host_view_mac_unittest.mm (right): https://codereview.chromium.org/2007083002/diff/180001/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm#newcode247 content/browser/renderer_host/render_widget_host_view_mac_unittest.mm:247: mock_clock->Advance(base::TimeDelta::FromMilliseconds(100)); On 2016/06/23 16:38:37, sadrul wrote: > What is ...
4 years, 6 months ago (2016-06-24 19:40:56 UTC) #8
majidvp
+ ccameron@: Can you please review Mac bits in content and chrome/browser.
4 years, 6 months ago (2016-06-24 19:45:33 UTC) #10
ccameron
Mac bits lgtm
4 years, 6 months ago (2016-06-24 20:24:25 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2007083002/200001
4 years, 6 months ago (2016-06-24 21:07:43 UTC) #14
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 6 months ago (2016-06-24 21:58:44 UTC) #16
commit-bot: I haz the power
4 years, 6 months ago (2016-06-24 22:00:54 UTC) #18
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/c9cc06afc9329f475cf5efd244cc80f713728873
Cr-Commit-Position: refs/heads/master@{#401987}

Powered by Google App Engine
This is Rietveld 408576698