Last Comment Bug 785076 - [AccessFu] Work around timestamp issue in emulated touch events.
: [AccessFu] Work around timestamp issue in emulated touch events.
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Disability Access APIs (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla17
Assigned To: Eitan Isaacson [:eeejay]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-23 07:45 PDT by Eitan Isaacson [:eeejay]
Modified: 2012-08-23 19:20 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Work around touch emulation timestamp issue. (2.77 KB, patch)
2012-08-23 07:50 PDT, Eitan Isaacson [:eeejay]
dbolter: review+
Details | Diff | Splinter Review

Description Eitan Isaacson [:eeejay] 2012-08-23 07:45:31 PDT

    
Comment 1 Eitan Isaacson [:eeejay] 2012-08-23 07:50:55 PDT
Created attachment 654615 [details] [diff] [review]
Work around touch emulation timestamp issue.
Comment 2 David Bolter [:davidb] 2012-08-23 08:16:37 PDT
Comment on attachment 654615 [details] [diff] [review]
Work around touch emulation timestamp issue.

Review of attachment 654615 [details] [diff] [review]:
-----------------------------------------------------------------

r=me with considerations below:

::: accessible/src/jsat/TouchAdapter.jsm
@@ +87,5 @@
>      let touches = aEvent.changedTouches;
> +    // XXX: Until bug 77992 is resolved, on desktop we get microseconds
> +    // instead of milliseconds.
> +    let timeStamp = (Utils.OS == 'Android') ? aEvent.timeStamp :
> +      new Date().getTime();

Date.now() is much faster than (new Date()).getTime();

Also, you could call timeStamp "time" or "now" if you wanted.
Comment 3 Eitan Isaacson [:eeejay] 2012-08-23 08:34:04 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/d636babbf532

Thanks for the Date.now() tip..
Comment 4 David Bolter [:davidb] 2012-08-23 10:48:09 PDT
(In reply to Eitan Isaacson [:eeejay] from comment #3)
> https://hg.mozilla.org/integration/mozilla-inbound/rev/d636babbf532
> 
> Thanks for the Date.now() tip..

I really shouldn't give dating tips.
Comment 5 Ryan VanderMeulen [:RyanVM] 2012-08-23 19:20:47 PDT
https://hg.mozilla.org/mozilla-central/rev/d636babbf532

Note You need to log in before you can comment on or make changes to this bug.